Skip to content

Commit

Permalink
Changes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Dec 16, 2020
1 parent ea5e44f commit 37313e5
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 36 deletions.
4 changes: 2 additions & 2 deletions physics/GFS_rrtmgp_cloud_overlap_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ subroutine GFS_rrtmgp_cloud_overlap_pre_run(nCol, nLev, yearlen, doSWrad, doLWra
real(kind_phys), dimension(nCol,nLev) :: deltaZ
logical :: top_at_1

if (.not. (doSWrad .or. doLWrad)) return

! Initialize CCPP error handling variables
errmsg = ''
errflg = 0

if (.not. (doSWrad .or. doLWrad)) return

! What is vertical ordering?
top_at_1 = (p_lev(1,1) .lt. p_lev(1, nLev))
if (top_at_1) then
Expand Down
14 changes: 7 additions & 7 deletions physics/GFS_rrtmgp_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -189,24 +189,24 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nGases, nTracers, i_o3, lsswr, lslwr,
errmsg ! Error message
integer, intent(out) :: &
errflg ! Error flag
real(kind_phys), intent(out) :: &
real(kind_phys), intent(inout) :: &
raddt ! Radiation time-step
real(kind_phys), dimension(ncol), intent(out) :: &
real(kind_phys), dimension(ncol), intent(inout) :: &
tsfg, & ! Ground temperature
tsfa ! Skin temperature
real(kind_phys), dimension(nCol,nLev), intent(out) :: &
real(kind_phys), dimension(nCol,nLev), intent(inout) :: &
p_lay, & ! Pressure at model-layer
t_lay, & ! Temperature at model layer
q_lay, & ! Water-vapor mixing ratio (kg/kg)
tv_lay, & ! Virtual temperature at model-layers
relhum, & ! Relative-humidity at model-layers
qs_lay ! Saturation vapor pressure at model-layers
real(kind_phys), dimension(nCol,nLev+1), intent(out) :: &
qs_lay ! Saturation vapor pressure at model-layers
real(kind_phys), dimension(nCol,nLev+1), intent(inout) :: &
p_lev, & ! Pressure at model-interface
t_lev ! Temperature at model-interface
real(kind_phys), dimension(nCol, nLev, nTracers),intent(out) :: &
real(kind_phys), dimension(nCol, nLev, nTracers),intent(inout) :: &
tracer ! Array containing trace gases
type(ty_gas_concs),intent(out) :: &
type(ty_gas_concs),intent(inout) :: &
gas_concentrations ! RRTMGP DDT: gas volumne mixing ratios

! Local variables
Expand Down
26 changes: 13 additions & 13 deletions physics/GFS_rrtmgp_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
dimensions = ()
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[p_lay]
standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa
Expand All @@ -271,7 +271,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[p_lev]
standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa
Expand All @@ -280,7 +280,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension_plus_one)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[t_lay]
standard_name = air_temperature_at_layer_for_RRTMGP
Expand All @@ -289,7 +289,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[t_lev]
standard_name = air_temperature_at_interface_for_RRTMGP
Expand All @@ -298,7 +298,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension_plus_one)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[tsfg]
standard_name = surface_ground_temperature_for_radiation
Expand All @@ -307,7 +307,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[tsfa]
standard_name = surface_air_temperature_for_radiation
Expand All @@ -316,7 +316,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[tv_lay]
standard_name = virtual_temperature
Expand All @@ -325,7 +325,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[relhum]
standard_name = relative_humidity
Expand All @@ -334,7 +334,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[qs_lay]
standard_name = saturation_vapor_pressure
Expand All @@ -343,7 +343,7 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[q_lay]
standard_name = water_vapor_mixing_ratio
Expand All @@ -352,7 +352,7 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[tracer]
standard_name = chemical_tracers
Expand All @@ -361,15 +361,15 @@
dimensions = (horizontal_loop_extent,vertical_dimension,number_of_tracers)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[gas_concentrations]
standard_name = Gas_concentrations_for_RRTMGP_suite
long_name = DDT containing gas concentrations for RRTMGP radiation scheme
units = DDT
dimensions = ()
type = ty_gas_concs
intent = out
intent = inout
optional = F
[errmsg]
standard_name = ccpp_error_message
Expand Down
11 changes: 5 additions & 6 deletions physics/GFS_rrtmgp_thompsonmp_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,16 @@ subroutine GFS_rrtmgp_thompsonmp_pre_run(nCol, nLev, nTracers, ncnd, doSWrad, do
cld_reliq, & ! Cloud liquid effective radius
cld_iwp, & ! Cloud ice water path
cld_reice, & ! Cloud ice effecive radius
cld_swp, & ! Cloud snow water path
cld_resnow, & ! Cloud snow effective radius
cld_rwp, & ! Cloud rain water path
cld_rerain, & ! Cloud rain effective radius
precip_frac, & ! Precipitation fraction
effrin_cldliq, & ! Effective radius for liquid cloud-particles (microns)
effrin_cldice, & ! Effective radius for ice cloud-particles (microns)
effrin_cldsnow ! Effective radius for snow cloud-particles (microns)

! Outputs
real(kind_phys), dimension(nCol,nLev),intent(out) :: &
cld_swp, & ! Cloud snow water path
cld_resnow, & ! Cloud snow effective radius
cld_rwp, & ! Cloud rain water path
cld_rerain, & ! Cloud rain effective radius
precip_frac ! Precipitation fraction
character(len=*), intent(out) :: &
errmsg ! Error message
integer, intent(out) :: &
Expand Down
10 changes: 5 additions & 5 deletions physics/GFS_rrtmgp_thompsonmp_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[cld_resnow]
standard_name = mean_effective_radius_for_snow_flake
Expand All @@ -394,7 +394,7 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[cld_rwp]
standard_name = cloud_rain_water_path
Expand All @@ -403,7 +403,7 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[cld_rerain]
standard_name = mean_effective_radius_for_rain_drop
Expand All @@ -412,7 +412,7 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[precip_frac]
standard_name = precipitation_fraction_by_layer
Expand All @@ -421,7 +421,7 @@
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[errmsg]
standard_name = ccpp_error_message
Expand Down
2 changes: 1 addition & 1 deletion physics/rrtmgp_lw_cloud_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ subroutine rrtmgp_lw_cloud_optics_run(doLWrad, doG_cldoptics, icliq_lw, icice_lw
type(ty_optical_props_2str),intent(inout) :: &
lw_optical_props_cloudsByBand, & ! RRTMGP DDT: Longwave optical properties in each band (clouds)
lw_optical_props_precipByBand ! RRTMGP DDT: Longwave optical properties in each band (precipitation)
real(kind_phys), dimension(ncol,nLev), intent(out) :: &
real(kind_phys), dimension(ncol,nLev), intent(inout) :: &
cldtaulw ! Approx 10.mu band layer cloud optical depth

! Local variables
Expand Down
2 changes: 1 addition & 1 deletion physics/rrtmgp_lw_cloud_optics.meta
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
dimensions = (horizontal_loop_extent,vertical_dimension)
type = real
kind = kind_phys
intent = out
intent = inout
optional = F
[lw_optical_props_cloudsByBand]
standard_name = longwave_optical_properties_for_cloudy_atmosphere_by_band
Expand Down
2 changes: 1 addition & 1 deletion physics/rrtmgp_sw_cloud_optics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ subroutine rrtmgp_sw_cloud_optics_init(doG_cldoptics, doGP_cldoptics_PADE,
c0r = (/0.980, 0.975, 0.965, 0.960, 0.955, 0.952, 0.950, &
0.944, 0.894, 0.884, 0.883, 0.883, 0.883, 0.883/)
c0s = (/0.970, 0.970, 0.970, 0.970, 0.970, 0.970, 0.970, &
0.970, 0.970, 0.970, 0.700, 0.700, 0.700, 0.700/)
0.970, 0.970, 0.970, 0.700, 0.700, 0.700, 0.700/)

end subroutine rrtmgp_sw_cloud_optics_init

Expand Down

0 comments on commit 37313e5

Please sign in to comment.