MAPL_FractionalRegridder.F90 Source File


This file depends on

sourcefile~~mapl_fractionalregridder.f90~~EfferentGraph sourcefile~mapl_fractionalregridder.f90 MAPL_FractionalRegridder.F90 sourcefile~mapl_abstractregridder.f90 MAPL_AbstractRegridder.F90 sourcefile~mapl_fractionalregridder.f90->sourcefile~mapl_abstractregridder.f90 sourcefile~mapl_tilingregridder.f90 MAPL_TilingRegridder.F90 sourcefile~mapl_fractionalregridder.f90->sourcefile~mapl_tilingregridder.f90 sourcefile~base_base.f90 Base_Base.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~base_base.f90 sourcefile~constants.f90 Constants.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~constants.f90 sourcefile~mapl_exceptionhandling.f90 MAPL_ExceptionHandling.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~mapl_keywordenforcer.f90 MAPL_KeywordEnforcer.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~mapl_memutils.f90 MAPL_MemUtils.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~mapl_memutils.f90 sourcefile~regridderspec.f90 RegridderSpec.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~regridderspec.f90 sourcefile~regridderspecroutehandlemap.f90 RegridderSpecRouteHandleMap.F90 sourcefile~mapl_abstractregridder.f90->sourcefile~regridderspecroutehandlemap.f90 sourcefile~mapl_tilingregridder.f90->sourcefile~mapl_abstractregridder.f90 sourcefile~mapl_tilingregridder.f90->sourcefile~base_base.f90 sourcefile~mapl_tilingregridder.f90->sourcefile~constants.f90 sourcefile~mapl_abstractgridfactory.f90 MAPL_AbstractGridFactory.F90 sourcefile~mapl_tilingregridder.f90->sourcefile~mapl_abstractgridfactory.f90 sourcefile~mapl_comms.f90 MAPL_Comms.F90 sourcefile~mapl_tilingregridder.f90->sourcefile~mapl_comms.f90 sourcefile~mapl_dirpath.f90 MAPL_DirPath.F90 sourcefile~mapl_tilingregridder.f90->sourcefile~mapl_dirpath.f90 sourcefile~mapl_errorhandling.f90 MAPL_ErrorHandling.F90 sourcefile~mapl_tilingregridder.f90->sourcefile~mapl_errorhandling.f90 sourcefile~mapl_gridmanager.f90 MAPL_GridManager.F90 sourcefile~mapl_tilingregridder.f90->sourcefile~mapl_gridmanager.f90 sourcefile~mapl_tilingregridder.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~pfio.f90 pFIO.F90 sourcefile~mapl_tilingregridder.f90->sourcefile~pfio.f90 sourcefile~regrid_functions_mod.f90 Regrid_Functions_Mod.F90 sourcefile~mapl_tilingregridder.f90->sourcefile~regrid_functions_mod.f90 sourcefile~mapl_tilingregridder.f90->sourcefile~regridderspec.f90 sourcefile~regridmethods.f90 RegridMethods.F90 sourcefile~mapl_tilingregridder.f90->sourcefile~regridmethods.f90 sourcefile~shmem.f90 Shmem.F90 sourcefile~mapl_tilingregridder.f90->sourcefile~shmem.f90

Files dependent on this one

sourcefile~~mapl_fractionalregridder.f90~~AfferentGraph sourcefile~mapl_fractionalregridder.f90 MAPL_FractionalRegridder.F90 sourcefile~mapl_regriddermanager.f90 MAPL_RegridderManager.F90 sourcefile~mapl_regriddermanager.f90->sourcefile~mapl_fractionalregridder.f90 sourcefile~base.f90 Base.F90 sourcefile~base.f90->sourcefile~mapl_regriddermanager.f90 sourcefile~mapl_cfio.f90 MAPL_CFIO.F90 sourcefile~base.f90->sourcefile~mapl_cfio.f90 sourcefile~mapl_simplebundlemod.f90 MAPL_SimpleBundleMod.F90 sourcefile~base.f90->sourcefile~mapl_simplebundlemod.f90 sourcefile~mapl_cfio.f90->sourcefile~mapl_regriddermanager.f90 sourcefile~extdatadrivermod.f90 ExtDataDriverMod.F90 sourcefile~extdatadrivermod.f90->sourcefile~mapl_cfio.f90 sourcefile~mapl.f90 MAPL.F90 sourcefile~extdatadrivermod.f90->sourcefile~mapl.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~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~mapl_cfio.f90 sourcefile~mapl_historygridcomp.f90 MAPL_HistoryGridComp.F90 sourcefile~mapl_historygridcomp.f90->sourcefile~mapl_cfio.f90 sourcefile~mapl_historygridcomp.f90->sourcefile~mapl_historycollection.f90 sourcefile~mapl_nuopcwrappermod.f90 MAPL_NUOPCWrapperMod.F90 sourcefile~mapl_nuopcwrappermod.f90->sourcefile~base.f90 sourcefile~mapl_nuopcwrappermod.f90->sourcefile~mapl_cap.f90 sourcefile~mapl_simplebundlemod.f90->sourcefile~mapl_cfio.f90 sourcefile~regrid_util.f90 Regrid_Util.F90 sourcefile~regrid_util.f90->sourcefile~mapl_cfio.f90 sourcefile~regrid_util.f90->sourcefile~mapl.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~ut_extdata.f90->sourcefile~extdatagridcompmod.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 sourcefile~capdriver.f90 CapDriver.F90 sourcefile~capdriver.f90->sourcefile~mapl.f90 sourcefile~comp_testing_driver.f90 Comp_Testing_Driver.F90 sourcefile~comp_testing_driver.f90->sourcefile~mapl.f90 sourcefile~extdatadriver.f90 ExtDataDriver.F90 sourcefile~extdatadriver.f90->sourcefile~extdatadrivermod.f90 sourcefile~extdatadriver.f90->sourcefile~mapl.f90 sourcefile~extdatadrivergridcomp.f90 ExtDataDriverGridComp.F90 sourcefile~extdatadrivergridcomp.f90->sourcefile~extdatagridcompmod.f90 sourcefile~extdatadrivergridcomp.f90->sourcefile~extdatagridcompng.f90 sourcefile~extdatadrivergridcomp.f90->sourcefile~mapl.f90 sourcefile~extdatadrivergridcomp.f90->sourcefile~mapl_historygridcomp.f90 sourcefile~extdataroot_gridcomp.f90 ExtDataRoot_GridComp.F90 sourcefile~extdataroot_gridcomp.f90->sourcefile~mapl.f90 sourcefile~mapl_capgridcomp.f90 MAPL_CapGridComp.F90 sourcefile~mapl_capgridcomp.f90->sourcefile~extdatagridcompmod.f90 sourcefile~mapl_capgridcomp.f90->sourcefile~extdatagridcompng.f90 sourcefile~mapl_capgridcomp.f90->sourcefile~mapl_historygridcomp.f90 sourcefile~mapl_demo_fargparse.f90 MAPL_demo_fargparse.F90 sourcefile~mapl_demo_fargparse.f90->sourcefile~mapl.f90 sourcefile~mapl_gridcomps.f90 MAPL_GridComps.F90 sourcefile~mapl_gridcomps.f90->sourcefile~mapl_cap.f90 sourcefile~pfio_mapl_demo.f90 pfio_MAPL_demo.F90 sourcefile~pfio_mapl_demo.f90->sourcefile~mapl.f90 sourcefile~time_ave_util.f90 time_ave_util.F90 sourcefile~time_ave_util.f90->sourcefile~mapl.f90 sourcefile~varspecdescription.f90 VarspecDescription.F90 sourcefile~varspecdescription.f90->sourcefile~mapl.f90

Source Code

module MAPL_FractionalRegridderMod
   use MAPL_AbstractRegridderMod
   use MAPL_TilingRegridderMod
   use ESMF
   use, intrinsic :: iso_fortran_env, only: REAL32
   implicit none
   private

   public :: FractionalRegridder

   type, extends(TilingRegridder) :: FractionalRegridder
      private
   contains
      procedure, nopass :: add_contribution
   end type FractionalRegridder
   

contains


   subroutine add_contribution(x_in, weight, x_out, fraction)
      real (kind=REAL32), intent(in) :: x_in
      real (kind=REAL32), intent(in) :: weight
      real (kind=REAL32), intent(inout) :: x_out
      real (kind=REAL32), intent(inout) :: fraction

      if (nint(x_in) == 0) then
         x_out = x_out + weight
      end if
      fraction = fraction + weight
      
   end subroutine add_contribution
   
   
end module MAPL_FractionalRegridderMod