Skip to content

Commit

Permalink
Consider surface ocean current in air-sea flux calculation (#755)
Browse files Browse the repository at this point in the history
* Moving nest performance optimization stage 2.

* update atmos_model and FV3GFS_io read performance when io_layout=1,1 and allow one to override data integrity checks in FMS restart logic

* Add the following HAFS ccpp physics suites (@ChunxiZhang-NOAA and @BinLiu-NOAA):
suite_FV3_HAFS_v0_thompson.xml
suite_FV3_HAFS_v0_thompson_nonsst.xml
suite_FV3_HAFS_v0_thompson_noahmp.xml
suite_FV3_HAFS_v0_thompson_noahmp_nonsst.xml

* Update submodule upp, which has the fix for regional latlon grid crossing the prime meridian.

* Only call atmosphere_fill_nest_cpl at the cap driver time steps (coupling time
steps). This is to reduce the overhead introduced by downscaling the coupling
variables from FV3ATM parent to nest.

* Removed reference to unused variable parent_x.

* Update to point submodule ccpp/physics to the feature/hafsv0.3_final branch of
the hafs-community fork.

* FV3-related typedefs changes for the Hurricane PBL options

* Update submodule ccpp/physics, which added the tc_pbl option in the GFS sa-TKE
EDMF PBL scheme for HAFS/hurricane modeling.

* Update to point the support/HAFS branch for upp, ccpp-physics and atmos_cubed_sphere.

* Adding upoff as a namelist parameter

* Update submodule atmos_cubed_sphere, which has updated the time string
in internal tracker output (fort.602, phtcf file).

* fix initialization issue for moving nest grid in debug mode (#622)

* Update submodule atmos_cubed_sphere to point the production/hafs.v1 branch.

* Update submodule upp, which cherry-picked the wind GUST fix from the develop branch.

* Create ESMF field attributes using the same kind as field data values (#618)

* Use 32bit value for 'missing_value' and '_FillValue' attributes

* Update ccpp/suites_not_used/suite_FV3_HAFS_v1* files, needed for the latest sync.

* Update submodule UPP to point to the feature/hafsv2_baseline branch.

* Add a namelist to include ocean current in the computation of air-sea fluxes.

* Change the variable name for zonal ocean current from ssu to usfco.

* Change the variable name for meridional ocean current from ssv to vsfco.

* Update HAFS thompson ccpp suites and move suite_FV3_HAFS_v1_thompson.xml
and suite_FV3_HAFS_v1_thompson_nonsst.xml under ccpp/suites since they
are used by operational HAFS configurations.

* Update usfco and vsfco standard and long names in GFS_typedefs.meta.

* Update standard name for icplocn2atm in ccpp/data/GFS_typedefs.meta.

---------

Co-authored-by: Bin.Liu <[email protected]>
Co-authored-by: William Ramstrom <[email protected]>
Co-authored-by: Rusty.Benson <[email protected]>
Co-authored-by: AndrewHazelton <[email protected]>
Co-authored-by: Biju Thomas <[email protected]>
  • Loading branch information
6 people authored Feb 1, 2024
1 parent ef04de2 commit 8db821c
Show file tree
Hide file tree
Showing 13 changed files with 167 additions and 17 deletions.
2 changes: 1 addition & 1 deletion atmos_cubed_sphere
52 changes: 52 additions & 0 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1977,6 +1977,58 @@ subroutine assign_importdata(jdat, rc)
endif
endif

! get zonal ocean current:
!--------------------------------------------------------------------------
fldname = 'ocn_current_zonal'
if (trim(impfield_name) == trim(fldname)) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex) .and. GFS_control%cplocn2atm) then
!$omp parallel do default(shared) private(i,j,nb,ix)
do j=jsc,jec
do i=isc,iec
nb = Atm_block%blkno(i,j)
ix = Atm_block%ixp(i,j)
GFS_Data(nb)%Sfcprop%usfco(ix) = zero
if (GFS_Data(nb)%Sfcprop%oceanfrac(ix) > zero) then ! ocean points
if(mergeflg(i,j)) then
GFS_Data(nb)%Sfcprop%usfco(ix) = zero
datar8(i,j) = zero
else
GFS_Data(nb)%Sfcprop%usfco(ix) = datar8(i,j)
endif
endif
enddo
enddo
if (mpp_pe() == mpp_root_pe() .and. debug) print *,'get usfco from mediator'
endif
endif

! get meridional ocean current:
!--------------------------------------------------------------------------
fldname = 'ocn_current_merid'
if (trim(impfield_name) == trim(fldname)) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex) .and. GFS_control%cplocn2atm) then
!$omp parallel do default(shared) private(i,j,nb,ix)
do j=jsc,jec
do i=isc,iec
nb = Atm_block%blkno(i,j)
ix = Atm_block%ixp(i,j)
GFS_Data(nb)%Sfcprop%vsfco(ix) = zero
if (GFS_Data(nb)%Sfcprop%oceanfrac(ix) > zero) then ! ocean points
if(mergeflg(i,j)) then
GFS_Data(nb)%Sfcprop%vsfco(ix) = zero
datar8(i,j) = zero
else
GFS_Data(nb)%Sfcprop%vsfco(ix) = datar8(i,j)
endif
endif
enddo
enddo
if (mpp_pe() == mpp_root_pe() .and. debug) print *,'get vsfco from mediator'
endif
endif

! get sea ice fraction: fice or sea ice concentration from the mediator
!-----------------------------------------------------------------------
fldname = 'ice_fraction'
Expand Down
17 changes: 16 additions & 1 deletion ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: soiltype_frac(:,:) => null() !< fractions [0:1] of soil categories
!< [tsea in gbphys.f]
real (kind=kind_phys), pointer :: tsfco (:) => null() !< sst in K
real (kind=kind_phys), pointer :: usfco (:) => null() !< surface zonal current in m s-1
real (kind=kind_phys), pointer :: vsfco (:) => null() !< surface meridional current in m s-1
real (kind=kind_phys), pointer :: tsfcl (:) => null() !< surface land temperature in K
real (kind=kind_phys), pointer :: tisfc (:) => null() !< surface temperature over ice fraction
real (kind=kind_phys), pointer :: tiice(:,:) => null() !< internal ice temperature
Expand Down Expand Up @@ -1315,6 +1317,10 @@ module GFS_typedefs
!< 0=no change
!< 6=areodynamical roughness over water with input 10-m wind
!< 7=slightly decrease Cd for higher wind speed compare to 6
!--- air_sea_flux scheme
integer :: icplocn2atm !< air_sea flux options over ocean:
!< 0=no change
!< l=including ocean current in the computation of air_sea fluxes

!--- potential temperature definition in surface layer physics
logical :: thsfc_loc !< flag for local vs. standard potential temperature
Expand Down Expand Up @@ -2321,6 +2327,8 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
endif

allocate (Sfcprop%tsfc (IM))
allocate (Sfcprop%usfco (IM))
allocate (Sfcprop%vsfco (IM))
allocate (Sfcprop%tsfco (IM))
allocate (Sfcprop%tsfcl (IM))
allocate (Sfcprop%tisfc (IM))
Expand Down Expand Up @@ -2378,6 +2386,8 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
endif

Sfcprop%tsfc = clear_val
Sfcprop%usfco = clear_val
Sfcprop%vsfco = clear_val
Sfcprop%tsfco = clear_val
Sfcprop%tsfcl = clear_val
Sfcprop%tisfc = clear_val
Expand Down Expand Up @@ -3815,6 +3825,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!< 6=areodynamical roughness over water with input 10-m wind
!< 7=slightly decrease Cd for higher wind speed compare to 6
!< negative when cplwav2atm=.true. - i.e. two way wave coupling
integer :: icplocn2atm = 0 !< air_sea_flux options over ocean
!< 0=ocean current is not used in the computation of air_sea fluxes
!< 1=including ocean current in the computation of air_sea fluxes

!--- potential temperature definition in surface layer physics
logical :: thsfc_loc = .true. !< flag for local vs. standard potential temperature
Expand Down Expand Up @@ -4074,7 +4087,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
frac_grid, min_lakeice, min_seaice, min_lake_height, &
ignore_lake, frac_ice, &
!--- surface layer
sfc_z0_type, &
sfc_z0_type, icplocn2atm, &
!--- switch beteeen local and standard potential temperature
thsfc_loc, &
!--- switches in 2-m diagnostics
Expand Down Expand Up @@ -5000,6 +5013,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- surface layer
Model%sfc_z0_type = sfc_z0_type
if (Model%cplwav2atm) Model%sfc_z0_type = -1
Model%icplocn2atm = icplocn2atm

!--- potential temperature reference in sfc layer
Model%thsfc_loc = thsfc_loc
Expand Down Expand Up @@ -6824,6 +6838,7 @@ subroutine control_print(Model)
print *, ' '
print *, 'surface layer options'
print *, ' sfc_z0_type : ', Model%sfc_z0_type
print *, ' icplocn2atm : ', Model%icplocn2atm
print *, ' '
print *, 'vertical diffusion coefficients'
print *, ' xkzm_m : ', Model%xkzm_m
Expand Down
20 changes: 20 additions & 0 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,20 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[usfco]
standard_name = x_ocean_current
long_name = zonal current at ocean surface
units = m s-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[vsfco]
standard_name = y_ocean_current
long_name = meridional current at ocean surface
units = m s-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[tsfcl]
standard_name = surface_skin_temperature_over_land
long_name = surface skin temperature over land
Expand Down Expand Up @@ -5855,6 +5869,12 @@
units = flag
dimensions = ()
type = integer
[icplocn2atm]
standard_name = control_for_air_sea_flux_computation_over_water
long_name = air-sea flux option
units = 1
dimensions = ()
type = integer
[xkzminv]
standard_name = max_atmosphere_heat_diffusivity_due_to_background
long_name = maximum background value of heat diffusivity
Expand Down
22 changes: 22 additions & 0 deletions ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3932,6 +3932,28 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%tsfc(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'usfco'
ExtDiag(idx)%desc = 'surface zonal current'
ExtDiag(idx)%unit = 'm/s'
ExtDiag(idx)%mod_name = 'gfs_sfc'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%usfco(:)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'vsfco'
ExtDiag(idx)%desc = 'surface meridional current'
ExtDiag(idx)%unit = 'm/s'
ExtDiag(idx)%mod_name = 'gfs_sfc'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => Sfcprop(nb)%vsfco(:)
enddo

if (Model%frac_grid) then
do num = 1,Model%kice
write (xtra,'(i1)') num
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw_pre</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
Expand Down Expand Up @@ -61,7 +60,6 @@
<scheme>unified_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
<scheme>ozphys_2015</scheme>
<scheme>h2ophys</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
Expand All @@ -79,7 +77,7 @@
<scheme>mp_thompson_post</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
<scheme>phys_tend</scheme>
<scheme>GFS_physics_post</scheme>
</subcycle>
</group>
<group name="stochastics">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw_pre</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
Expand Down Expand Up @@ -59,7 +58,6 @@
<scheme>unified_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
<scheme>ozphys_2015</scheme>
<scheme>h2ophys</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
Expand All @@ -77,7 +75,7 @@
<scheme>mp_thompson_post</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
<scheme>phys_tend</scheme>
<scheme>GFS_physics_post</scheme>
</subcycle>
</group>
<group name="stochastics">
Expand Down
4 changes: 1 addition & 3 deletions ccpp/suites_not_used/suite_FV3_HAFS_v1_thompson_noahmp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw_pre</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
Expand Down Expand Up @@ -61,7 +60,6 @@
<scheme>unified_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
<scheme>ozphys_2015</scheme>
<scheme>h2ophys</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
Expand All @@ -79,7 +77,7 @@
<scheme>mp_thompson_post</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
<scheme>phys_tend</scheme>
<scheme>GFS_physics_post</scheme>
</subcycle>
</group>
<group name="stochastics">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw_pre</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
Expand Down Expand Up @@ -59,7 +58,6 @@
<scheme>unified_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
<scheme>ozphys_2015</scheme>
<scheme>h2ophys</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
Expand All @@ -77,7 +75,7 @@
<scheme>mp_thompson_post</scheme>
<scheme>GFS_MP_generic_post</scheme>
<scheme>maximum_hourly_diagnostics</scheme>
<scheme>phys_tend</scheme>
<scheme>GFS_physics_post</scheme>
</subcycle>
</group>
<group name="stochastics">
Expand Down
4 changes: 3 additions & 1 deletion cpl/module_cplfields.F90
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ module module_cplfields
FieldInfo("t2m ", "s") ]

! Import Fields ----------------------------------------
integer, public, parameter :: NimportFields = 62
integer, public, parameter :: NimportFields = 64
logical, public :: importFieldsValid(NimportFields)
type(ESMF_Field), target, public :: importFields(NimportFields)

Expand All @@ -179,6 +179,8 @@ module module_cplfields
FieldInfo("inst_ice_vis_dir_albedo ", "s"), &
FieldInfo("wave_z0_roughness_length ", "s"), &
FieldInfo("inst_tracer_diag_aod ", "s"), &
FieldInfo("ocn_current_zonal ", "s"), &
FieldInfo("ocn_current_merid ", "s"), &

! For receiving fluxes from mediator
FieldInfo("stress_on_air_ocn_zonal ", "s"), &
Expand Down
Loading

0 comments on commit 8db821c

Please sign in to comment.