From 242c87c5b3f03ae0dea5a7226c906c88cc0f86cc Mon Sep 17 00:00:00 2001 From: eric james Date: Fri, 29 Mar 2024 18:23:13 +0000 Subject: [PATCH 1/5] Correcting bug in CALVIS_GSD.f --- sorc/ncep_post.fd/CALVIS_GSD.f | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sorc/ncep_post.fd/CALVIS_GSD.f b/sorc/ncep_post.fd/CALVIS_GSD.f index c2795a6e5..05a6aca71 100644 --- a/sorc/ncep_post.fd/CALVIS_GSD.f +++ b/sorc/ncep_post.fd/CALVIS_GSD.f @@ -96,7 +96,7 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) !------------------------------------------------------------------ ! - use vrbls2d, only: sno, si, ustar + use vrbls2d, only: sno, si, ustar, z0 use vrbls3d, only: qqw, qqi, qqs, qqr, qqg, t, pmid, q, u, v, extcof55, aextc55 use params_mod, only: h1, d608, rd, g use ctlblk_mod, only: jm, im, jsta_2l, jend_2u, lm, modelname, spval, method_blsn,& @@ -319,16 +319,18 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) ! print *, i,j - if (si(i,j) ustar_t .and. z0(i,j) .le. 0.7) then z_r = 1.6*(ustar(i,j)**2./(2.*g)) - Q_s = max((0.68/ustar(i,j))*(RHOAIR/g)*(ustar(i,j)**2.-ustar_t**2.),0.0) + Q_s = max((0.68/ustar(i,j))*(RHOAIR/g)*ustar_t*(ustar(i,j)**2.-ustar_t**2.),0.0) C_r = (Q_s/u_p)*(lamda*g/ustar(i,j)**2.)*exp(-lamda*z_r*g/ustar(i,j)**2.) c_z = max(C_r * exp(-1.55*((0.05628*ustar(i,j))**-0.544 - z**-0.544)),1e-15) c_alpha = alpha/(alpha+2) !simplified version of (6) in Letcher et al (2021) rho_sno = sno(i,j)/(si(i,j)/1.0e3) - rho_sno = rho_sno*2. + 10.*max(0.,rho_sno-0.15) + rho_sno = rho_sno*2. + 10.*max(0.,rho_sno-150.) vis_blsn = (5.217*rho_sno*r_bar**1.011)/(1.82*c_z*c_alpha) BETABLSN = 3.912/(vis_blsn/1000.0) + !if (i==2764 .and. j==1076) then + !if (i==3580 .and. j==1356) then ! print to ensure quality !print *, "z_r", z_r !print *, "Q_s", Q_s @@ -340,6 +342,8 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) !print *, "rho_sno", rho_sno !print *, "vis_blsn", vis_blsn !print *, "BETABLSN", BETABLSN + !print *, "ustar", ustar(i,j) + !endif else BETABLSN = 0 !print *, "BETABLSN", BETABLSN From 02f082f0d7e56056e1e80e342a1424a3aac7e8fd Mon Sep 17 00:00:00 2001 From: eric james Date: Tue, 2 Apr 2024 21:16:46 +0000 Subject: [PATCH 2/5] Introducing roughness length impact on BLSN (no BLSN effect at z0>0.7). --- sorc/ncep_post.fd/CALVIS_GSD.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/ncep_post.fd/CALVIS_GSD.f b/sorc/ncep_post.fd/CALVIS_GSD.f index 05a6aca71..ee297579f 100644 --- a/sorc/ncep_post.fd/CALVIS_GSD.f +++ b/sorc/ncep_post.fd/CALVIS_GSD.f @@ -326,7 +326,7 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) c_z = max(C_r * exp(-1.55*((0.05628*ustar(i,j))**-0.544 - z**-0.544)),1e-15) c_alpha = alpha/(alpha+2) !simplified version of (6) in Letcher et al (2021) rho_sno = sno(i,j)/(si(i,j)/1.0e3) - rho_sno = rho_sno*2. + 10.*max(0.,rho_sno-150.) + rho_sno = rho_sno*2. + 10.*max(0.,rho_sno-150.0) vis_blsn = (5.217*rho_sno*r_bar**1.011)/(1.82*c_z*c_alpha) BETABLSN = 3.912/(vis_blsn/1000.0) !if (i==2764 .and. j==1076) then From 66a53f9bb32f35d193044661a99f84bdf973789d Mon Sep 17 00:00:00 2001 From: eric james Date: Tue, 2 Apr 2024 21:20:59 +0000 Subject: [PATCH 3/5] Removing some gridpoint print statements for testing. --- sorc/ncep_post.fd/CALVIS_GSD.f | 3 --- 1 file changed, 3 deletions(-) diff --git a/sorc/ncep_post.fd/CALVIS_GSD.f b/sorc/ncep_post.fd/CALVIS_GSD.f index 4684db241..9f6afaa53 100644 --- a/sorc/ncep_post.fd/CALVIS_GSD.f +++ b/sorc/ncep_post.fd/CALVIS_GSD.f @@ -333,8 +333,6 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) rho_sno = rho_sno*2. + 10.*max(0.,rho_sno-150.0) vis_blsn = (5.217*rho_sno*r_bar**1.011)/(1.82*c_z*c_alpha) BETABLSN = 3.912/(vis_blsn/1000.0) - !if (i==2764 .and. j==1076) then - !if (i==3580 .and. j==1356) then ! print to ensure quality !print *, "z_r", z_r !print *, "Q_s", Q_s @@ -347,7 +345,6 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) !print *, "vis_blsn", vis_blsn !print *, "BETABLSN", BETABLSN !print *, "ustar", ustar(i,j) - !endif else BETABLSN = 0 !print *, "BETABLSN", BETABLSN From 3fb3679aa6c5ffc2533629d04223391a70147560 Mon Sep 17 00:00:00 2001 From: eric james Date: Thu, 11 Apr 2024 16:04:16 +0000 Subject: [PATCH 4/5] Checking change to compile_upp.sh --- tests/compile_upp.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/compile_upp.sh b/tests/compile_upp.sh index c1cb507a1..47102823a 100755 --- a/tests/compile_upp.sh +++ b/tests/compile_upp.sh @@ -106,6 +106,7 @@ if [[ $MACHINE_ID != "unknown" ]]; then fi module load $modulefile module list + module show g2tmpl fi set -x From c698ecce495b9aecee407920054d10a8d783da9c Mon Sep 17 00:00:00 2001 From: eric james Date: Thu, 11 Apr 2024 16:05:07 +0000 Subject: [PATCH 5/5] Reverting change. --- tests/compile_upp.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/compile_upp.sh b/tests/compile_upp.sh index 47102823a..c1cb507a1 100755 --- a/tests/compile_upp.sh +++ b/tests/compile_upp.sh @@ -106,7 +106,6 @@ if [[ $MACHINE_ID != "unknown" ]]; then fi module load $modulefile module list - module show g2tmpl fi set -x