-
Notifications
You must be signed in to change notification settings - Fork 169
Updated sfc_nst.f, sfc_nst.meta, module_nst_water_prop.f90 and flake_… #588
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
Changes from 1 commit
55d395f
8c60ce5
f1d12c5
20e1ae8
26340ba
17ccdcf
0ee9504
465167f
8f78249
68bf580
15575af
c8b70e9
f4cf862
347104a
edc9194
bc78c25
267748a
3f953f5
7f42a8f
7f70536
222ffe6
56c8d3a
6b99742
334e245
7adb61f
e1f6417
6a08c3a
dfeb51c
a81cdb9
2742ece
5411d4d
8cd133d
e46fe37
80ae761
bc75cd5
26aa3d6
e20ad29
aa73104
3163fbc
59ab0cd
b53829d
b657923
2d3b3c4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -187,6 +187,9 @@ SUBROUTINE flake_driver_run ( & | |
| REAL (KIND = kind_phys) :: & | ||
| lake_depth_max, T_bot_2_in, T_bot_2_out, dxlat,tb,tr,tt,temp,Kbar, DelK | ||
|
|
||
|
|
||
| REAL (KIND = kind_phys) :: x, y | ||
|
|
||
| INTEGER :: i,ipr,iter | ||
|
|
||
| LOGICAL :: lflk_botsed_use | ||
|
|
@@ -237,9 +240,19 @@ SUBROUTINE flake_driver_run ( & | |
| ! else | ||
| ! T_sfc(i) = tsurf(i) | ||
| ! endif | ||
| T_sfc(i) = 0.2*tt + 0.8* tsurf(i) | ||
| T_sfc(i) = 0.1*tt + 0.9* tsurf(i) | ||
| endif | ||
|
|
||
| x = 0.03279*julian | ||
| if(xlat(i) .ge. 0.0) then | ||
| y = 0.0034*x**5 -0.1241*x**4+1.6231*x**3-8.8666*x**2+17.206*x-4.2929 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is bad coding practice for coding a polynomial. Better way is like |
||
| T_sfc(i) = T_sfc(i) + 0.3*y | ||
| tb = tb + 0.05*y | ||
| else | ||
| y = 0.0034*x**5 -0.1241*x**4+1.6231*x**3-8.8666*x**2+17.206*x-4.2929 | ||
| T_sfc(i) = T_sfc(i) - 0.3*y | ||
| tb = tb - 0.05*y | ||
| endif | ||
| T_bot(i) = tb | ||
| T_B1(i) = tb | ||
|
|
||
|
|
@@ -275,7 +288,7 @@ SUBROUTINE flake_driver_run ( & | |
| ! print*,'inside flake driver' | ||
| ! print*, julian,xlat(i),w_albedo(I),w_extinc(i),lakedepth(i),elev(i),tb,tt,tsurf(i),T_sfc(i) | ||
|
|
||
| endif !lake fraction and depth | ||
| endif !lake | ||
| endif !flag | ||
| enddo | ||
| 1001 format ( 'At icount=', i5, ' x = ', f5.2,5x, 'y = ', & | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,12 +8,15 @@ module sfc_nst | |
|
|
||
| ! \brief This subroutine is empty since there are no procedures that need to be done to initialize the GFS NSST code. | ||
| !! This subroutine is empty since there are no procedures that need to be done to initialize the GFS NSST code. | ||
| !! | ||
| !! \section arg_table_sfc_nst_init Argument Table | ||
|
climbfuji marked this conversation as resolved.
Outdated
|
||
| !! | ||
| subroutine sfc_nst_init | ||
| end subroutine sfc_nst_init | ||
|
|
||
| ! \brief This subroutine is empty since there are no procedures that need to be done to finalize the GFS NSST code. | ||
| !! This subroutine is empty since there are no procedures that need to be done to finalize the GFS NSST code. | ||
| !! \section arg_table_sfc_nst_finalize Argument Table | ||
|
climbfuji marked this conversation as resolved.
Outdated
|
||
| !! | ||
| subroutine sfc_nst_finalize | ||
| end subroutine sfc_nst_finalize | ||
|
|
@@ -28,7 +31,7 @@ end subroutine sfc_nst_finalize | |
| subroutine sfc_nst_run & | ||
| & ( im, hvap, cp, hfus, jcal, eps, epsm1, rvrdm1, rd, rhw0, & ! --- inputs: | ||
| & pi, sbc, ps, u1, v1, t1, q1, tref, cm, ch, & | ||
| & prsl1, prslki, prsik1, prslk1, wet, xlon, sinlat, & | ||
| & prsl1, prslki, prsik1, prslk1, wet, lake, xlon, sinlat, & | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe be "lake" is bad name here I recommend using something like "use_flake".
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An additional question is whether "flake" and "nsst" models should coexist? I think DA over lakes needs nsst (needs to determine lake skin temperature). Does flake provide skin temperature? Radiation needs skin temperature too.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@YihuaWu-NOAA @SMoorthi-emc : Agree with Moorthi, it is a topic to discuss and the decide if whether "flake" and "nsst" models should coexist? |
||
| & stress, & | ||
| & sfcemis, dlwflx, sfcnsw, rain, timestep, kdt, solhr,xcosz, & | ||
| & wind, flag_iter, flag_guess, nstf_name1, nstf_name4, & | ||
|
|
@@ -47,7 +50,7 @@ subroutine sfc_nst_run & | |
| ! call sfc_nst ! | ||
| ! inputs: ! | ||
| ! ( im, ps, u1, v1, t1, q1, tref, cm, ch, ! | ||
| ! prsl1, prslki, wet, xlon, sinlat, stress, ! | ||
| ! prsl1, prslki, wet, lake, xlon, sinlat, stress, ! | ||
| ! sfcemis, dlwflx, sfcnsw, rain, timestep, kdt,solhr,xcosz, ! | ||
| ! wind, flag_iter, flag_guess, nstf_name1, nstf_name4, ! | ||
| ! nstf_name5, lprnt, ipr, ! | ||
|
|
@@ -94,6 +97,7 @@ subroutine sfc_nst_run & | |
| ! prsik1 - real, im ! | ||
| ! prslk1 - real, im ! | ||
| ! wet - logical, =T if any ocn/lake water (F otherwise) im ! | ||
| ! lake - logical, =T if any lake otherwise ocn | ||
| ! icy - logical, =T if any ice im ! | ||
| ! xlon - real, longitude (radians) im ! | ||
| ! sinlat - real, sin of latitude im ! | ||
|
|
@@ -194,7 +198,8 @@ subroutine sfc_nst_run & | |
| real (kind=kind_phys), intent(in) :: timestep | ||
| real (kind=kind_phys), intent(in) :: solhr | ||
|
|
||
| logical, dimension(im), intent(in) :: flag_iter, flag_guess, wet | ||
| logical, dimension(im), intent(in) :: flag_iter, flag_guess, wet, & | ||
| & lake | ||
| ! &, icy | ||
| logical, intent(in) :: lprnt | ||
|
|
||
|
|
@@ -259,14 +264,14 @@ subroutine sfc_nst_run & | |
| ! | ||
| do i = 1, im | ||
| ! flag(i) = wet(i) .and. .not.icy(i) .and. flag_iter(i) | ||
| flag(i) = wet(i) .and. flag_iter(i) | ||
| flag(i) = wet(i) .and. flag_iter(i) .and. .not. lake(i) | ||
| enddo | ||
| ! | ||
| ! save nst-related prognostic fields for guess run | ||
| ! | ||
| do i=1, im | ||
| ! if(wet(i) .and. .not.icy(i) .and. flag_guess(i)) then | ||
| if(wet(i) .and. flag_guess(i)) then | ||
| if(wet(i) .and. flag_guess(i) .and. .not. lake(i)) then | ||
| xt_old(i) = xt(i) | ||
| xs_old(i) = xs(i) | ||
| xu_old(i) = xu(i) | ||
|
|
@@ -582,7 +587,7 @@ subroutine sfc_nst_run & | |
| ! restore nst-related prognostic fields for guess run | ||
| do i=1, im | ||
| ! if (wet(i) .and. .not.icy(i)) then | ||
| if (wet(i)) then | ||
| if (wet(i) .and. .not. lake(i)) then | ||
| if (flag_guess(i)) then ! when it is guess of | ||
| xt(i) = xt_old(i) | ||
| xs(i) = xs_old(i) | ||
|
|
@@ -655,10 +660,14 @@ module sfc_nst_pre | |
| !! The NSST scheme is one of the three schemes used to represent the | ||
| !! surface in the GFS physics suite. The other two are the Noah land | ||
| !! surface model and the sice simplified ice model. | ||
| !! | ||
|
climbfuji marked this conversation as resolved.
Outdated
|
||
| !! \section arg_table_sfc_nst_init Argument Table | ||
| !! | ||
| subroutine sfc_nst_pre_init | ||
| end subroutine sfc_nst_pre_init | ||
|
|
||
| !! \section arg_table_sfc_nst_finalize Argument Table | ||
|
climbfuji marked this conversation as resolved.
Outdated
|
||
| !! | ||
| subroutine sfc_nst_pre_finalize | ||
| end subroutine sfc_nst_pre_finalize | ||
|
|
||
|
|
@@ -668,7 +677,7 @@ end subroutine sfc_nst_pre_finalize | |
| !> \section NSST_general_pre_algorithm General Algorithm | ||
| !! @{ | ||
| subroutine sfc_nst_pre_run | ||
| & (im, wet, tsfc_wat, tsurf_wat, tseal, xt, xz, dt_cool, | ||
| & (im, wet, lake, tsfc_wat, tsurf_wat, tseal, xt, xz, dt_cool, | ||
| & z_c, tref, cplflx, oceanfrac, nthreads, errmsg, errflg) | ||
|
|
||
| use machine , only : kind_phys | ||
|
|
@@ -680,7 +689,7 @@ subroutine sfc_nst_pre_run | |
|
|
||
| ! --- inputs: | ||
| integer, intent(in) :: im, nthreads | ||
| logical, dimension(im), intent(in) :: wet | ||
| logical, dimension(im), intent(in) :: wet, lake | ||
| real (kind=kind_phys), dimension(im), intent(in) :: | ||
| & tsfc_wat, xt, xz, dt_cool, z_c, oceanfrac | ||
| logical, intent(in) :: cplflx | ||
|
|
@@ -707,7 +716,7 @@ subroutine sfc_nst_pre_run | |
| errflg = 0 | ||
|
|
||
| do i=1,im | ||
| if (wet(i)) then | ||
| if (wet(i) .and. .not. lake(i)) then | ||
| ! tem = (oro(i)-oro_uf(i)) * rlapse | ||
| ! DH* 20190927 simplyfing this code because tem is zero | ||
| !tem = zero | ||
|
|
@@ -722,10 +731,11 @@ subroutine sfc_nst_pre_run | |
| ! update tsfc & tref with T1 from OGCM & NSST Profile if coupled | ||
| ! | ||
| if (cplflx) then | ||
| call get_dtzm_2d (xt, xz, dt_cool, & | ||
| & z_c, wet, zero, omz1, im, 1, nthreads, dtzm) | ||
| call get_dtzm_2d (xt, xz, dt_cool, | ||
| & z_c, wet, lake, zero, omz1, im, 1, | ||
| & nthreads, dtzm) | ||
| do i=1,im | ||
| if (wet(i) .and. oceanfrac(i) > zero) then | ||
| if (wet(i) .and. oceanfrac(i) > zero .and. .not. lake(i)) then | ||
| ! dnsst = tsfc_wat(i) - tref(i) ! retrive/get difference of Ts and Tf | ||
| tref(i) = tsfc_wat(i) - dtzm(i) ! update Tf with T1 and NSST T-Profile | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this safe, replacing with ? Is it guaranteed that
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am concerned about this line too, @YihuaWu-NOAA can you explain why the original code does not work for flake model?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@climbfuji @junwang-noaa : tref(i) = max(tgice, tsfco(i) - dtzm(i)) needs to be used/kept. |
||
| ! tsfc_wat(i) = max(271.2,tref(i) + dnsst) ! get Ts updated due to Tf update | ||
|
|
@@ -754,11 +764,15 @@ module sfc_nst_post | |
|
|
||
| ! \defgroup GFS_NSST_POST GFS Near-Surface Sea Temperature Post | ||
| !! \brief Brief description of the parameterization | ||
| !! | ||
| !! \section arg_table_sfc_nst_post_init Argument Table | ||
|
climbfuji marked this conversation as resolved.
Outdated
|
||
| !! | ||
| subroutine sfc_nst_post_init | ||
| end subroutine sfc_nst_post_init | ||
|
|
||
| ! \brief Brief description of the subroutine | ||
| !! | ||
| !! \section arg_table_sfc_nst_post_finalize Argument Table | ||
|
climbfuji marked this conversation as resolved.
Outdated
|
||
| !! | ||
| subroutine sfc_nst_post_finalize | ||
| end subroutine sfc_nst_post_finalize | ||
|
|
@@ -773,7 +787,7 @@ end subroutine sfc_nst_post_finalize | |
| ! \section NSST_detailed_post_algorithm Detailed Algorithm | ||
| ! @{ | ||
| subroutine sfc_nst_post_run & | ||
| & ( im, rlapse, tgice, wet, icy, oro, oro_uf, nstf_name1, & | ||
| & ( im, rlapse, tgice, wet, lake,icy, oro, oro_uf, nstf_name1, & | ||
|
climbfuji marked this conversation as resolved.
Outdated
|
||
| & nstf_name4, nstf_name5, xt, xz, dt_cool, z_c, tref, xlon, & | ||
| & tsurf_wat, tsfc_wat, nthreads, dtzm, errmsg, errflg & | ||
| & ) | ||
|
|
@@ -787,7 +801,7 @@ subroutine sfc_nst_post_run & | |
|
|
||
| ! --- inputs: | ||
| integer, intent(in) :: im, nthreads | ||
| logical, dimension(im), intent(in) :: wet, icy | ||
| logical, dimension(im), intent(in) :: wet, icy, lake | ||
| real (kind=kind_phys), intent(in) :: rlapse, tgice | ||
| real (kind=kind_phys), dimension(im), intent(in) :: oro, oro_uf | ||
| integer, intent(in) :: nstf_name1, nstf_name4, nstf_name5 | ||
|
|
@@ -828,12 +842,12 @@ subroutine sfc_nst_post_run & | |
| if (nstf_name1 > 1) then | ||
| zsea1 = 0.001_kp*real(nstf_name4) | ||
| zsea2 = 0.001_kp*real(nstf_name5) | ||
| call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, zsea1, zsea2, & | ||
| call get_dtzm_2d (xt, xz, dt_cool, z_c, wet, lake, zsea1, zsea2, & | ||
| & im, 1, nthreads, dtzm) | ||
| do i = 1, im | ||
| ! if (wet(i) .and. .not.icy(i)) then | ||
| ! if (wet(i) .and. (frac_grid .or. .not. icy(i))) then | ||
| if (wet(i)) then | ||
| if (wet(i) .and. .not. lake(i)) then | ||
| tsfc_wat(i) = max(tgice, tref(i) + dtzm(i)) | ||
| ! tsfc_wat(i) = max(271.2, tref(i) + dtzm(i)) - & | ||
| ! (oro(i)-oro_uf(i))*rlapse | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.