subroutine f_esmf_gridcreatenoperidim(gridp, maxIndex, len1, &
coordSys, cspresent, &
coordTypeKind, ctkpresent, &
indexflag, rc)
use ESMF_UtilTypesMod
use ESMF_LogErrMod
use ESMF_GridMod
implicit none
! arguments
type(ESMF_Pointer) :: gridp
integer, intent(in) :: len1
integer :: maxIndex(1:len1)
integer :: cspresent, ctkpresent
type(ESMF_CoordSys_Flag) :: coordSys
type(ESMF_TypeKind_Flag) :: coordTypeKind
type(ESMF_Index_Flag) :: indexflag
integer, intent(out) :: rc
type(ESMF_Grid) :: grid
! initialize return code; assume routine not implemented
rc = ESMF_RC_NOT_IMPL
! handle the optional arguments
if (cspresent == 0 .and. ctkpresent == 0) then
grid = ESMF_GridCreateNoPeriDim(maxIndex=maxIndex, &
indexflag=indexflag, rc=rc)
elseif (cspresent == 0 .and. ctkpresent == 1) then
grid = ESMF_GridCreateNoPeriDim(maxIndex=maxIndex, &
coordTypeKind=coordTypeKind, &
indexflag=indexflag, rc=rc)
elseif (cspresent == 1 .and. ctkpresent == 0) then
grid = ESMF_GridCreateNoPeriDim(maxIndex=maxIndex, &
coordSys=coordSys, &
indexflag=indexflag, rc=rc)
elseif (cspresent == 1 .and. ctkpresent == 1) then
grid = ESMF_GridCreateNoPeriDim(maxIndex=maxIndex, &
coordSys=coordSys, &
coordTypeKind=coordTypeKind, &
indexflag=indexflag, rc=rc)
endif
if (ESMF_LogFoundError(rc, ESMF_ERR_PASSTHRU, &
ESMF_CONTEXT, rcToReturn=rc)) return
gridp=grid%this
rc = ESMF_SUCCESS
end subroutine f_esmf_gridcreatenoperidim