Skip to content

Commit

Permalink
Bug fix for dimensions of eta level variables and WAM variables in Fo…
Browse files Browse the repository at this point in the history
…rtran code and CCPP metadata (#431)

* Add additional diagnostic arrays for radiation-microphysics development
* Bug fixes for WAM model runs with levr < levs
  • Loading branch information
climbfuji authored Dec 30, 2021
1 parent 42dd808 commit 9ab2847
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ccpp/data/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ subroutine interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd, jed
! For multi-gases physics
integer, intent(in) :: nwat
integer, intent(in), optional :: ngas
real(kind_dyn), intent(in), optional :: rilist(:)
real(kind_dyn), intent(in), optional :: cpilist(:)
real(kind_dyn), intent(in), optional :: rilist(0:)
real(kind_dyn), intent(in), optional :: cpilist(0:)
integer, intent(in) :: mpirank
integer, intent(in) :: mpiroot
!
Expand Down
7 changes: 5 additions & 2 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3897,6 +3897,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

if (levr < 0) then
Model%levr = levs
else if (levr > levs) then
write(0,*) "Logic error, number of radiatiton levels (levr) cannot exceed number of model levels (levs)"
stop
else
Model%levr = levr
endif
Expand Down Expand Up @@ -4783,12 +4786,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%restart = restart
Model%hydrostatic = hydrostatic
Model%jdat(1:8) = jdat(1:8)
allocate(Model%si(Model%levr+1))
allocate(Model%si(Model%levs+1))
!--- Define sigma level for radiation initialization
!--- The formula converting hybrid sigma pressure coefficients to sigma coefficients follows Eckermann (2009, MWR)
!--- ps is replaced with p0. The value of p0 uses that in http://www.emc.ncep.noaa.gov/officenotes/newernotes/on461.pdf
!--- ak/bk have been flipped from their original FV3 orientation and are defined sfc -> toa
Model%si = (ak + bk * con_p0 - ak(Model%levr+1)) / (con_p0 - ak(Model%levr+1))
Model%si(1:Model%levs+1) = (ak(1:Model%levs+1) + bk(1:Model%levs+1) * con_p0 - ak(Model%levs+1)) / (con_p0 - ak(Model%levs+1))
Model%sec = 0
Model%yearlen = 365
Model%julian = -9999.
Expand Down
6 changes: 3 additions & 3 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2519,13 +2519,13 @@
standard_name = sigma_pressure_hybrid_coordinate_a_coefficient
long_name = a parameter for sigma pressure level calculations
units = Pa
dimensions = (vertical_interface_dimension_for_radiation)
dimensions = (vertical_interface_dimension)
type = real
[bk]
standard_name = sigma_pressure_hybrid_coordinate_b_coefficient
long_name = b parameter for sigma pressure level calculations
units = none
dimensions = (vertical_interface_dimension_for_radiation)
dimensions = (vertical_interface_dimension)
type = real
[levsp1]
standard_name = vertical_interface_dimension
Expand Down Expand Up @@ -5228,7 +5228,7 @@
standard_name = sigma_pressure_hybrid_vertical_coordinate
long_name = vertical sigma coordinate for radiation initialization
units = none
dimensions = (vertical_interface_dimension_for_radiation)
dimensions = (vertical_interface_dimension)
type = real
kind = kind_phys
[dxinv]
Expand Down

0 comments on commit 9ab2847

Please sign in to comment.