Skip to content

Commit

Permalink
Physics Separator Merge Step1 (#22)
Browse files Browse the repository at this point in the history
From Chris Harrop,
https://github.com/christopherwharrop/gmtb-gfsphysics
branch: harrop_gfs

merged with master, bit-for-bit match with baseline.

* Enclose contents of sfc_nst.f in a module.
Replace sfc_nst with sfc_nst_run.
Add empty sfc_nst_init and sfc_nst_finalize.
Add parseable table of sfc_nst argument descriptions.
Split nstf_name argument into: nstf_name1, nstf_name4, nstf_name5.
Modify call to sfc_nst in GFS_physics_driver.F90 to call sfc_nst_run.
  • Loading branch information
llpcarson authored Dec 13, 2017
1 parent 29dea6e commit 8284bf7
Show file tree
Hide file tree
Showing 4 changed files with 439 additions and 85 deletions.
84 changes: 34 additions & 50 deletions GFS_layer/GFS_physics_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ module module_physics_driver
use ozne_def, only: levozp, oz_coeff, oz_pres
use h2o_def, only: levh2o, h2o_coeff, h2o_pres
use gfs_fv3_needs, only: get_prs_fv3, get_phi_fv3
use module_nst_water_prop, only: get_dtzm_2d
use sfc_nst, only: sfc_nst_run
use sfc_nst_pre, only: sfc_nst_pre_run
use sfc_nst_post, only: sfc_nst_post_run
use GFS_typedefs, only: GFS_statein_type, GFS_stateout_type, &
GFS_sfcprop_type, GFS_coupling_type, &
GFS_control_type, GFS_grid_type, &
Expand Down Expand Up @@ -885,59 +887,41 @@ subroutine GFS_physics_driver &

if (Model%nstf_name(1) > 0) then

do i = 1, im
if ( islmsk(i) == 0 ) then
tem = (Sfcprop%oro(i)-Sfcprop%oro_uf(i)) * rlapse
tseal(i) = Sfcprop%tsfc(i) + tem
tsurf(i) = tsurf(i) + tem
endif
enddo

call sfc_nst (im, Model%lsoil, Statein%pgr, Statein%ugrs, &
Statein%vgrs, Statein%tgrs, Statein%qgrs, &
Sfcprop%tref, cd, cdq, Statein%prsl(1,1), work3, &
islmsk, Grid%xlon, Grid%sinlat, stress, &
Radtend%semis, gabsbdlw, adjsfcnsw, Sfcprop%tprcp, &
dtf, kdt, Model%solhr, xcosz, &
Tbd%phy_f2d(1,Model%num_p2d), flag_iter, &
flag_guess, Model%nstf_name, lprnt, ipr, &
call sfc_nst_pre_run(im, islmsk, Sfcprop%oro, Sfcprop%oro_uf, &
Sfcprop%tsfc, &
! --- Input/output
tseal, tsurf, Sfcprop%xt, Sfcprop%xs, Sfcprop%xu, &
Sfcprop%xv, Sfcprop%xz, Sfcprop%zm, Sfcprop%xtts, &
Sfcprop%xzts, Sfcprop%dt_cool, Sfcprop%z_c, &
Sfcprop%c_0, Sfcprop%c_d, Sfcprop%w_0, Sfcprop%w_d,&
Sfcprop%d_conv, Sfcprop%ifd, Sfcprop%qrain, &
tsurf, &
! --- outputs:
qss, gflx, Diag%cmm, Diag%chh, evap, hflx, ep1d)

! if (lprnt) print *,' tseaz2=',tseal(ipr),' tref=',tref(ipr),
! & ' dt_cool=',dt_cool(ipr),' dt_warm=',2.0*xt(ipr)/xz(ipr),
! & ' kdt=',kdt

do i = 1, im
if ( islmsk(i) == 0 ) then
tsurf(i) = tsurf(i) - (Sfcprop%oro(i)-Sfcprop%oro_uf(i)) * rlapse
endif
enddo
tseal)

call sfc_nst_run (im, Model%lsoil, Statein%pgr, Statein%ugrs(:,1), &
Statein%vgrs(:,1), Statein%tgrs(:,1), &
Statein%qgrs(:,1,1), Sfcprop%tref, cd, cdq, &
Statein%prsl(:,1), work3, islmsk, Grid%xlon, &
Grid%sinlat, stress, Radtend%semis, gabsbdlw, &
adjsfcnsw, Sfcprop%tprcp, dtf, kdt, Model%solhr, &
xcosz, Tbd%phy_f2d(:,Model%num_p2d), flag_iter, &
flag_guess, Model%nstf_name(1), Model%nstf_name(4),&
Model%nstf_name(5), lprnt, ipr, &
! --- Input/output
tseal, tsurf, Sfcprop%xt, Sfcprop%xs, Sfcprop%xu, &
Sfcprop%xv, Sfcprop%xz, Sfcprop%zm, Sfcprop%xtts, &
Sfcprop%xzts, Sfcprop%dt_cool, Sfcprop%z_c, &
Sfcprop%c_0, Sfcprop%c_d, Sfcprop%w_0, Sfcprop%w_d,&
Sfcprop%d_conv, Sfcprop%ifd, Sfcprop%qrain, &
! --- outputs:
qss, gflx, Diag%cmm, Diag%chh, evap, hflx, ep1d)

! --- ... run nsst model ... ---

if (Model%nstf_name(1) > 1) then
zsea1 = 0.001*real(Model%nstf_name(4))
zsea2 = 0.001*real(Model%nstf_name(5))
call get_dtzm_2d (Sfcprop%xt, Sfcprop%xz, Sfcprop%dt_cool, &
Sfcprop%z_c, Sfcprop%slmsk, zsea1, zsea2, &
im, 1, dtzm)
do i = 1, im
if ( islmsk(i) == 0 ) then
Sfcprop%tsfc(i) = max(271.2,Sfcprop%tref(i) + dtzm(i)) - &
(Sfcprop%oro(i)-Sfcprop%oro_uf(i))*rlapse
endif
enddo
endif

! if (lprnt) print *,' tseaz2=',tsea(ipr),' tref=',tref(ipr), &
! & ' dt_cool=',dt_cool(ipr),' dt_warm=',dt_warm(ipr),' kdt=',kdt
call sfc_nst_post_run(im, islmsk, Sfcprop%oro, Sfcprop%oro_uf, &
Model%nstf_name(1), Model%nstf_name(4), &
Model%nstf_name(5), Sfcprop%xt, Sfcprop%xz, &
Sfcprop%dt_cool, Sfcprop%z_c, Sfcprop%slmsk, &
Sfcprop%tref, Grid%xlon, &
! --- Input/output
tsurf, &
! --- outputs:
dtzm, Sfcprop%tsfc)

else

Expand Down
Binary file added physics/docs/img/NSST.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions physics/docs/library.bib
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,24 @@ @article{king_and_harshvardhan_1986
Volume = {43},
Year = {1986}}

@url{Li_2015,
Author = {Xu Li},
Title = {The development of the NSST within the NCEP GFS/CFS},
Url = {http://cpo.noaa.gov/sites/cpo/MAPP/workshops/rtf_technical_ws/presentations/21_Xu_Li.pdf}}

@url{Li_Derber_2009,
Author = {Xu Li and John Derber},
Title = {Near Sea Surface Temperatures (NSST) Analysis in NCEP GFS},
Url = {https://www.jcsda.noaa.gov/documents/meetings/wkshp2008/4/JCSDA_2008_Li.pdf}}

@article{Fairall_all_1996,
Author = {C. W. Fairall and E. F. Bradley and J. S. Godfrey and G. A. Wick and J. B. Edson and G. S. Young},
Journal = {J. Geophys. Res.},
Pages = {1295-1308},
Title = {Cool-skin and warm-layer effects on sea surface temperature},
Volume = {101(C1)},
Year = {1996}}

@url{key_2002,
Address = {Madison, Wisconsin},
Author = {J.R. Key},
Expand Down
Loading

0 comments on commit 8284bf7

Please sign in to comment.