Skip to content

Commit e1f97ad

Browse files
authored
Merge pull request #1059 from grantfirl/ufs-dev-PR119
UFS-dev PR#119
2 parents d46098d + a2a3092 commit e1f97ad

File tree

4 files changed

+31
-22
lines changed

4 files changed

+31
-22
lines changed

physics/CONV/SAMF/samfshalcnv.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ subroutine samfshalcnv_run(im,km,itc,ntc,cliq,cp,cvap, &
191191
parameter(cinacrmx=-120.,shevf=2.0)
192192
parameter(dtmax=10800.,dtmin=600.)
193193
parameter(bb1=4.0,bb2=0.8,csmf=0.2)
194-
parameter(tkcrt=2.,cmxfac=15.)
194+
parameter(tkcrt=2.,cmxfac=10.)
195195
! parameter(bet1=1.875,cd1=.506,f1=2.0,gam1=.5)
196196
parameter(betaw=.03,dxcrtc0=9.e3)
197197
parameter(h1=0.33333333)

physics/PBL/SATMEDMF/satmedmfvdifq.F

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ subroutine satmedmfvdifq_run(im,km,ntrac,ntcw,ntrw, &
271271
parameter(elmfac=1.0,elefac=1.0,cql=100.)
272272
parameter(dw2min=1.e-4,dkmax=1000.,xkgdx=1000.)
273273
parameter(qlcr=3.5e-5,zstblmax=2500.)
274-
parameter(xkinv1=0.15,xkinv2=0.3)
274+
parameter(xkinv1=0.4,xkinv2=0.3)
275275
parameter(h1=0.33333333,hcrinv=250.)
276276
parameter(vegflo=0.1,vegfup=1.0,z0lo=0.1,z0up=1.0)
277277
parameter(vc0=1.0,zc0=1.0)

physics/SFC_Layer/UFS/sfc_diff.f

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,24 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in)
350350
tvs = half * (tsurf_wat(i)+tskin_wat(i))/prsik1(i)
351351
& * virtfac
352352
endif
353-
354-
z0 = 0.01_kp * z0rl_wat(i)
355-
z0max = max(zmin, min(z0,z1(i)))
356-
! ustar_wat(i) = sqrt(grav * z0 / charnock)
353+
!
357354
wind10m = sqrt(u10m(i)*u10m(i)+v10m(i)*v10m(i))
355+
!
356+
if (sfc_z0_type == -1) then ! using wave model derived momentum roughness
357+
tem1 = 0.11 * vis / ustar_wat(i)
358+
z0 = tem1 + 0.01_kp * z0rl_wav(i)
358359
360+
if (redrag) then
361+
z0max = max(min(z0, z0s_max),1.0e-7_kp)
362+
else
363+
z0max = max(min(z0,0.1_kp), 1.0e-7_kp)
364+
endif
365+
z0rl_wat(i) = 100.0_kp * z0max ! cm
366+
else
367+
z0 = 0.01_kp * z0rl_wat(i)
368+
z0max = max(zmin, min(z0,z1(i)))
369+
endif
370+
!
359371
!** test xubin's new z0
360372

361373
! ztmax = z0max
@@ -425,17 +437,18 @@ subroutine sfc_diff_run (im,rvrdm1,eps,epsm1,grav, & !intent(in)
425437
z0rl_wat(i) = 1.0e-4_kp
426438
endif
427439

428-
elseif (z0rl_wav(i) <= 1.0e-7_kp .or. &
429-
& z0rl_wav(i) > 1.0_kp) then
430-
! z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i)
431-
tem1 = 0.11 * vis / ustar_wat(i)
432-
z0 = tem1 + (charnock/grav)*ustar_wat(i)*ustar_wat(i)
440+
elseif (z0rl_wav(i) <= 1.0e-7_kp .or.
441+
& z0rl_wav(i) > 1.0_kp) then
442+
! z0 = (charnock / grav) * ustar_wat(i) * ustar_wat(i)
443+
tem1 = 0.11 * vis / ustar_wat(i)
444+
z0 = tem1 + (charnock/grav)*ustar_wat(i)*ustar_wat(i)
445+
446+
if (redrag) then
447+
z0rl_wat(i) = 100.0_kp * max(min(z0, z0s_max),1.0e-7_kp)
448+
else
449+
z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.0e-7_kp)
450+
endif
433451

434-
if (redrag) then
435-
z0rl_wat(i) = 100.0_kp * max(min(z0, z0s_max),1.0e-7_kp)
436-
else
437-
z0rl_wat(i) = 100.0_kp * max(min(z0,0.1_kp), 1.0e-7_kp)
438-
endif
439452
endif
440453

441454
endif ! end of if(open ocean)

tools/check_encoding.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
if suffix in SUFFICES:
1616
with open(os.path.join(root, file)) as f:
1717
contents = f.read()
18-
try:
19-
contents.decode('ascii')
20-
except UnicodeDecodeError:
18+
if not contents.isascii():
2119
for line in contents.split('\n'):
22-
try:
23-
line.decode('ascii')
24-
except UnicodeDecodeError:
20+
if not line.isascii():
2521
raise Exception('Detected non-ascii characters in file {}, line: "{}"'.format(os.path.join(root, file), line))

0 commit comments

Comments
 (0)