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

Code update for HR4_roughness, background diffusivity and shallow convection #119

Merged
merged 56 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c18c6d4
CCPP scheme simulator.
Jan 30, 2023
f9abb73
Fix file rename typo
Jan 30, 2023
ef0d369
Added MPI commands to ccpp_scheme_simulator
Jan 31, 2023
fd72b35
Work in progress...
Feb 3, 2023
ffd26ab
Some changes
Feb 6, 2023
112ac89
Some small cleanup
Feb 7, 2023
6a4c4b1
More OO changes. Will split into load_data and ccpp_scheme components…
Feb 9, 2023
be4cc2e
More OO changes
Feb 10, 2023
7001ef9
Split scheme into load and simulator components.
Feb 13, 2023
8bc8ec9
Small bug fix to nml
Feb 13, 2023
6db4af5
Remove dimension for tracer, handle tracers individualy, not with sta…
Feb 13, 2023
147cbac
Fixed bug in interpolation routine.
Feb 14, 2023
a296389
Moew changes
Feb 17, 2023
e49f1f6
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into ccpp…
Apr 5, 2023
a3933a5
CCPP scheme simulator
May 4, 2023
833b990
Merge branch 'ufs/dev-gf' into ufs-dev-PR64
grantfirl May 4, 2023
3ba2924
Merge branch 'main' into ufs-dev-PR64
grantfirl May 8, 2023
6e53907
Merge commit 'd474c2' into ufs-dev-PR26
grantfirl May 9, 2023
2515b27
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
May 30, 2023
5d49f79
Reorganization of scheme simulator. Now stateless.
Jun 1, 2023
d8a5b1f
Merge pull request #1015 from grantfirl/ufs-dev-PR64
grantfirl Jun 13, 2023
6f12331
Merge branch 'main' into ufs-dev-PR26
grantfirl Jun 13, 2023
4d69108
fix bug in scm_sfc_flux_spec.F90
grantfirl Jun 14, 2023
6cfaad5
Merge branch 'update_HR2' into ufs-dev-PR65
grantfirl Jun 26, 2023
93e0c8d
Merge commit '81e3f5e36' into ufs-dev-PR71
grantfirl Jun 26, 2023
bc94a0f
Merge remote-tracking branch 'joe-fork/mynn_snowfix' into ufs-dev-PR71
grantfirl Jun 26, 2023
92c8a9e
Merge pull request #1016 from grantfirl/ufs-dev-PR26
grantfirl Jun 29, 2023
c5566ab
Merge branch 'main' into ufs-dev-PR65
grantfirl Jun 29, 2023
ce731f2
Merge branch 'main' into ufs-dev-PR71
grantfirl Jun 29, 2023
12d4fc2
Working as expected!
Jul 7, 2023
6ceffe3
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
Jul 7, 2023
9b77c4e
Merge pull request #1020 from grantfirl/ufs-dev-PR65
grantfirl Jul 7, 2023
9465b6f
Housekeeping
Jul 11, 2023
c61a2a6
GNU bug found in SCM CI
Jul 13, 2023
8e5646e
Some cleanup.
Jul 18, 2023
7e8cd3a
Merge branch 'main' into ufs-dev-PR71
grantfirl Jul 19, 2023
e3c00d3
Renamed scheme simulator suite simulator
Jul 19, 2023
2d6d44c
Omission from previous commit
Jul 19, 2023
5ab1a5b
Add ability to use constant forcing data when one-dimensional data is…
Jul 19, 2023
07a25fe
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
Aug 1, 2023
215ba6d
Merge pull request #996 from dustinswales/ccpp_scheme_sim
dustinswales Aug 1, 2023
1e7542a
Merge branch 'main' into ufs-dev-PR71
grantfirl Aug 3, 2023
fa96015
Merge pull request #1021 from grantfirl/ufs-dev-PR71
grantfirl Aug 3, 2023
4e45989
Code update for HR4_roughness
Qingfu-Liu Oct 16, 2023
3debf89
Code update for HR4_roughness
Qingfu-Liu Oct 16, 2023
c2b1301
Code update for HR4_roughness
Qingfu-Liu Oct 16, 2023
2fc24ca
Merge remote-tracking branch 'upstream/ufs/dev' into HR4_roughness
Qingfu-Liu Nov 28, 2023
91da6a0
Merge https://github.com/Qingfu-Liu/ccpp-physics into HR4_roughness
Qingfu-Liu Nov 28, 2023
562377c
remove files from old version
Qingfu-Liu Nov 28, 2023
12cd9c6
update files satmedmfvdifq.F samfshalcnv.f sfc_diff.f
Qingfu-Liu Nov 28, 2023
225848c
Merge remote-tracking branch 'upstream/ufs/dev' into HR4_roughness
Qingfu-Liu Dec 1, 2023
d65507a
Fix CI 2
Qingfu-Liu Dec 14, 2023
fa9931a
Merge remote-tracking branch 'upstream/ufs/dev' into HR4_roughness
Qingfu-Liu Jan 10, 2024
26ecb3d
Merge remote-tracking branch 'upstream/ufs/dev' into HR4_roughness
Qingfu-Liu Jan 16, 2024
97e3b1c
update surface physics z0 from waves
Qingfu-Liu Jan 18, 2024
327fbaa
Merge remote-tracking branch 'upstream/ufs/dev' into HR4_roughness
Qingfu-Liu Jan 26, 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
2 changes: 1 addition & 1 deletion physics/CONV/SAMF/samfshalcnv.f
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, &
parameter(cinacrmx=-120.,shevf=2.0)
parameter(dtmax=10800.,dtmin=600.)
parameter(bb1=4.0,bb2=0.8,csmf=0.2)
parameter(tkcrt=2.,cmxfac=15.)
parameter(tkcrt=2.,cmxfac=10.)
! parameter(bet1=1.875,cd1=.506,f1=2.0,gam1=.5)
parameter(betaw=.03,dxcrtc0=9.e3)
parameter(h1=0.33333333)
Expand Down
2 changes: 1 addition & 1 deletion physics/PBL/SATMEDMF/satmedmfvdifq.F
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
parameter(elmfac=1.0,elefac=1.0,cql=100.)
parameter(dw2min=1.e-4,dkmax=1000.,xkgdx=1000.)
parameter(qlcr=3.5e-5,zstblmax=2500.)
parameter(xkinv1=0.15,xkinv2=0.3)
parameter(xkinv1=0.4,xkinv2=0.3)
parameter(h1=0.33333333,hcrinv=250.)
parameter(vegflo=0.1,vegfup=1.0,z0lo=0.1,z0up=1.0)
parameter(vc0=1.0,zc0=1.0)
Expand Down
31 changes: 16 additions & 15 deletions physics/SFC_Layer/UFS/sfc_diff.f
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,24 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in)
tvs = half * (tsurf_wat(i)+tskin_wat(i))/prsik1(i)
& * virtfac
endif

z0 = 0.01_kp * z0rl_wat(i)
z0max = max(zmin, min(z0,z1(i)))
! ustar_wat(i) = sqrt(grav * z0 / charnock)
!
wind10m = sqrt(u10m(i)*u10m(i)+v10m(i)*v10m(i))
!
if (sfc_z0_type == -1) then ! using wave model derived momentum roughness
tem1 = 0.11 * vis / ustar_wat(i)
z0 = tem1 + 0.01_kp * z0rl_wav(i)

if (redrag) then
z0max = max(min(z0, z0s_max),1.0e-7_kp)
else
z0max = max(min(z0,0.1_kp), 1.0e-7_kp)
endif
z0rl_wat(i) = 100.0_kp * z0max ! cm
else
z0 = 0.01_kp * z0rl_wat(i)
z0max = max(zmin, min(z0,z1(i)))
endif
!
!** test xubin's new z0

! ztmax = z0max
Expand Down Expand Up @@ -425,17 +437,6 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in)
z0rl_wat(i) = 1.0e-4_kp
endif

elseif (z0rl_wav(i) <= 1.0e-7_kp .or. &

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JongilHan66 I'm concerned that removal of this section of code is having some unintended effects. It's my understanding is that this code was put in by Moorthi after we noticed there were issues with where the atm model expected z0 from waves, and the vlaues that the wave model sent, whether it was land/sea masks or a value the atm model did not thinkk was acceptable. I ran a few of the regression tests offline and I saw this:

showdiffcpldbmktest

On the left is the differences and on the top right is from this branch and the bottom right is from develop. It's easy to see this issue by the differences being near land/sea masks and in lakes. Please let me know if you'd like to discuss this more offline and sorry for the delay in looking closer at this before.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JessicaMeixner-NOAA I thought that section would not be necessary as molecular viscosity effect is now included (which will result in z0 > 1.e-7 always). But I have no objection to recover that section for a safety.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JongilHan66 I think focusing on for example the lakes really shows where this is needed. Otherwise it defaults to the minimum value because the waves do not provide a roughness length there.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Qingfu-Liu @JessicaMeixner-NOAA Hi Qingfu, could you recover that section to the original one, i.e.,

! elseif (z0rl_wav(i) <= 1.0e-7_kp .or. &
! & z0rl_wav(i) > 1.0_kp) then
!! z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i)
! tem1 = 0.11 * vis / ustar_wat(i)
! z0 = tem1 + (charnock/grav)*ustar_wat(i)*ustar_wat(i)

! if (redrag) then
! z0rl_wat(i) = 100.0_kp * max(min(z0, z0s_max),1.0e-7_kp)
! else
! z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.0e-7_kp)
! endif
! endif

==>
elseif (z0rl_wav(i) <= 1.0e-7_kp .or. &
& z0rl_wav(i) > 1.0_kp) then
! z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i)
tem1 = 0.11 * vis / ustar_wat(i)
z0 = tem1 + (charnock/grav)*ustar_wat(i)*ustar_wat(i)

          if (redrag) then
            z0rl_wat(i) = 100.0_kp * max(min(z0, z0s_max),1.0e-7_kp)
          else
            z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.0e-7_kp)
          endif
        endif

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JongilHan66 I have added this section of original code and tested in suite control_p8. Can you review the new code? Thanks

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Qingfu-Liu I saw that that section was correctly recovered to the original one.

& z0rl_wav(i) > 1.0_kp) then
! z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i)
tem1 = 0.11 * vis / ustar_wat(i)
z0 = tem1 + (charnock/grav)*ustar_wat(i)*ustar_wat(i)

if (redrag) then
z0rl_wat(i) = 100.0_kp * max(min(z0, z0s_max),1.0e-7_kp)
else
z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.0e-7_kp)
endif
endif

endif ! end of if(open ocean)
Expand Down
8 changes: 2 additions & 6 deletions tools/check_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
if suffix in SUFFICES:
with open(os.path.join(root, file)) as f:
contents = f.read()
try:
contents.decode('ascii')
except UnicodeDecodeError:
if not contents.isascii():
for line in contents.split('\n'):
try:
line.decode('ascii')
except UnicodeDecodeError:
if not line.isascii():
raise Exception('Detected non-ascii characters in file {}, line: "{}"'.format(os.path.join(root, file), line))
Loading