ESMF_GridLUA1PeriDim Subroutine

private subroutine ESMF_GridLUA1PeriDim(dimCount, periodicDim, lWidthIn, uWidthIn, alignIn, lWidthOut, uWidthOut, alignOut, rc)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: dimCount
integer, intent(in) :: periodicDim
integer, intent(in), optional, target :: lWidthIn(:)
integer, intent(in), optional, target :: uWidthIn(:)
integer, intent(in), optional, target :: alignIn(:)
integer, intent(out), target :: lWidthOut(:)
integer, intent(out), target :: uWidthOut(:)
integer, intent(out), target :: alignOut(:)
integer, intent(out), optional :: rc

Calls

proc~~esmf_gridlua1peridim~~CallsGraph proc~esmf_gridlua1peridim ESMF_GridLUA1PeriDim proc~esmf_gridluadefault ESMF_GridLUADefault proc~esmf_gridlua1peridim->proc~esmf_gridluadefault proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_gridlua1peridim->proc~esmf_logfounderror proc~esmf_logseterror ESMF_LogSetError proc~esmf_gridlua1peridim->proc~esmf_logseterror proc~esmf_gridluadefault->proc~esmf_logfounderror proc~esmf_gridluadefault->proc~esmf_logseterror c_esmc_gridluadefault c_esmc_gridluadefault proc~esmf_gridluadefault->c_esmc_gridluadefault interface~esmf_interarraycreate ESMF_InterArrayCreate proc~esmf_gridluadefault->interface~esmf_interarraycreate proc~esmf_interarraydestroy ESMF_InterArrayDestroy proc~esmf_gridluadefault->proc~esmf_interarraydestroy 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 proc~esmf_logseterror->esmf_breakpoint proc~esmf_logseterror->proc~esmf_logrc2msg proc~esmf_logseterror->proc~esmf_logwrite proc~esmf_interarraycreateptr ESMF_InterArrayCreatePtr interface~esmf_interarraycreate->proc~esmf_interarraycreateptr proc~esmf_interarraycreatetrg ESMF_InterArrayCreateTrg interface~esmf_interarraycreate->proc~esmf_interarraycreatetrg proc~esmf_logfounddeallocerror ESMF_LogFoundDeallocError proc~esmf_interarraydestroy->proc~esmf_logfounddeallocerror 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_interarraycreateptr->proc~esmf_logfounderror proc~esmf_interarraycreateptr->proc~esmf_logseterror c_esmc_interarraycreate1d c_esmc_interarraycreate1d proc~esmf_interarraycreateptr->c_esmc_interarraycreate1d c_esmc_interarraycreate1di8 c_esmc_interarraycreate1di8 proc~esmf_interarraycreateptr->c_esmc_interarraycreate1di8 c_esmc_interarraycreate1dr8 c_esmc_interarraycreate1dr8 proc~esmf_interarraycreateptr->c_esmc_interarraycreate1dr8 c_esmc_interarraycreate2d c_esmc_interarraycreate2d proc~esmf_interarraycreateptr->c_esmc_interarraycreate2d c_esmc_interarraycreate2di8 c_esmc_interarraycreate2di8 proc~esmf_interarraycreateptr->c_esmc_interarraycreate2di8 c_esmc_interarraycreate2dr8 c_esmc_interarraycreate2dr8 proc~esmf_interarraycreateptr->c_esmc_interarraycreate2dr8 c_esmc_interarraycreate3d c_esmc_interarraycreate3d proc~esmf_interarraycreateptr->c_esmc_interarraycreate3d c_esmc_interarraycreate3di8 c_esmc_interarraycreate3di8 proc~esmf_interarraycreateptr->c_esmc_interarraycreate3di8 c_esmc_interarraycreate3dr8 c_esmc_interarraycreate3dr8 proc~esmf_interarraycreateptr->c_esmc_interarraycreate3dr8 c_esmc_interarraysetinvalid c_esmc_interarraysetinvalid proc~esmf_interarraycreateptr->c_esmc_interarraysetinvalid proc~esmf_interarraycreatetrg->proc~esmf_logfounderror proc~esmf_interarraycreatetrg->interface~esmf_interarraycreate proc~esmf_interarraycreatetrg->c_esmc_interarraysetinvalid 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_logfounddeallocerror->esmf_breakpoint proc~esmf_logfounddeallocerror->proc~esmf_logrc2msg proc~esmf_logfounddeallocerror->proc~esmf_logwrite proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Called by

proc~~esmf_gridlua1peridim~~CalledByGraph proc~esmf_gridlua1peridim ESMF_GridLUA1PeriDim proc~esmf_gridcreate1peridimi ESMF_GridCreate1PeriDimI proc~esmf_gridcreate1peridimi->proc~esmf_gridlua1peridim proc~esmf_gridcreate1peridimr ESMF_GridCreate1PeriDimR proc~esmf_gridcreate1peridimr->proc~esmf_gridlua1peridim interface~esmf_gridcreate1peridim ESMF_GridCreate1PeriDim interface~esmf_gridcreate1peridim->proc~esmf_gridcreate1peridimi interface~esmf_gridcreate1peridim->proc~esmf_gridcreate1peridimr

Source Code

      subroutine ESMF_GridLUA1PeriDim(dimCount, periodicDim, &
                                     lWidthIn, uWidthIn, alignIn, &
                                     lWidthOut, uWidthOut, alignOut, &
                                     rc)
!
! !ARGUMENTS:
       integer,               intent(in)              :: dimCount
       integer,               intent(in)              :: periodicDim
       integer,       target, intent(in),   optional  :: lWidthIn(:)
       integer,       target, intent(in),   optional  :: uWidthIn(:)
       integer,       target, intent(in),   optional  :: alignIn(:)
       integer,       target, intent(out)             :: lWidthOut(:)
       integer,       target, intent(out)             :: uWidthOut(:)
       integer,       target, intent(out)             :: alignOut(:)
       integer,               intent(out),  optional  :: rc
!
! !DESCRIPTION:
! This routine sets the default values of the lwidth, uwidth, and align
! based on the user's passed in values for these.
!
! The arguments are:
! \begin{description}
! \item[{[lWidthIn]}]
!     The lower width from the user.
! \item[{[uWidthIn]}]
!     The upper width from the user.
! \item[{[alignIn]}]
!     The lower width from the user.
! \item[{[lWidthOut]}]
!     The lower width based on user input.
! \item[{[uWidthIn]}]
!     The upper width based on user input.
! \item[{[alignIn]}]
!     The lower width based on user input.
! \item[{[rc]}]
!      Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
! \end{description}
!
!EOPI
    integer :: localrc ! local error status

    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    ! Check DimCount of gridWidths and Aligns
    if (present(lWidthIn)) then
        if (size(lWidthIn) /= dimCount) then
           call ESMF_LogSetError(rcToCheck=ESMF_RC_ARG_SIZE, &
                     msg="- gridEdgeLWidth must be of size equal to Grid dimCount", &
                     ESMF_CONTEXT, rcToReturn=rc)
              return
        endif
        if (lWidthIn(periodicDim) /= 0) then
           call ESMF_LogSetError(rcToCheck=ESMF_RC_ARG_SIZE, &
                     msg="- gridEdgeLWidth must be of size 0 on the periodic dimension", &
                     ESMF_CONTEXT, rcToReturn=rc)
              return
        endif
    endif

    if (present(uWidthIn)) then
        if (size(uWidthIn) /= dimCount) then
           call ESMF_LogSetError(rcToCheck=ESMF_RC_ARG_SIZE, &
                     msg="- gridEdgeUWidth must be of size equal to Grid dimCount", &
                     ESMF_CONTEXT, rcToReturn=rc)
              return
        endif
        if (uWidthIn(periodicDim) /= 0) then
           call ESMF_LogSetError(rcToCheck=ESMF_RC_ARG_SIZE, &
                     msg="- gridEdgeUWidth must be of size 0 on the periodic dimension", &
                     ESMF_CONTEXT, rcToReturn=rc)
              return
        endif
    endif

    call ESMF_GridLUADefault(dimCount, &
         lWidthIn, uWidthIn, alignIn, &
         lWidthOut, uWidthOut, alignOut, localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, &
         ESMF_CONTEXT, rcToReturn=rc)) return

    ! Make default 0 for periodic dimension
    lWidthOut(periodicDim)=0
    uWidthOut(periodicDim)=0

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

    end subroutine ESMF_GridLUA1PeriDim