subroutine f_esmf_gridcreate1peridim(gridp, maxIndex, len1, &
polekindflag, len2, &
periodicDim, &
poleDim, &
coordSys, &
coordTypeKind, &
indexflag, rc)
use ESMF_UtilTypesMod
use ESMF_LogErrMod
use ESMF_GridMod
implicit none
! arguments
type(ESMF_Pointer) :: gridp
integer, intent(in) :: len1, len2
integer :: maxIndex(1:len1)
type(ESMF_PoleKind_Flag), optional :: polekindflag(1:len2)
integer, optional :: periodicDim
integer, optional :: poleDim
type(ESMF_CoordSys_Flag), optional :: coordSys
type(ESMF_TypeKind_Flag), optional :: coordTypeKind
type(ESMF_Index_Flag), optional :: indexflag
integer, intent(out), optional :: rc
type(ESMF_Grid) :: grid
integer :: poleDim_Loc
! initialize return code; assume routine not implemented
rc = ESMF_RC_NOT_IMPL
! set default for poleDim
if (present(poleDim)) then
poleDim_Loc = poleDim
else
poleDim_Loc = 2
endif
grid = ESMF_GridCreate1PeriDim(maxIndex=maxIndex, &
polekindflag=polekindflag, &
periodicDim=periodicDim, &
poleDim=poleDim_Loc, &
coordSys=coordSys, &
coordTypeKind=coordTypeKind, &
indexflag=indexflag, &
rc=rc)
if (ESMF_LogFoundError(rc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
gridp = grid%this
rc = ESMF_SUCCESS
end subroutine f_esmf_gridcreate1peridim