Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combination PR for ozone diagnostics, metadata intent bugfixes, sfcsub.F landmask bugfix, and canopy resistance output #205

Merged
merged 19 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e4d091f
Make ozone photochem diagnostics match parametrization terms
DWesl Apr 9, 2024
8a85857
Fix the setting of model landmask when interpolating
GeorgeGayno-NOAA Apr 24, 2024
5cdea5b
Fix incorrect intents
dustinswales Apr 25, 2024
e4f22f7
Address reviewers comment
dustinswales Apr 25, 2024
25cfc3a
Address reviewers comment
dustinswales Apr 25, 2024
25330ed
Initial commit of canopy resistane (rca) in Noah-MP for AQM.
drnimbusrain May 2, 2024
78197bd
Merge branch 'patch-2' into combo_20240503
grantfirl May 3, 2024
1b81201
Merge branch 'cleanup_intents' into combo_20240503
grantfirl May 3, 2024
5546181
Merge branch 'sfcsub_fix' into combo_20240503
grantfirl May 3, 2024
5972b38
Merge branch 'feature/canres_aqm' into combo_20240503
grantfirl May 3, 2024
68ea163
move calculation of rca to noahmpdrv.F90 from module_sf_noahmplsm (ad…
grantfirl May 6, 2024
25a5fc7
use regular lai rather than lai_eff
grantfirl May 7, 2024
94852db
add initialization for variables that are not calculated at Noahmp gl…
grantfirl May 9, 2024
b98faf3
Update CODEOWNERS
dustinswales May 13, 2024
dcaa3f4
Merge pull request #5 from dustinswales/update_codeowners_grant
grantfirl May 13, 2024
30cfb46
add BoYang-NOAA to CODEOWNERS for ugwpv1_gsldrag*
grantfirl May 13, 2024
bff4e29
Updated rca calculation with rsmin and rsmax limits.
drnimbusrain May 15, 2024
2062e9a
Merge pull request #6 from noaa-oar-arl/combo_20240503
grantfirl May 15, 2024
be05ec2
fix openACC directive bug in cu_gf_deep.F90
grantfirl May 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
367 changes: 181 additions & 186 deletions CODEOWNERS

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion physics/CONV/Grell_Freitas/cu_gf_deep.F90
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ subroutine cu_gf_deep_run( &
real(kind=kind_phys), dimension (its:ite,kts:kte) :: pwdper, massflx
integer :: nv
!$acc declare create(chem,chem_cup,chem_up,chem_down,dellac,dellac2,chem_c,chem_pw,chem_pwd, &
!$acc chem_pwav,chem_psum,pwdper,massflux)
!$acc chem_pwav,chem_psum,pwdper,massflx)

real(kind=kind_phys), dimension (its:ite,kts:kte) :: &
entr_rate_2d,mentrd_rate_2d,he,hes,qes,z, heo,heso,qeso,zo, &
Expand Down
2 changes: 1 addition & 1 deletion physics/GWD/gwdps.meta
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
intent = inout
[ldiag_ugwp]
standard_name = flag_for_unified_gravity_wave_physics_diagnostics
long_name = flag for CIRES UGWP Diagnostics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers)
type = real
kind = kind_phys
intent = in
intent = inout
[dtidx]
standard_name = cumulative_change_of_state_variables_outer_index
long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ subroutine GFS_MP_generic_post_run(
totprcp, totice, totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, rain_cpl, rainc_cpl, snow_cpl, &
pwat, frzr, frzrb, frozr, frozrb, tsnowp, tsnowpb, rhonewsn1, exticeden, &
drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, &
graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, dfi_radar_max_intervals, &
graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, &
dtend, dtidx, index_of_temperature, index_of_process_mp,ldiag3d, qdiag3d,dqdt_qmicro, lssav, num_dfi_radar, &
fh_dfi_radar,index_of_process_dfi_radar, ix_dfi_radar, dfi_radar_tten, radar_tten_limits, fhour, prevsq, &
iopt_lake, iopt_lake_clm, lkm, use_lake_model, errmsg, errflg)
Expand All @@ -43,10 +43,9 @@ subroutine GFS_MP_generic_post_run(
integer, intent(in) :: index_of_temperature,index_of_process_mp,use_lake_model(:)
integer, intent(in) :: imfshalcnv,imfshalcnv_gf,imfdeepcnv,imfdeepcnv_gf,imfdeepcnv_samf
integer, dimension (:), intent(in) :: htop
integer :: dfi_radar_max_intervals
real(kind=kind_phys), intent(in) :: fh_dfi_radar(:), fhour, con_t0c
real(kind=kind_phys), intent(in) :: radar_tten_limits(:)
integer :: ix_dfi_radar(:)
integer, intent(in) :: ix_dfi_radar(:)
real(kind=kind_phys), dimension(:,:), intent(inout) :: gt0,refl_10cm

real(kind=kind_phys), intent(in) :: dtf, frain, con_g, rainmin, rhowater
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@
dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_tracers)
type = real
kind = kind_phys
intent = inout
intent = in
[rain0]
standard_name = lwe_thickness_of_explicit_rain_amount
long_name = explicit rain on physics timestep
Expand Down Expand Up @@ -772,13 +772,6 @@
type = real
kind = kind_phys
intent = in
[dfi_radar_max_intervals]
standard_name = maximum_number_of_radar_derived_temperature_or_convection_suppression_intervals
long_name = maximum allowed number of time ranges with radar-derived microphysics temperature tendencies or radar-derived convection suppression
units = count
dimensions = ()
type = integer
intent = in
[num_dfi_radar]
standard_name = number_of_radar_derived_temperature_or_convection_suppression_intervals
long_name = number of time ranges with radar-derived microphysics temperature tendencies or radar-derived convection suppression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ subroutine GFS_surface_composites_post_run (
logical, intent(in) :: cplflx, frac_grid, cplwav2atm, frac_ice
logical, intent(in) :: lheatstrg
logical, dimension(:), intent(in) :: flag_cice, dry, icy
logical, dimension(:), intent(inout) :: wet
logical, dimension(:), intent(in) :: wet
integer, dimension(:), intent(in) :: islmsk, use_lake_model
real(kind=kind_phys), dimension(:), intent(in) :: wind, t1, q1, prsl1, landfrac, lakefrac, oceanfrac, &
cd_wat, cd_lnd, cd_ice, cdq_wat, cdq_lnd, cdq_ice, rb_wat, rb_lnd, rb_ice, stress_wat, &
Expand Down
2 changes: 1 addition & 1 deletion physics/Interstitials/UFS_SCM_NEPTUNE/sfcsub.F
Original file line number Diff line number Diff line change
Expand Up @@ -7670,7 +7670,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil,slmskl,slmskw, &
! points. so for efficiency, don't have fixrdc try to
! find a value at landice points as defined by the vet type (vet).
allocate(slmask_noice(len))
slmask_noice = 1.0
slmask_noice = slmskl
do i = 1, len
if (nint(vet(i)) < 1 .or.
& nint(vet(i)) == landice_cat) then
Expand Down
4 changes: 2 additions & 2 deletions physics/PBL/MYNN_EDMF/mynnedmf_wrapper.F90
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ SUBROUTINE mynnedmf_wrapper_run( &
implicit none
!-------------------------------------------------------------------

real(kind_phys) :: huge
real(kind_phys), intent(in) :: huge
character(len=*), intent(out) :: errmsg
integer, intent(out) :: errflg

Expand Down Expand Up @@ -290,7 +290,7 @@ SUBROUTINE mynnedmf_wrapper_run( &
real(kind_phys), dimension(:), intent(inout) :: frp
logical, intent(in) :: mix_chem, enh_mix, rrfs_sd
real(kind_phys), dimension(:,:,:), intent(inout) :: chem3d
real(kind_phys), dimension(:,: ), intent(inout) :: vdep
real(kind_phys), dimension(:,: ), intent(in) :: vdep
real(kind_phys), dimension(im) :: emis_ant_no

!MYNN-2D
Expand Down
2 changes: 1 addition & 1 deletion physics/PBL/SATMEDMF/satmedmfvdif.meta
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@
dimensions = (horizontal_loop_extent,vertical_layer_dimension,cumulative_change_of_state_variables_outer_index_max)
type = real
kind = kind_phys
intent = in
intent = inout
[dtidx]
standard_name = cumulative_change_of_state_variables_outer_index
long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index
Expand Down
2 changes: 1 addition & 1 deletion physics/PBL/SATMEDMF/satmedmfvdifq.meta
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@
dimensions = (horizontal_loop_extent,vertical_layer_dimension,cumulative_change_of_state_variables_outer_index_max)
type = real
kind = kind_phys
intent = in
intent = inout
[dtidx]
standard_name = cumulative_change_of_state_variables_outer_index
long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index
Expand Down
2 changes: 1 addition & 1 deletion physics/PBL/SHOC/moninshoc.meta
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@
dimensions = (horizontal_loop_extent,vertical_layer_dimension,cumulative_change_of_state_variables_outer_index_max)
type = real
kind = kind_phys
intent = in
intent = inout
[dtidx]
standard_name = cumulative_change_of_state_variables_outer_index
long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index
Expand Down
2 changes: 1 addition & 1 deletion physics/PBL/YSU/ysuvdif.meta
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@
dimensions = (horizontal_loop_extent,vertical_layer_dimension,cumulative_change_of_state_variables_outer_index_max)
type = real
kind = kind_phys
intent = in
intent = inout
[dtidx]
standard_name = cumulative_change_of_state_variables_outer_index
long_name = index of state-variable and process in last dimension of diagnostic tendencies array AKA cumulative_change_index
Expand Down
4 changes: 2 additions & 2 deletions physics/SFC_Layer/UFS/sfc_diag.meta
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = inout
intent = in
[tskin]
standard_name = surface_skin_temperature
long_name = surface skin temperature
Expand Down Expand Up @@ -314,7 +314,7 @@
long_name = model 2m diagnostics use the temperature and humidity calculated by the lake model
units = flag
dimensions = ()
type = integer
type = logical
intent = in
[wind]
standard_name = wind_speed_at_lowest_model_layer
Expand Down
2 changes: 1 addition & 1 deletion physics/SFC_Layer/UFS/sfc_diag_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ subroutine sfc_diag_post_run (im, lsm, lsm_noahmp, opt_diag, dry, lssav, dtf, co
logical , dimension(:), intent(in) :: dry
real(kind=kind_phys), dimension(:), intent(in) :: pgr, u10m, v10m
real(kind=kind_phys), dimension(:), intent(inout) :: t2m, q2m, tmpmin, tmpmax, spfhmin, spfhmax
real(kind=kind_phys), dimension(:), intent(inout) :: t2mmp, q2mp
real(kind=kind_phys), dimension(:), intent(in) :: t2mmp, q2mp
real(kind=kind_phys), dimension(:), intent(inout) :: wind10mmax, u10mmax, v10mmax, dpt2m

character(len=*), intent(out) :: errmsg
Expand Down
4 changes: 2 additions & 2 deletions physics/SFC_Layer/UFS/sfc_diag_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
intent = in
[q2mp]
standard_name = specific_humidity_at_2m_from_noahmp
long_name = 2 meter specific humidity from noahmp
units = kg kg-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
intent = in
[t2m]
standard_name = air_temperature_at_2m
long_name = 2 meter temperature
Expand Down
10 changes: 7 additions & 3 deletions physics/SFC_Models/Land/Noahmp/module_sf_noahmplsm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2013,6 +2013,8 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in
chuc = 0.
chv2 = 0.
rb = 0.
laisun = 0.
laisha = 0.

cdmnv = 0.0
ezpdv = 0.0
Expand Down Expand Up @@ -2263,7 +2265,8 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in
csigmaf1, & !out
!jref:start
qc ,qsfc ,psfc , & !in
q2v ,chv2, chleaf, chuc) !inout
q2v ,chv2 ,chleaf ,chuc , &
rb) !out

! new coupling code

Expand Down Expand Up @@ -3712,7 +3715,8 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , &
t2mv ,psnsun ,psnsha ,canhs , & !out
csigmaf1, & !out
qc ,qsfc ,psfc , & !in
q2v ,cah2 ,chleaf ,chuc ) !inout
q2v ,cah2 ,chleaf ,chuc , & !inout
rb) !out

! --------------------------------------------------------------------------------------------------
! use newton-raphson iteration to solve for vegetation (tv) and
Expand Down Expand Up @@ -3836,6 +3840,7 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , &
real (kind=kind_phys), intent(out) :: chuc !< under canopy exchange coefficient
real (kind=kind_phys), intent(out) :: canhs !< canopy heat storage change (w/m2)
real (kind=kind_phys), intent(out) :: q2v !<
real (kind=kind_phys), intent(out) :: rb !< bulk leaf boundary layer resistance (s/m)
real (kind=kind_phys) :: cah !< sensible heat conductance, canopy air to zlvl air (m/s)
real (kind=kind_phys) :: u10v !< 10 m wind speed in eastward dir (m/s)
real (kind=kind_phys) :: v10v !< 10 m wind speed in eastward dir (m/s)
Expand All @@ -3852,7 +3857,6 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , &
real (kind=kind_phys) :: z0mo !roughness length for intermediate output only (m)
real (kind=kind_phys) :: z0h !roughness length, sensible heat (m)
real (kind=kind_phys) :: z0hg !roughness length, sensible heat (m)
real (kind=kind_phys) :: rb !bulk leaf boundary layer resistance (s/m)
real (kind=kind_phys) :: ramc !aerodynamic resistance for momentum (s/m)
real (kind=kind_phys) :: rahc !aerodynamic resistance for sensible heat (s/m)
real (kind=kind_phys) :: rawc !aerodynamic resistance for water vapor (s/m)
Expand Down
22 changes: 19 additions & 3 deletions physics/SFC_Models/Land/Noahmp/noahmpdrv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ subroutine noahmpdrv_run &
sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, &
cmm, chh, evbs, evcw, sbsno, pah, ecan, etran, edir, snowc,&
stm, snohf,smcwlt2, smcref2, wet1, t2mmp, q2mp,zvfun, &
ztmax, errmsg, errflg, &
ztmax, rca, errmsg, errflg, &
canopy_heat_storage_ccpp, &
rainfall_ccpp, &
sw_absorbed_total_ccpp, &
Expand Down Expand Up @@ -400,6 +400,8 @@ subroutine noahmpdrv_run &
real(kind=kind_phys), dimension(:) , intent(out) :: q2mp ! combined q2m from tiles
real(kind=kind_phys), dimension(:) , intent(out) :: zvfun !
real(kind=kind_phys), dimension(:) , intent(out) :: ztmax ! thermal roughness length
real(kind=kind_phys), dimension(:) , intent(out) :: rca ! total canopy/stomatal resistance (s/m)

character(len=*) , intent(out) :: errmsg
integer , intent(out) :: errflg

Expand Down Expand Up @@ -623,7 +625,7 @@ subroutine noahmpdrv_run &
real (kind=kind_phys) :: canopy_heat_storage ! out | within-canopy heat [W/m2]
real (kind=kind_phys) :: spec_humid_sfc_veg ! out | surface specific humidty over vegetation [kg/kg]
real (kind=kind_phys) :: spec_humid_sfc_bare ! out | surface specific humidty over bare soil [kg/kg]

real (kind=kind_phys) :: ustarx ! inout |surface friction velocity
real (kind=kind_phys) :: prslkix ! in exner function
real (kind=kind_phys) :: prsik1x ! in exner function
Expand Down Expand Up @@ -948,6 +950,10 @@ subroutine noahmpdrv_run &
ch_vegetated = 0.0
ch_bare_ground = ch_noahmp
canopy_heat_storage = 0.0
lai_sunlit = 0.0
lai_shaded = 0.0
rs_sunlit = 0.0
rs_shaded = 0.0

else ! not glacier

Expand Down Expand Up @@ -1056,7 +1062,17 @@ subroutine noahmpdrv_run &
chxy (i) = ch_noahmp
zorl (i) = z0_total * 100.0 ! convert to cm
ztmax (i) = z0h_total


!LAI-scale canopy resistance based on weighted sunlit shaded fraction
if(rs_sunlit .le. 0.0 .or. rs_shaded .le. 0.0 .or. &
lai_sunlit .eq. 0.0 .or. lai_shaded .eq. 0.0) then
rca(i) = parameters%rsmax
else !calculate LAI-scale canopy conductance (1/Rs)
rca(i) = ((1.0/(rs_sunlit+leaf_air_resistance)*lai_sunlit) + &
((1.0/(rs_shaded+leaf_air_resistance))*lai_shaded))
rca(i) = max((1.0/rca(i)),parameters%rsmin) !resistance
end if

smc (i,:) = soil_moisture_vol
slc (i,:) = soil_liquid_vol
snowxy (i) = float(snow_levels)
Expand Down
8 changes: 8 additions & 0 deletions physics/SFC_Models/Land/Noahmp/noahmpdrv.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,14 @@
type = real
kind = kind_phys
intent = out
[rca]
standard_name = aerodynamic_resistance_in_canopy
long_name = canopy resistance
units = s m-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = out
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
4 changes: 2 additions & 2 deletions physics/photochem/module_ozphys.F90
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ subroutine run_o3prog_2015(this, con_1ovg, dt, p, t, dp, ozpl, oz, do_diag, do3_

! Diagnostics (optional)
if (do_diag) then
do3_dt_prd(:,iLev) = (prod(:,1)-prod(:,2)*prod(:,6))*dt
do3_dt_ozmx(:,iLev) = (oz(:,iLev) - ozib(:))
do3_dt_prd(:,iLev) = prod(:,1) * dt
do3_dt_ozmx(:,iLev) = prod(:,2) * (oz(:,iLev) - prod(:,6)) * dt
do3_dt_temp(:,iLev) = prod(:,3)*(t(:,iLev)-prod(:,5))*dt
do3_dt_ohoz(:,iLev) = prod(:,4) * (colo3(:,iLev)-coloz(:,iLev))*dt
endif
Expand Down
Loading