Skip to content

Commit

Permalink
Merge pull request #47 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Merge Develop into Master
  • Loading branch information
mathomp4 authored Feb 12, 2020
2 parents 194d73e + 6f04398 commit 3152285
Show file tree
Hide file tree
Showing 28 changed files with 2,559 additions and 2,240 deletions.
32 changes: 3 additions & 29 deletions AdvCore_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module AdvCore_GridCompMod
! !USES:

use ESMF
use MAPL_Mod
use MAPL
use m_set_eta, only: set_eta
use fv_arrays_mod, only: fv_atmos_type, FVPRC, REAL4, REAL8
use fms_mod, only: fms_init, set_domain, nullify_domain
Expand All @@ -67,6 +67,7 @@ module AdvCore_GridCompMod

USE FV_StateMod, only: AdvCoreTracers => T_TRACERS
USE FV_StateMod, only: FV_Atm
use CubeGridPrototype, only: register_grid_and_regridders

implicit none
private
Expand Down Expand Up @@ -274,6 +275,7 @@ subroutine SetServices(GC, rc)
if (.NOT. FV3_DynCoreIsRunning) then
! Make sure FV3 is setup
! -----------------------
call register_grid_and_regridders()
call fv_init1(FV_Atm, dt, grids_on_my_pe, p_split)
! Get Domain decomposition
!-------------------------
Expand Down Expand Up @@ -316,7 +318,6 @@ subroutine SetServices(GC, rc)
!--------------------------------------------------
if (.NOT. FV3_DynCoreIsRunning) then
call fv_init2(FV_Atm, dt, grids_on_my_pe, p_split)
call register_grid_and_regridders()
end if

! Ending with a Generic SetServices call is a MAPL requirement
Expand Down Expand Up @@ -935,31 +936,4 @@ subroutine global_integral (QG,Q,PLE,IM,JM,KM,NQ)

end subroutine global_integral

subroutine register_grid_and_regridders()
use MAPL_GridManagerMod, only: grid_manager
use CubedSphereGridFactoryMod, only: CubedSphereGridFactory
use MAPL_RegridderManagerMod, only: regridder_manager
use MAPL_RegridderSpecMod, only: REGRID_METHOD_BILINEAR
use LatLonToCubeRegridderMod
use CubeToLatLonRegridderMod
use CubeToCubeRegridderMod

type (CubedSphereGridFactory) :: factory

type (CubeToLatLonRegridder) :: cube_to_latlon_prototype
type (LatLonToCubeRegridder) :: latlon_to_cube_prototype
type (CubeToCubeRegridder) :: cube_to_cube_prototype

call grid_manager%add_prototype('Cubed-Sphere',factory)
associate (method => REGRID_METHOD_BILINEAR, mgr => regridder_manager)
call mgr%add_prototype('Cubed-Sphere', 'LatLon', method, cube_to_latlon_prototype)
call mgr%add_prototype('LatLon', 'Cubed-Sphere', method, latlon_to_cube_prototype)
call mgr%add_prototype('Cubed-Sphere', 'Cubed-Sphere', method, cube_to_cube_prototype)
end associate

end subroutine register_grid_and_regridders

!EOC
!------------------------------------------------------------------------------

end module AdvCore_GridCompMod
Loading

0 comments on commit 3152285

Please sign in to comment.