Skip to content
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

Update EMC develop from NCAR dtc/develop 2020/03/17 #81

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
e45b4f4
add GFS_GWD_generic_post scheme to SDFs using default GWD and substit…
grantfirl Nov 4, 2019
759997d
Add CCPP annotations to GFS_driver.F90, GFS_physics_driver.F90, GFS_r…
climbfuji Nov 4, 2019
8bd0c2e
Update .gitmodules for NCAR fork, branch dtc/develop, and update subm…
climbfuji Nov 4, 2019
e6e2c81
add FA scheme changes on host model side
mzhangw Nov 8, 2019
685722d
1. using explicit simulation configuration in SDF file
mzhangw Nov 14, 2019
eaed2d3
Merge pull request #1 from grantfirl/gwd_interstitial_reorg
grantfirl Nov 15, 2019
9f91d6d
Merge branch 'dtc/develop' of https://github.com/NCAR/fv3atm into HAF…
mzhangw Nov 18, 2019
c985af4
add gwd_post in FA SDF file following other SDFs
mzhangw Nov 18, 2019
b3f213d
Update submodule pointers for ccpp-framework and ccpp-physics
climbfuji Nov 18, 2019
9ee222b
Add new SDFs for sas and satmedmfvdifq, remove samfshalcnv_post schem…
climbfuji Nov 18, 2019
c69850f
ccpp/CMakeLists.txt: cleanup bitforbit compiler options, adjust for b…
climbfuji Nov 18, 2019
8cba04d
ccpp/config/ccpp_prebuild_config.py: add sas shallow/deep convection …
climbfuji Nov 18, 2019
2e27a29
Update CCPP annotations in gfsphysics/GFS_layer/GFS_physics_driver.F90
climbfuji Nov 18, 2019
daba616
gfsphysics/GFS_layer/GFS_typedefs.*: add new control variables/flags …
climbfuji Nov 18, 2019
b9a3887
ccpp/build_ccpp.sh: correct ESMF_DEP_INCPATH settings to avoid warnin…
climbfuji Nov 19, 2019
a4a0418
gfsphysics/GFS_layer/GFS_typedefs.F90: bugfix, use correct Model%imfd…
climbfuji Nov 19, 2019
ae916b3
makefile: remove include directory and library entries for old FV3/fm…
climbfuji Nov 19, 2019
a333ffc
Update submodule pointers for ccpp-framework and ccpp-physics
climbfuji Nov 19, 2019
8c7f231
Update submodule pointer for ccpp/physics
climbfuji Nov 20, 2019
1d1b1f8
Update submodule pointers for ccpp/framework and ccpp/physics
climbfuji Nov 20, 2019
332fb61
Merge pull request #3 from climbfuji/ccpp_add_sas_and_satmedmfvdifq
climbfuji Nov 20, 2019
c8c7d06
remove update_moist module
mzhangw Nov 22, 2019
2e3b41d
change TRAIN name to accumulated change...
mzhangw Nov 22, 2019
dc11553
Merge branch 'dtc/develop' of https://github.com/NCAR/fv3atm into HAF…
mzhangw Nov 22, 2019
3dba65f
fix compilation warnings related to wrong arguments passed into 2 sub…
grantfirl Nov 22, 2019
72c51fc
Merge pull request #2 from mzhangw/HAFS_fer_hires
climbfuji Nov 22, 2019
5975b8e
Update submodule pointers for atmos_cubed_sphere ccpp/physics
climbfuji Nov 22, 2019
3fd71cf
Merge pull request #5 from climbfuji/update_submodule_pointers_20191122
climbfuji Nov 22, 2019
d94fedd
Update submodule pointers for atmos_cubed_sphere ccpp/physics
climbfuji Nov 22, 2019
ed2116d
Revert "dtc/develop: update submodule pointers 2019/11/22"
climbfuji Nov 22, 2019
b9f75af
Merge pull request #6 from NCAR/revert-5-update_submodule_pointers_20…
climbfuji Nov 22, 2019
a3fc609
Merge branch 'dtc/develop' of https://github.com/NCAR/fv3atm into upd…
climbfuji Nov 22, 2019
b2404b5
Merge pull request #7 from climbfuji/update_submodule_pointers_20191122
climbfuji Nov 22, 2019
2124b57
Merge pull request #4 from grantfirl/fix_cires_ugwp_compilation_warning
climbfuji Nov 25, 2019
e726454
Update submodule pointer for ccpp-physics
climbfuji Nov 25, 2019
cb7e389
Merge pull request #9 from climbfuji/fv3atm_update_submodule_pointer_…
climbfuji Nov 25, 2019
a550ddf
Merge FV3 gsd/develop into fv3atm dtc/develop, squashed commit of the…
climbfuji Nov 26, 2019
1688b29
ccpp/config/ccpp_prebuild_config.py: add new configuration item DEFAU…
climbfuji Nov 26, 2019
07af073
Update submodule pointers for ccpp-framework and ccpp-physics
climbfuji Nov 26, 2019
661e98c
Update submodule pointers for ccpp/framework and ccpp/physics
climbfuji Nov 27, 2019
bc31689
Merge pull request #10 from climbfuji/merge_gsd_develop_and_update_ba…
climbfuji Nov 27, 2019
03f7d78
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
climbfuji Nov 27, 2019
9caa172
Update submodule pointer for ccpp/physics
climbfuji Nov 27, 2019
ac71e23
ccpp/CMakeLists.txt: add flag '-Wall' to DEBUG flags for GNU compiler
climbfuji Nov 30, 2019
2de4377
Update submodule pointers for ccpp-framework and ccpp-physics
climbfuji Dec 2, 2019
8b23f66
adding updated suite for coupling
linlin-pan Dec 3, 2019
eae6786
Update submodule pointers for atmos_cubed_sphere, ccpp/framework, ccp…
climbfuji Dec 3, 2019
88e87e9
Merge pull request #11 from climbfuji/dtc_develop_udpate_from_emc_201…
climbfuji Dec 3, 2019
3aacc00
changing ccpp/suites/suite_FV3_GFS_2017_couple.xml
linlin-pan Dec 4, 2019
66c7001
remove sfc_noahmp_pre interstitial scheme from prebuild and SDF, move…
grantfirl Dec 5, 2019
c9322aa
change RUC surface precip vars to Sfcprop DDT in GFS_restart.F90
grantfirl Dec 5, 2019
0a292c4
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
climbfuji Dec 5, 2019
9f72864
update the suite file for coupling
linlin-pan Dec 6, 2019
d373518
adding new suit files for GFS v15.2 and GFS v16beta
linlin-pan Dec 6, 2019
eb4c2e0
make associated change to GFS_physics_driver for NoahMP precip rates
grantfirl Dec 6, 2019
41884c2
Merge branch 'fix_noahmp_precip_rates' of https://github.com/grantfir…
climbfuji Dec 6, 2019
3be9f98
Merge branch 'dtc/develop' of https://github.com/panll/fv3atm into up…
climbfuji Dec 6, 2019
aa99bea
fix array dimensions for phii, prsi in ugwp_driver_v0.F
grantfirl Dec 6, 2019
b317eae
Bugfixes for NoahMP precipitation rate PR
climbfuji Dec 6, 2019
3780030
Merge branch 'fix_cires_ugwp_dimension_bug' of https://github.com/gra…
climbfuji Dec 6, 2019
718b7a5
fix cires_ugwp_init call arguments in GFS_driver.F90 (there is no iss…
grantfirl Dec 6, 2019
1c7f2c1
Merge branch 'fix_cires_ugwp_dimension_bug' of https://github.com/gra…
climbfuji Dec 6, 2019
fd8b1d6
Update submodule pointer for ccpp/physics
climbfuji Dec 9, 2019
5264272
Merge pull request #15 from climbfuji/update_dtc_develop_from_emc_dev…
climbfuji Dec 9, 2019
38b8834
change suite_FV3_GFS_v15.2 to suite_FV3_GFS_v15p2
grantfirl Dec 12, 2019
153ae61
Merge pull request #20 from grantfirl/fix_GFS_v15p2_name
climbfuji Dec 12, 2019
d0a75a9
Merge branch 'develop' of https://github.com/noaa-emc/fv3atm into HEAD
climbfuji Dec 14, 2019
9228d4c
Updates from ufs_public_release: use correct NETCDF variable for new …
climbfuji Dec 16, 2019
6353b7c
Merge pull request #21 from climbfuji/update_dtc_develop_from_ufs_pub…
climbfuji Dec 17, 2019
fa72e2b
io/FV3GFS_io.F90: bugfix for cold starts from RAP/HRRR initial condit…
climbfuji Dec 23, 2019
e14e81f
Merge pull request #22 from climbfuji/sar_fix_hrrr_ics
climbfuji Dec 26, 2019
c58e27a
Bugfix in the cap at lake points; fice is wrt water area for sea ice …
ShanSunNOAA Jan 8, 2020
e15f304
assign tsfco/zorlo (over water) to tsfcl/zorll (over land) initially,…
ShanSunNOAA Jan 9, 2020
1f61c0b
Limit ice frac to be <=1.
ShanSunNOAA Jan 9, 2020
fdb78ae
Cosmetic changes
ShanSunNOAA Jan 11, 2020
77e0957
Merge branch 'develop' of https://github.com/noaa-emc/fv3atm into HEAD
climbfuji Jan 27, 2020
9234128
Update .gitmodules for code review and testing
climbfuji Jan 27, 2020
35bbaf7
Revert .gitmodules change, update submodule pointers
climbfuji Feb 3, 2020
9de2a9d
Merge pull request #24 from climbfuji/update_dtc_develop_from_develop
climbfuji Feb 3, 2020
b2614a4
Update .gitmodules and submodule pointers for code review and testing
climbfuji Feb 5, 2020
8f057b8
-- Merged atmos_model.F90, GFS_physics_driver.F90 & FV3GFS_io.F90 to …
ShanSunNOAA Feb 5, 2020
94006f6
Merging to master: no changes in results in the non-CCPP control run
ShanSunNOAA Feb 5, 2020
cf0fad6
Revert change to .gitmodules, update submodule pointers for ccpp-fram…
climbfuji Feb 6, 2020
756ef51
Merge pull request #25 from climbfuji/dom_combine_prs_20200204
climbfuji Feb 6, 2020
42bc16e
Update .gitmodules and submodule pointer for ccpp-physics for code re…
ShanSunNOAA Feb 14, 2020
e83422c
Revert change to smoiseq definition
ShanSunNOAA Feb 14, 2020
b4eddd5
Bug fix in FV3GFS_io.F90. Results are bitwise identical in standalone…
ShanSunNOAA Feb 15, 2020
c13ed87
Correcting comments
ShanSunNOAA Feb 17, 2020
22f0dcb
Updating Coupling%tisfcin_cpl over ocean points only
ShanSunNOAA Feb 20, 2020
5c6bd37
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
climbfuji Feb 28, 2020
bf5bfa1
Update submodule pointer for .gitmodules for code review and testing
climbfuji Mar 4, 2020
c6e17ef
Revert change to .gitmodules, update submodule pointer for atmos_cube…
climbfuji Mar 9, 2020
1a385e3
Merge pull request #27 from climbfuji/update_dtc_develop_from_emc
climbfuji Mar 9, 2020
3375ede
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
climbfuji Mar 11, 2020
2507045
Add moninedmf_hafs.f to CCPP prebuild config
climbfuji Mar 12, 2020
2de5048
Update .gitmodules for code review
climbfuji Mar 12, 2020
4e54579
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into mer…
climbfuji Mar 12, 2020
13b04a4
Merging develop (fc9a4c2) into branch fractional_landmask
ShanSunNOAA Mar 12, 2020
cc085c7
Revert change .gitmodules and update submodule pointer for ccpp/physics
climbfuji Mar 12, 2020
e88f2b3
Merge pull request #29 from climbfuji/merge_emc_develop_20200311_afte…
climbfuji Mar 12, 2020
6d3399b
Merge branch 'dtc/develop' of https://github.com/NCAR/fv3atm into upd…
climbfuji Mar 12, 2020
67c8b06
Add nsradar_reset to control resetting radar calculations for Thompso…
climbfuji Mar 12, 2020
b8f6e8e
Setting fice=1 if fice>1.-1.e-10
ShanSunNOAA Mar 12, 2020
1b5bd6e
Update .gitmodules for code review and testing
climbfuji Mar 12, 2020
872b8fc
gfsphysics/GFS_layer/GFS_typedefs.F90: bugfix for declaration of vari…
climbfuji Mar 13, 2020
fcb1313
Revert change to .gitmodules, update submodule pointers for GFDL_atmo…
climbfuji Mar 13, 2020
722339d
Merge pull request #30 from climbfuji/update_from_dev_emc_20200312_an…
climbfuji Mar 13, 2020
94c863e
Merge branch 'fractional_landmask' of https://github.com/shansun6/fv3…
climbfuji Mar 13, 2020
8645684
gfsphysics/GFS_layer/GFS_typedefs.F90: bugfix for Thompson radar refl…
climbfuji Mar 16, 2020
811ca4d
Support for CCPP with hera.gnu
climbfuji Mar 16, 2020
9b79ce1
Revert change to .gitmodules and update submodule pointer for ccpp-ph…
climbfuji Mar 17, 2020
8672795
Merge pull request #31 from climbfuji/final_pr_before_merging_to_deve…
climbfuji Mar 17, 2020
1e8b882
Update .gitmodules and submodule pointer for ccpp-physics for code re…
climbfuji Mar 17, 2020
7d43172
Merge branch 'dtc/develop' of https://github.com/NCAR/fv3atm into upd…
climbfuji Mar 17, 2020
729b687
Update submodule pointer for ccpp-physics
climbfuji Mar 17, 2020
9e21926
Update submodule pointer for ccpp-physics
climbfuji Mar 17, 2020
b8abee3
Revert change to .gitmodules, update submodule pointers for ccpp-fram…
climbfuji Mar 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1724,7 +1724,6 @@ subroutine assign_importdata(rc)
if (IPD_Data(nb)%Sfcprop%oceanfrac(ix) > zero) then
IPD_Data(nb)%Coupling%tseain_cpl(ix) = datar8(i,j)
IPD_Data(nb)%Sfcprop%tsfco(ix) = datar8(i,j)
! IPD_Data(nb)%Sfcprop%tsfc(ix) = datar8(i,j)
endif
enddo
enddo
Expand All @@ -1747,13 +1746,17 @@ subroutine assign_importdata(rc)
IPD_Data(nb)%Coupling%ficein_cpl(ix) = zero
IPD_Data(nb)%Coupling%slimskin_cpl(ix) = IPD_Data(nb)%Sfcprop%slmsk(ix)
if (IPD_Data(nb)%Sfcprop%oceanfrac(ix) > zero) then
if (datar8(i,j) >= IPD_control%min_seaice*IPD_Data(nb)%Sfcprop%oceanfrac(ix)) then
IPD_Data(nb)%Coupling%ficein_cpl(ix) = max(zero, min(datar8(i,j),one))
IPD_Data(nb)%Sfcprop%slmsk(ix) = 2. !slmsk=2 crashes in gcycle on partial land points
IPD_Data(nb)%Coupling%ficein_cpl(ix) = max(zero, min(one, datar8(i,j)/IPD_Data(nb)%Sfcprop%oceanfrac(ix))) !LHS: ice frac wrt water area
if (IPD_Data(nb)%Coupling%ficein_cpl(ix) > one-epsln) IPD_Data(nb)%Coupling%ficein_cpl(ix)=one
if (IPD_Data(nb)%Coupling%ficein_cpl(ix) >= IPD_control%min_seaice) then
if (abs(one-IPD_Data(nb)%Sfcprop%oceanfrac(ix)) < epsln) IPD_Data(nb)%Sfcprop%slmsk(ix) = 2. !slmsk=2 crashes in gcycle on partial land points
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this works for non-fractional grid, where ocean fraction is either close 1 or 0, but does this work for fraction grid where ocean fraction may <1 (50%ocean and 50%land)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shansun6

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When ice and land co-exist, slmsk cannot be 2, since it would crash at gcycle.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks.

IPD_Data(nb)%Coupling%slimskin_cpl(ix) = 4.
elseif (abs(one-IPD_Data(nb)%Sfcprop%oceanfrac(ix)) < epsln) then
IPD_Data(nb)%Sfcprop%slmsk(ix) = zero
IPD_Data(nb)%Coupling%slimskin_cpl(ix) = zero
else
IPD_Data(nb)%Coupling%ficein_cpl(ix) = zero
if (abs(one-IPD_Data(nb)%Sfcprop%oceanfrac(ix)) < epsln) then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel this can only be applied for non-fractional grid, is it correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shansun6 this question is for you.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should work for both nonfrac and frac grid. It is to prevent slmsk to be set to zero when partial ocean exists. When both land and ocean exist in one cell, slmsk is set to 1.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation.

IPD_Data(nb)%Sfcprop%slmsk(ix) = zero
IPD_Data(nb)%Coupling%slimskin_cpl(ix) = zero
end if
endif
endif
enddo
Expand Down Expand Up @@ -1924,7 +1927,7 @@ subroutine assign_importdata(rc)
ix = Atm_block%ixp(i,j)
if (IPD_Data(nb)%Sfcprop%oceanfrac(ix) > zero) then
!if it is ocean or ice get surface temperature from mediator
if(IPD_Data(nb)%Coupling%ficein_cpl(ix) >= IPD_control%min_seaice*IPD_Data(nb)%Sfcprop%oceanfrac(ix)) then
if(IPD_Data(nb)%Coupling%ficein_cpl(ix) >= IPD_control%min_seaice) then
IPD_Data(nb)%Sfcprop%tisfc(ix) = IPD_Data(nb)%Coupling%tisfcin_cpl(ix)
IPD_Data(nb)%Sfcprop%fice(ix) = IPD_Data(nb)%Coupling%ficein_cpl(ix)
IPD_Data(nb)%Sfcprop%hice(ix) = IPD_Data(nb)%Coupling%hicein_cpl(ix)
Expand Down
8 changes: 7 additions & 1 deletion ccpp/build_ccpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eu

# List of valid/tested machines
VALID_MACHINES=( wcoss_cray wcoss_dell_p3 gaea.intel jet.intel \
hera.intel \
hera.intel hera.gnu \
cheyenne.intel cheyenne.intel-impi cheyenne.gnu cheyenne.pgi endeavor.intel \
stampede.intel supermuc_phase2.intel macosx.gnu \
linux.intel linux.gnu linux.pgi )
Expand Down Expand Up @@ -128,6 +128,12 @@ fi
if [[ "${MAKE_OPT}" == *"STATIC=Y"* ]]; then
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DSTATIC=ON"
else
# hera.gnu uses the NCEPLIBS-external/NCEPLIBS umbrella build libraries,
# which cannot be linked dynamically at this point (missing -fPIC flag)
if [[ "${MACHINE_ID}" == "hera.gnu" ]]; then
echo "Dynamic CCPP build not supported on hera.gnu at this time."
exit 1
fi
# Dynamic builds require linking the NCEPlibs, provide path to them
CCPP_CMAKE_FLAGS="${CCPP_CMAKE_FLAGS} -DSTATIC=OFF -DBACIO_LIB4=${BACIO_LIB4} -DSP_LIBd=${SP_LIBd} -DW3NCO_LIBd=${W3NCO_LIBd}"
fi
Expand Down
1 change: 1 addition & 0 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
'FV3/ccpp/physics/physics/cu_gf_driver.F90' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/cu_gf_driver_post.F90' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/moninedmf.f' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/moninedmf_hafs.f' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/moninshoc.f' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/satmedmfvdif.F' : [ 'slow_physics' ],
'FV3/ccpp/physics/physics/satmedmfvdifq.F' : [ 'slow_physics' ],
Expand Down
2 changes: 1 addition & 1 deletion ccpp/framework
7 changes: 7 additions & 0 deletions ccpp/set_compilers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ case "$MACHINE_ID" in
export F77=mpiifort
export F90=mpiifort
;;
hera.gnu)
export CC=mpicc
export CXX=mpicxx
export FC=mpif90
export F77=mpif77
export F90=mpif90
;;
cheyenne.intel)
export CC=mpicc
export CXX=mpicxx
Expand Down
92 changes: 42 additions & 50 deletions gfsphysics/GFS_layer/GFS_physics_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ subroutine GFS_physics_driver &
! --- ... xw: transfer ice thickness & concentration from global to local variables
!## CCPP ## global to local variable transfer not necessary for these two
zice(i) = Sfcprop%hice(i)
fice(i) = Sfcprop%fice(i) ! ice fraction of lake/ocean wrt whole cell
fice(i) = Sfcprop%fice(i)
!*## CCPP ##*
!## CCPP ##* GFS_surface_composites.F90/GFS_surface_composites_pre_run
tice(i) = Sfcprop%tisfc(i)
Expand Down Expand Up @@ -1126,35 +1126,31 @@ subroutine GFS_physics_driver &
!*## CCPP ##

!## CCPP ##* GFS_surface_composites.F90/GFS_surface_composites_pre
if (Model%frac_grid) then ! here Sfcprop%fice is fraction of the whole grid that is ice
if (Model%frac_grid) then
do i = 1, IM
frland(i) = Sfcprop%landfrac(i)
if (frland(i) > zero) dry(i) = .true.
tem = one - frland(i)
if (tem > epsln) then
if (frland(i) < one) then
if (flag_cice(i)) then
if (fice(i) >= Model%min_seaice*tem) then
if (fice(i) >= Model%min_seaice) then
icy(i) = .true.
else
fice(i) = zero
endif
else
if (fice(i) >= Model%min_lakeice*tem) then
if (fice(i) >= Model%min_lakeice) then
icy(i) = .true.
fice(i) = fice(i)/tem ! fice is fraction of ocean/lake
else
fice(i) = zero
endif
endif
if (fice(i) < one) then
wet(i)=.true. !some open ocean/lake water exists
if (.not. Model%cplflx) Sfcprop%tsfco(i) = max(Sfcprop%tsfco(i), Sfcprop%tisfc(i), tgice)

end if
else
fice(i) = zero
endif
! ocean/lake area that is not frozen
if (tem-fice(i) > epsln) then
wet(i) = .true. ! there is some open water!
if (.not. Model%cplflx) Sfcprop%tsfco(i) = max(Sfcprop%tsfco(i), Sfcprop%tisfc(i), tgice)
! if (icy(i)) Sfcprop%tsfco(i) = max(Sfcprop%tsfco(i), tgice)
! if (icy(i)) Sfcprop%tsfco(i) = max(Sfcprop%tisfc(i), tgice)
endif
enddo
else
Expand Down Expand Up @@ -1524,32 +1520,32 @@ subroutine GFS_physics_driver &

if (Model%frac_grid) then
do i=1,im
tem = one - Sfcprop%fice(i) - frland(i)
tem = (one - frland(i)) * fice(i) ! tem = ice fraction wrt whole cell
if (flag_cice(i)) then
adjsfculw(i) = adjsfculw3(i,1) * frland(i) &
+ Coupling%ulwsfcin_cpl(i) * Sfcprop%fice(i) &
+ adjsfculw3(i,3) * tem
+ Coupling%ulwsfcin_cpl(i) * tem &
+ adjsfculw3(i,3) * (one - frland(i) - tem)
else
adjsfculw(i) = adjsfculw3(i,1) * frland(i) &
+ adjsfculw3(i,2) * Sfcprop%fice(i) &
+ adjsfculw3(i,3) * tem
+ adjsfculw3(i,2) * tem &
+ adjsfculw3(i,3) * (one - frland(i) - tem)
endif
enddo
else
do i=1,im
if (dry(i)) then ! all land
adjsfculw(i) = adjsfculw3(i,1)
elseif (icy(i)) then ! ice (and water)
tem = one - Sfcprop%fice(i)
tem = one - fice(i)
if (flag_cice(i)) then
if (wet(i) .and. adjsfculw3(i,3) /= huge) then
adjsfculw(i) = Coupling%ulwsfcin_cpl(i)*Sfcprop%fice(i) + adjsfculw3(i,3)*tem
adjsfculw(i) = Coupling%ulwsfcin_cpl(i)*fice(i) + adjsfculw3(i,3)*tem
else
adjsfculw(i) = Coupling%ulwsfcin_cpl(i)
endif
else
if (wet(i) .and. adjsfculw3(i,3) /= huge) then
adjsfculw(i) = adjsfculw3(i,2)*Sfcprop%fice(i) + adjsfculw3(i,3)*tem
adjsfculw(i) = adjsfculw3(i,2)*fice(i) + adjsfculw3(i,3)*tem
else
adjsfculw(i) = adjsfculw3(i,2)
endif
Expand Down Expand Up @@ -2002,9 +1998,9 @@ subroutine GFS_physics_driver &
do i=1, im
!
! Three-way composites (fields from sfc_diff)
txl = Sfcprop%landfrac(i)
txi = Sfcprop%fice(i) ! here Sfcprop%fice is grid fraction that is ice
txo = one - txl - txi
txl = frland(i)
txi = fice(i)*(one - frland(i)) ! txi = ice fraction wrt whole cell
txo = max(zero, one - txl - txi)
Sfcprop%zorl(i) = txl*zorl3(i,1) + txi*zorl3(i,2) + txo*zorl3(i,3)
cd(i) = txl*cd3(i,1) + txi*cd3(i,2) + txo*cd3(i,3)
cdq(i) = txl*cdq3(i,1) + txi*cdq3(i,2) + txo*cdq3(i,3)
Expand Down Expand Up @@ -2062,8 +2058,7 @@ subroutine GFS_physics_driver &
if (.not. flag_cice(i)) then
if (islmsk(i) == 2) then ! return updated lake ice thickness & concentration to global array
Sfcprop%hice(i) = zice(i)
! Sfcprop%fice(i) = fice(i) * Sfcprop%lakefrac(i) ! fice is fraction of lake area that is frozen
Sfcprop%fice(i) = fice(i) * (one-Sfcprop%landfrac(i)) ! fice is fraction of wet area that is frozen
Sfcprop%fice(i) = fice(i)
Sfcprop%tisfc(i) = tice(i)
else ! this would be over open ocean or land (no ice fraction)
Sfcprop%hice(i) = zero
Expand Down Expand Up @@ -2121,7 +2116,7 @@ subroutine GFS_physics_driver &
Sfcprop%zorlo(i) = zorl3(i,3)

if (flag_cice(i) .and. wet(i)) then ! this was already done for lake ice in sfc_sice
txi = Sfcprop%fice(i)
txi = fice(i)
txo = one - txi
evap(i) = txi * evap3(i,2) + txo * evap3(i,3)
hflx(i) = txi * hflx3(i,2) + txo * hflx3(i,3)
Expand Down Expand Up @@ -2843,34 +2838,31 @@ subroutine GFS_physics_driver &
if (Model%cplflx) then
do i=1,im
if (Sfcprop%oceanfrac(i) > zero) then ! Ocean only, NO LAKES
if (fice(i) == Sfcprop%oceanfrac(i)) then ! use results from CICE
if (Sfcprop%fice(i) > one - epsln) then ! no open water, thus use results from CICE
Coupling%dusfci_cpl(i) = dusfc_cice(i)
Coupling%dvsfci_cpl(i) = dvsfc_cice(i)
Coupling%dtsfci_cpl(i) = dtsfc_cice(i)
Coupling%dqsfci_cpl(i) = dqsfc_cice(i)

elseif (wet(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point
if (icy(i) .or. dry(i)) then
tem1 = max(Diag%q1(i), 1.e-8)
rho = Statein%prsl(i,1) / (con_rd*Diag%t1(i)*(one+con_fvirt*tem1))
if (wind(i) > zero) then
tem = - rho * stress3(i,3) / wind(i)
Coupling%dusfci_cpl(i) = tem * Statein%ugrs(i,1) ! U-momentum flux
Coupling%dvsfci_cpl(i) = tem * Statein%vgrs(i,1) ! V-momentum flux
else
Coupling%dusfci_cpl(i) = zero
Coupling%dvsfci_cpl(i) = zero
endif
Coupling%dtsfci_cpl(i) = con_cp * rho * hflx3(i,3) ! sensible heat flux over open ocean
Coupling%dqsfci_cpl(i) = con_hvap * rho * evap3(i,3) ! latent heat flux over open ocean
elseif (icy(i) .or. dry(i)) then ! use stress_ocean from sfc_diff for opw component at mixed point
tem1 = max(Diag%q1(i), 1.e-8)
rho = Statein%prsl(i,1) / (con_rd*Diag%t1(i)*(one+con_fvirt*tem1))
if (wind(i) > zero) then
tem = - rho * stress3(i,3) / wind(i)
Coupling%dusfci_cpl(i) = tem * Statein%ugrs(i,1) ! U-momentum flux
Coupling%dvsfci_cpl(i) = tem * Statein%vgrs(i,1) ! V-momentum flux
else
Coupling%dusfci_cpl(i) = zero
Coupling%dvsfci_cpl(i) = zero
endif
Coupling%dtsfci_cpl(i) = con_cp * rho * hflx3(i,3) ! sensible heat flux over open ocean
Coupling%dqsfci_cpl(i) = con_hvap * rho * evap3(i,3) ! latent heat flux over open ocean
! if (lprnt .and. i == ipr) write(0,*)' hflx33=',hflx3(i,3),' evap33=',evap3(i,3), &
! ' con_cp=',con_cp,' rho=',rho,' con_hvap=',con_hvap
else ! use results from PBL scheme for 100% open ocean
Coupling%dusfci_cpl(i) = dusfc1(i)
Coupling%dvsfci_cpl(i) = dvsfc1(i)
Coupling%dtsfci_cpl(i) = dtsfc1(i)
Coupling%dqsfci_cpl(i) = dqsfc1(i)
endif
else ! use results from PBL scheme for 100% open ocean
Coupling%dusfci_cpl(i) = dusfc1(i)
Coupling%dvsfci_cpl(i) = dvsfc1(i)
Coupling%dtsfci_cpl(i) = dtsfc1(i)
Coupling%dqsfci_cpl(i) = dqsfc1(i)
endif

Coupling%dusfc_cpl (i) = Coupling%dusfc_cpl(i) + Coupling%dusfci_cpl(i) * dtf
Expand Down
Loading