ESMF_ConfigGetFloatsR4 Subroutine

private subroutine ESMF_ConfigGetFloatsR4(config, valueList, keywordEnforcer, count, label, default, rc)

Arguments

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

Calls

proc~~esmf_configgetfloatsr4~~CallsGraph proc~esmf_configgetfloatsr4 ESMF_ConfigGetFloatsR4 proc~esmf_configfindlabel ESMF_ConfigFindLabel proc~esmf_configgetfloatsr4->proc~esmf_configfindlabel proc~esmf_configgetfloatr4 ESMF_ConfigGetFloatR4 proc~esmf_configgetfloatsr4->proc~esmf_configgetfloatr4 proc~esmf_configgetinit ESMF_ConfigGetInit proc~esmf_configgetfloatsr4->proc~esmf_configgetinit proc~esmf_imerr ESMF_IMErr proc~esmf_configgetfloatsr4->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_configgetfloatsr4->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_configgetfloatr4->proc~esmf_configgetinit proc~esmf_configgetfloatr4->proc~esmf_imerr proc~esmf_configgetstring ESMF_ConfigGetString proc~esmf_configgetfloatr4->proc~esmf_configgetstring proc~esmf_configsetcurrentattrused ESMF_ConfigSetCurrentAttrUsed proc~esmf_configgetfloatr4->proc~esmf_configsetcurrentattrused 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_ proc~esmf_configsetcurrentattrused->proc~esmf_configgetinit proc~esmf_configsetcurrentattrused->proc~esmf_imerr proc~esmf_utilarray2string ESMF_UtilArray2String proc~esmf_configsetcurrentattrused->proc~esmf_utilarray2string 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_utilarray2string proc~esmf_logflush->proc~esmf_utiliounitflush proc~esmf_logopenfile->proc~esmf_utiliounitflush proc~esmf_utiliounitget ESMF_UtilIOUnitGet proc~esmf_logopenfile->proc~esmf_utiliounitget

Called by

proc~~esmf_configgetfloatsr4~~CalledByGraph proc~esmf_configgetfloatsr4 ESMF_ConfigGetFloatsR4 interface~esmf_configgetattribute ESMF_ConfigGetAttribute interface~esmf_configgetattribute->proc~esmf_configgetfloatsr4 proc~complianceinitialize ComplianceInitialize proc~complianceinitialize->interface~esmf_configgetattribute proc~esmf_frameworkinternalinit ESMF_FrameworkInternalInit proc~esmf_frameworkinternalinit->interface~esmf_configgetattribute proc~multpar_multlines MultPar_MultLines proc~multpar_multlines->interface~esmf_configgetattribute proc~multpar_singleline_u MultPar_SingleLine_U proc~multpar_singleline_u->interface~esmf_configgetattribute proc~multpar_singleline_v MultPar_SingleLine_V proc~multpar_singleline_v->interface~esmf_configgetattribute proc~multpar_singleline_vf MultPar_SingleLine_Vf proc~multpar_singleline_vf->interface~esmf_configgetattribute proc~nuopc_freeformatcreateread NUOPC_FreeFormatCreateRead proc~nuopc_freeformatcreateread->interface~esmf_configgetattribute proc~read_descriptor_files read_descriptor_files proc~read_descriptor_files->interface~esmf_configgetattribute proc~read_dist_specification read_dist_specification proc~read_dist_specification->interface~esmf_configgetattribute proc~read_table_integer read_table_integer proc~read_dist_specification->proc~read_table_integer proc~read_table_real read_table_real proc~read_dist_specification->proc~read_table_real proc~read_table_string read_table_string proc~read_dist_specification->proc~read_table_string proc~read_grid_specification read_grid_specification proc~read_grid_specification->interface~esmf_configgetattribute proc~read_redistribution_grid read_redistribution_grid proc~read_grid_specification->proc~read_redistribution_grid proc~read_regridding_grid read_regridding_grid proc~read_grid_specification->proc~read_regridding_grid proc~read_redistribution_grid->interface~esmf_configgetattribute proc~read_redistribution_grid->proc~read_table_integer proc~read_redistribution_grid->proc~read_table_real proc~read_redistribution_grid->proc~read_table_string proc~read_regridding_grid->interface~esmf_configgetattribute proc~read_regridding_grid->proc~read_table_integer proc~read_regridding_grid->proc~read_table_real proc~read_regridding_grid->proc~read_table_string proc~read_table_integer->interface~esmf_configgetattribute proc~read_table_real->interface~esmf_configgetattribute proc~read_table_string->interface~esmf_configgetattribute proc~read_testharness_config Read_TestHarness_Config proc~read_testharness_config->interface~esmf_configgetattribute proc~sections Sections proc~sections->interface~esmf_configgetattribute proc~singlepar SinglePar proc~singlepar->interface~esmf_configgetattribute proc~singleparset SingleParSet proc~singleparset->interface~esmf_configgetattribute proc~table Table proc~table->interface~esmf_configgetattribute program~esmf_appdriver ESMF_AppDriver program~esmf_appdriver->interface~esmf_configgetattribute program~esmf_configoverviewex ESMF_ConfigOverviewEx program~esmf_configoverviewex->interface~esmf_configgetattribute program~esmf_hconfigutest ESMF_HConfigUTest program~esmf_hconfigutest->interface~esmf_configgetattribute interface~nuopc_freeformatcreate NUOPC_FreeFormatCreate interface~nuopc_freeformatcreate->proc~nuopc_freeformatcreateread proc~esmf_initialize ESMF_Initialize proc~esmf_initialize->proc~esmf_frameworkinternalinit proc~f_esmf_frameworkinitialize f_esmf_frameworkinitialize proc~f_esmf_frameworkinitialize->proc~esmf_frameworkinternalinit 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~registeric~2 registerIC proc~registeric~2->proc~complianceinitialize program~esmf_test_harness esmf_test_harness program~esmf_test_harness->proc~read_testharness_config

Source Code

      subroutine ESMF_ConfigGetFloatsR4(config, valueList, &
        keywordEnforcer, count, label, default, rc)

! !ARGUMENTS:
      type(ESMF_Config),  intent(inout)         :: config
      real(ESMF_KIND_R4), intent(inout)         :: valueList(:)
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
      integer,            intent(in),  optional :: count
      character(len=*),   intent(in),  optional :: label
      real(ESMF_KIND_R4), intent(in),  optional :: default
      integer,            intent(out), optional :: rc
!
! !DESCRIPTION: 
!  Gets a 4-byte real {\tt valueList} of a given {\tt count} from
!  the {\tt config} object.
!
!   The arguments are:
!   \begin{description}
!   \item [config]
!     Already created {\tt ESMF\_Config} object.
!   \item [valueList]
!     Returned real values. 
!   \item [count]
!     Number of returned values expected. 
!   \item [{[label]}]
!     Identifing label. 
!   \item [{[default]}]
!     Default value if label is not found in configuration object. 
!   \item [{[rc]}]
!     Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!
!EOPI -------------------------------------------------------------------
!
      integer :: localrc
      integer :: localcount
      integer :: i 
      logical :: found

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

      localrc = ESMF_RC_NOT_IMPL
      !check variables
      ESMF_INIT_CHECK_DEEP(ESMF_ConfigGetInit,config,rc)

      localcount = size (valueList)
      if (present (count)) then
        if (count <= 0) then
           if (ESMF_LogFoundError(ESMF_RC_OBJ_BAD, &
                                  msg="invalid SIZE", &
                                   ESMF_CONTEXT, rcToReturn=rc)) return
        else if (count > size (valueList)) then
           if (ESMF_LogFoundError(ESMF_RC_OBJ_BAD, &
                                  msg="invalid SIZE", &
                                   ESMF_CONTEXT, rcToReturn=rc)) return
        else
           localcount = count
        end if
      endif

! Default setting
      if( present( default ) ) then 
         valueList(1:localcount) = default

      else
         valueList(1:localcount) = 0.0
      endif
! Processing
      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)  &
             localrc = ESMF_RC_NOT_FOUND
      end if

      do i = 1, localcount
         
         if(present( default )) then
            call ESMF_ConfigGetFloatR4( config, valueList(i), default=default, rc=localrc )
         else
            call ESMF_ConfigGetFloatR4( config, valueList(i), rc = localrc)
         endif
      enddo

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

    end subroutine ESMF_ConfigGetFloatsR4