Skip to content

Commit 8a6cd13

Browse files
scrasmussengrantfirlVanderleiVargas-NOAAQingfu-LiuClaraDraper-NOAA
authored
ufs-dev PR#371 (NCAR#1224)
* update standard names to move Xgrs to physics_timestep_initial* and remove *_of_new_state (default name refers to 'current' value) * fix a few unchanged standard names * change some timestep_initial variables to general variables; make satmedmfvdifq return new tendencies and new tendency application block in GFS_PBL_generic_post * Refactor physics tendency calculations - Added tendency variables (`ten_t`, `ten_u`, `ten_v`) for temperature and wind tendencies in SAMF deep and shallow convection schemes. - Updated relevant `.meta` files to reflect changes in variable intent (`inout` -> `in` where appropriate) and added tendencies. - Modified Interstitials (`GFS_DCNV_generic_post`, `GFS_DCNV_generic_pre`, `GFS_SCNV_generic_post`, `GFS_SCNV_generic_pre`) to directly use tendencies instead of saved state variables. - Removed redundant saved variables (`save_u`, `save_v`, `save_t`). - Added `delt` to post interstitials. * update unified_ugwp, ugwpv1, and drag_suite to use new tendency code * save tendency work with GFS_photochemistry * add tracer tendency changes to convection; fix typos in GFS_photochemistry * fix typo in samfdeepcnv.f * save tendency work with Thompson MP * save tendency work with radiation * add FMS to ccpp-physics CMakeLists.txt for fv3 * add initial setting of state in GFS_time_vary_pre.fv3; fix horizontal_dimension in GFS_time_vary_pre.scm * fix metadata in GFS_time_vary_pre.fv3 * add momentum tendency output to mp_thompson and fix intent in metadata * fix array size bug in mp_thompson.F90; cleanup dtend code using new tendency paradigm; cleanup saving of states no longer needed * fix improperly-merged conflict resolution in GFS_photochemistry.F90 * fix access of ntlnc/ntinc access of tracer array when missing * convert many RAD, PBL, GWD, CONV, and MP schemes to return tendencies * convert MG micro and Arakawa-Wu adjustment schemes * convert MYNNEDMF PBL scheme to return tendencies * add changes to MYNN EDMF PBL * add back divide-by-zero bugfix in module_sf_noahmp_glacier.F90 that was removed recently * remove obsolete interstitial schemes * fix 2 minor compilation issues after testing with UFS RTs * fix bug in MG MP * fix near-surface air temperature standard name in GFS_surface_composites_pre * apply tendency cleanup to GFDLMPv3 and TEMPO * fix compilation error * fix typo in TEMPO * debug sgscloud_radpre/post * remove tendency application code from rrtmg_lw/sw_post * change thmpsn to thompson to fix compilation error * fix compilation errors in GFS_radiation_post.F90 * remove Zhao-Carr cloud schemes and combine Xu-Randall cloud fraction calculations * fix array size problem in cs_conv.F90 * refactor RAS tendencies * fix compilation error in rascnv.F90 * change Xu-Randall cloud fraction scheme to be elemental * Fixed too-high lower bound for SMC Deleted code associated with already removed print statements Deleted excess comments. * use new cld_frac_XuRandall function from module_radiation_clouds in RRTMGP scheme * Tidy-up for PR. * modify the cld_frac_XuRandall function call in RRTMGP scheme * Changes to the post L-IAU checks: * Change tfreeze to match that in NoahMP * Only set SLC to SMC if temp newly > tfreez * add the repository update to this PR * Revert "add the repository update to this PR" This reverts commit 565d62c. * fix bug in GFDLMPv3 tendency implementation * remove the printing tests * remove Zhao-Carr schemes from modules in the UFS_SCM_NEPTUNE directory * remove Zhao-Carr microphysics scheme from physics/MP directory * fix hail tendency changes from reviewer suggestions * fix indexing bug in cu_tiedtke caught in code review * changes to RAS tendency application update code from code review * check for flag_for_generic_tendency_due_to_gravity_wave_drag before computing diagnostic tendencies in drag_suite * fix diagnostic tendency bug in physics/GWD/ugwpv1_gsldrag.F90 * remove unused arguments in physics/GWD/ugwpv1_gsldrag_post.F90 * fix tendency diagnostics in physics/GWD/unified_ugwp.F90 * fix merge problem in mp_thompson.meta * add arguments to drag_suite_run called outside of ccpp entry point * initialize dclw variables in cu_ntiedtke * fix loop bounds for ten_q in cu_gf_driver.F90 * fix loop bounds in cu_c3_driver * fix new_q typo in mp_fer_hires.F90 * deallocate locally-allocated variables in MP schemes * update zeroing logic in m_micro_post after review * Update for 10m wind option in fire_behavior module * remove non-ASCII character in canopy_levs.F90 (from previous PR) * Updates to progomega option of saSAS convection scheme * Correction * correction 2 * fix line in SHOC where a tracer was being updated directly * remove old_ozone array since it was not being used * deallocate local variables in satmedmfvdifq at end of run phase * save temperature before modification to pass in to diagnostics in GFS_radiation_post * Remove goto in physics/MP/Morrison_Gettelman/aer_cloud.F * Remove goto in physics/Radiation/radiation_clouds.f * fix diagnostic temp tendency in GFS_MP_generic.F90 for when radar is/isn't available * Correct parameter setting in samfshalcnv to pass debug runs * Name END DO * Remove goto physics/MP/calpreciptype.f90 * Remove goto physics/MP/Morrison_Gettelman/cldwat2m_micro.F * Start goto physics/SFC_Models/Land/RUC/module_sf_ruclsm.F90 * Remove goto physics/SFC_Layer/UFS/module_nst_model.f90 * address saturation vapor pressure out of bounds error in hafs_4_nest RT * update long names to remove 'updated by physics'; change prognostic updraft standard names * remove additional references to Zhao-Carr microphysics * remove Zhao-Carr references from GFS_scnv_generic_post * fix deallocation statement in Thompson MP * Remove go to physics/CONV/C3/cu_c3_sh.F90 * Remove go to physics/PBL/MYJ/module_BL_MYJPBL.F90 * Remove goto physics/MP/Morrison_Gettelman/wv_saturation.F * Again physics/MP/Morrison_Gettelman/wv_saturation.F * physics/MP/Morrison_Gettelman/wv_saturation.F * Typo * Remove goto physics/CONV/C3/cu_c3_deep.F90 * Remove go to physics/CONV/RAS/rascnv.F90 * Typo rascnv.F90 * physics/SFC_Layer/GFDL/gfdl_sfc_layer.F90 * physics/CONV/Grell_Freitas/cu_gf_sh.F90 * Typo module_BL_MYJPBL.F90 * physics/SFC_Layer/MYJ/module_SF_JSFC.F90 * First pass physics/CONV/Grell_Freitas/cu_gf_deep.F90 * physics/CONV/Grell_Freitas/cu_gf_deep.F90 * physics/GWD/ugwp_driver_v0.F * physics/MP/Thompson/module_mp_thompson.F90 * physics/PBL/MYNN_EDMF/module_bl_mynn.F90 * physics/MP/GFDL/v1_2019/gfdl_cloud_microphys_mod.F90 * physics/MP/GFDL/v3_2022/gfdl_cloud_microphys_v3_mod.F90 * Fix compile physics/Radiation/radiation_clouds.f * Compile fixes * Fix for 73 character limit line * Compile fix * Start physics/SFC_Models/Land/RUC/module_sf_ruclsm.F90 * physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90 * fix additional warnings * Fix compile hafsw wcoss2 * Revert rascnv so control_ras_intel b4b on wcoss2 * Use 10-m intepolated winds in the explicit in-canopy diffusion of tracers. Remove hpbl/kpbl update due to explicit in-canopy diffusion. * Clean up commented out code. Correct a truncated source line. * Comment out the integrated-canopy meteorology effect. Keep the lines for future PR with the canopy met effects. * revert radiation_clouds.f --------- Co-authored-by: Grant Firl <grant.firl@noaa.gov> Co-authored-by: VanderleiVargas-NOAA <vanderlei.vargas@noaa.gov> Co-authored-by: Qingfu Liu <Qingfu.Liu@noaa.gov> Co-authored-by: Clara.Draoper-NOAA <clara.draper@noaa.gov> Co-authored-by: Michael Kavulich, Jr <kavulich@ucar.edu> Co-authored-by: Lisa <lisa.bengtsson@noaa.gov> Co-authored-by: Nicholas Szapiro <149816583+NickSzapiro-NOAA@users.noreply.github.com> Co-authored-by: Rhae Sung Kim <rhaesung.kim@noaa.gov> Co-authored-by: Nick Szapiro <nick.szapiro@noaa.gov> Co-authored-by: Nick Szapiro <nick.szapiro@clogin06.cactus.wcoss2.ncep.noaa.gov> Co-authored-by: iri01 <i.t.ivanova@gmail.com> Co-authored-by: iri01 <129897017+iri01@users.noreply.github.com> Co-authored-by: Grant Firl <grant@Macbook-Air-M4.local> Co-authored-by: Tracy <hertneky@ucar.edu>
1 parent f68ffdb commit 8a6cd13

3 files changed

Lines changed: 42 additions & 39 deletions

File tree

physics/PBL/SATMEDMF/canopy_driver.F

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ subroutine canopy_driver_run(im,km,ntrac,ntcw,ntrw,
6363
& swh,hlw,xmu,garea,zvfun,sigmaf, ! in
6464
& psk,rbsoil,zorl,u10m,v10m,t2m, q2m,fm,fh,
6565
& tsea,heat,evap,stress,spd1,
66-
& kpbl, ! inout: kpbl
66+
& kpbl, ! in: kpbl
6767
& pgr,
6868
& prsi,del,prsl,prslk,phii,phil,delt,tte_edmf,
6969
& dspheat, ! in
@@ -91,7 +91,7 @@ subroutine canopy_driver_run(im,km,ntrac,ntcw,ntrw,
9191
integer, intent(in) :: tc_pbl
9292
integer, intent(in) :: use_lpt
9393
integer, intent(in) :: kinver(:)
94-
integer, intent(inout) :: kpbl(:)
94+
integer, intent(in) :: kpbl(:)
9595
logical, intent(in) :: gen_tend,ldiag3d
9696
!
9797
real(kind=kind_phys), intent(in) :: grav,pi,rd,cp,rv,hvap,hfus,fv,
@@ -143,7 +143,7 @@ subroutine canopy_driver_run(im,km,ntrac,ntcw,ntrw,
143143
real(kind=kind_phys), intent(in) ::
144144
& dusfc(:), dvsfc(:),
145145
& dtsfc(:), dqsfc(:)
146-
real(kind=kind_phys), intent(inout) ::
146+
real(kind=kind_phys), intent(in) ::
147147
& hpbl(:) ! use resolved hpbl in non-canopy columns
148148
real(kind=kind_phys), intent(inout) ::
149149
& dkt(:,:), dku(:,:)
@@ -847,6 +847,10 @@ subroutine canopy_driver_run(im,km,ntrac,ntcw,ntrw,
847847
enddo
848848
849849
! NB. Using 10-m interpolated values creates shear and gives very high TKE tendencies
850+
u1_can (:,1:km) = u1_can3 (:,1:km)
851+
v1_can (:,1:km) = v1_can3 (:,1:km)
852+
853+
ws1_can (:,1:km) = sqrt(u1_can(:,1:km)**2+v1_can(:,1:km)**2)
850854
851855
t1_can (:,1:km) = t1_can3 (:,1:km)
852856
@@ -889,10 +893,10 @@ subroutine canopy_driver_run(im,km,ntrac,ntcw,ntrw,
889893
q1_can (:,kc, ntke ) = q1(:,k, ntke ) ! ntke always on
890894
891895
! Above-canopy wind components set to hybrid model layers
892-
u1_can (:,kc) = u1 (:,k)
893-
v1_can (:,kc) = v1 (:,k)
896+
! u1_can (:,kc) = u1 (:,k)
897+
! v1_can (:,kc) = v1 (:,k)
894898
895-
ws1_can(:,kc) = sqrt(u1_can(:,kc)**2+v1_can(:,kc)**2)
899+
! ws1_can(:,kc) = sqrt(u1_can(:,kc)**2+v1_can(:,kc)**2)
896900
897901
end do
898902
@@ -903,10 +907,10 @@ subroutine canopy_driver_run(im,km,ntrac,ntcw,ntrw,
903907
q1_can (:,kc, ntke ) = q1(:,1, ntke ) ! ntke always on
904908
905909
!Sub-canopy values of wind components set to 1hy model layer
906-
u1_can (:,kc) = u1 (:,1)
907-
v1_can (:,kc) = v1 (:,1)
910+
! u1_can (:,kc) = u1 (:,1)
911+
! v1_can (:,kc) = v1 (:,1)
908912
909-
ws1_can(:,kc) = sqrt(u1_can(:,kc)**2+v1_can(:,kc)**2)
913+
! ws1_can(:,kc) = sqrt(u1_can(:,kc)**2+v1_can(:,kc)**2)
910914
end do
911915
912916
!
@@ -943,7 +947,7 @@ subroutine canopy_driver_run(im,km,ntrac,ntcw,ntrw,
943947
IF (FRT_MASK(i) <= 0.) THEN
944948
945949
! Non-canopy columns
946-
! kpbl_can(i) = kpbl(i) ! kpbl zero before original sat call
950+
kpbl_can(i) = kpbl(i) ! kpbl zero before original sat call
947951
hpbl_can(i) = hpbl(i)
948952
949953
! Non-canopy columns
@@ -1227,8 +1231,8 @@ subroutine canopy_driver_run(im,km,ntrac,ntcw,ntrw,
12271231
end do ! k = 1, km-nkc
12281232
12291233
! Apply minimum value on chemical conc after "canopy_to_resolved"
1230-
q2_mod (:,:, ntoz:ntrac1 ) =
1231-
& max(q2_mod (:,:, ntoz:ntrac1), concmin) ! after "canopy_to_resolved"
1234+
q2_mod (:,:, ntchs-1:ntrac1 ) =
1235+
& max(q2_mod (:,:, ntchs-1:ntrac1), concmin) ! after "canopy_to_resolved"
12321236
12331237
! Apply minimum value on humidity qmin before doing canopy_transfer & update tendency
12341238
q2_mod(:,:, ntqv) = max(q2_mod(:,:, ntqv),qmin)
@@ -1525,17 +1529,28 @@ subroutine canopy_driver_run(im,km,ntrac,ntcw,ntrw,
15251529
! Update ONLY chemical tracers (n=8, ntrac1)
15261530
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15271531
1528-
! All chemical tracers (n=9, ntrac1)
1529-
! ntqv=1-8 are cloud/rain and "sgs_tke"
1530-
! n=8 "no2" (ntchs=9) GFDL
1531-
! n=9 "no" GFDL
1532-
! n=10 "o3" GFDL
1532+
! All chemical tracers (n= ntchs-1 , ntche-1 (ntrac1)
1533+
! ntqv = 1-7 cloud/rain and "sgs_tke"
1534+
! sgs_tke = 8 N/A
1535+
!
1536+
! ntchs-1 = 8 "no2" GFS_v16 GFDL MP
1537+
! ntchs = 9 "no" GFS_v16 GFDL MP
1538+
! n = 10 "o3" GFS_v16 GFDL MP
15331539
! ...
1534-
! NTRAC1 = 196
1535-
! ---NO PBL TEND --------
1536-
! n=197 ntche
1537-
! n=198 ntke
1538-
! -----------------------
1540+
! ntche-1= 196 NTRAC1 GFS_v16 GFDL MP
1541+
! ntche = 197 "cld_amt" GFS_v16 GFDL MP
1542+
! ntke = 198 "tke" GFS_v16 GFDL MP
1543+
! ---------------------------------------
1544+
! ntqv = 1-9 cloud/rain
1545+
! sgs_tke = 10 "sgs_tke" N/A
1546+
!
1547+
! ntchs-1 = 10 "no2" GFS_v17p8
1548+
! ntchs = 11 "no" GFS_v17p8
1549+
! n = 12 "o3" GFS_v17p8
1550+
! ...
1551+
! ntche-1 = 198 NTRAC1 GFS_v17p8
1552+
! ntke = 199 "tke" GFS_v17p8
1553+
! ---------------------------------------
15391554
DO n = ntchs-1, ntche-1 ! 10, ntche-1 (same as NTRAC1)
15401555
15411556
! Update all model layers
@@ -1556,18 +1571,6 @@ subroutine canopy_driver_run(im,km,ntrac,ntcw,ntrw,
15561571
15571572
endif !if(do_canopy)
15581573
1559-
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1560-
!> ## Save PBL height for diagnostic purpose
1561-
!
1562-
if (do_canopy) then
1563-
1564-
do i = 1, im
1565-
hpbl(i) = hpbl_can(i)
1566-
kpbl(i) = kpbl_can(i)
1567-
enddo
1568-
1569-
endif !do_canopy
1570-
!
15711574
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15721575
15731576
return

physics/PBL/SATMEDMF/canopy_driver.meta

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@
504504
units = index
505505
dimensions = (horizontal_loop_extent)
506506
type = integer
507-
intent = inout
507+
intent = in
508508
[pgr]
509509
standard_name = surface_air_pressure
510510
long_name = surface pressure
@@ -629,7 +629,7 @@
629629
dimensions = (horizontal_loop_extent)
630630
type = real
631631
kind = kind_phys
632-
intent = inout
632+
intent = in
633633
[tkeh]
634634
standard_name = vertical_turbulent_kinetic_energy_at_interface
635635
long_name = vertical turbulent kinetic energy at model layer interfaces

physics/PBL/SATMEDMF/satmedmfvdifq.F

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,9 +1847,9 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
18471847
END IF
18481848
18491849
! Comment out to turn OFF the integrated canopy effect
1850-
dkt(i,k)= (dkt(i,k)/EDDYVEST1) * EDDYVEST_INT !Scale dkt to resolved eddy diffusivity
1851-
dkq(i,k)= (dkq(i,k)/EDDYVEST1) * EDDYVEST_INT !Scale dkq to resolved eddy diffusivity
1852-
dku(i,k)= (dku(i,k)/EDDYVEST1) * EDDYVEST_INT !Scale dku to resolved eddy diffusivity
1850+
!Apr17 dkt(i,k)= (dkt(i,k)/EDDYVEST1) * EDDYVEST_INT !Scale dkt to resolved eddy diffusivity
1851+
!Apr17 dkq(i,k)= (dkq(i,k)/EDDYVEST1) * EDDYVEST_INT !Scale dkq to resolved eddy diffusivity
1852+
!Apr17 dku(i,k)= (dku(i,k)/EDDYVEST1) * EDDYVEST_INT !Scale dku to resolved eddy diffusivity
18531853
18541854
END IF ! (COUNTCAN > 0)
18551855

0 commit comments

Comments
 (0)