supports_hconfig.F90 Source File


This file depends on

sourcefile~~supports_hconfig.f90~2~~EfferentGraph sourcefile~supports_hconfig.f90~2 supports_hconfig.F90 sourcefile~base.f90 Base.F90 sourcefile~supports_hconfig.f90~2->sourcefile~base.f90 sourcefile~coordinateaxis.f90 CoordinateAxis.F90 sourcefile~supports_hconfig.f90~2->sourcefile~coordinateaxis.f90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~supports_hconfig.f90~2->sourcefile~errorhandling.f90 sourcefile~geomspec.f90 GeomSpec.F90 sourcefile~supports_hconfig.f90~2->sourcefile~geomspec.f90 sourcefile~latlongeomspec.f90 LatLonGeomSpec.F90 sourcefile~supports_hconfig.f90~2->sourcefile~latlongeomspec.f90 sourcefile~mapl_range.f90 MAPL_Range.F90 sourcefile~supports_hconfig.f90~2->sourcefile~mapl_range.f90 sourcefile~pfio.f90 pFIO.F90 sourcefile~supports_hconfig.f90~2->sourcefile~pfio.f90

Source Code

#include "MAPL_ErrLog.h"

submodule (mapl3g_LatLonGeomSpec) supports_hconfig_smod
   use mapl3g_CoordinateAxis
   use mapl3g_GeomSpec
   use pfio
   use MAPL_RangeMod
   use MAPLBase_Mod
   use mapl_ErrorHandling
   use esmf
   implicit none (type, external)
   
contains

   logical module function supports_hconfig_(this, hconfig, rc) result(supports)
      class(LatLonGeomSpec), intent(in) :: this
      type(ESMF_HConfig), intent(in) :: hconfig
      integer, optional, intent(out) :: rc

      integer :: status
      type(LonAxis) :: lon_axis
      type(LatAxis) :: lat_axis
      character(:), allocatable :: geom_class

      ! Mandatory entry: "class: latlon"
      supports = ESMF_HConfigIsDefined(hconfig, keystring='class', _RC)
      _RETURN_UNLESS(supports)

      geom_class = ESMF_HConfigAsString(hconfig, keyString='class', _RC)
      supports = (geom_class == 'latlon')
      _RETURN_UNLESS(supports)
      
      supports = lon_axis%supports(hconfig, _RC)
      _RETURN_UNLESS(supports)

      supports = lat_axis%supports(hconfig, _RC)
      _RETURN_UNLESS(supports)

      _RETURN(_SUCCESS)
   end function supports_hconfig_

end submodule supports_hconfig_smod