Skip to content

Commit 3423a13

Browse files
authored
Merge pull request #733 from dustinswales/hotfix_gpflxadj
Bugfixes for RRTMGP
2 parents 2ececb0 + 2f8c13f commit 3423a13

24 files changed

+241
-195
lines changed

physics/GFS_cloud_diagnostics.meta

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
intent = in
5858
optional = F
5959
[p_lay]
60-
standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa
60+
standard_name = air_pressure_at_layer_for_RRTMGP
6161
long_name = air pressure at vertical layer for radiation calculation
62-
units = hPa
62+
units = Pa
6363
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
6464
type = real
6565
kind = kind_phys
@@ -75,9 +75,9 @@
7575
intent = in
7676
optional = F
7777
[p_lev]
78-
standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa
78+
standard_name = air_pressure_at_interface_for_RRTMGP
7979
long_name = air pressure at vertical interface for radiation calculation
80-
units = hPa
80+
units = Pa
8181
dimensions = (horizontal_loop_extent,vertical_interface_dimension)
8282
type = real
8383
kind = kind_phys

physics/GFS_rrtmgp_cloud_overlap_pre.meta

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,18 @@
6666
kind = kind_phys
6767
optional = F
6868
[p_lev]
69-
standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa
69+
standard_name = air_pressure_at_interface_for_RRTMGP
7070
long_name = air pressure at vertical interface for radiation calculation
71-
units = hPa
71+
units = Pa
7272
dimensions = (horizontal_loop_extent,vertical_interface_dimension)
7373
type = real
7474
kind = kind_phys
7575
intent = in
7676
optional = F
7777
[p_lay]
78-
standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa
78+
standard_name = air_pressure_at_layer_for_RRTMGP
7979
long_name = air pressure at vertical layer for radiation calculation
80-
units = hPa
80+
units = Pa
8181
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
8282
type = real
8383
kind = kind_phys

physics/GFS_rrtmgp_gfdlmp_pre.meta

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,18 @@
128128
intent = in
129129
optional = F
130130
[p_lev]
131-
standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa
131+
standard_name = air_pressure_at_interface_for_RRTMGP
132132
long_name = air pressure at vertical interface for radiation calculation
133-
units = hPa
133+
units = Pa
134134
dimensions = (horizontal_loop_extent,vertical_interface_dimension)
135135
type = real
136136
kind = kind_phys
137137
intent = in
138138
optional = F
139139
[p_lay]
140-
standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa
140+
standard_name = air_pressure_at_layer_for_RRTMGP
141141
long_name = air pressure at vertical layer for radiation calculation
142-
units = hPa
142+
units = Pa
143143
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
144144
type = real
145145
kind = kind_phys

physics/GFS_rrtmgp_lw_post.meta

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575
intent = in
7676
optional = F
7777
[p_lev]
78-
standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa
78+
standard_name = air_pressure_at_interface_for_RRTMGP
7979
long_name = air pressure level
80-
units = hPa
80+
units = Pa
8181
dimensions = (horizontal_loop_extent,vertical_interface_dimension)
8282
type = real
8383
kind = kind_phys

physics/GFS_rrtmgp_pre.F90

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ end subroutine GFS_rrtmgp_pre_init
9898
!!
9999
subroutine GFS_rrtmgp_pre_run(nCol, nLev, nTracers, i_o3, lsswr, lslwr, fhswr, fhlwr, &
100100
xlat, xlon, prsl, tgrs, prslk, prsi, qgrs, tsfc, con_eps, con_epsm1, con_fvirt, &
101-
con_epsqs, minGPpres, minGPtemp, raddt, p_lay, t_lay, p_lev, t_lev, tsfg, tsfa, &
102-
qs_lay, q_lay, tv_lay, relhum, tracer, gas_concentrations, errmsg, errflg)
101+
con_epsqs, minGPpres, maxGPpres, minGPtemp, maxGPtemp, raddt, p_lay, t_lay, p_lev, &
102+
t_lev, tsfg, tsfa, qs_lay, q_lay, tv_lay, relhum, tracer, gas_concentrations, &
103+
tsfc_radtime, errmsg, errflg)
103104

104105
! Inputs
105106
integer, intent(in) :: &
@@ -112,7 +113,9 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nTracers, i_o3, lsswr, lslwr, fhswr, f
112113
lslwr ! Call LW radiation
113114
real(kind_phys), intent(in) :: &
114115
minGPtemp, & ! Minimum temperature allowed in RRTMGP.
116+
maxGPtemp, & ! Maximum ...
115117
minGPpres, & ! Minimum pressure allowed in RRTMGP.
118+
maxGPpres, & ! Maximum pressure allowed in RRTMGP.
116119
fhswr, & ! Frequency of SW radiation call.
117120
fhlwr ! Frequency of LW radiation call.
118121
real(kind_phys), intent(in) :: &
@@ -142,7 +145,8 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nTracers, i_o3, lsswr, lslwr, fhswr, f
142145
raddt ! Radiation time-step
143146
real(kind_phys), dimension(ncol), intent(inout) :: &
144147
tsfg, & ! Ground temperature
145-
tsfa ! Skin temperature
148+
tsfa, & ! Skin temperature
149+
tsfc_radtime ! Surface temperature at radiation timestep
146150
real(kind_phys), dimension(nCol,nLev), intent(inout) :: &
147151
p_lay, & ! Pressure at model-layer
148152
t_lay, & ! Temperature at model layer
@@ -202,18 +206,31 @@ subroutine GFS_rrtmgp_pre_run(nCol, nLev, nTracers, i_o3, lsswr, lslwr, fhswr, f
202206
! Temperature at layer-center
203207
t_lay(1:NCOL,:) = tgrs(1:NCOL,:)
204208

205-
! Bound temperature at layer centers.
209+
! Bound temperature/pressure at layer centers.
206210
do iCol=1,NCOL
207211
do iLay=1,nLev
208212
if (t_lay(iCol,iLay) .le. minGPtemp) then
209213
t_lay(iCol,iLay) = minGPtemp + epsilon(minGPtemp)
210214
endif
215+
if (p_lay(iCol,iLay) .le. minGPpres) then
216+
p_lay(iCol,iLay) = minGPpres + epsilon(minGPpres)
217+
endif
218+
if (t_lay(iCol,iLay) .ge. maxGPtemp) then
219+
t_lay(iCol,iLay) = maxGPtemp - epsilon(maxGPtemp)
220+
endif
221+
if (p_lay(iCol,iLay) .ge. maxGPpres) then
222+
p_lay(iCol,iLay) = maxGPpres - epsilon(maxGPpres)
223+
endif
211224
enddo
212225
enddo
213226

214227
! Temperature at layer-interfaces
215228
call cmp_tlev(nCol,nLev,minGPpres,p_lay,t_lay,p_lev,tsfc,t_lev)
216229

230+
! Save surface temperature at radiation time-step, used for LW flux adjustment betwen
231+
! radiation calls.
232+
tsfc_radtime = tsfc
233+
217234
! Compute a bunch of thermodynamic fields needed by the cloud microphysics schemes.
218235
! Relative humidity, saturation mixing-ratio, vapor mixing-ratio, virtual temperature,
219236
! layer thickness,...

physics/GFS_rrtmgp_pre.meta

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,15 @@
230230
kind = kind_phys
231231
intent = in
232232
optional = F
233+
[maxGPpres]
234+
standard_name = maximum_pressure_in_RRTMGP
235+
long_name = maximum pressure allowed in RRTMGP
236+
units = Pa
237+
dimensions = ()
238+
type = real
239+
kind = kind_phys
240+
intent = in
241+
optional = F
233242
[minGPtemp]
234243
standard_name = minimum_temperature_in_RRTMGP
235244
long_name = minimum temperature allowed in RRTMGP
@@ -239,6 +248,15 @@
239248
kind = kind_phys
240249
intent = in
241250
optional = F
251+
[maxGPtemp]
252+
standard_name = maximum_temperature_in_RRTMGP
253+
long_name = maximum temperature allowed in RRTMGP
254+
units = K
255+
dimensions = ()
256+
type = real
257+
kind = kind_phys
258+
intent = in
259+
optional = F
242260
[raddt]
243261
standard_name = time_step_for_radiation
244262
long_name = radiation time step
@@ -249,18 +267,18 @@
249267
intent = inout
250268
optional = F
251269
[p_lay]
252-
standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa
270+
standard_name = air_pressure_at_layer_for_RRTMGP
253271
long_name = air pressure at vertical layer for radiation calculation
254-
units = hPa
272+
units = Pa
255273
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
256274
type = real
257275
kind = kind_phys
258276
intent = inout
259277
optional = F
260278
[p_lev]
261-
standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa
279+
standard_name = air_pressure_at_interface_for_RRTMGP
262280
long_name = air pressure at vertical interface for radiation calculation
263-
units = hPa
281+
units = Pa
264282
dimensions = (horizontal_loop_extent,vertical_interface_dimension)
265283
type = real
266284
kind = kind_phys
@@ -284,6 +302,15 @@
284302
kind = kind_phys
285303
intent = inout
286304
optional = F
305+
[tsfc_radtime]
306+
standard_name = surface_skin_temperature_on_radiation_timestep
307+
long_name = surface skin temperature on radiation timestep
308+
units = K
309+
dimensions = (horizontal_loop_extent)
310+
type = real
311+
kind = kind_phys
312+
intent = in
313+
optional = F
287314
[tsfg]
288315
standard_name = surface_ground_temperature_for_radiation
289316
long_name = surface ground temperature for radiation

physics/GFS_rrtmgp_sw_post.meta

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@
101101
intent = in
102102
optional = F
103103
[p_lev]
104-
standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa
104+
standard_name = air_pressure_at_interface_for_RRTMGP
105105
long_name = air pressure level
106-
units = hPa
106+
units = Pa
107107
dimensions = (horizontal_loop_extent,vertical_interface_dimension)
108108
type = real
109109
kind = kind_phys

physics/GFS_rrtmgp_thompsonmp_pre.meta

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,18 @@
136136
intent = in
137137
optional = F
138138
[p_lev]
139-
standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa
139+
standard_name = air_pressure_at_interface_for_RRTMGP
140140
long_name = air pressure at vertical interface for radiation calculation
141-
units = hPa
141+
units = Pa
142142
dimensions = (horizontal_loop_extent,vertical_interface_dimension)
143143
type = real
144144
kind = kind_phys
145145
intent = in
146146
optional = F
147147
[p_lay]
148-
standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa
148+
standard_name = air_pressure_at_layer_for_RRTMGP
149149
long_name = air pressure at vertical layer for radiation calculation
150-
units = hPa
150+
units = Pa
151151
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
152152
type = real
153153
kind = kind_phys

physics/GFS_rrtmgp_zhaocarr_pre.meta

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,18 @@
105105
intent = in
106106
optional = F
107107
[p_lev]
108-
standard_name = air_pressure_at_interface_for_RRTMGP_in_hPa
108+
standard_name = air_pressure_at_interface_for_RRTMGP
109109
long_name = air pressure at vertical interface for radiation calculation
110-
units = hPa
110+
units = Pa
111111
dimensions = (horizontal_loop_extent,vertical_interface_dimension)
112112
type = real
113113
kind = kind_phys
114114
intent = in
115115
optional = F
116116
[p_lay]
117-
standard_name = air_pressure_at_layer_for_RRTMGP_in_hPa
117+
standard_name = air_pressure_at_layer_for_RRTMGP
118118
long_name = air pressure at vertical layer for radiation calculation
119-
units = hPa
119+
units = Pa
120120
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
121121
type = real
122122
kind = kind_phys

physics/GFS_suite_interstitial.F90

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,8 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, flag_
234234
enddo
235235

236236
! --- ... sfc lw fluxes used by atmospheric model are saved for output
237-
if (.not. use_LW_jacobian) then
238-
if (frac_grid) then
239-
do i=1,im
237+
if (frac_grid) then
238+
do i=1,im
240239
tem = (one - frland(i)) * cice(i) ! tem = ice fraction wrt whole cell
241240
if (flag_cice(i)) then
242241
adjsfculw(i) = adjsfculw_lnd(i) * frland(i) &
@@ -247,9 +246,9 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, flag_
247246
+ adjsfculw_ice(i) * tem &
248247
+ adjsfculw_wat(i) * (one - frland(i) - tem)
249248
endif
250-
enddo
251-
else
252-
do i=1,im
249+
enddo
250+
else
251+
do i=1,im
253252
if (dry(i)) then ! all land
254253
adjsfculw(i) = adjsfculw_lnd(i)
255254
elseif (icy(i)) then ! ice (and water)
@@ -270,8 +269,7 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, flag_
270269
else ! all water
271270
adjsfculw(i) = adjsfculw_wat(i)
272271
endif
273-
enddo
274-
endif
272+
enddo
275273
endif
276274

277275
do i=1,im

0 commit comments

Comments
 (0)