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

UFS-dev PR#109 #1039

Closed
wants to merge 68 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
f020a3a
bug fix for rain evaporation due to inconsistent usage of air density…
gthompsnWRF Apr 27, 2023
c7f6d31
three small fixes: max ice size bin made smaller (since snow min size…
gthompsnWRF May 4, 2023
694040f
Merge branch 'BugFix_prv_rev' into small_fixes_GT
gthompsnWRF May 4, 2023
3682e47
Rollback changes to rain evaporation
Jun 14, 2023
279e52b
Merge pull request #81 from AndersJensen-NOAA/rain_evap
grantfirl Jun 16, 2023
c3f9f71
Merge branch 'ufs/dev' into small_fixes_GT
grantfirl Jun 21, 2023
0c01b39
bug fix the snow and graupel melting terms set to zero when sublimati…
gthompsnWRF Jul 5, 2023
2b6a7a4
Initiate SRW v3.0.0 SciDoc
mzhangw Jun 8, 2023
7ec1eb8
Some format and file size adjustments
mzhangw Jun 9, 2023
c901390
address some review comments
mzhangw Jun 15, 2023
57f72fb
Scidoc updates
mzhangw Jul 5, 2023
8cd2586
narrative description for previous update
mzhangw Jul 13, 2023
2a56d37
Host large images remotely
mkavulich Jun 30, 2023
1a8f968
Merge branch 'ufs/dev' into small_fixes_GT
grantfirl Jul 19, 2023
9b69974
Merge pull request #88 from grantfirl/strat_warm_bias_fix_cheng
grantfirl Jul 24, 2023
9e35de1
Changes to logging and initialization of the CLM Lake Model.
SamuelTrahanNOAA Jul 24, 2023
03dbacc
Merge remote-tracking branch 'origin/ufs/dev' into tanya-fix-20230724
SamuelTrahanNOAA Jul 27, 2023
1fae3bc
some missing changes from last commit
SamuelTrahanNOAA Jul 27, 2023
180c43b
yet more changes missing in prior commits
SamuelTrahanNOAA Jul 27, 2023
ace56af
t_grnd(i) should be t_grnd(c)
SamuelTrahanNOAA Jul 28, 2023
c0c253f
fix another typo
SamuelTrahanNOAA Jul 28, 2023
452237b
Merge branch 'ufs/dev' into small_fixes_GT
grantfirl Jul 31, 2023
102d664
Some housekeeping: overwrite ccppsrw_doxyfile (no need to keep separa…
mkavulich Jul 31, 2023
0154a65
Remove old namelists, remove "develop" from names
mkavulich Aug 1, 2023
8f44755
Incorporate changes to FV3_HRRR namelist suggested by Tanya
mkavulich Aug 1, 2023
aaa02d8
Address Ligia/Weiwei's comments
mkavulich Aug 1, 2023
dbcd50f
Remove hard-coded path in doxyfile
mkavulich Aug 1, 2023
39dccc8
Various formatting fixes, grammar and wording changes
mkavulich Aug 1, 2023
6b12f19
Less ambiguous wording regarding resolution
mkavulich Aug 1, 2023
6884732
*actually* fix ambiguous wording
mkavulich Aug 1, 2023
724c20f
Weiwei's suggested changes
mkavulich Aug 3, 2023
816f607
More fixes from Weiwei
mkavulich Aug 14, 2023
9c342a5
Adding OpenACC statements to accelerate MYNN surface scheme performan…
timsliwinski-noaa Aug 15, 2023
af890d4
Merge pull request #69 from ufs-community/small_fixes_GT
grantfirl Aug 18, 2023
e2818ec
Merge branch 'ufs/dev' into srw300_scidoc_noimages
grantfirl Aug 18, 2023
725adbd
Merge remote-tracking branch 'upstream/ufs/dev' into tanya-fix-20230724
SamuelTrahanNOAA Aug 18, 2023
f12b69f
merge #91 (UFS-SRW v3.0.0 SciDoc updates)
SamuelTrahanNOAA Aug 18, 2023
6229818
add SPP support for G-F deep convection
JiliDong-NOAA Aug 21, 2023
5b94685
Merge pull request #92 from SamuelTrahanNOAA/tanya-fix-20230724
dustinswales Aug 22, 2023
6ce3da1
Merge branch 'ufs-community:ufs/dev' into feature/gf-spp
JiliDong-NOAA Aug 23, 2023
96f6002
minor change on explicitly delcaring data type
JiliDong-NOAA Aug 23, 2023
95e9ff2
Reworking how errmsg is treated in device code to remove some preproc…
timsliwinski-noaa Aug 24, 2023
36a313e
Removing preprocessor directives to re-enable print statements on GPU…
timsliwinski-noaa Aug 28, 2023
315d3cc
stop FV3_HRRR_c3 from crashing with gnu debug
SamuelTrahanNOAA Sep 6, 2023
7efb112
Merge pull request #98 from JiliDong-NOAA/feature/gf-spp
dustinswales Sep 8, 2023
770ad33
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
timsliwinski-noaa Sep 8, 2023
31a99de
Merge pull request #97 from timsliwinski-noaa/mynnsfc_openacc
grantfirl Sep 14, 2023
ab84c01
"GF radar reflectivity, dust bug fix, and C3 updates"
haiqinli Sep 20, 2023
5612a96
Fix race condition in GFS_phys_time_vary.fv3.F90 error detection
SamuelTrahanNOAA Sep 21, 2023
3ec61d3
detect empty errmsg in GFS_phys_time_vary.fv3.F90
SamuelTrahanNOAA Sep 21, 2023
7912a19
Initialize err variables in set_soilveg.f
SamuelTrahanNOAA Sep 21, 2023
7332c8e
initialize errmsg & errflg in noahmp_tables.f90
SamuelTrahanNOAA Sep 21, 2023
374996e
only read h2odata, ozdata and noahmp table when they are needed
SamuelTrahanNOAA Sep 22, 2023
5377c7c
passing nc back from microphysics
AnningCheng-NOAA Sep 22, 2023
cfd8485
"to address the reviewer's comments"
haiqinli Sep 23, 2023
f7efdce
Merge remote-tracking branch 'upstream/ufs/dev' into c3-pointer-fix
SamuelTrahanNOAA Sep 25, 2023
671b5f0
Merge remote-tracking branch 'sam/bugfix/errmsgflg-race-condition' in…
SamuelTrahanNOAA Sep 25, 2023
dbd5f58
remove all constant 3D variables from clm lake
SamuelTrahanNOAA Sep 27, 2023
75ec623
calculate constants only once per i
SamuelTrahanNOAA Sep 27, 2023
7a8f693
"to address the reviewers' comments"
haiqinli Sep 27, 2023
a55ce5e
z => dz
SamuelTrahanNOAA Sep 28, 2023
ab4d5f1
"correct the dimension of soil moisture for dust emission"
haiqinli Sep 29, 2023
e0a949d
Merge remote-tracking branch 'sam/clm-lake-fewer-variables' into c3-p…
SamuelTrahanNOAA Sep 29, 2023
609c90b
Merge remote-tracking branch 'haiqin/ufs/dev-radar' into c3-pointer-fix
SamuelTrahanNOAA Sep 29, 2023
dd91c3a
Merge pull request #102 from SamuelTrahanNOAA/c3-pointer-fix
grantfirl Oct 3, 2023
9822325
Merge branch 'ufs/dev' into mrfd
grantfirl Oct 12, 2023
7cc4800
Merge branch 'c3-pointer-fix' into ufs-dev-PR102
grantfirl Dec 2, 2023
de05a41
Merge branch 'mrfd' into ufs-dev-PR109
grantfirl Dec 3, 2023
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
79 changes: 62 additions & 17 deletions physics/GFS_phys_time_vary.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,22 @@ module GFS_phys_time_vary

contains

subroutine copy_error(myerrmsg, myerrflg, errmsg, errflg)
implicit none
character(*), intent(in) :: myerrmsg
integer, intent(in) :: myerrflg
character(*), intent(out) :: errmsg
integer, intent(inout) :: errflg
if(myerrflg /= 0 .and. errflg == 0) then
!$OMP CRITICAL
if(errflg == 0) then
errmsg = myerrmsg
errflg = myerrflg
endif
!$OMP END CRITICAL
endif
end subroutine copy_error

!> \section arg_table_GFS_phys_time_vary_init Argument Table
!! \htmlinclude GFS_phys_time_vary_init.html
!!
Expand Down Expand Up @@ -192,6 +208,9 @@ subroutine GFS_phys_time_vary_init (
real(kind=kind_phys), dimension(:), allocatable :: dzsno
real(kind=kind_phys), dimension(:), allocatable :: dzsnso

integer :: myerrflg
character(len=255) :: myerrmsg

! Initialize CCPP error handling variables
errmsg = ''
errflg = 0
Expand All @@ -207,64 +226,75 @@ subroutine GFS_phys_time_vary_init (
!$OMP shared (xlat_d,xlon_d,imap,jmap,errmsg,errflg) &
!$OMP shared (levozp,oz_coeff,oz_pres,ozpl) &
!$OMP shared (levh2o,h2o_coeff,h2o_pres,h2opl) &
!$OMP shared (iamin, iamax, jamin, jamax) &
!$OMP shared (iamin, iamax, jamin, jamax, lsm_noahmp) &
!$OMP shared (iaerclm,iaermdl,ntrcaer,aer_nm,iflip,iccn) &
!$OMP shared (jindx1_o3,jindx2_o3,ddy_o3,jindx1_h,jindx2_h,ddy_h) &
!$OMP shared (jindx1_aer,jindx2_aer,ddy_aer,iindx1_aer,iindx2_aer,ddx_aer) &
!$OMP shared (jindx1_ci,jindx2_ci,ddy_ci,iindx1_ci,iindx2_ci,ddx_ci) &
!$OMP shared (do_ugwp_v1,jindx1_tau,jindx2_tau,ddy_j1tau,ddy_j2tau) &
!$OMP shared (isot,ivegsrc,nlunit,sncovr,sncovr_ice,lsm,lsm_ruc) &
!$OMP shared (min_seaice,fice,landfrac,vtype,weasd,snupx,salp_data) &
!$OMP private (ix,i,j,rsnow,vegtyp)
!$OMP private (ix,i,j,rsnow,vegtyp,myerrmsg,myerrflg)

!$OMP sections

!$OMP section
!> - Call read_o3data() to read ozone data
need_o3data: if(ntoz > 0) then
call read_o3data (ntoz, me, master)

! Consistency check that the hardcoded values for levozp and
! oz_coeff in GFS_typedefs.F90 match what is set by read_o3data
! in GFS_typedefs.F90: allocate (Tbd%ozpl (IM,levozp,oz_coeff))
if (size(ozpl, dim=2).ne.levozp) then
write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", &
myerrflg = 1
write(myerrmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", &
"levozp from read_o3data does not match value in GFS_typedefs.F90: ", &
levozp, " /= ", size(ozpl, dim=2)
errflg = 1
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
end if
if (size(ozpl, dim=3).ne.oz_coeff) then
write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", &
myerrflg = 1
write(myerrmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", &
"oz_coeff from read_o3data does not match value in GFS_typedefs.F90: ", &
oz_coeff, " /= ", size(ozpl, dim=3)
errflg = 1
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
end if
endif need_o3data

!$OMP section
!> - Call read_h2odata() to read stratospheric water vapor data
need_h2odata: if(h2o_phys) then
call read_h2odata (h2o_phys, me, master)

! Consistency check that the hardcoded values for levh2o and
! h2o_coeff in GFS_typedefs.F90 match what is set by read_o3data
! in GFS_typedefs.F90: allocate (Tbd%h2opl (IM,levh2o,h2o_coeff))
if (size(h2opl, dim=2).ne.levh2o) then
write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", &
write(myerrmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", &
"levh2o from read_h2odata does not match value in GFS_typedefs.F90: ", &
levh2o, " /= ", size(h2opl, dim=2)
errflg = 1
myerrflg = 1
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
end if
if (size(h2opl, dim=3).ne.h2o_coeff) then
write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", &
write(myerrmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", &
"h2o_coeff from read_h2odata does not match value in GFS_typedefs.F90: ", &
h2o_coeff, " /= ", size(h2opl, dim=3)
errflg = 1
myerrflg = 1
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
end if
endif need_h2odata

!$OMP section
!> - Call read_aerdata() to read aerosol climatology, Anning added coupled
!> added coupled gocart and radiation option to initializing aer_nm
if (iaerclm) then
ntrcaer = ntrcaerm
call read_aerdata (me,master,iflip,idate,errmsg,errflg)
myerrflg = 0
myerrmsg = 'read_aerdata failed without a message'
call read_aerdata (me,master,iflip,idate,myerrmsg,myerrflg)
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
else if(iaermdl ==2 ) then
do ix=1,ntrcaerm
do j=1,levs
Expand All @@ -289,16 +319,27 @@ subroutine GFS_phys_time_vary_init (
!$OMP section
!> - Call tau_amf dats for ugwp_v1
if (do_ugwp_v1) then
call read_tau_amf(me, master, errmsg, errflg)
myerrflg = 0
myerrmsg = 'read_tau_amf failed without a message'
call read_tau_amf(me, master, myerrmsg, myerrflg)
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
endif

!$OMP section
!> - Initialize soil vegetation (needed for sncovr calculation further down)
call set_soilveg(me, isot, ivegsrc, nlunit, errmsg, errflg)
myerrflg = 0
myerrmsg = 'set_soilveg failed without a message'
call set_soilveg(me, isot, ivegsrc, nlunit, myerrmsg, myerrflg)
call copy_error(myerrmsg, myerrflg, errmsg, errflg)

!$OMP section
!> - read in NoahMP table (needed for NoahMP init)
call read_mp_table_parameters(errmsg, errflg)
if(lsm == lsm_noahmp) then
myerrflg = 0
myerrmsg = 'read_mp_table_parameters failed without a message'
call read_mp_table_parameters(myerrmsg, myerrflg)
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
endif

!$OMP end sections

Expand Down Expand Up @@ -393,7 +434,9 @@ subroutine GFS_phys_time_vary_init (
if (errflg/=0) return

if (iaerclm) then
! This call is outside the OpenMP section, so it should access errmsg & errflg directly.
call read_aerdataf (me, master, iflip, idate, fhour, errmsg, errflg)
! If it is moved to an OpenMP section, it must use myerrmsg, myerrflg, and copy_error.
if (errflg/=0) return
end if

Expand Down Expand Up @@ -479,7 +522,8 @@ subroutine GFS_phys_time_vary_init (
!$omp shared(dwsat_table,dksat_table,psisat_table,smoiseq) &
!$OMP shared(smcwtdxy,deeprechxy,rechxy,errmsg,errflg) &
!$OMP private(vegtyp,masslai,masssai,snd,dzsno,dzsnso,isnow) &
!$OMP private(soiltyp,bexp,smcmax,smcwlt,dwsat,dksat,psisat,ddz)
!$OMP private(soiltyp,bexp,smcmax,smcwlt,dwsat,dksat,psisat) &
!$OMP private(myerrmsg,myerrflg,ddz)
do ix=1,im
if (landfrac(ix) >= drythresh) then
tvxy(ix) = tsfcl(ix)
Expand Down Expand Up @@ -594,8 +638,9 @@ subroutine GFS_phys_time_vary_init (
dzsno(-1) = 0.20_kind_phys
dzsno(0) = snd - 0.05_kind_phys - 0.20_kind_phys
else
errmsg = 'Error in GFS_phys_time_vary.fv3.F90: Problem with the logic assigning snow layers in Noah MP initialization'
errflg = 1
myerrmsg = 'Error in GFS_phys_time_vary.fv3.F90: Problem with the logic assigning snow layers in Noah MP initialization'
myerrflg = 1
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
endif

! Now we have the snowxy field
Expand Down
2 changes: 1 addition & 1 deletion physics/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
& imp_physics_mg, iovr, iovr_rand, iovr_maxrand, iovr_max, &
& iovr_dcorr, iovr_exp, iovr_exprand, idcor, idcor_con, &
& idcor_hogan, idcor_oreopoulos, lcrick, lcnorm, &
& imfdeepcnv, imfdeepcnv_gf, imfdeepcnv_gf, do_mynnedmf, &
& imfdeepcnv, imfdeepcnv_gf, imfdeepcnv_c3, do_mynnedmf, &
& lgfdlmprad, &
& uni_cld, lmfshal, lmfdeep2, cldcov, clouds1, &
& effrl, effri, effrr, effrs, effr_in, &
Expand Down
Loading
Loading