MAPL_GridSpec.F90 Source File


This file depends on

sourcefile~~mapl_gridspec.f90~~EfferentGraph sourcefile~mapl_gridspec.f90 MAPL_GridSpec.F90 sourcefile~mapl_gridtype.f90 MAPL_GridType.F90 sourcefile~mapl_gridspec.f90->sourcefile~mapl_gridtype.f90

Files dependent on this one

sourcefile~~mapl_gridspec.f90~~AfferentGraph sourcefile~mapl_gridspec.f90 MAPL_GridSpec.F90 sourcefile~mapl_identityregridder.f90 MAPL_IdentityRegridder.F90 sourcefile~mapl_identityregridder.f90->sourcefile~mapl_gridspec.f90 sourcefile~mapl_latlontolatlonregridder.f90 MAPL_LatLonToLatLonRegridder.F90 sourcefile~mapl_latlontolatlonregridder.f90->sourcefile~mapl_gridspec.f90 sourcefile~mapl_regriddermanager.f90 MAPL_RegridderManager.F90 sourcefile~mapl_regriddermanager.f90->sourcefile~mapl_identityregridder.f90 sourcefile~mapl_regriddermanager.f90->sourcefile~mapl_latlontolatlonregridder.f90 sourcefile~newregriddermanager.f90 NewRegridderManager.F90 sourcefile~newregriddermanager.f90->sourcefile~mapl_identityregridder.f90 sourcefile~base.f90 Base.F90 sourcefile~base.f90->sourcefile~mapl_regriddermanager.f90 sourcefile~base.f90->sourcefile~newregriddermanager.f90 sourcefile~mapl_cfio.f90 MAPL_CFIO.F90 sourcefile~base.f90->sourcefile~mapl_cfio.f90 sourcefile~griddedio.f90 GriddedIO.F90 sourcefile~griddedio.f90->sourcefile~newregriddermanager.f90 sourcefile~mapl_cfio.f90->sourcefile~mapl_regriddermanager.f90 sourcefile~mapl_cfio.f90->sourcefile~newregriddermanager.f90 sourcefile~mapl_epochswathmod.f90 MAPL_EpochSwathMod.F90 sourcefile~mapl_epochswathmod.f90->sourcefile~newregriddermanager.f90 sourcefile~regrid_util.f90 Regrid_Util.F90 sourcefile~regrid_util.f90->sourcefile~newregriddermanager.f90 sourcefile~regrid_util.f90->sourcefile~mapl_cfio.f90 sourcefile~extdata_iobundlemod.f90 ExtData_IOBundleMod.F90 sourcefile~extdata_iobundlemod.f90->sourcefile~griddedio.f90 sourcefile~extdata_iobundlemod.f90~2 ExtData_IOBundleMod.F90 sourcefile~extdata_iobundlemod.f90~2->sourcefile~griddedio.f90 sourcefile~extdatadrivermod.f90 ExtDataDriverMod.F90 sourcefile~extdatadrivermod.f90->sourcefile~mapl_cfio.f90 sourcefile~extdatagridcompmod.f90 ExtDataGridCompMod.F90 sourcefile~extdatagridcompmod.f90->sourcefile~mapl_cfio.f90 sourcefile~extdatagridcompng.f90 ExtDataGridCompNG.F90 sourcefile~extdatagridcompng.f90->sourcefile~mapl_cfio.f90 sourcefile~fieldbundleread.f90 FieldBundleRead.F90 sourcefile~fieldbundleread.f90->sourcefile~griddedio.f90 sourcefile~fieldbundlewrite.f90 FieldBundleWrite.F90 sourcefile~fieldbundlewrite.f90->sourcefile~griddedio.f90 sourcefile~mapl.f90 MAPL.F90 sourcefile~mapl.f90->sourcefile~base.f90 sourcefile~mapl_cap.f90 MAPL_Cap.F90 sourcefile~mapl_cap.f90->sourcefile~mapl_cfio.f90 sourcefile~mapl_historycollection.f90 MAPL_HistoryCollection.F90 sourcefile~mapl_historycollection.f90->sourcefile~griddedio.f90 sourcefile~mapl_historycollection.f90->sourcefile~mapl_cfio.f90 sourcefile~mapl_historycollection.f90->sourcefile~mapl_epochswathmod.f90 sourcefile~mapl_historygridcomp.f90 MAPL_HistoryGridComp.F90 sourcefile~mapl_historygridcomp.f90->sourcefile~mapl_cfio.f90 sourcefile~mapl_historygridcomp.f90->sourcefile~mapl_epochswathmod.f90 sourcefile~mapl_nuopcwrappermod.f90 MAPL_NUOPCWrapperMod.F90 sourcefile~mapl_nuopcwrappermod.f90->sourcefile~base.f90 sourcefile~mapl_simplebundlemod.f90 MAPL_SimpleBundleMod.F90 sourcefile~mapl_simplebundlemod.f90->sourcefile~mapl_cfio.f90 sourcefile~test_cfio_bundle.pf Test_CFIO_Bundle.pf sourcefile~test_cfio_bundle.pf->sourcefile~base.f90 sourcefile~tstqsat.f90 tstqsat.F90 sourcefile~tstqsat.f90->sourcefile~base.f90 sourcefile~ut_extdata.f90 ut_ExtData.F90 sourcefile~ut_extdata.f90->sourcefile~base.f90 sourcefile~utcfio_array.f90 utCFIO_Array.F90 sourcefile~utcfio_array.f90->sourcefile~mapl_cfio.f90 sourcefile~utcfio_bundle.f90 utCFIO_Bundle.F90 sourcefile~utcfio_bundle.f90->sourcefile~base.f90 sourcefile~utcfio_nbits.f90 utCFIO_Nbits.F90 sourcefile~utcfio_nbits.f90->sourcefile~mapl_cfio.f90

Source Code

module MAPL_GridSpecMod
   use MAPL_GridTypeMod
   implicit none
   private

   public :: GridSpec
   public :: DimensionSpec
   ! parameters


   integer, parameter :: NUM_DIMS = 2

   type :: DimensionSpec
      integer :: num_points
      integer :: topology
      real :: x_min
      real :: x_max
   contains
      procedure :: equals_dim
      procedure :: not_equals_dim
      generic :: operator(==) => equals_dim
      generic :: operator(/=) => not_equals_dim
   end type DimensionSpec


   type :: GridSpec
      type (GridType) :: grid_type
      type (DimensionSpec) :: dim_specs(NUM_DIMS)
   contains
      procedure :: equals_grid
      procedure :: not_equals_grid
      generic :: operator(==) => equals_grid
      generic :: operator(/=) => not_equals_grid
   end type GridSpec



contains

   
   impure elemental logical function equals_grid(a, b) result(equals)
      class (GridSpec), intent(in) :: a
      class (GridSpec), intent(in) :: b

      equals = all(a%dim_specs == b%dim_specs) .and. &
           & (a%grid_type == b%grid_type)

   end function equals_grid


   impure elemental logical function not_equals_grid(a, b) result(not_equals)
      class (GridSpec), intent(in) :: a
      class (GridSpec), intent(in) :: b

      not_equals = .not. (a == b)

   end function not_equals_grid
   

   impure elemental logical function equals_dim(a, b) result(equals)
      class (DimensionSpec), intent(in) :: a
      class (DimensionSpec), intent(in) :: b

      equals = &
           & (a%num_points == b%num_points) .and. &
           & (a%topology == b%topology) .and. &
           & (a%x_min == b%x_min) .and. &
           & (a%x_max == b%x_max)

   end function equals_dim


   impure elemental logical function not_equals_dim(a, b) result(not_equals)
      class (DimensionSpec), intent(in) :: a
      class (DimensionSpec), intent(in) :: b

      not_equals = .not. (a == b)

   end function not_equals_dim

   
end module MAPL_GridSpecMod