ESMF_ConfigGetDim Subroutine

public subroutine ESMF_ConfigGetDim(config, lineCount, columnCount, keywordEnforcer, label, rc)

Arguments

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

Calls

proc~~esmf_configgetdim~~CallsGraph proc~esmf_configgetdim ESMF_ConfigGetDim proc~esmf_configfindlabel ESMF_ConfigFindLabel proc~esmf_configgetdim->proc~esmf_configfindlabel proc~esmf_configgetinit ESMF_ConfigGetInit proc~esmf_configgetdim->proc~esmf_configgetinit proc~esmf_configgetlen ESMF_ConfigGetLen proc~esmf_configgetdim->proc~esmf_configgetlen proc~esmf_confignextline ESMF_ConfigNextLine proc~esmf_configgetdim->proc~esmf_confignextline proc~esmf_imerr ESMF_IMErr proc~esmf_configgetdim->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_configgetdim->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_configgetlen->proc~esmf_configfindlabel proc~esmf_configgetlen->proc~esmf_configgetinit proc~esmf_configgetlen->proc~esmf_imerr proc~esmf_configgetlen->proc~esmf_logfounderror proc~esmf_configgetstring ESMF_ConfigGetString proc~esmf_configgetlen->proc~esmf_configgetstring proc~esmf_confignextline->proc~esmf_configgetinit proc~esmf_confignextline->proc~esmf_imerr proc~esmf_confignextline->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 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_ 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_configgetdim~~CalledByGraph proc~esmf_configgetdim ESMF_ConfigGetDim 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~nuopc_freeformatcreateread NUOPC_FreeFormatCreateRead 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_configgetdim proc~read_dist_specification read_dist_specification proc~read_dist_specification->proc~esmf_configgetdim proc~read_redistribution_grid read_redistribution_grid proc~read_redistribution_grid->proc~esmf_configgetdim proc~read_regridding_grid read_regridding_grid proc~read_regridding_grid->proc~esmf_configgetdim proc~read_testharness_config Read_TestHarness_Config proc~read_testharness_config->proc~esmf_configgetdim proc~sections Sections proc~sections->proc~esmf_configgetdim proc~table Table proc~table->proc~esmf_configgetdim interface~nuopc_freeformatcreate->proc~nuopc_freeformatcreateread 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_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 program~esmf_test_harness esmf_test_harness program~esmf_test_harness->proc~read_testharness_config program~esmf_test_harness->proc~read_testharness_specifier 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_nuopc_utest->proc~nuopc_driveregestrunsequence interface~nuopc_compattributeegest NUOPC_CompAttributeEgest interface~nuopc_compattributeegest->proc~nuopc_cplcompattributeege interface~nuopc_compattributeegest->proc~nuopc_gridcompattributeege interface~nuopc_driveringestrunsequence NUOPC_DriverIngestRunSequence interface~nuopc_driveringestrunsequence->proc~nuopc_driveringestrunsequenceff interface~nuopc_driveringestrunsequence->proc~nuopc_driveringestrunsequencehc interface~nuopc_ingestpetlist NUOPC_IngestPetList interface~nuopc_ingestpetlist->proc~nuopc_ingestpetlisthc proc~nuopc_fielddictionaryegesti NUOPC_FieldDictionaryEgestI proc~nuopc_fielddictionaryegesti->proc~nuopc_fielddictionaryegestdefaulti proc~nuopc_fielddictionaryegesti->proc~nuopc_fielddictionaryegestyamli proc~nuopc_fielddictionarysetupdefault NUOPC_FieldDictionarySetupDefault proc~nuopc_fielddictionarysetupdefault->proc~nuopc_fielddictionarydefinition

Source Code

    subroutine ESMF_ConfigGetDim(config, lineCount, columnCount, &
      keywordEnforcer, label, rc)

! !ARGUMENTS:
      type(ESMF_Config), intent(inout)         :: config
      integer,           intent(out)           :: lineCount
      integer,           intent(out)           :: columnCount
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: 
!  Returns the number of lines in the table in {\tt lineCount} and 
!  the maximum number of words in a table line in {\tt columnCount}.
!
!  After the call, the line pointer is positioned to the end of the table.
!  To reset it to the beginning of the table, use {\tt ESMF\_ConfigFindLabel}. 
!
!   The arguments are:
!   \begin{description}
!   \item [config]
!     Already created {\tt ESMF\_Config} object.
!   \item [lineCount]
!     Returned number of lines in the table. 
!   \item [columnCount]
!     Returned maximum number of words in a table line. 
!   \item [{[label]}]
!     Identifying label (if present), otherwise current line.
!   \item [{[rc]}]
!     Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOP -------------------------------------------------------------------
!
      integer :: localrc
      integer :: n
      logical :: found
      logical :: tend

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

      lineCount = 0
      columnCount = 0
      
      !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_ConfigNextLine(config, tableEnd=tend, rc=localrc)
         if (localrc /= ESMF_SUCCESS ) then
            lineCount = 0
            columnCount = 0
            exit
         endif
         if ( tend ) then
            exit
         else
            lineCount = lineCount + 1
            n = ESMF_ConfigGetLen( config, rc = localrc)
            if ( localrc /= ESMF_SUCCESS ) then
               lineCount = 0
               columnCount = 0
               if ( present( rc )) then
                 rc = localrc
               endif
               return
            else
               columnCount = max(columnCount, n)
            endif
         endif 
      enddo
      if ( present( rc )) then
        rc = localrc
      endif

    end subroutine ESMF_ConfigGetDim