Skip to content

Commit 10e9cc0

Browse files
committed
New dummy routine GFS->finalize for FV3 with corresponding wrapper and cap in the IPD layer.F90
1 parent baee1ca commit 10e9cc0

File tree

4 files changed

+44
-10
lines changed

4 files changed

+44
-10
lines changed

GFS_layer/GFS_abstraction_layer.F90

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ module physics_abstraction_layer
1515

1616
#ifdef CCPP
1717
use GFS_driver, only: initialize => GFS_initialize, &
18-
time_vary_step => GFS_time_vary_step
18+
time_vary_step => GFS_time_vary_step, &
19+
finalize => GFS_finalize
1920
#else
2021
use GFS_driver, only: initialize => GFS_initialize, &
2122
time_vary_step => GFS_time_vary_step, &
2223
radiation_step1 => GFS_radiation_driver, &
2324
physics_step1 => GFS_physics_driver, &
24-
physics_step2 => GFS_stochastic_driver
25+
physics_step2 => GFS_stochastic_driver,&
26+
finalize => GFS_finalize
2527
#endif
2628

2729
!----------------------
@@ -50,6 +52,7 @@ module physics_abstraction_layer
5052
public physics_step1
5153
public physics_step2
5254
#endif
55+
public finalize
5356

5457
CONTAINS
5558

GFS_layer/GFS_driver.F90

+11-3
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,15 @@ module GFS_driver
9191
public GFS_physics_driver !< physics_driver (was gbphys)
9292
public GFS_stochastic_driver !< stochastic physics
9393
#endif
94+
public GFS_finalize
9495

9596
CONTAINS
9697
!*******************************************************************************************
9798

9899

99-
!--------------
100-
! GFS initialze
101-
!--------------
100+
!---------------
101+
! GFS initialize
102+
!---------------
102103
subroutine GFS_initialize (Model, Statein, Stateout, Sfcprop, &
103104
Coupling, Grid, Tbd, Cldprop, Radtend, &
104105
Diag, Interstitial, Init_parm)
@@ -378,4 +379,11 @@ subroutine GFS_grid_populate (Grid, xlon, xlat, area)
378379

379380
end subroutine GFS_grid_populate
380381

382+
383+
!-------------
384+
! GFS finalize
385+
!-------------
386+
subroutine GFS_finalize ()
387+
end subroutine GFS_finalize
388+
381389
end module GFS_driver

IPD_layer/IPD_driver.F90

+13-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ module IPD_driver
55
IPD_diag_type, IPD_restart_type, &
66
IPD_interstitial_type
77
#ifdef CCPP
8-
use physics_abstraction_layer, only: initialize, time_vary_step
8+
use physics_abstraction_layer, only: initialize, time_vary_step, &
9+
finalize
910
#else
1011
use physics_abstraction_layer, only: initialize, time_vary_step, &
1112
radiation_step1, physics_step1, &
12-
physics_step2
13+
physics_step2, finalize
1314
#endif
1415

1516
use physics_diag_layer, only: diag_populate
@@ -38,13 +39,14 @@ module IPD_driver
3839
public IPD_physics_step1
3940
public IPD_physics_step2
4041
#endif
42+
public IPD_finalize
4143

4244
CONTAINS
4345
!*******************************************************************************************
4446

4547

4648
!----------------
47-
! IPD Initialize
49+
! IPD initialize
4850
!----------------
4951
subroutine IPD_initialize (IPD_control, IPD_Data, IPD_Diag, IPD_Restart, IPD_Interstitial, IPD_init_parm)
5052
type(IPD_control_type), intent(inout) :: IPD_Control
@@ -147,4 +149,12 @@ subroutine IPD_physics_step2 (IPD_Control, IPD_Data, IPD_Diag, IPD_Restart)
147149
end subroutine IPD_physics_step2
148150
#endif
149151

152+
!----------------
153+
! IPD finalize
154+
!----------------
155+
subroutine IPD_finalize ()
156+
!--- finalize the physics suite
157+
call finalize ()
158+
end subroutine IPD_finalize
159+
150160
end module IPD_driver

IPD_layer/IPD_driver_cap.F90

+15-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ module IPD_driver_cap
3434
IPD_interstitial_type
3535
use :: IPD_driver, &
3636
only: IPD_initialize, &
37-
IPD_setup_step
37+
IPD_setup_step, &
38+
IPD_finalize
3839
use :: machine, &
3940
only: kind_phys
4041
use :: namelist_soilveg, &
@@ -44,7 +45,8 @@ module IPD_driver_cap
4445
private
4546

4647
public :: ipd_initialize_cap, &
47-
ipd_setup_step_cap
48+
ipd_setup_step_cap, &
49+
ipd_finalize_cap
4850

4951
contains
5052

@@ -173,4 +175,15 @@ function ipd_setup_step_cap(ptr) bind(c) result(ierr)
173175

174176
end function IPD_setup_step_cap
175177

178+
function ipd_finalize_cap(ptr) bind(c) result(ierr)
179+
180+
integer(c_int32_t) :: ierr
181+
type(c_ptr), intent(inout) :: ptr
182+
183+
ierr = 0
184+
185+
call IPD_finalize()
186+
187+
end function ipd_finalize_cap
188+
176189
end module IPD_driver_cap

0 commit comments

Comments
 (0)