ESMF_ConfigGetFloatR4 Subroutine

private subroutine ESMF_ConfigGetFloatR4(config, value, keywordEnforcer, label, default, rc)

Arguments

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

Calls

proc~~esmf_configgetfloatr4~~CallsGraph proc~esmf_configgetfloatr4 ESMF_ConfigGetFloatR4 proc~esmf_configgetinit ESMF_ConfigGetInit proc~esmf_configgetfloatr4->proc~esmf_configgetinit 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 ESMF_IMErr proc~esmf_configgetfloatr4->proc~esmf_imerr proc~esmf_configgetstring->proc~esmf_configgetinit proc~esmf_configgetstring->proc~esmf_imerr proc~esmf_configfindlabel ESMF_ConfigFindLabel proc~esmf_configgetstring->proc~esmf_configfindlabel proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_configgetstring->proc~esmf_logfounderror proc~index_ index_ 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 proc~esmf_initcheckdeep ESMF_InitCheckDeep proc~esmf_imerr->proc~esmf_initcheckdeep proc~esmf_imerr->proc~esmf_logfounderror proc~esmf_configfindlabel->proc~esmf_configgetinit proc~esmf_configfindlabel->proc~esmf_imerr proc~esmf_configfindlabel->proc~esmf_logfounderror proc~esmf_configfindlabel->proc~index_ 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

Called by

proc~~esmf_configgetfloatr4~~CalledByGraph proc~esmf_configgetfloatr4 ESMF_ConfigGetFloatR4 interface~esmf_configgetattribute ESMF_ConfigGetAttribute interface~esmf_configgetattribute->proc~esmf_configgetfloatr4 proc~esmf_configgetfloatsr4 ESMF_ConfigGetFloatsR4 interface~esmf_configgetattribute->proc~esmf_configgetfloatsr4 proc~esmf_configgetfloatsr4->proc~esmf_configgetfloatr4 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_ConfigGetFloatR4(config, value, &
        keywordEnforcer, label, default, rc)

! !ARGUMENTS:
      type(ESMF_Config), intent(inout)         :: config
      real(ESMF_KIND_R4), intent(out)          :: value
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
      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 value} from the {\tt config} object.
!
!   The arguments are:
!   \begin{description}
!   \item [config]
!     Already created {\tt ESMF\_Config} object.
!   \item [value]
!     Returned value. 
!   \item [{[label]}]
!     Identifying label. 
!   \item [{[default]}]
!     Default value if {\tt label} is not found in {\tt config} object. 
!   \item [{[rc]}]
!     Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!   \end{description}
!

!EOPI -------------------------------------------------------------------
!
      integer :: localrc
      integer :: iostat
      character(len=NBUF_MAX) :: string
      real(ESMF_KIND_R4) :: x
      
      ! 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)

! Default setting
      if( present( default ) ) then 
         value = default
      else
         value = 0.0
      endif

! Processing
      if (present (label ) ) then
         call ESMF_ConfigGetString( config, string, label=label, rc=localrc)
      else
         call ESMF_ConfigGetString( config, string, rc = localrc )
      endif

      if ( localrc == ESMF_SUCCESS ) then
           read(string,*,iostat=iostat) x
           if (iostat == 0) then
             call ESMF_ConfigSetCurrentAttrUsed(config, used=.true.)
           else
             ! undo what GetSring() did
             call ESMF_ConfigSetCurrentAttrUsed(config, used=.false.)
             localrc = ESMF_RC_VAL_OUTOFRANGE
           endif
      else
         if( present( default )) then
            x = default
            localrc = ESMF_SUCCESS
         endif
      end if

      if ( localrc == ESMF_SUCCESS ) then
         value = x
      endif

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

    end subroutine ESMF_ConfigGetFloatR4