ESMF_LocStreamGetKeyI4 Subroutine

private subroutine ESMF_LocStreamGetKeyI4(locstream, keyName, keywordEnforcer, localDE, exclusiveLBound, exclusiveUBound, exclusiveCount, computationalLBound, computationalUBound, computationalCount, totalLBound, totalUBound, totalCount, farray, datacopyflag, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_LocStream), intent(in) :: locstream
character(len=*), intent(in) :: keyName
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(in), optional :: localDE
integer, intent(out), optional :: exclusiveLBound
integer, intent(out), optional :: exclusiveUBound
integer, intent(out), optional :: exclusiveCount
integer, intent(out), optional :: computationalLBound
integer, intent(out), optional :: computationalUBound
integer, intent(out), optional :: computationalCount
integer, intent(out), optional :: totalLBound
integer, intent(out), optional :: totalUBound
integer, intent(out), optional :: totalCount
integer(kind=ESMF_KIND_I4), pointer :: farray(:)
type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag
integer, intent(out), optional :: rc

Calls

proc~~esmf_locstreamgetkeyi4~~CallsGraph proc~esmf_locstreamgetkeyi4 ESMF_LocStreamGetKeyI4 c_esmc_locstreamgetkeybnds c_esmc_locstreamgetkeybnds proc~esmf_locstreamgetkeyi4->c_esmc_locstreamgetkeybnds esmf_arrayget esmf_arrayget proc~esmf_locstreamgetkeyi4->esmf_arrayget esmf_localarrayget esmf_localarrayget proc~esmf_locstreamgetkeyi4->esmf_localarrayget proc~esmf_imerr ESMF_IMErr proc~esmf_locstreamgetkeyi4->proc~esmf_imerr proc~esmf_locstreamgetinit ESMF_LocStreamGetInit proc~esmf_locstreamgetkeyi4->proc~esmf_locstreamgetinit proc~esmf_locstreamgetkeyarray ESMF_LocStreamGetKeyArray proc~esmf_locstreamgetkeyi4->proc~esmf_locstreamgetkeyarray proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_locstreamgetkeyi4->proc~esmf_logfounderror proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep proc~esmf_locstreamgetkeyarray->proc~esmf_imerr proc~esmf_locstreamgetkeyarray->proc~esmf_locstreamgetinit proc~esmf_locstreamgetkeyarray->proc~esmf_logfounderror 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_locstreamgetkeyi4~~CalledByGraph proc~esmf_locstreamgetkeyi4 ESMF_LocStreamGetKeyI4 interface~esmf_locstreamgetkey ESMF_LocStreamGetKey interface~esmf_locstreamgetkey->proc~esmf_locstreamgetkeyi4 proc~esmf_locstreamcreatebybkgmesh ESMF_LocStreamCreateByBkgMesh proc~esmf_locstreamcreatebybkgmesh->interface~esmf_locstreamgetkey proc~esmf_locstreamgetpntlist ESMF_LocStreamGetPntList proc~esmf_locstreamcreatebybkgmesh->proc~esmf_locstreamgetpntlist proc~esmf_locstreamgetpntlist->interface~esmf_locstreamgetkey proc~esmf_locstreamprint ESMF_LocStreamPrint proc~esmf_locstreamprint->interface~esmf_locstreamgetkey proc~esmf_pointlistcreatefrmlocstream ESMF_PointListCreateFrmLocStream proc~esmf_pointlistcreatefrmlocstream->interface~esmf_locstreamgetkey proc~f_esmf_locstreamgetkeyarray f_esmf_locstreamgetkeyarray proc~f_esmf_locstreamgetkeyarray->interface~esmf_locstreamgetkey proc~test_locstreambkg test_locstreambkg proc~test_locstreambkg->interface~esmf_locstreamgetkey proc~test_locstreambkgnda test_locstreambkgnda proc~test_locstreambkgnda->interface~esmf_locstreamgetkey proc~test_locstreambkgsph test_locstreambkgsph proc~test_locstreambkgsph->interface~esmf_locstreamgetkey proc~test_nearest2dcartlstols test_Nearest2DCartLSToLS proc~test_nearest2dcartlstols->interface~esmf_locstreamgetkey proc~test_nearest3dcartlstols test_Nearest3DCartLSToLS proc~test_nearest3dcartlstols->interface~esmf_locstreamgetkey proc~test_patchmeshtolocstreammask test_PatchMeshToLocStreamMask proc~test_patchmeshtolocstreammask->interface~esmf_locstreamgetkey proc~test_pointlist_from_locstream_wmask test_pointlist_from_locStream_wmask proc~test_pointlist_from_locstream_wmask->interface~esmf_locstreamgetkey proc~test_regridgridtogml test_regridGridToGML proc~test_regridgridtogml->interface~esmf_locstreamgetkey proc~test_regridgridtolocstream3d test_regridGridToLocStream3d proc~test_regridgridtolocstream3d->interface~esmf_locstreamgetkey proc~test_regridgridtolocstreamloccnt test_regridGridToLocStreamLocCnt proc~test_regridgridtolocstreamloccnt->interface~esmf_locstreamgetkey proc~test_regridgridtolocstreamregdist test_regridGridToLocStreamRegDist proc~test_regridgridtolocstreamregdist->interface~esmf_locstreamgetkey proc~test_regridmeshtolocstreammask test_regridMeshToLocStreamMask proc~test_regridmeshtolocstreammask->interface~esmf_locstreamgetkey proc~test_regridnearestlocstream_wclustertomesh test_regridNearestLocStream_wClusterToMesh proc~test_regridnearestlocstream_wclustertomesh->interface~esmf_locstreamgetkey proc~test_regridnearestlocstreamtogrid test_regridNearestLocStreamToGrid proc~test_regridnearestlocstreamtogrid->interface~esmf_locstreamgetkey proc~test_regridnearestlocstreamtolocstream test_regridNearestLocStreamToLocStream proc~test_regridnearestlocstreamtolocstream->interface~esmf_locstreamgetkey proc~user_init~23 user_init proc~user_init~23->interface~esmf_locstreamgetkey proc~user_run~24 user_run proc~user_run~24->interface~esmf_locstreamgetkey program~esmf_locstreamcreateutest ESMF_LocStreamCreateUTest program~esmf_locstreamcreateutest->interface~esmf_locstreamgetkey program~esmf_locstreamcreateutest->proc~esmf_locstreamprint program~esmf_locstreamcreateutest->proc~test_locstreambkg program~esmf_locstreamcreateutest->proc~test_locstreambkgnda program~esmf_locstreamcreateutest->proc~test_locstreambkgsph program~esmf_locstreamex ESMF_LocStreamEx program~esmf_locstreamex->interface~esmf_locstreamgetkey interface~esmf_locstreamcreate ESMF_LocStreamCreate interface~esmf_locstreamcreate->proc~esmf_locstreamcreatebybkgmesh interface~esmf_pointlistcreate ESMF_PointListCreate interface~esmf_pointlistcreate->proc~esmf_pointlistcreatefrmlocstream program~esmf_pointlistutest ESMF_PointListUTest program~esmf_pointlistutest->proc~test_pointlist_from_locstream_wmask

Source Code

      subroutine ESMF_LocStreamGetKeyI4(locstream, keyName, keywordEnforcer, &
          localDE, exclusiveLBound, exclusiveUBound, exclusiveCount,     &
          computationalLBound, computationalUBound, computationalCount,     &
          totalLBound, totalUBound, totalCount,     &
          farray, datacopyflag, rc)
!
! !ARGUMENTS:
      type(ESMF_LocStream),   intent(in)            :: locstream
      character (len=*),      intent(in)            :: keyName
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
      integer,                intent(in),  optional :: localDE
      integer,                intent(out), optional :: exclusiveLBound
      integer,                intent(out), optional :: exclusiveUBound
      integer,                intent(out), optional :: exclusiveCount
      integer,                intent(out), optional :: computationalLBound
      integer,                intent(out), optional :: computationalUBound
      integer,                intent(out), optional :: computationalCount
      integer,                intent(out), optional :: totalLBound
      integer,                intent(out), optional :: totalUBound
      integer,                intent(out), optional :: totalCount
      integer(ESMF_KIND_I4), pointer :: farray(:)
      type(ESMF_DataCopy_Flag), intent(in), optional :: datacopyflag
      integer, intent(out), optional :: rc
!
! !DESCRIPTION:
!    This method gets a Fortran pointer to the piece of memory which holds the 
!    key data for a particular key on the given local DE. 
!    This is useful, for example, for setting the key values in a LocStream, or
!    for reading the values. 
!
!     The arguments are:
!     \begin{description}
!     \item[{locstream}]
!          LocStream to get the information from.
!     \item[{keyName}]
!          The key to get the information from.
!     \item[{[localDE]}]
!         The local DE for which information is requested. {\tt [0,..,localDECount-1]}.
!         For {\tt localDECount==1} the {\tt localDE} argument may be omitted,
!          in which case it will default to {\tt localDE=0}.
!     \item[{[exclusiveLBound]}]
!          Upon return this holds the lower bounds of the exclusive region.
!     \item[{[exclusiveUBound]}]
!          Upon return this holds the upper bounds of the exclusive region.
!     \item[{[exclusiveCount]}]
!          Upon return this holds the number of items in the exclusive region
 !          (i.e. {\tt exclusiveUBound-exclusiveLBound+1}). {\tt exclusiveCount}.
!     \item[{[computationalLBound]}]
!          Upon return this holds the lower bounds of the computational region.
!     \item[{[computationalUBound]}]
!          Upon return this holds the upper bounds of the computational region.
!     \item[{[computationalCount]}]
!          Upon return this holds the number of items in the computational region
!          (i.e. {\tt computationalUBound-computationalLBound+1}). 
!     \item[{[totalLBound]}]
!          Upon return this holds the lower bounds of the total region.
!     \item[{[totalUBound]}]
!          Upon return this holds the upper bounds of the total region.
!     \item[{[totalCount]}]
!          Upon return this holds the number of items in the total region
!          (i.e. {\tt totalUBound-totalLBound+1}). 
!     \item[{farray}]
!          The pointer to the coordinate data.
!     \item[{[datacopyflag]}]
!          If not specified, default to {\tt ESMF\_DATACOPY\_REFERENCE}, in this case
!          farray is a reference to the data in the Grid coordinate arrays. 
!          Please see Section~\ref{const:datacopyflag} for further description and a
!          list of valid values. 
!     \item[{[rc]}]
!          Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOPI


 ! Local variables 
 type(ESMF_Array) :: array 
 integer :: localrc ! local error status 
 type(ESMF_LocalArray) :: larray 
 type(ESMF_DataCopy_Flag) :: datacopyflagInt

 ! Initialize return code 
 localrc = ESMF_RC_NOT_IMPL 
 if (present(rc)) rc = ESMF_RC_NOT_IMPL 

 ! Check init status of arguments 
 ESMF_INIT_CHECK_DEEP(ESMF_LocStreamGetInit, locstream, rc) 

  
 ! Set Defaults
 if (present(datacopyflag)) then
    datacopyflagInt=datacopyflag
 else
    datacopyflagInt=ESMF_DATACOPY_REFERENCE
 endif

 ! Get Key Array
 call ESMF_LocStreamGetKeyArray(locstream, keyName=keyName, keyArray=array, rc=localrc)  
 if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, & 
                         ESMF_CONTEXT, rcToReturn=rc)) return

 
 ! Obtain the native array pointer via the LocalArray interface 
 call ESMF_ArrayGet(array, localDE=localDE, localarray=larray, rc=localrc) 
 if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, & 
                              ESMF_CONTEXT, rcToReturn=rc)) return
 
 call ESMF_LocalArrayGet(larray, farray, datacopyflag=datacopyflag, rc=localrc) 
 if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, & 
                              ESMF_CONTEXT, rcToReturn=rc)) return 

  ! Get Bounds via C++
   call c_ESMC_locstreamgetkeybnds(array, localDE, & 
                 exclusiveLBound, exclusiveUBound, exclusiveCount, &
                 computationalLBound, computationalUBound, computationalCount, &
                 totalLBound, totalUBound, totalCount, &
                 localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, & 
            ESMF_CONTEXT, rcToReturn=rc)) return

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

end subroutine ESMF_LocStreamGetKeyI4