ESMF_ConfigGetLen Function

public function ESMF_ConfigGetLen(config, keywordEnforcer, label, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_Config), intent(inout) :: config
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
character(len=*), intent(in), optional :: label
integer, intent(out), optional :: rc

Return Value integer


Calls

proc~~esmf_configgetlen~~CallsGraph proc~esmf_configgetlen ESMF_ConfigGetLen proc~esmf_configfindlabel ESMF_ConfigFindLabel proc~esmf_configgetlen->proc~esmf_configfindlabel proc~esmf_configgetinit ESMF_ConfigGetInit proc~esmf_configgetlen->proc~esmf_configgetinit proc~esmf_configgetstring ESMF_ConfigGetString proc~esmf_configgetlen->proc~esmf_configgetstring proc~esmf_imerr ESMF_IMErr proc~esmf_configgetlen->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_configgetlen->proc~esmf_logfounderror proc~esmf_configfindlabel->proc~esmf_configgetinit proc~esmf_configfindlabel->proc~esmf_imerr proc~esmf_configfindlabel->proc~esmf_logfounderror proc~index_ index_ proc~esmf_configfindlabel->proc~index_ proc~esmf_configgetstring->proc~esmf_configfindlabel proc~esmf_configgetstring->proc~esmf_configgetinit proc~esmf_configgetstring->proc~esmf_imerr proc~esmf_configgetstring->proc~esmf_logfounderror proc~esmf_configgetstring->proc~index_ 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_configgetlen~~CalledByGraph proc~esmf_configgetlen ESMF_ConfigGetLen proc~esmf_configgetdim ESMF_ConfigGetDim proc~esmf_configgetdim->proc~esmf_configgetlen proc~f_esmf_configgetlen f_esmf_configgetlen proc~f_esmf_configgetlen->proc~esmf_configgetlen proc~f_esmf_configgetlennolabel f_esmf_configgetlennolabel proc~f_esmf_configgetlennolabel->proc~esmf_configgetlen proc~nuopc_freeformatcreateread NUOPC_FreeFormatCreateRead proc~nuopc_freeformatcreateread->proc~esmf_configgetlen proc~nuopc_freeformatcreateread->proc~esmf_configgetdim interface~nuopc_freeformatcreate NUOPC_FreeFormatCreate proc~nuopc_freeformatcreateread->interface~nuopc_freeformatcreate proc~read_descriptor_files read_descriptor_files proc~read_descriptor_files->proc~esmf_configgetlen proc~read_descriptor_files->proc~esmf_configgetdim proc~read_dist_specification read_dist_specification proc~read_dist_specification->proc~esmf_configgetlen proc~read_dist_specification->proc~esmf_configgetdim proc~read_redistribution_grid read_redistribution_grid proc~read_redistribution_grid->proc~esmf_configgetlen proc~read_redistribution_grid->proc~esmf_configgetdim proc~read_regridding_grid read_regridding_grid proc~read_regridding_grid->proc~esmf_configgetlen proc~read_regridding_grid->proc~esmf_configgetdim proc~table Table proc~table->proc~esmf_configgetlen proc~table->proc~esmf_configgetdim program~esmf_hconfigutest ESMF_HConfigUTest program~esmf_hconfigutest->proc~esmf_configgetlen interface~nuopc_freeformatcreate->proc~nuopc_freeformatcreateread proc~f_esmf_configgetdim f_esmf_configgetdim proc~f_esmf_configgetdim->proc~esmf_configgetdim proc~f_esmf_configgetdimnolabel f_esmf_configgetdimnolabel proc~f_esmf_configgetdimnolabel->proc~esmf_configgetdim proc~read_grid_specification read_grid_specification proc~read_grid_specification->proc~read_redistribution_grid proc~read_grid_specification->proc~read_regridding_grid proc~read_testharness_config Read_TestHarness_Config proc~read_testharness_config->proc~esmf_configgetdim proc~read_testharness_specifier Read_TestHarness_Specifier proc~read_testharness_specifier->proc~read_descriptor_files proc~read_testharness_specifier->proc~read_dist_specification proc~read_testharness_specifier->proc~read_grid_specification proc~sections Sections proc~sections->proc~esmf_configgetdim proc~nuopc_cplcompattributeege NUOPC_CplCompAttributeEge proc~nuopc_cplcompattributeege->interface~nuopc_freeformatcreate proc~nuopc_driveregestrunsequence NUOPC_DriverEgestRunSequence proc~nuopc_driveregestrunsequence->interface~nuopc_freeformatcreate proc~nuopc_driveringestrunsequenceff NUOPC_DriverIngestRunSequenceFF proc~nuopc_driveringestrunsequenceff->interface~nuopc_freeformatcreate proc~nuopc_driveringestrunsequencehc NUOPC_DriverIngestRunSequenceHC proc~nuopc_driveringestrunsequencehc->interface~nuopc_freeformatcreate proc~nuopc_fielddictionarydefinition NUOPC_FieldDictionaryDefinition proc~nuopc_fielddictionarydefinition->interface~nuopc_freeformatcreate proc~nuopc_fielddictionaryegestdefaulti NUOPC_FieldDictionaryEgestDefaultI proc~nuopc_fielddictionaryegestdefaulti->interface~nuopc_freeformatcreate proc~nuopc_fielddictionaryegestyamli NUOPC_FieldDictionaryEgestYAMLI proc~nuopc_fielddictionaryegestyamli->interface~nuopc_freeformatcreate proc~nuopc_gridcompattributeege NUOPC_GridCompAttributeEge proc~nuopc_gridcompattributeege->interface~nuopc_freeformatcreate proc~nuopc_ingestpetlisthc NUOPC_IngestPetListHC proc~nuopc_ingestpetlisthc->interface~nuopc_freeformatcreate proc~setrunsequence SetRunSequence proc~setrunsequence->interface~nuopc_freeformatcreate program~esmf_nuopc_utest ESMF_NUOPC_UTest program~esmf_nuopc_utest->interface~nuopc_freeformatcreate program~esmf_test_harness esmf_test_harness program~esmf_test_harness->proc~read_testharness_config program~esmf_test_harness->proc~read_testharness_specifier

Source Code

    integer function ESMF_ConfigGetLen(config, keywordEnforcer, label, rc)

! !ARGUMENTS:
      type(ESMF_Config), intent(inout)          :: config 
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
      character(len=*),  intent(in),   optional :: label
      integer,           intent(out),  optional :: rc
!
!
! !STATUS:
! \begin{itemize}
! \item\apiStatusCompatibleVersion{5.2.0r}
! \end{itemize}
!
! !DESCRIPTION: 
! Gets the length of the line in words by counting words
! disregarding types.  Returns the word count as an integer.
!
!   The arguments are:
!   \begin{description}
!   \item [config]
!     Already created {\tt ESMF\_Config} object.
!   \item [{[label]}]
!     Identifying label.   If not specified, use the current line.
!   \item [{[rc]}]
!     Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOP -------------------------------------------------------------------
      character(len=NBUF_MAX) :: string
      integer :: localrc
      integer :: count 
      logical :: eol, found

      ! Initialize return code; assume routine not implemented
      if (present(rc)) rc = ESMF_RC_NOT_IMPL

      localrc = ESMF_SUCCESS
      count = 0
      ESMF_ConfigGetLen = -1    ! assume error
      
      !check variables
      ESMF_INIT_CHECK_DEEP(ESMF_ConfigGetInit,config,rc)

      if( present( label )) then
         call ESMF_ConfigFindLabel(config, label=label,  &
             isPresent=found, rc=localrc)
         if (ESMF_LogFoundError (localrc, ESMF_ERR_PASSTHRU,  &
             ESMF_CONTEXT, rcToReturn=rc)) return
         if (.not. found) then
            localrc = ESMF_RC_NOT_FOUND
            if (present( rc )) then
              rc = localrc
            endif
            return
         endif
      endif

      do
         call ESMF_ConfigGetString( config, string, eolFlag=eol, rc = localrc )
         if (eol) exit            
         if ( localrc == ESMF_SUCCESS ) then
            count = count + 1
         else
            exit
         endif
      enddo
 

      ESMF_ConfigGetLen = count

      if( present ( rc )) then
        rc = localrc
      endif

    end function ESMF_ConfigGetLen