MAPL_ESMF_InfoKeys.F90 Source File


This file depends on

sourcefile~~mapl_esmf_infokeys.f90~~EfferentGraph sourcefile~mapl_esmf_infokeys.f90 MAPL_ESMF_InfoKeys.F90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~mapl_esmf_infokeys.f90->sourcefile~errorhandling.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~errorhandling.f90->sourcefile~mapl_throw.f90

Files dependent on this one

sourcefile~~mapl_esmf_infokeys.f90~~AfferentGraph sourcefile~mapl_esmf_infokeys.f90 MAPL_ESMF_InfoKeys.F90 sourcefile~fieldbundleinfo.f90 FieldBundleInfo.F90 sourcefile~fieldbundleinfo.f90->sourcefile~mapl_esmf_infokeys.f90 sourcefile~fieldinfo.f90 FieldInfo.F90 sourcefile~fieldinfo.f90->sourcefile~mapl_esmf_infokeys.f90 sourcefile~infoutilities.f90 InfoUtilities.F90 sourcefile~infoutilities.f90->sourcefile~mapl_esmf_infokeys.f90 sourcefile~test_fieldbundledelta.pf Test_FieldBundleDelta.pf sourcefile~test_fieldbundledelta.pf->sourcefile~mapl_esmf_infokeys.f90 sourcefile~test_infoutilities.pf Test_InfoUtilities.pf sourcefile~test_infoutilities.pf->sourcefile~mapl_esmf_infokeys.f90 sourcefile~ungriddeddims.f90 UngriddedDims.F90 sourcefile~ungriddeddims.f90->sourcefile~mapl_esmf_infokeys.f90 sourcefile~verticaldimspec.f90 VerticalDimSpec.F90 sourcefile~verticaldimspec.f90->sourcefile~mapl_esmf_infokeys.f90

Source Code

#include "MAPL_Exceptions.h"
module mapl3g_esmf_info_keys

   use MAPL_ErrorHandling

   implicit none

   public :: INFO_SHARED_NAMESPACE
   public :: INFO_PRIVATE_NAMESPACE
   public :: INFO_INTERNAL_NAMESPACE
   public :: KEY_UNGRIDDED_DIMS
   public :: KEY_VERT_DIM
   public :: KEY_VERT_GRID
   public :: KEY_INTERPOLATION_WEIGHTS
   public :: KEY_FIELD_PROTOTYPE
   public :: KEY_FIELDBUNDLETYPE
   public :: KEY_UNITS
   public :: KEY_LONG_NAME
   public :: KEY_STANDARD_NAME
   public :: KEY_TYPEKIND
   public :: KEY_NUM_LEVELS
   public :: KEY_VLOC
   public :: KEY_NUM_UNGRIDDED_DIMS
   public :: KEYSTUB_DIM
   public :: KEY_UNGRIDDED_NAME
   public :: KEY_UNGRIDDED_UNITS
   public :: KEY_UNGRIDDED_COORD
   public :: KEY_DIM_STRINGS
   public :: make_dim_key
   public :: KEY_VERT_STAGGERLOC
   private

   ! FieldSpec info keys
   character(len=*), parameter :: PREFIX = '/MAPL'
   character(len=*), parameter :: INFO_SHARED_NAMESPACE   = PREFIX // '/shared'
   character(len=*), parameter :: INFO_PRIVATE_NAMESPACE  = PREFIX // '/private'
   character(len=*), parameter :: INFO_INTERNAL_NAMESPACE = PREFIX // '/internal'

   character(len=*), parameter :: KEY_UNGRIDDED_DIMS = '/ungridded_dims'
   character(len=*), parameter :: KEY_VERT_DIM = '/vertical_dim'
   character(len=*), parameter :: KEY_VERT_GRID = '/vertical_grid'
   character(len=*), parameter :: KEY_UNITS = '/units'
   character(len=*), parameter :: KEY_LONG_NAME = '/long_name'
   character(len=*), parameter :: KEY_STANDARD_NAME = '/standard_name'

   ! VerticalGeom info keys
   character(len=*), parameter :: KEY_NUM_LEVELS = KEY_VERT_GRID // '/num_levels'

   ! VerticalDimSpec info keys
   character(len=*), parameter :: KEY_VLOC = KEY_VERT_DIM // '/vloc'
   character(len=*), parameter :: KEY_VERT_STAGGERLOC = "/vert_staggerloc"


   ! UngriddedDims info keys
   character(len=*), parameter :: KEY_NUM_UNGRIDDED_DIMS = '/num_ungridded_dimensions'
   character(len=*), parameter :: KEYSTUB_DIM = '/dim_'

   ! UngriddedDim info keys
   character(len=*), parameter :: KEY_UNGRIDDED_NAME = 'name'
   character(len=*), parameter :: KEY_UNGRIDDED_UNITS = 'units'
   character(len=*), parameter :: KEY_UNGRIDDED_COORD = 'coordinates'

   character(len=*), parameter :: KEY_DIM_STRINGS(9) = [ &
      KEYSTUB_DIM // '1', KEYSTUB_DIM // '2', KEYSTUB_DIM // '3', &
      KEYSTUB_DIM // '4', KEYSTUB_DIM // '5', KEYSTUB_DIM // '6', &
      KEYSTUB_DIM // '7', KEYSTUB_DIM // '8', KEYSTUB_DIM // '9']

   character(len=*), parameter :: KEY_TYPEKIND = '/typekind'
   character(len=*), parameter :: KEY_FIELD_PROTOTYPE = '/field_prototype'
   character(len=*), parameter :: KEY_INTERPOLATION_WEIGHTS = '/interpolation_weights'
   character(len=*), parameter :: KEY_FIELDBUNDLETYPE = '/fieldBundleType'

contains

   function make_dim_key(n, rc) result(key)
      character(len=:), allocatable :: key
      integer, intent(in) :: n
      integer, optional, intent(out) :: rc
      integer :: status
      character(len=32) :: raw

      key = ''
      _ASSERT(n > 0, 'Index must be positive.')
      if(n <= size(KEY_DIM_STRINGS)) then
         key = KEY_DIM_STRINGS(n)
         _RETURN(_SUCCESS)
      end if
      write(raw, fmt='(I0)', iostat=status) n
      _ASSERT(status == 0, 'Write failed')
      key = KEYSTUB_DIM // trim(raw)
      _RETURN(_SUCCESS)

   end function make_dim_key

end module mapl3g_esmf_info_keys