-
Notifications
You must be signed in to change notification settings - Fork 11
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
Allow SHiELD_physics to use the full coupler fluxes. #53
Changes from all commits
bee8c37
a54267c
4cfb96a
20019a9
f74ff30
d280370
1541fd4
1b4a29f
0ef6494
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 |
---|---|---|
|
@@ -1179,7 +1179,23 @@ subroutine GFS_physics_driver & | |
!else | ||
!!$ endif | ||
|
||
if (Model%sfc_gfdl) then | ||
! kgao - need a logic to ensure sfc_coupled is true when coupled with MOM6 | ||
if (Model%sfc_coupled) then | ||
! a version of sfc_diff from coupling with MOM6 by kgao | ||
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. Useful comment much appreciated. |
||
! Sfcprop%uustar,Sfcprop%zorl,Sfcprop%ztrl are not updated over ocean points | ||
call sfc_diff_coupled(im,Statein%pgr, Statein%ugrs, Statein%vgrs,& | ||
Statein%tgrs, Statein%qgrs, Diag%zlvl, Sfcprop%snowd, & | ||
Sfcprop%tsfc, Sfcprop%zorl, Sfcprop%ztrl, cd, & | ||
cdq, rb, Statein%prsl(1,1), work3, islmsk, stress, & | ||
Sfcprop%ffmm, Sfcprop%ffhh, Sfcprop%uustar, & | ||
wind, Tbd%phy_f2d(1,Model%num_p2d), fm10, fh2, & | ||
sigmaf, vegtype, Sfcprop%shdmax, Model%ivegsrc, & | ||
tsurf, flag_iter) !, Model%redrag, Model%z0s_max, & | ||
!Model%do_z0_moon, Model%do_z0_hwrf15, & | ||
!Model%do_z0_hwrf17, Model%do_z0_hwrf17_hwonly, & | ||
!Model%wind_th_hwrf) | ||
|
||
else if (Model%sfc_gfdl) then | ||
! a new and more flexible version of sfc_diff by kgao | ||
call sfc_diff_gfdl(im,Statein%pgr, Statein%ugrs, Statein%vgrs,& | ||
Statein%tgrs, Statein%qgrs, Diag%zlvl, Sfcprop%snowd, & | ||
|
@@ -1192,6 +1208,7 @@ subroutine GFS_physics_driver & | |
Model%do_z0_moon, Model%do_z0_hwrf15, & | ||
Model%do_z0_hwrf17, Model%do_z0_hwrf17_hwonly, & | ||
Model%wind_th_hwrf) | ||
|
||
else | ||
! GFS original sfc_diff modified by kgao | ||
call sfc_diff (im,Statein%pgr, Statein%ugrs, Statein%vgrs,& | ||
|
@@ -1279,14 +1296,30 @@ subroutine GFS_physics_driver & | |
|
||
! --- ... surface energy balance over ocean | ||
|
||
call sfc_ocean & | ||
if (Model%sfc_coupled) then | ||
! kgao: this version is for coupling with MOM6, which | ||
! gets hflx and evap over ocean points | ||
! based on shflx and lhflx from coupler | ||
call sfc_ocean_coupled & | ||
! --- inputs: | ||
(im, Statein%pgr, Statein%ugrs, Statein%vgrs, Statein%tgrs, & | ||
Statein%qgrs, Sfcprop%tsfc, cd, cdq, Statein%prsl(1,1), & | ||
work3, islmsk, Tbd%phy_f2d(1,Model%num_p2d), flag_iter, & | ||
! kgao: shflx and lhflx from coupler | ||
Sfcprop%shflx, Sfcprop%lhflx, & | ||
! --- outputs: | ||
qss, Diag%cmm, Diag%chh, gflx, evap, hflx, ep1d) | ||
|
||
else | ||
call sfc_ocean & | ||
! --- inputs: | ||
(im, Statein%pgr, Statein%ugrs, Statein%vgrs, Statein%tgrs, & | ||
Statein%qgrs, Sfcprop%tsfc, cd, cdq, Statein%prsl(1,1), & | ||
work3, islmsk, Tbd%phy_f2d(1,Model%num_p2d), flag_iter, & | ||
! --- outputs: | ||
qss, Diag%cmm, Diag%chh, gflx, evap, hflx, ep1d) | ||
endif | ||
|
||
endif ! if ( nstf_name(1) > 0 ) then | ||
|
||
! if (lprnt) write(0,*)' sfalb=',sfalb(ipr),' ipr=',ipr & | ||
|
@@ -1451,6 +1484,10 @@ subroutine GFS_physics_driver & | |
Diag%u1(:) = Statein%ugrs(:,1) | ||
Diag%v1(:) = Statein%vgrs(:,1) | ||
Sfcprop%qsfc(:) = qss(:) | ||
|
||
! KGao | ||
Diag%hflx(:) = hflx(:) | ||
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. How do these differ from the existing diagnostics? Is this exposing the behavior of the coupler itself rather than the flux "seen" by the atmosphere? 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. hflx and evap are two new diagnostics, which were to ensure the fields seen by the SHiELD physics are consistent with what in the coupler. They represent the temp and q fluxes (not the sensible and latent heat fluxes). |
||
Diag%evap(:) = evap(:) | ||
|
||
if (Model%override_surface_radiative_fluxes) then | ||
Diag%dlwsfci_override(:) = adjsfcdlw_for_coupling(:) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these so that we can have arrays holding the flux directly from the coupler? If so, why not use the arrays in the
Coupling%
data structure?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we let the Sfcprop% data structure holds surface layer variables (heat fluxes, ocean temp, z0/zt) passed from the coupler. It is a convenient choice as some fields are already defined. There should be a merge request to the atmos_driver repo to reflect this.
I am not sure of the role of Coupling% in SHiELD physics. I don't think Joseph and I have touched it for the SHiELD-MOM6 coupling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is fine; I'm not sure whether Coupling% is actually hooked up to anything. Sfcprop is already being used and is convenient, but be aware that it may be altered in subtle ways elsewhere in the physics driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The coupling arrays may be useful if we need to accumulate something over timesteps instead of passing instantaneous values.
SHiELD_physics/GFS_layer/GFS_typedefs.F90
Line 1911 in c93b388