-
Notifications
You must be signed in to change notification settings - Fork 146
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
Redundant surface variable cleanup #659
Closed
Closed
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8f75b58
change surface_skin_temperature_over_ice_interstitial to surface_skin…
mzhangw 826dca1
cleanup the standard/long name of semis_wat/semis_lnd/semis_ice/tsfc_wat
mzhangw a43f331
Merge branch 'NCAR:main' into redund_surface
mzhangw f435ba5
tsfc_lnd and tsfc_save cleanup
mzhangw 9d97823
Merge branch 'redund_surface' of https://github.com/mzhangw/ccpp-phys…
mzhangw 1977cba
Merge branch 'NCAR:main' into redund_surface
mzhangw 8a33f3a
delete turf*, which is not used
mzhangw 7c0e99f
Merge branch 'redund_surface' of https://github.com/mzhangw/ccpp-phys…
mzhangw 99bac72
format change as requested
mzhangw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,8 +30,8 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx | |
landfrac, lakefrac, lakedepth, oceanfrac, frland, dry, icy, use_flake, ocean, wet, & | ||
hice, cice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & | ||
tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, & | ||
weasd, weasd_wat, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, & | ||
tsfc_lnd, tsfc_ice, tisfc, tice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, & | ||
weasd, weasd_wat, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl,tsfci, tsfc_wat, & | ||
tisfc, tice, & | ||
gflx_ice, tgice, islmsk, islmsk_cice, slmsk, semis_rad, semis_wat, semis_lnd, semis_ice, & | ||
qss, qss_wat, qss_lnd, qss_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, & | ||
min_lakeice, min_seaice, zorlo, zorll, zorli, errmsg, errflg) | ||
|
@@ -48,9 +48,9 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx | |
real(kind=kind_phys), dimension(:), intent( out) :: frland | ||
real(kind=kind_phys), dimension(:), intent(in ) :: snowd, tprcp, uustar, weasd, qss, hflx | ||
|
||
real(kind=kind_phys), dimension(:), intent(inout) :: tsfc, tsfco, tsfcl, tisfc, tsurf | ||
real(kind=kind_phys), dimension(:), intent(inout) :: tsfc, tsfco, tsfcl, tsfci, tisfc | ||
real(kind=kind_phys), dimension(:), intent(inout) :: snowd_wat, snowd_lnd, snowd_ice, tprcp_wat, & | ||
tprcp_lnd, tprcp_ice, tsfc_wat, tsfc_lnd, tsfc_ice, tsurf_wat,tsurf_lnd, tsurf_ice, & | ||
tprcp_lnd, tprcp_ice, tsfc_wat, & | ||
uustar_wat, uustar_lnd, uustar_ice, weasd_wat, weasd_lnd, weasd_ice, & | ||
qss_wat, qss_lnd, qss_ice, hflx_wat, hflx_lnd, hflx_ice, ep1d_ice, gflx_ice | ||
real(kind=kind_phys), dimension(:), intent( out) :: tice | ||
|
@@ -179,7 +179,6 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx | |
if (wet(i)) then ! Water | ||
uustar_wat(i) = uustar(i) | ||
tsfc_wat(i) = tsfco(i) | ||
tsurf_wat(i) = tsfco(i) | ||
! weasd_wat(i) = weasd(i) | ||
! snowd_wat(i) = snowd(i) | ||
weasd_wat(i) = zero | ||
|
@@ -195,12 +194,10 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx | |
if (dry(i)) then ! Land | ||
uustar_lnd(i) = uustar(i) | ||
weasd_lnd(i) = weasd(i) | ||
tsfc_lnd(i) = tsfcl(i) | ||
tsurf_lnd(i) = tsfcl(i) | ||
snowd_lnd(i) = snowd(i) | ||
semis_lnd(i) = semis_rad(i) | ||
qss_lnd(i) = qss(i) | ||
hflx_lnd(i) = hflx(i) | ||
qss_lnd(i) = qss(i) | ||
hflx_lnd(i) = hflx(i) | ||
! DH* | ||
else | ||
zorll(i) = huge | ||
|
@@ -209,8 +206,7 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx | |
if (icy(i)) then ! Ice | ||
uustar_ice(i) = uustar(i) | ||
weasd_ice(i) = weasd(i) | ||
tsfc_ice(i) = tisfc(i) | ||
tsurf_ice(i) = tisfc(i) | ||
tsfci(i) = tisfc(i) | ||
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. Same here, |
||
snowd_ice(i) = snowd(i) | ||
ep1d_ice(i) = zero | ||
gflx_ice(i) = zero | ||
|
@@ -352,11 +348,11 @@ subroutine GFS_surface_composites_post_run ( | |
zorl, zorlo, zorll, zorli, & | ||
cd, cd_wat, cd_lnd, cd_ice, cdq, cdq_wat, cdq_lnd, cdq_ice, rb, rb_wat, rb_lnd, rb_ice, stress, stress_wat, stress_lnd, & | ||
stress_ice, ffmm, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh, ffhh_wat, ffhh_lnd, ffhh_ice, uustar, uustar_wat, uustar_lnd, & | ||
uustar_ice, fm10, fm10_wat, fm10_lnd, fm10_ice, fh2, fh2_wat, fh2_lnd, fh2_ice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, & | ||
uustar_ice, fm10, fm10_wat, fm10_lnd, fm10_ice, fh2, fh2_wat, fh2_lnd, fh2_ice, & | ||
cmm, cmm_wat, cmm_lnd, cmm_ice, chh, chh_wat, chh_lnd, chh_ice, gflx, gflx_wat, gflx_lnd, gflx_ice, ep1d, ep1d_wat, & | ||
ep1d_lnd, ep1d_ice, weasd, weasd_wat, weasd_lnd, weasd_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, & | ||
tprcp_lnd, tprcp_ice, evap, evap_wat, evap_lnd, evap_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, qss, qss_wat, qss_lnd, & | ||
qss_ice, tsfc, tsfco, tsfcl, tsfc_wat, tsfc_lnd, tsfc_ice, tisfc, tice, hice, cice, min_seaice, tiice, stc, errmsg, errflg) | ||
qss_ice, tsfc, tsfco, tsfcl, tsfci, tsfc_wat, tisfc, tice, hice, cice, min_seaice, tiice, stc, errmsg, errflg) | ||
|
||
implicit none | ||
|
||
|
@@ -367,13 +363,13 @@ subroutine GFS_surface_composites_post_run ( | |
real(kind=kind_phys), dimension(:), intent(in) :: landfrac, lakefrac, oceanfrac, & | ||
cd_wat, cd_lnd, cd_ice, cdq_wat, cdq_lnd, cdq_ice, rb_wat, rb_lnd, rb_ice, stress_wat, & | ||
stress_lnd, stress_ice, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh_wat, ffhh_lnd, ffhh_ice, uustar_wat, uustar_lnd, uustar_ice, & | ||
fm10_wat, fm10_lnd, fm10_ice, fh2_wat, fh2_lnd, fh2_ice, tsurf_wat, tsurf_lnd, tsurf_ice, cmm_wat, cmm_lnd, cmm_ice, & | ||
fm10_wat, fm10_lnd, fm10_ice, fh2_wat, fh2_lnd, fh2_ice, cmm_wat, cmm_lnd, cmm_ice, & | ||
chh_wat, chh_lnd, chh_ice, gflx_wat, gflx_lnd, gflx_ice, ep1d_wat, ep1d_lnd, ep1d_ice, weasd_wat, weasd_lnd, weasd_ice, & | ||
snowd_wat, snowd_lnd, snowd_ice,tprcp_wat, tprcp_lnd, tprcp_ice, evap_wat, evap_lnd, evap_ice, hflx_wat, hflx_lnd, & | ||
hflx_ice, qss_wat, qss_lnd, qss_ice, tsfc_wat, tsfc_lnd, tsfc_ice | ||
hflx_ice, qss_wat, qss_lnd, qss_ice, tsfc_wat | ||
|
||
real(kind=kind_phys), dimension(:), intent(inout) :: zorl, zorlo, zorll, zorli, cd, cdq, rb, stress, ffmm, ffhh, uustar, fm10, & | ||
fh2, tsurf, cmm, chh, gflx, ep1d, weasd, snowd, tprcp, evap, hflx, qss, tsfc, tsfco, tsfcl, tisfc | ||
fh2, cmm, chh, gflx, ep1d, weasd, snowd, tprcp, evap, hflx, qss, tsfc, tsfco, tsfcl, tsfci, tisfc | ||
|
||
real(kind=kind_phys), dimension(:), intent(in ) :: tice ! interstitial sea ice temperature | ||
real(kind=kind_phys), dimension(:), intent(inout) :: hice, cice | ||
|
@@ -415,8 +411,6 @@ subroutine GFS_surface_composites_post_run ( | |
uustar(i) = txl*uustar_lnd(i) + txi*uustar_ice(i) + txo*uustar_wat(i) | ||
fm10(i) = txl*fm10_lnd(i) + txi*fm10_ice(i) + txo*fm10_wat(i) | ||
fh2(i) = txl*fh2_lnd(i) + txi*fh2_ice(i) + txo*fh2_wat(i) | ||
!tsurf(i) = txl*tsurf_lnd(i) + txi*tice(i) + txo*tsurf_wat(i) | ||
!tsurf(i) = txl*tsurf_lnd(i) + txi*tsurf_ice(i) + txo*tsurf_wat(i) ! not used again! Moorthi | ||
cmm(i) = txl*cmm_lnd(i) + txi*cmm_ice(i) + txo*cmm_wat(i) | ||
chh(i) = txl*chh_lnd(i) + txi*chh_ice(i) + txo*chh_wat(i) | ||
!gflx(i) = txl*gflx_lnd(i) + txi*gflx_ice(i) + txo*gflx_wat(i) | ||
|
@@ -438,10 +432,9 @@ subroutine GFS_surface_composites_post_run ( | |
qss(i) = txl*qss_lnd(i) + txi*qss_ice(i) + txo*qss_wat(i) | ||
gflx(i) = txl*gflx_lnd(i) + txi*gflx_ice(i) + txo*gflx_wat(i) | ||
endif | ||
tsfc(i) = txl*tsfc_lnd(i) + txi*tice(i) + txo*tsfc_wat(i) | ||
tsfc(i) = txl*tsfcl(i) + txi*tice(i) + txo*tsfc_wat(i) | ||
|
||
if (dry(i)) then | ||
tsfcl(i) = tsfc_lnd(i) ! over land | ||
elseif (wet(i)) then | ||
tsfcl(i) = tsfc_wat(i) ! over water | ||
else | ||
|
@@ -452,14 +445,14 @@ subroutine GFS_surface_composites_post_run ( | |
elseif (icy(i)) then | ||
tsfco(i) = tice(i) ! over lake or ocean ice when uncoupled | ||
else | ||
tsfco(i) = tsfc_lnd(i) ! over land | ||
tsfco(i) = tsfcl(i) ! over land | ||
endif | ||
if (icy(i)) then | ||
tisfc(i) = tice(i) ! over lake or ocean ice when uncoupled | ||
elseif (wet(i)) then | ||
tisfc(i) = tsfc_wat(i) ! over lake or ocean when uncoupled | ||
else | ||
tisfc(i) = tsfc_lnd(i) ! over land | ||
tisfc(i) = tsfcl(i) ! over land | ||
endif | ||
! for coupled model ocean will replace this | ||
! if (icy(i)) tisfc(i) = tsfc_ice(i) ! over ice when uncoupled | ||
|
@@ -499,8 +492,6 @@ subroutine GFS_surface_composites_post_run ( | |
uustar(i) = uustar_lnd(i) | ||
fm10(i) = fm10_lnd(i) | ||
fh2(i) = fh2_lnd(i) | ||
!tsurf(i) = tsurf_lnd(i) | ||
tsfcl(i) = tsfc_lnd(i) ! over land | ||
tsfc(i) = tsfcl(i) | ||
tsfco(i) = tsfc(i) | ||
tisfc(i) = tsfc(i) | ||
|
@@ -527,7 +518,6 @@ subroutine GFS_surface_composites_post_run ( | |
uustar(i) = uustar_wat(i) | ||
fm10(i) = fm10_wat(i) | ||
fh2(i) = fh2_wat(i) | ||
!tsurf(i) = tsurf_wat(i) | ||
tsfco(i) = tsfc_wat(i) ! over lake (and ocean when uncoupled) | ||
tsfc(i) = tsfco(i) | ||
tsfcl(i) = tsfc(i) | ||
|
@@ -555,7 +545,6 @@ subroutine GFS_surface_composites_post_run ( | |
fm10(i) = fm10_ice(i) | ||
fh2(i) = fh2_ice(i) | ||
stress(i) = stress_ice(i) | ||
!tsurf(i) = tsurf_ice(i) | ||
cmm(i) = cmm_ice(i) | ||
chh(i) = chh_ice(i) | ||
gflx(i) = gflx_ice(i) | ||
|
@@ -564,22 +553,23 @@ subroutine GFS_surface_composites_post_run ( | |
snowd(i) = snowd_ice(i) | ||
!tprcp(i) = cice(i)*tprcp_ice(i) + (one-cice(i))*tprcp_wat(i) | ||
qss(i) = qss_ice(i) | ||
tsfc(i) = tsfc_ice(i) | ||
tsfc(i) = tsfci(i) | ||
evap(i) = evap_ice(i) | ||
hflx(i) = hflx_ice(i) | ||
qss(i) = qss_ice(i) | ||
tisfc(i) = tice(i) | ||
if (.not. flag_cice(i)) then | ||
! tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled) | ||
zorl(i) = cice(i) * zorli(i) + (one - cice(i)) * zorlo(i) | ||
tsfc(i) = tsfc_ice(i) ! over lake (and ocean when uncoupled) | ||
tsfc(i) = tsfci(i) ! over lake (and ocean when uncoupled) | ||
|
||
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. Please remove extra blank line |
||
elseif (wet(i)) then | ||
if (cice(i) >= min_seaice) then ! this was already done for lake ice in sfc_sice | ||
txi = cice(i) | ||
txo = one - txi | ||
evap(i) = txi * evap_ice(i) + txo * evap_wat(i) | ||
hflx(i) = txi * hflx_ice(i) + txo * hflx_wat(i) | ||
tsfc(i) = txi * tsfc_ice(i) + txo * tsfc_wat(i) | ||
tsfc(i) = txi * tsfci(i) + txo * tsfc_wat(i) | ||
stress(i) = txi * stress_ice(i) + txo * stress_wat(i) | ||
qss(i) = txi * qss_ice(i) + txo * qss_wat(i) | ||
ep1d(i) = txi * ep1d_ice(i) + txo * ep1d_wat(i) | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please revert indentation changes in lines 198 and 199