Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for optional arguments in ccpp physics and framework #807

Merged
merged 35 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b7835b7
Update .gitmodules and submodule pointer for ccpp-framework for code …
climbfuji Mar 8, 2024
8eb9826
Update .gitmodules and submodule pointer for ccpp-physics for code re…
climbfuji Mar 8, 2024
108e85c
In ccpp/data/GFS_typedefs.meta: change units 'flashes 5 min-1' to 'fl…
climbfuji Mar 8, 2024
734d81a
In ccpp/driver/GFS_diagnostics.F90, scale lightning threat from flash…
climbfuji Mar 8, 2024
43333d5
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
climbfuji Mar 11, 2024
0972de7
Fix wrong long names for lightning threat indices in ccpp/data/GFS_ty…
climbfuji Mar 11, 2024
2946888
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
climbfuji Mar 20, 2024
84a1aac
Update .gitmodules and submodule pointer for ccpp-framework for code …
climbfuji Mar 20, 2024
c5b390a
Update .gitmodules and submodule pointer for ccpp-physics for code re…
climbfuji Mar 22, 2024
daa5bee
Remove invalid active attributes in ccpp/data/GFS_typedefs.meta
climbfuji Mar 22, 2024
2879440
Update submodule pointer for ccpp-physics
climbfuji Mar 22, 2024
9b13193
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
climbfuji Apr 3, 2024
e726c68
Update submodule pointers for ccpp-framework and ccpp-physics
climbfuji Apr 3, 2024
5a18b70
Update submodule pointer for ccpp-physics
climbfuji Apr 4, 2024
98cc7c1
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
climbfuji Apr 10, 2024
bb8fdad
Update submodule pointer for ccpp-physics
climbfuji Apr 14, 2024
bcbe67c
Update submodule pointer for ccpp-physics
climbfuji Apr 14, 2024
9b0f9bc
Bug fix for GFDL-MP in CCPP: use correct allocation of variables but …
climbfuji Apr 18, 2024
77022b5
Bug fix in ccpp/data/GFS_typedefs.meta: sncovr_ice is always allocate…
climbfuji Apr 18, 2024
9359ac5
Bug fix in ccpp/data/CCPP_typedefs.meta small-scale gravity wave drag…
climbfuji Apr 19, 2024
712e5c7
Bug fix in ccpp/data/GFS_typedefs.meta: three variables are always al…
climbfuji Apr 19, 2024
516f773
More bug fixes for active attributes in ccpp/data/GFS_typedefs.meta
climbfuji Apr 19, 2024
1f56b50
More bug fixes for allocation dimensions in ccpp/data/CCPP_typedefs.*…
climbfuji Apr 27, 2024
e4304ee
Update .gitmodules and submodule pointer for GFDL_atmos_cubed_sphere …
climbfuji Apr 27, 2024
f87ef0c
Set ccpp_data's thrd_cnt in ccpp/driver/CCPP_driver.F90
climbfuji Apr 27, 2024
a446b96
Update submodule pointer for ccpp-physics
climbfuji Apr 29, 2024
54d6058
Update submodule pointer for ccpp-physics
climbfuji Apr 30, 2024
bd42123
Update submodule pointer for ccpp-physics
climbfuji May 1, 2024
3f28648
No default in OMP pragmas in ccpp/driver/CCPP_driver.F90
climbfuji May 7, 2024
91528d5
Update submodule pointer for ccpp-physics
climbfuji May 10, 2024
87fc7d6
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
climbfuji May 10, 2024
5eacf1c
Address self-review
climbfuji May 11, 2024
e337210
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
climbfuji May 20, 2024
2b53b6c
Update submodule pointer for ccpp-physics
climbfuji May 20, 2024
b872338
Revert .gitmodules and update submodule pointers for atmos_cubed_sphe…
climbfuji May 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion atmos_cubed_sphere
30 changes: 30 additions & 0 deletions ccpp/data/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,18 @@ module CCPP_typedefs
integer :: ie
integer :: isd
integer :: ied
integer :: isc1
jkbk2004 marked this conversation as resolved.
Show resolved Hide resolved
integer :: iec1
integer :: isc2
integer :: iec2
integer :: js
integer :: je
integer :: jsd
integer :: jed
integer :: jsc1
integer :: jec1
integer :: jsc2
integer :: jec2
integer :: ng
integer :: npz
integer :: npzp1
Expand Down Expand Up @@ -1557,6 +1565,18 @@ subroutine gfdl_interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd
integer, intent(in) :: mpirank
integer, intent(in) :: mpiroot
!
integer :: isc1, jsc1, iec1, jec1
integer :: isc2, jsc2, iec2, jec2
!
isc1 = lbound(delp, dim=1)
jsc1 = lbound(delp, dim=2)
iec1 = ubound(delp, dim=1)
jec1 = ubound(delp, dim=2)
isc2 = lbound(delz, dim=1)
jsc2 = lbound(delz, dim=2)
iec2 = ubound(delz, dim=1)
jec2 = ubound(delz, dim=2)
!
#ifdef MOIST_CAPPA
Interstitial%npzcappa = npz
allocate (Interstitial%cappa (isd:ied, jsd:jed, 1:npz) )
Expand Down Expand Up @@ -1594,13 +1614,22 @@ subroutine gfdl_interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd
Interstitial%ie = ie
Interstitial%isd = isd
Interstitial%ied = ied
Interstitial%isc1 = isc1
Interstitial%iec1 = iec1
Interstitial%isc2 = isc2
Interstitial%iec2 = iec2
Interstitial%js = js
Interstitial%je = je
Interstitial%jsd = jsd
Interstitial%jed = jed
Interstitial%jsc1 = jsc1
Interstitial%jec1 = jec1
Interstitial%jsc2 = jsc2
Interstitial%jec2 = jec2
Interstitial%ng = ng
Interstitial%npz = npz
Interstitial%npzp1 = npz+1
!
! Set up links from GFDL_interstitial DDT to ATM DDT
Interstitial%delp => delp
Interstitial%delz => delz
Expand All @@ -1617,6 +1646,7 @@ subroutine gfdl_interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd
if (do_qs) Interstitial%qs => qs
if (do_qg) Interstitial%qg => qg
if (do_qa) Interstitial%qc => qc
!
#ifdef USE_COND
Interstitial%npzq_con = npz
#else
Expand Down
88 changes: 68 additions & 20 deletions ccpp/data/CCPP_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@
dimensions = (horizontal_loop_extent,4)
type = real
kind = kind_phys
active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33)
active = (control_for_drag_suite_gravity_wave_drag == 2 .or. control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 22 .or. control_for_drag_suite_gravity_wave_drag == 33)
[cmm_water]
standard_name = surface_drag_wind_speed_for_momentum_in_air_over_water
long_name = momentum exchange coefficient over water
Expand Down Expand Up @@ -1526,15 +1526,15 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33)
active = (control_for_drag_suite_gravity_wave_drag == 2 .or. control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 22 .or. control_for_drag_suite_gravity_wave_drag == 33)
[oa4ss]
standard_name = asymmetry_of_subgrid_orography_small_scale
long_name = asymmetry of subgrid height_above_mean_sea_level small scale
units = none
dimensions = (horizontal_loop_extent,4)
type = real
kind = kind_phys
active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33)
active = (control_for_drag_suite_gravity_wave_drag == 2 .or. control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 22 .or. control_for_drag_suite_gravity_wave_drag == 33)
[oc]
standard_name = convexity_of_subgrid_orography
long_name = convexity of subgrid height_above_mean_sea_level
Expand All @@ -1549,7 +1549,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
active = (control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 33)
active = (control_for_drag_suite_gravity_wave_drag == 2 .or. control_for_drag_suite_gravity_wave_drag == 3 .or. control_for_drag_suite_gravity_wave_drag == 22 .or. control_for_drag_suite_gravity_wave_drag == 33)
[olyr]
standard_name = ozone_concentration_at_layer_for_radiation
long_name = ozone concentration layer
Expand Down Expand Up @@ -2964,6 +2964,30 @@
units = count
dimensions = ()
type = integer
[isc1]
standard_name = starting_x_direction_index_alloc1
long_name = starting X direction index for allocation
units = count
dimensions = ()
type = integer
[iec1]
standard_name = ending_x_direction_index_alloc1
long_name = ending X direction index for allocation
units = count
dimensions = ()
type = integer
[isc2]
standard_name = starting_x_direction_index_alloc2
long_name = starting X direction index for allocation
units = count
dimensions = ()
type = integer
[iec2]
standard_name = ending_x_direction_index_alloc2
long_name = ending X direction index for allocation
units = count
dimensions = ()
type = integer
[js]
standard_name = starting_y_direction_index
long_name = starting Y direction index
Expand All @@ -2988,25 +3012,49 @@
units = count
dimensions = ()
type = integer
[jsc1]
standard_name = starting_y_direction_index_alloc1
long_name = starting X direction index for allocation
units = count
dimensions = ()
type = integer
[jec1]
standard_name = ending_y_direction_index_alloc1
long_name = ending X direction index for allocation
units = count
dimensions = ()
type = integer
[jsc2]
standard_name = starting_y_direction_index_alloc2
long_name = starting X direction index for allocation
units = count
dimensions = ()
type = integer
[jec2]
standard_name = ending_y_direction_index_alloc2
long_name = ending X direction index for allocation
units = count
dimensions = ()
type = integer
[delp]
standard_name = pressure_thickness_at_Lagrangian_surface
long_name = pressure thickness at Lagrangian surface
units = Pa
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
[delz]
standard_name = thickness_at_Lagrangian_surface
long_name = thickness at Lagrangian_surface
units = m
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_thickness_at_Lagrangian_surface)
dimensions = (starting_x_direction_index_alloc2:ending_x_direction_index_alloc2,starting_y_direction_index_alloc2:ending_y_direction_index_alloc2,1:vertical_dimension_for_thickness_at_Lagrangian_surface)
type = real
kind = kind_dyn
[area]
standard_name = cell_area_for_fast_physics
long_name = area of the grid cell for fast physics
units = m2
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1)
type = real
kind = kind_grid
[ng]
Expand Down Expand Up @@ -3049,92 +3097,92 @@
standard_name = log_pressure_at_Lagrangian_surface
long_name = logarithm of pressure at Lagrangian surface
units = Pa
dimensions = (starting_x_direction_index:ending_x_direction_index,1:vertical_dimension_for_fast_physics_plus_one,starting_y_direction_index:ending_y_direction_index)
dimensions = (starting_x_direction_index_alloc2:ending_x_direction_index_alloc2,1:vertical_dimension_for_fast_physics_plus_one,starting_y_direction_index_alloc2:ending_y_direction_index_alloc2)
type = real
kind = kind_dyn
[phis]
standard_name = surface_geopotential_at_Lagrangian_surface
long_name = surface geopotential at Lagrangian surface
units = m2 s-2
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1)
type = real
kind = kind_dyn
[pkz]
standard_name = finite_volume_mean_edge_pressure_raised_to_the_power_of_kappa
long_name = finite-volume mean edge pressure raised to the power of kappa
units = 1
dimensions = (starting_x_direction_index:ending_x_direction_index,starting_y_direction_index:ending_y_direction_index,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc2:ending_x_direction_index_alloc2,starting_y_direction_index_alloc2:ending_y_direction_index_alloc2,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
[pt]
standard_name = virtual_temperature_at_Lagrangian_surface
long_name = virtual temperature at Lagrangian surface
units = K
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
[qvi]
standard_name = gas_tracers_for_multi_gas_physics_at_Lagrangian_surface
long_name = gas tracers for multi gas physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics,0:number_of_gases_for_multi_gases_physics)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics,1:number_of_gases_for_multi_gases_physics)
type = real
kind = kind_dyn
active = (number_of_gases_for_multi_gases_physics > 0)
[qv]
standard_name = water_vapor_specific_humidity_at_Lagrangian_surface
long_name = water vapor specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
[ql]
standard_name = cloud_liquid_water_specific_humidity_at_Lagrangian_surface
long_name = cloud liquid water specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
[qi]
standard_name = cloud_ice_specific_humidity_at_Lagrangian_surface
long_name = cloud ice specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
[qr]
standard_name = cloud_rain_specific_humidity_at_Lagrangian_surface
long_name = cloud rain specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
[qs]
standard_name = cloud_snow_specific_humidity_at_Lagrangian_surface
long_name = cloud snow specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
[qg]
standard_name = cloud_graupel_specific_humidity_at_Lagrangian_surface
long_name = cloud graupel specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
[qc]
standard_name = cloud_fraction_at_Lagrangian_surface
long_name = cloud fraction at Lagrangian surface
units = none
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_fast_physics)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_fast_physics)
type = real
kind = kind_dyn
[q_con]
standard_name = cloud_condensed_water_specific_humidity_at_Lagrangian_surface
long_name = cloud condensed water specific humidity updated by fast physics at Lagrangian surface
units = kg kg-1
dimensions = (starting_x_direction_index_domain:ending_x_direction_index_domain,starting_y_direction_index_domain:ending_y_direction_index_domain,1:vertical_dimension_for_condensed_water_at_Lagrangian_surface)
dimensions = (starting_x_direction_index_alloc1:ending_x_direction_index_alloc1,starting_y_direction_index_alloc1:ending_y_direction_index_alloc1,1:vertical_dimension_for_condensed_water_at_Lagrangian_surface)
type = real
kind = kind_dyn
[nthreads]
Expand Down
13 changes: 7 additions & 6 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2746,12 +2746,13 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
!
end if

allocate (Sfcprop%rmol (IM ))
allocate (Sfcprop%flhc (IM ))
allocate (Sfcprop%flqc (IM ))
Sfcprop%rmol = clear_val
Sfcprop%flhc = clear_val
Sfcprop%flqc = clear_val
allocate (Sfcprop%rmol (IM ))
allocate (Sfcprop%flhc (IM ))
allocate (Sfcprop%flqc (IM ))
Sfcprop%rmol = clear_val
Sfcprop%flhc = clear_val
Sfcprop%flqc = clear_val

if (Model%do_mynnsfclay) then
! For MYNN surface layer scheme
!print*,"Allocating all MYNN-sfclay variables"
Expand Down
Loading