hconfig_get_private.F90 Source File


This file depends on

sourcefile~~hconfig_get_private.f90~~EfferentGraph sourcefile~hconfig_get_private.f90 hconfig_get_private.F90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~hconfig_get_private.f90->sourcefile~errorhandling.f90 sourcefile~generalized_equality.f90 generalized_equality.F90 sourcefile~hconfig_get_private.f90->sourcefile~generalized_equality.f90 sourcefile~get_hconfig.f90 get_hconfig.F90 sourcefile~hconfig_get_private.f90->sourcefile~get_hconfig.f90 sourcefile~hconfig_params.f90 hconfig_params.F90 sourcefile~hconfig_get_private.f90->sourcefile~hconfig_params.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~errorhandling.f90->sourcefile~mapl_throw.f90 sourcefile~get_hconfig.f90->sourcefile~errorhandling.f90 sourcefile~get_hconfig.f90->sourcefile~hconfig_params.f90 sourcefile~hconfig_params.f90->sourcefile~errorhandling.f90 sourcefile~pflogger_stub.f90 pflogger_stub.F90 sourcefile~hconfig_params.f90->sourcefile~pflogger_stub.f90 sourcefile~pfl_keywordenforcer.f90 PFL_KeywordEnforcer.F90 sourcefile~pflogger_stub.f90->sourcefile~pfl_keywordenforcer.f90 sourcefile~wraparray.f90 WrapArray.F90 sourcefile~pflogger_stub.f90->sourcefile~wraparray.f90

Files dependent on this one

sourcefile~~hconfig_get_private.f90~~AfferentGraph sourcefile~hconfig_get_private.f90 hconfig_get_private.F90 sourcefile~hconfig_get.f90 hconfig_get.F90 sourcefile~hconfig_get.f90->sourcefile~hconfig_get_private.f90 sourcefile~test_hconfig_get_private.pf Test_hconfig_get_private.pf sourcefile~test_hconfig_get_private.pf->sourcefile~hconfig_get_private.f90 sourcefile~hconfig3g.f90 HConfig3G.F90 sourcefile~hconfig3g.f90->sourcefile~hconfig_get.f90 sourcefile~mapl_generic.f90~2 MAPL_Generic.F90 sourcefile~mapl_generic.f90~2->sourcefile~hconfig_get.f90 sourcefile~generic3g.f90 Generic3g.F90 sourcefile~generic3g.f90->sourcefile~mapl_generic.f90~2 sourcefile~mapl3_deprecated.f90 MAPL3_Deprecated.F90 sourcefile~mapl3_deprecated.f90->sourcefile~mapl_generic.f90~2 sourcefile~protoextdatagc.f90 ProtoExtDataGC.F90 sourcefile~protoextdatagc.f90->sourcefile~mapl_generic.f90~2 sourcefile~simpleleafgridcomp.f90 SimpleLeafGridComp.F90 sourcefile~simpleleafgridcomp.f90->sourcefile~mapl_generic.f90~2 sourcefile~simpleparentgridcomp.f90 SimpleParentGridComp.F90 sourcefile~simpleparentgridcomp.f90->sourcefile~mapl_generic.f90~2 sourcefile~test_runchild.pf Test_RunChild.pf sourcefile~test_runchild.pf->sourcefile~mapl_generic.f90~2 sourcefile~test_scenarios.pf Test_Scenarios.pf sourcefile~test_scenarios.pf->sourcefile~mapl_generic.f90~2 sourcefile~test_simpleleafgridcomp.pf Test_SimpleLeafGridComp.pf sourcefile~test_simpleleafgridcomp.pf->sourcefile~mapl_generic.f90~2 sourcefile~test_simpleparentgridcomp.pf Test_SimpleParentGridComp.pf sourcefile~test_simpleparentgridcomp.pf->sourcefile~mapl_generic.f90~2 sourcefile~cap.f90 Cap.F90 sourcefile~cap.f90->sourcefile~generic3g.f90 sourcefile~capgridcomp.f90 CapGridComp.F90 sourcefile~capgridcomp.f90->sourcefile~generic3g.f90 sourcefile~configurableleafgridcomp.f90 ConfigurableLeafGridComp.F90 sourcefile~configurableleafgridcomp.f90->sourcefile~generic3g.f90 sourcefile~configurableparentgridcomp.f90 ConfigurableParentGridComp.F90 sourcefile~configurableparentgridcomp.f90->sourcefile~generic3g.f90 sourcefile~extdatagridcomp.f90 ExtDataGridComp.F90 sourcefile~extdatagridcomp.f90->sourcefile~generic3g.f90 sourcefile~historycollectiongridcomp.f90 HistoryCollectionGridComp.F90 sourcefile~historycollectiongridcomp.f90->sourcefile~generic3g.f90 sourcefile~historycollectiongridcomp_private.f90 HistoryCollectionGridComp_private.F90 sourcefile~historycollectiongridcomp_private.f90->sourcefile~generic3g.f90 sourcefile~historygridcomp.f90 HistoryGridComp.F90 sourcefile~historygridcomp.f90->sourcefile~generic3g.f90 sourcefile~mapl3g.f90 mapl3g.F90 sourcefile~mapl3g.f90->sourcefile~generic3g.f90 sourcefile~test_extdatagridcomp.pf Test_ExtDataGridComp.pf sourcefile~test_extdatagridcomp.pf->sourcefile~generic3g.f90 sourcefile~test_historygridcomp.pf Test_HistoryGridComp.pf sourcefile~test_historygridcomp.pf->sourcefile~generic3g.f90

Source Code

#include "MAPL_ErrLog.h"
module mapl3g_hconfig_get_private
   use mapl3g_hconfig_params
   use mapl3g_get_hconfig
   use mapl3g_generalized_equality
   use :: esmf, only: ESMF_MAXSTR
   use :: esmf, only: ESMF_KIND_R4, ESMF_KIND_R8, ESMF_KIND_I4, ESMF_KIND_I8
   use :: esmf, only: ESMF_HConfig, ESMF_HConfigIsDefined
   use mapl_ErrorHandling

   implicit none
   private
   public :: get_value, HConfigParams, DEFAULT_TAG, ELLIPSIS

   interface get_value
      procedure :: get_value_i4
      module procedure :: get_value_i8
      module procedure :: get_value_r4
      module procedure :: get_value_r8
      module procedure :: get_value_string
      module procedure :: get_value_logical
      module procedure :: get_value_i4seq
      module procedure :: get_value_i8seq
      module procedure :: get_value_r4seq
      module procedure :: get_value_r8seq
      module procedure :: get_value_logical_seq
   end interface get_value

   character(len=*), parameter :: DEFAULT_TAG = ' (default)'
   character(len=*), parameter :: ELLIPSIS = ', ...'
   integer, parameter :: MAX_NUM_ITEMS_OUTPUT = 3

contains

#define EDIT_DESC_I4 'G0'
#define EDIT_DESC_I8 'G0'
#define EDIT_DESC_R4 'G0.7'
#define EDIT_DESC_R8 'G0.16'
#define EDIT_DESC_L 'L1'
#define EDIT_DESC_CH 'A'

!============================= SCALAR VALUE TYPES ==============================
#if defined ISARRAY
#  undef ISARRAY
#endif

   subroutine get_value_i4(params, value, default, valuestring, rc )
      integer(kind=ESMF_KIND_I4), intent(inout) :: value
      integer(kind=ESMF_KIND_I4), optional, intent(in) :: default
      character(len=*), parameter :: typestring = 'I4'
      character(len=*), parameter :: edit_descriptor = EDIT_DESC_I4
#include "hconfig_get_value_template.h"
   end subroutine get_value_i4

   subroutine get_value_i8(params, value, default, valuestring, rc)
      integer(kind=ESMF_KIND_I8), intent(inout) :: value
      integer(kind=ESMF_KIND_I8), optional, intent(in) :: default
      character(len=*), parameter :: typestring = 'I8'
      character(len=*), parameter :: edit_descriptor = EDIT_DESC_I8
#include "hconfig_get_value_template.h"
   end subroutine get_value_i8

   subroutine get_value_r4(params, value, default, valuestring, rc)
      real(kind=ESMF_KIND_R4), intent(inout) :: value
      real(kind=ESMF_KIND_R4), optional, intent(in) :: default
      character(len=*), parameter :: typestring = 'R4'
      character(len=*), parameter :: edit_descriptor = EDIT_DESC_R4
#include "hconfig_get_value_template.h"
   end subroutine get_value_r4

   subroutine get_value_r8(params, value, default, valuestring, rc)
      real(kind=ESMF_KIND_R8), intent(inout) :: value
      real(kind=ESMF_KIND_R8), optional, intent(in) :: default
      character(len=*), parameter :: typestring = 'R8'
      character(len=*), parameter :: edit_descriptor = EDIT_DESC_R8
#include "hconfig_get_value_template.h"
   end subroutine get_value_r8

   subroutine get_value_string(params, value, default, valuestring, rc)
      character(len=:), allocatable, intent(inout) :: value
      character(len=*), optional, intent(in) :: default
      character(len=*), parameter :: typestring = 'CH'
      character(len=*), parameter :: edit_descriptor = EDIT_DESC_CH
#include "hconfig_get_value_template.h"
   end subroutine get_value_string

   subroutine get_value_logical(params, value, default, valuestring, rc)
      logical, intent(inout) :: value
      logical, optional, intent(in) :: default
      character(len=*), parameter :: typestring = 'L'
      character(len=*), parameter :: edit_descriptor = EDIT_DESC_L
#include "hconfig_get_value_template.h"
   end subroutine get_value_logical

!============== Scalar subroutines must appear above this line. ================

!============================= ARRAY VALUE TYPES ===============================
#define ISARRAY 1
!=============== Array subroutines must appear below this line. ================

   subroutine get_value_i4seq(params, value, default, valuestring, rc)
      integer(kind=ESMF_KIND_I4), dimension(:), allocatable, intent(inout) :: value
      integer(kind=ESMF_KIND_I4), dimension(:), optional, intent(in) :: default
      character(len=*), parameter :: typestring = 'I4'
      character(len=*), parameter :: edit_descriptor = EDIT_DESC_I4
#include "hconfig_get_value_template.h"
   end subroutine get_value_i4seq

   subroutine get_value_i8seq(params, value, default, valuestring, rc)
      integer(kind=ESMF_KIND_I8), dimension(:), allocatable, intent(inout) :: value
      integer(kind=ESMF_KIND_I8), dimension(:), optional, intent(in) :: default
      character(len=*), parameter :: typestring = 'I8'
      character(len=*), parameter :: edit_descriptor = EDIT_DESC_I8
#include "hconfig_get_value_template.h"
   end subroutine get_value_i8seq

   subroutine get_value_r4seq(params, value, default, valuestring, rc)
      real(kind=ESMF_KIND_R4), dimension(:), allocatable, intent(inout) :: value
      real(kind=ESMF_KIND_R4), dimension(:), optional, intent(in) :: default
      character(len=*), parameter :: typestring = 'R4'
      character(len=*), parameter :: edit_descriptor = EDIT_DESC_R4
#include "hconfig_get_value_template.h"
   end subroutine get_value_r4seq

   subroutine get_value_r8seq(params, value, default, valuestring, rc)
      real(kind=ESMF_KIND_R8), dimension(:), allocatable, intent(inout) :: value
      real(kind=ESMF_KIND_R8), dimension(:), optional, intent(in) :: default
      character(len=*), parameter :: typestring = 'R8'
      character(len=*), parameter :: edit_descriptor = EDIT_DESC_R8
#include "hconfig_get_value_template.h"
   end subroutine get_value_r8seq

   subroutine get_value_logical_seq(params, value, default, valuestring, rc)
      logical, dimension(:), allocatable, intent(inout) :: value
      logical, dimension(:), optional, intent(in) :: default
      character(len=*), parameter :: typestring = 'L'
      character(len=*), parameter :: edit_descriptor = EDIT_DESC_L
#include "hconfig_get_value_template.h"
   end subroutine get_value_logical_seq

   function make_fmt(descriptor) result(fmt)
      character(len=:), allocatable :: fmt
      character(len=*), intent(in) :: descriptor

      fmt =  '(*(' // descriptor // ':", "))'

   end function make_fmt

end module mapl3g_hconfig_get_private