ESMF_GridEmptyCreate Function

public function ESMF_GridEmptyCreate(keywordEnforcer, vm, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
type(ESMF_VM), intent(in), optional :: vm
integer, intent(out), optional :: rc

Return Value type(ESMF_Grid)


Calls

proc~~esmf_gridemptycreate~~CallsGraph proc~esmf_gridemptycreate ESMF_GridEmptyCreate c_esmc_gridcreateempty c_esmc_gridcreateempty proc~esmf_gridemptycreate->c_esmc_gridcreateempty proc~esmf_imerr ESMF_IMErr proc~esmf_gridemptycreate->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_gridemptycreate->proc~esmf_logfounderror proc~esmf_vmgetinit ESMF_VMGetInit proc~esmf_gridemptycreate->proc~esmf_vmgetinit proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep esmf_breakpoint esmf_breakpoint proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfounderror->proc~esmf_logwrite 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_gridemptycreate~~CalledByGraph proc~esmf_gridemptycreate ESMF_GridEmptyCreate proc~initializeipdv05p4 InitializeIPDv05p4 proc~initializeipdv05p4->proc~esmf_gridemptycreate proc~test_atnas_gridindex test_atnas_gridindex proc~test_atnas_gridindex->proc~esmf_gridemptycreate program~esmf_gridarbitraryutest ESMF_GridArbitraryUTest program~esmf_gridarbitraryutest->proc~esmf_gridemptycreate program~esmf_gridcoordutest ESMF_GridCoordUTest program~esmf_gridcoordutest->proc~esmf_gridemptycreate program~esmf_gridcreateex ESMF_GridCreateEx program~esmf_gridcreateex->proc~esmf_gridemptycreate program~esmf_gridcreateutest ESMF_GridCreateUTest program~esmf_gridcreateutest->proc~esmf_gridemptycreate program~esmf_fieldcreategetutest ESMF_FieldCreateGetUTest program~esmf_fieldcreategetutest->proc~test_atnas_gridindex

Source Code

     function ESMF_GridEmptyCreate(keywordEnforcer, vm, rc)
!
! !RETURN VALUE:
     type(ESMF_Grid) :: ESMF_GridEmptyCreate
!
! !ARGUMENTS:
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
       type(ESMF_VM),           intent(in),  optional :: vm
       integer,                 intent(out), optional :: rc
!
! !STATUS:
! \begin{itemize}
! \item\apiStatusCompatibleVersion{5.2.0r}
! \item\apiStatusModifiedSinceVersion{5.2.0r}
! \begin{description}
! \item[7.1.0r] Added argument {\tt vm} to support object creation on a
!               different VM than that of the current context.
! \end{description}
! \end{itemize}
!
! !DESCRIPTION:
! Partially create an {\tt ESMF\_Grid} object. This function allocates
! an {\tt ESMF\_Grid} object, but doesn't allocate any coordinate storage or other
! internal structures. The {\tt ESMF\_GridEmptyComplete()} calls
! can be used to set the values in the grid object and to construct the
! internal structure.
!
! The arguments are:
! \begin{description}
! \item[{[vm]}]
!     If present, the Grid object is created on the specified
!     {\tt ESMF\_VM} object. The default is to create on the VM of the
!     current context.
! \item[{[rc]}]
!      Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
! \end{description}
!
!EOP

    integer :: localrc ! local error status
    type(ESMF_Grid) :: grid

    ! Initialize this grid object as invalid
    grid%this = ESMF_NULL_POINTER
    
    ! Check init status of arguments
    if (present(vm)) then
      ESMF_INIT_CHECK_DEEP_SHORT(ESMF_VMGetInit, vm, rc)
    endif

    ! Call C++ Subroutine to do the create
    call c_ESMC_gridcreateempty(grid%this, vm, localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
      ESMF_CONTEXT, rcToReturn=rc)) return

    ! Set return value
    ESMF_GridEmptyCreate = grid

    ! Set init status
    ESMF_INIT_SET_CREATED(ESMF_GridEmptyCreate)

    ! Return successfully
    if (present(rc)) rc = ESMF_SUCCESS

  end function ESMF_GridEmptyCreate