Skip to content

Commit 49c9f50

Browse files
committed
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into update_gfs_debug_semis_x
2 parents 9aa3c50 + d9e6676 commit 49c9f50

13 files changed

+1228
-438
lines changed

physics/GFS_surface_generic.F90

+18-6
Original file line numberDiff line numberDiff line change
@@ -275,32 +275,34 @@ end subroutine GFS_surface_generic_post_finalize
275275
!! \htmlinclude GFS_surface_generic_post_run.html
276276
!!
277277
subroutine GFS_surface_generic_post_run (im, cplflx, cplchm, cplwav, lssav, dry, icy, wet, &
278-
dtf, ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1, &
278+
lsm, lsm_noahmp, dtf, ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1, &
279279
adjsfcdlw, adjsfcdsw, adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjsfculw_wat, adjnirbmu, adjnirdfu, &
280-
adjvisbmu, adjvisdfu,t2m, q2m, u10m, v10m, tsfc, tsfc_wat, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf, &
280+
adjvisbmu, adjvisdfu, t2m, q2m, u10m, v10m, tsfc, tsfc_wat, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf, pah, pahi, &
281281
epi, gfluxi, t1, q1, u1, v1, dlwsfci_cpl, dswsfci_cpl, dlwsfc_cpl, dswsfc_cpl, dnirbmi_cpl, dnirdfi_cpl, dvisbmi_cpl, &
282282
dvisdfi_cpl, dnirbm_cpl, dnirdf_cpl, dvisbm_cpl, dvisdf_cpl, nlwsfci_cpl, nlwsfc_cpl, t2mi_cpl, q2mi_cpl, u10mi_cpl, &
283283
v10mi_cpl, tsfci_cpl, psurfi_cpl, nnirbmi_cpl, nnirdfi_cpl, nvisbmi_cpl, nvisdfi_cpl, nswsfci_cpl, nswsfc_cpl, nnirbm_cpl, &
284-
nnirdf_cpl, nvisbm_cpl, nvisdf_cpl, gflux, evbsa, evcwa, transa, sbsnoa, snowca, snohfa, ep, &
285-
runoff, srunoff, runof, drain, lheatstrg, h0facu, h0facs, zvfun, hflx, evap, hflxq, hffac, &
284+
nnirdf_cpl, nvisbm_cpl, nvisdf_cpl, gflux, evbsa, evcwa, transa, sbsnoa, snowca, snohfa, paha, ep, ecan, etran, edir, waxy, &
285+
runoff, srunoff, runof, drain, tecan, tetran, tedir, twa, lheatstrg, h0facu, h0facs, zvfun, hflx, evap, hflxq, hffac, &
286286
isot, ivegsrc, islmsk, vtype, stype, slope, vtype_save, stype_save, slope_save, errmsg, errflg)
287287

288288
implicit none
289289

290290
integer, intent(in) :: im
291291
logical, intent(in) :: cplflx, cplchm, cplwav, lssav
292292
logical, dimension(:), intent(in) :: dry, icy, wet
293+
integer, intent(in) :: lsm, lsm_noahmp
293294
real(kind=kind_phys), intent(in) :: dtf
294295

295296
real(kind=kind_phys), dimension(:), intent(in) :: ep1d, gflx, tgrs_1, qgrs_1, ugrs_1, vgrs_1, adjsfcdlw, adjsfcdsw, &
296297
adjnirbmd, adjnirdfd, adjvisbmd, adjvisdfd, adjsfculw, adjsfculw_wat, adjnirbmu, adjnirdfu, adjvisbmu, adjvisdfu, &
297-
t2m, q2m, u10m, v10m, tsfc, tsfc_wat, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf
298+
t2m, q2m, u10m, v10m, tsfc, tsfc_wat, pgr, xcosz, evbs, evcw, trans, sbsno, snowc, snohf, pah, ecan, etran, edir, &
299+
waxy
298300

299301
real(kind=kind_phys), dimension(:), intent(inout) :: epi, gfluxi, t1, q1, u1, v1, dlwsfci_cpl, dswsfci_cpl, dlwsfc_cpl, &
300302
dswsfc_cpl, dnirbmi_cpl, dnirdfi_cpl, dvisbmi_cpl, dvisdfi_cpl, dnirbm_cpl, dnirdf_cpl, dvisbm_cpl, dvisdf_cpl, &
301303
nlwsfci_cpl, nlwsfc_cpl, t2mi_cpl, q2mi_cpl, u10mi_cpl, v10mi_cpl, tsfci_cpl, psurfi_cpl, nnirbmi_cpl, nnirdfi_cpl, &
302304
nvisbmi_cpl, nvisdfi_cpl, nswsfci_cpl, nswsfc_cpl, nnirbm_cpl, nnirdf_cpl, nvisbm_cpl, nvisdf_cpl, gflux, evbsa, &
303-
evcwa, transa, sbsnoa, snowca, snohfa, ep
305+
evcwa, transa, sbsnoa, snowca, snohfa, ep, paha, tecan, tetran, tedir, twa, pahi
304306

305307
real(kind=kind_phys), dimension(:), intent(inout) :: runoff, srunoff
306308
real(kind=kind_phys), dimension(:), intent(in) :: drain, runof
@@ -333,6 +335,9 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplchm, cplwav, lssav, dry,
333335
do i=1,im
334336
epi(i) = ep1d(i)
335337
gfluxi(i) = gflx(i)
338+
if (lsm == lsm_noahmp) then
339+
pahi(i) = pah(i)
340+
endif
336341
t1(i) = tgrs_1(i)
337342
q1(i) = qgrs_1(i)
338343
u1(i) = ugrs_1(i)
@@ -426,6 +431,13 @@ subroutine GFS_surface_generic_post_run (im, cplflx, cplchm, cplwav, lssav, dry,
426431
! runoff at the surface and is accumulated in unit of meters
427432
runoff(i) = runoff(i) + (drain(i)+runof(i)) * dtf
428433
srunoff(i) = srunoff(i) + runof(i) * dtf
434+
tecan(i) = tecan(i) + ecan(i) * dtf
435+
tetran(i) = tetran(i) + etran(i) * dtf
436+
tedir(i) = tedir(i) + edir(i) * dtf
437+
if (lsm == lsm_noahmp) then
438+
paha(i) = paha(i) + pah(i) * dtf
439+
twa(i) = waxy(i)
440+
endif
429441
enddo
430442
endif
431443

physics/GFS_surface_generic.meta

+102
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,20 @@
600600
dimensions = (horizontal_loop_extent)
601601
type = logical
602602
intent = in
603+
[lsm]
604+
standard_name = control_for_land_surface_scheme
605+
long_name = flag for land surface model
606+
units = flag
607+
dimensions = ()
608+
type = integer
609+
intent = in
610+
[lsm_noahmp]
611+
standard_name = identifier_for_noahmp_land_surface_scheme
612+
long_name = flag for NOAH MP land surface model
613+
units = flag
614+
dimensions = ()
615+
type = integer
616+
intent = in
603617
[dtf]
604618
standard_name = timestep_for_dynamics
605619
long_name = dynamics timestep
@@ -864,6 +878,22 @@
864878
type = real
865879
kind = kind_phys
866880
intent = in
881+
[pah]
882+
standard_name = total_precipitation_advected_heat
883+
long_name = precipitation advected heat - total
884+
units = W m-2
885+
dimensions = (horizontal_loop_extent)
886+
type = real
887+
kind = kind_phys
888+
intent = in
889+
[pahi]
890+
standard_name = instantaneous_total_precipitation_advected_heat
891+
long_name = instantaneous precipitation advected heat - total
892+
units = W m-2
893+
dimensions = (horizontal_loop_extent)
894+
type = real
895+
kind = kind_phys
896+
intent = in
867897
[epi]
868898
standard_name = instantaneous_surface_potential_evaporation
869899
long_name = instantaneous sfc potential evaporation
@@ -1208,6 +1238,14 @@
12081238
type = real
12091239
kind = kind_phys
12101240
intent = inout
1241+
[paha]
1242+
standard_name = cumulative_precipitation_advected_heat_flux_multiplied_by_timestep
1243+
long_name = cumulative precipitation advected heat flux multiplied by timestep
1244+
units = W m-2 s
1245+
dimensions = (horizontal_loop_extent)
1246+
type = real
1247+
kind = kind_phys
1248+
intent = inout
12111249
[ep]
12121250
standard_name = cumulative_surface_upward_potential_latent_heat_flux_multiplied_by_timestep
12131251
long_name = cumulative surface upward potential latent heat flux multiplied by timestep
@@ -1216,6 +1254,38 @@
12161254
type = real
12171255
kind = kind_phys
12181256
intent = inout
1257+
[ecan]
1258+
standard_name = evaporation_of_intercepted_water
1259+
long_name = evaporation of intercepted water
1260+
units = kg m-2 s-1
1261+
dimensions = (horizontal_loop_extent)
1262+
type = real
1263+
kind = kind_phys
1264+
intent = in
1265+
[etran]
1266+
standard_name = transpiration_rate
1267+
long_name = transpiration rate
1268+
units = kg m-2 s-1
1269+
dimensions = (horizontal_loop_extent)
1270+
type = real
1271+
kind = kind_phys
1272+
intent = in
1273+
[edir]
1274+
standard_name = soil_surface_evaporation_rate
1275+
long_name = soil surface evaporation rate
1276+
units = kg m-2 s-1
1277+
dimensions = (horizontal_loop_extent)
1278+
type = real
1279+
kind = kind_phys
1280+
intent = in
1281+
[waxy]
1282+
standard_name = water_storage_in_aquifer
1283+
long_name = water storage in aquifer
1284+
units = mm
1285+
dimensions = (horizontal_loop_extent)
1286+
type = real
1287+
kind = kind_phys
1288+
intent = in
12191289
[runoff]
12201290
standard_name = total_runoff
12211291
long_name = total water runoff
@@ -1248,6 +1318,38 @@
12481318
type = real
12491319
kind = kind_phys
12501320
intent = in
1321+
[tecan]
1322+
standard_name = total_evaporation_of_intercepted_water
1323+
long_name = total evaporation of intercepted water
1324+
units = kg m-2
1325+
dimensions = (horizontal_loop_extent)
1326+
type = real
1327+
kind = kind_phys
1328+
intent = inout
1329+
[tetran]
1330+
standard_name = total_transpiration_rate
1331+
long_name = total transpiration rate
1332+
units = kg m-2
1333+
dimensions = (horizontal_loop_extent)
1334+
type = real
1335+
kind = kind_phys
1336+
intent = inout
1337+
[tedir]
1338+
standard_name = total_soil_surface_evaporation_rate
1339+
long_name = total soil surface evaporation rate
1340+
units = kg m-2
1341+
dimensions = (horizontal_loop_extent)
1342+
type = real
1343+
kind = kind_phys
1344+
intent = inout
1345+
[twa]
1346+
standard_name = total_water_storage_in_aquifer
1347+
long_name = total water storage in aquifer
1348+
units = kg m-2
1349+
dimensions = (horizontal_loop_extent)
1350+
type = real
1351+
kind = kind_phys
1352+
intent = inout
12511353
[lheatstrg]
12521354
standard_name = flag_for_canopy_heat_storage_in_land_surface_scheme
12531355
long_name = flag for canopy heat storage parameterization

physics/GFS_surface_loop_control.F90

+7-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ end subroutine GFS_surface_loop_control_part1_finalize
2222
!! \section detailed Detailed Algorithm
2323
!! @{
2424

25-
subroutine GFS_surface_loop_control_part1_run (im, iter, wind, flag_guess, errmsg, errflg)
25+
subroutine GFS_surface_loop_control_part1_run (im, iter, &
26+
wind, flag_guess, errmsg, errflg)
2627

2728
use machine, only: kind_phys
2829

@@ -78,8 +79,8 @@ end subroutine GFS_surface_loop_control_part2_finalize
7879
!! \section detailed Detailed Algorithm
7980
!! @{
8081

81-
subroutine GFS_surface_loop_control_part2_run (im, iter, wind, &
82-
flag_guess, flag_iter, dry, wet, icy, nstf_name1, errmsg, errflg)
82+
subroutine GFS_surface_loop_control_part2_run (im, lsm, lsm_noahmp, iter,&
83+
wind, flag_guess, flag_iter, dry, wet, icy, nstf_name1, errmsg, errflg)
8384

8485
use machine, only: kind_phys
8586

@@ -88,6 +89,8 @@ subroutine GFS_surface_loop_control_part2_run (im, iter, wind, &
8889
! Interface variables
8990
integer, intent(in) :: im
9091
integer, intent(in) :: iter
92+
integer, intent(in) :: lsm
93+
integer, intent(in) :: lsm_noahmp
9194
real(kind=kind_phys), dimension(:), intent(in) :: wind
9295
logical, dimension(:), intent(inout) :: flag_guess
9396
logical, dimension(:), intent(inout) :: flag_iter
@@ -110,7 +113,7 @@ subroutine GFS_surface_loop_control_part2_run (im, iter, wind, &
110113

111114
if (iter == 1 .and. wind(i) < 2.0d0) then
112115
!if (dry(i) .or. (wet(i) .and. .not.icy(i) .and. nstf_name1 > 0)) then
113-
if (dry(i) .or. (wet(i) .and. nstf_name1 > 0)) then
116+
if((dry(i) .and. lsm /= lsm_noahmp) .or. (wet(i) .and. nstf_name1 > 0)) then
114117
flag_iter(i) = .true.
115118
endif
116119
endif

physics/GFS_surface_loop_control.meta

+14
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,20 @@
6969
dimensions = ()
7070
type = integer
7171
intent = in
72+
[lsm]
73+
standard_name = control_for_land_surface_scheme
74+
long_name = flag for land surface model
75+
units = flag
76+
dimensions = ()
77+
type = integer
78+
intent = in
79+
[lsm_noahmp]
80+
standard_name = identifier_for_noahmp_land_surface_scheme
81+
long_name = flag for NOAH MP land surface model
82+
units = flag
83+
dimensions = ()
84+
type = integer
85+
intent = in
7286
[iter]
7387
standard_name = ccpp_loop_counter
7488
long_name = loop counter for subcycling loops in CCPP

0 commit comments

Comments
 (0)