ESMF_XGridGeomBaseDeserialize Function

public function ESMF_XGridGeomBaseDeserialize(buffer, offset, attreconflag, rc)

Arguments

Type IntentOptional Attributes Name
character(len=1), pointer, dimension(:) :: buffer
integer, intent(inout) :: offset
type(ESMF_AttReconcileFlag), optional :: attreconflag
integer, intent(out), optional :: rc

Return Value type(ESMF_XGridGeomBase)


Calls

proc~~esmf_xgridgeombasedeserialize~~CallsGraph proc~esmf_xgridgeombasedeserialize ESMF_XGridGeomBaseDeserialize c_esmc_vmaddfobject c_esmc_vmaddfobject proc~esmf_xgridgeombasedeserialize->c_esmc_vmaddfobject c_esmc_xgridgeombasedeserialize c_esmc_xgridgeombasedeserialize proc~esmf_xgridgeombasedeserialize->c_esmc_xgridgeombasedeserialize proc~esmf_griddeserialize ESMF_GridDeserialize proc~esmf_xgridgeombasedeserialize->proc~esmf_griddeserialize proc~esmf_logfoundallocerror ESMF_LogFoundAllocError proc~esmf_xgridgeombasedeserialize->proc~esmf_logfoundallocerror proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_xgridgeombasedeserialize->proc~esmf_logfounderror proc~esmf_meshdeserialize ESMF_MeshDeserialize proc~esmf_xgridgeombasedeserialize->proc~esmf_meshdeserialize proc~esmf_griddeserialize->proc~esmf_logfounderror c_esmc_griddeserialize c_esmc_griddeserialize proc~esmf_griddeserialize->c_esmc_griddeserialize esmf_breakpoint esmf_breakpoint proc~esmf_logfoundallocerror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfoundallocerror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfoundallocerror->proc~esmf_logwrite proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logfounderror->proc~esmf_logwrite proc~esmf_meshdeserialize->proc~esmf_logfounderror c_esmc_meshdeserialize c_esmc_meshdeserialize proc~esmf_meshdeserialize->c_esmc_meshdeserialize c_esmc_loggeterrormsg c_esmc_loggeterrormsg proc~esmf_logrc2msg->c_esmc_loggeterrormsg c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array proc~esmf_logclose->proc~esmf_logflush proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_logflush->proc~esmf_utilarray2string proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Called by

proc~~esmf_xgridgeombasedeserialize~~CalledByGraph proc~esmf_xgridgeombasedeserialize ESMF_XGridGeomBaseDeserialize proc~esmf_xgriddeserialize ESMF_XGridDeserialize proc~esmf_xgriddeserialize->proc~esmf_xgridgeombasedeserialize proc~checkproxy checkProxy proc~checkproxy->proc~esmf_xgriddeserialize proc~esmf_geomdeserialize ESMF_GeomDeserialize proc~esmf_geomdeserialize->proc~esmf_xgriddeserialize proc~esmf_fielddeserialize ESMF_FieldDeserialize proc~esmf_fielddeserialize->proc~esmf_geomdeserialize proc~test_regrid2xg_online test_regrid2xg_online proc~test_regrid2xg_online->proc~checkproxy proc~test_regrid2xgsph~2 test_regrid2xgSph proc~test_regrid2xgsph~2->proc~checkproxy proc~esmf_reconciledeserialize ESMF_ReconcileDeserialize proc~esmf_reconciledeserialize->proc~esmf_fielddeserialize proc~esmf_reconciledeserializeall ESMF_ReconcileDeserializeAll proc~esmf_reconciledeserializeall->proc~esmf_fielddeserialize proc~test7d4_generic test7d4_generic proc~test7d4_generic->proc~esmf_fielddeserialize

Source Code

      function ESMF_XGridGeomBaseDeserialize(buffer, offset, attreconflag, rc)
!
! !RETURN VALUE:
      type(ESMF_XGridGeomBase) :: ESMF_XGridGeomBaseDeserialize
!
! !ARGUMENTS:
      character, pointer, dimension(:)      :: buffer
      integer, intent(inout)                :: offset
      type(ESMF_AttReconcileFlag), optional :: attreconflag
      integer, intent(out), optional        :: rc
!
! !DESCRIPTION:
!      Takes a byte-stream buffer and reads the information needed to
!      recreate a Grid object.  Recursively calls the deserialize routines
!      needed to recreate the subobjects.
!      Expected to be used by {\tt ESMF\_StateReconcile()}.
!
!     The arguments are:
!     \begin{description}
!     \item [buffer]
!           Data buffer which holds the serialized information.
!     \item [offset]
!           Current read offset in the current buffer.  This will be
!           updated by this routine and return pointing to the next
!           unread byte in the buffer.
!     \item[{[attreconflag]}]
!           Flag to tell if Attribute serialization is to be done
!     \item [{[rc]}]
!           Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!     \end{description}
!
!EOPI
    type(ESMF_XGridGeomBaseClass),pointer :: gbcp
    integer :: localrc
    type(ESMF_AttReconcileFlag) :: lattreconflag

    ! Initialize return code; assume failure until success is certain
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    ! deal with optional attreconflag
    if (present(attreconflag)) then
      lattreconflag = attreconflag
    else
      lattreconflag = ESMF_ATTRECONCILE_OFF
    endif

    ! allocate GeomBase type
    allocate(gbcp, stat=localrc)
    if (ESMF_LogFoundAllocError(localrc, msg="Allocating GeomBase type object", &
                                     ESMF_CONTEXT,  &
                                     rcToReturn=rc)) return

    ! serialize GeomBase info
    call c_ESMC_XGridGeomBaseDeserialize(gbcp%type%type,        &
                                    gbcp%staggerloc%staggerloc, &
                                    gbcp%meshloc%meshloc, &
                                    buffer, offset, localrc)
    if (ESMF_LogFoundError(localrc, &
   ESMF_ERR_PASSTHRU, &
   ESMF_CONTEXT, rcToReturn=rc)) return

    ! Get info depending on type
    select case(gbcp%type%type)

     case (ESMF_XGRIDGEOMTYPE_GRID%type) ! Grid
        gbcp%grid=ESMF_GridDeserialize(buffer=buffer, &
            offset=offset, attreconflag=lattreconflag, rc=localrc)
        if (ESMF_LogFoundError(localrc, &
           ESMF_ERR_PASSTHRU, &
           ESMF_CONTEXT, rcToReturn=rc)) return

     case (ESMF_XGRIDGEOMTYPE_MESH%type)
        gbcp%mesh=ESMF_MeshDeserialize(buffer=buffer, &
            offset=offset, rc=localrc)
        if (ESMF_LogFoundError(localrc, &
           ESMF_ERR_PASSTHRU, &
           ESMF_CONTEXT, rcToReturn=rc)) return


     case default
       if (ESMF_LogFoundError(ESMF_RC_ARG_VALUE, &
           msg=" Bad type value", &
           ESMF_CONTEXT, rcToReturn=rc)) return
    end select


    ! Set pointer
    ESMF_XGridGeomBaseDeserialize%gbcp=>gbcp

    ! Add reference to this object into ESMF garbage collection table
    call c_ESMC_VMAddFObject(ESMF_XGridGeomBaseDeserialize, ESMF_ID_GEOMBASE%objectID)

   ! Set init status
    ESMF_INIT_SET_CREATED(ESMF_XGridGeomBaseDeserialize)

    if  (present(rc)) rc = ESMF_SUCCESS

    end function ESMF_XGridGeomBaseDeserialize