RegridderSpec.F90 Source File


This file depends on

sourcefile~~regridderspec.f90~2~~EfferentGraph sourcefile~regridderspec.f90~2 RegridderSpec.F90 sourcefile~geom_mgr.f90 geom_mgr.F90 sourcefile~regridderspec.f90~2->sourcefile~geom_mgr.f90 sourcefile~regridderparam.f90 RegridderParam.F90 sourcefile~regridderspec.f90~2->sourcefile~regridderparam.f90 sourcefile~geomspec.f90 GeomSpec.F90 sourcefile~geom_mgr.f90->sourcefile~geomspec.f90 sourcefile~geomutilities.f90 GeomUtilities.F90 sourcefile~geom_mgr.f90->sourcefile~geomutilities.f90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~geomutilities.f90->sourcefile~errorhandling.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~errorhandling.f90->sourcefile~mapl_throw.f90

Files dependent on this one

sourcefile~~regridderspec.f90~2~~AfferentGraph sourcefile~regridderspec.f90~2 RegridderSpec.F90 sourcefile~esmfregridderfactory.f90 EsmfRegridderFactory.F90 sourcefile~esmfregridderfactory.f90->sourcefile~regridderspec.f90~2 sourcefile~regridder_mgr.f90 regridder_mgr.F90 sourcefile~regridder_mgr.f90->sourcefile~regridderspec.f90~2 sourcefile~regriddermanager.f90 RegridderManager.F90 sourcefile~regridder_mgr.f90->sourcefile~regriddermanager.f90 sourcefile~regriddermanager.f90->sourcefile~regridderspec.f90~2 sourcefile~regriddermanager.f90->sourcefile~esmfregridderfactory.f90 sourcefile~regridderspecvector.f90 RegridderSpecVector.F90 sourcefile~regriddermanager.f90->sourcefile~regridderspecvector.f90 sourcefile~regridderspecvector.f90->sourcefile~regridderspec.f90~2 sourcefile~regridaction.f90 RegridAction.F90 sourcefile~regridaction.f90->sourcefile~regridder_mgr.f90 sourcefile~test_regriddermanager.pf Test_RegridderManager.pf sourcefile~test_regriddermanager.pf->sourcefile~regridder_mgr.f90 sourcefile~test_routehandlemanager.pf Test_RouteHandleManager.pf sourcefile~test_routehandlemanager.pf->sourcefile~regridder_mgr.f90 sourcefile~fieldspec.f90~2 FieldSpec.F90 sourcefile~fieldspec.f90~2->sourcefile~regridaction.f90 sourcefile~bracketspec.f90 BracketSpec.F90 sourcefile~bracketspec.f90->sourcefile~fieldspec.f90~2 sourcefile~make_itemspec.f90 make_itemSpec.F90 sourcefile~make_itemspec.f90->sourcefile~fieldspec.f90~2 sourcefile~modelverticalgrid.f90 ModelVerticalGrid.F90 sourcefile~modelverticalgrid.f90->sourcefile~fieldspec.f90~2 sourcefile~test_addfieldspec.pf Test_AddFieldSpec.pf sourcefile~test_addfieldspec.pf->sourcefile~fieldspec.f90~2 sourcefile~test_bracketspec.pf Test_BracketSpec.pf sourcefile~test_bracketspec.pf->sourcefile~fieldspec.f90~2 sourcefile~test_fieldinfo.pf Test_FieldInfo.pf sourcefile~test_fieldinfo.pf->sourcefile~fieldspec.f90~2 sourcefile~test_fieldspec.pf Test_FieldSpec.pf sourcefile~test_fieldspec.pf->sourcefile~fieldspec.f90~2

Source Code

#include "MAPL_Generic.h"

module mapl3g_RegridderSpec
   use esmf
   use mapl3g_RegridderParam
   use mapl3g_geom_mgr, only: MAPL_SameGeom
   implicit none
   private

   public :: RegridderSpec
   public :: operator(==)

   type :: RegridderSpec
      private
      class(RegridderParam), allocatable :: param
      type(ESMF_Geom) :: geom_in
      type(ESMF_Geom) :: geom_out
   contains
      procedure :: get_param
      procedure :: get_geom_in
      procedure :: get_geom_out
   end type RegridderSpec

   interface operator(==)
      module procedure equal_to
   end interface operator(==)

   interface RegridderSpec
      procedure new_RegridderSpec
   end interface RegridderSpec

contains

   function new_RegridderSpec(param, geom_in, geom_out) result(spec)
      type(RegridderSpec) :: spec
      class(RegridderParam), intent(in) :: param
      type(ESMF_Geom), intent(in) :: geom_in
      type(ESMF_Geom), intent(in) :: geom_out

      spec%param = param
      spec%geom_in = geom_in
      spec%geom_out = geom_out
   end function new_RegridderSpec

   function get_param(this) result(param)
      class(RegridderParam), allocatable :: param
      class(RegridderSpec), intent(in) :: this
      param = this%param
   end function get_param

   function get_geom_in(this) result(geom)
      type(ESMF_Geom) :: geom
      class(RegridderSpec), intent(in) :: this
      geom = this%geom_in
   end function get_geom_in

   function get_geom_out(this) result(geom)
      type(ESMF_Geom) :: geom
      class(RegridderSpec), intent(in) :: this
      geom = this%geom_out
   end function get_geom_out
   
   logical function equal_to(this, other) result(eq)
      type(RegridderSpec), intent(in) :: this
      type(RegridderSpec), intent(in) :: other

      eq = this%param == other%param
      if (.not. eq) return

      eq = MAPL_SameGeom(this%geom_in, other%geom_in)
      if (.not. eq) return

      eq = MAPL_SameGeom(this%geom_out, other%geom_out)
      if (.not. eq) return
      
   end function equal_to

   
end module mapl3g_RegridderSpec