diff --git a/cesm/flux_atmocn/shr_flux_mod.F90 b/cesm/flux_atmocn/shr_flux_mod.F90
index 87d8be9d5..9e74abf28 100644
--- a/cesm/flux_atmocn/shr_flux_mod.F90
+++ b/cesm/flux_atmocn/shr_flux_mod.F90
@@ -133,8 +133,8 @@ end subroutine shr_flux_adjust_constants
! Thomas Toniazzo (Bjerknes Centre, Bergen) ”
!===============================================================================
SUBROUTINE flux_atmOcn(logunit, nMax ,zbot ,ubot ,vbot ,thbot , &
- & qbot ,s16O ,sHDO ,s18O ,rbot , &
- & tbot ,us ,vs , &
+ & qbot ,s16O ,sHDO ,s18O ,rbot, &
+ & tbot ,us ,vs, pslv, &
& ts ,mask , seq_flux_atmocn_minwind, &
& sen ,lat ,lwup , &
& r16O, rhdo, r18O, &
@@ -169,6 +169,7 @@ SUBROUTINE flux_atmOcn(logunit, nMax ,zbot ,ubot ,vbot ,thbot , &
real(R8) ,intent(in) :: r18O (nMax) ! ocn H218O tracer ratio/Rstd
real(R8) ,intent(in) :: rbot (nMax) ! atm air density (kg/m^3)
real(R8) ,intent(in) :: tbot (nMax) ! atm T (K)
+ real(R8) ,intent(in) :: pslv (nMax) ! atm sea level pressure(Pa)
real(R8) ,intent(in) :: us (nMax) ! ocn u-velocity (m/s)
real(R8) ,intent(in) :: vs (nMax) ! ocn v-velocity (m/s)
real(R8) ,intent(in) :: ts (nMax) ! ocn temperature (K)
@@ -553,9 +554,22 @@ SUBROUTINE flux_atmOcn(logunit, nMax ,zbot ,ubot ,vbot ,thbot , &
endif
ENDDO
+ else if (ocn_surface_flux_scheme .eq. 2) then
+
+ call flux_atmOcn_UA(logunit,&
+ nMax, zbot, ubot, vbot, thbot, &
+ qbot, s16O, sHDO, s18O, rbot, &
+ tbot, pslv, us, vs, &
+ ts, mask, sen, lat, lwup, &
+ r16O, rhdo, r18O, &
+ evap, evap_16O, evap_HDO, evap_18O, &
+ taux, tauy, tref, qref, &
+ duu10n, ustar_sv, re_sv, ssq_sv, &
+ missval)
+
else
- call shr_sys_abort(subName//" subroutine flux_atmOcn requires ocn_surface_flux_scheme = 0 or 1")
+ call shr_sys_abort(subName//" subroutine flux_atmOcn requires ocn_surface_flux_scheme = 0, 1 or 2")
endif !! ocn_surface_flux_scheme
diff --git a/cime_config/namelist_definition_drv.xml b/cime_config/namelist_definition_drv.xml
index a535a0fa6..f4d366913 100644
--- a/cime_config/namelist_definition_drv.xml
+++ b/cime_config/namelist_definition_drv.xml
@@ -894,7 +894,17 @@
ogrid
-
+
+ integer
+ control
+ MED_attributes
+
+ atm/ocn flux calculation scheme
+
+
+ 0
+
+
real
control
diff --git a/mediator/esmFldsExchange_cesm_mod.F90 b/mediator/esmFldsExchange_cesm_mod.F90
index 9bf8062eb..48ac2a2ed 100644
--- a/mediator/esmFldsExchange_cesm_mod.F90
+++ b/mediator/esmFldsExchange_cesm_mod.F90
@@ -291,6 +291,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
call addmap(fldListFr(compatm)%flds, 'Sa_shum', compocn, mapbilnr, 'one', atm2ocn_map)
call addmap(fldListFr(compatm)%flds, 'Sa_ptem', compocn, mapbilnr, 'one', atm2ocn_map)
call addmap(fldListFr(compatm)%flds, 'Sa_dens', compocn, mapbilnr, 'one', atm2ocn_map)
+ call addmap(fldListFr(compatm)%flds, 'Sa_pslv', compocn, mapbilnr, 'one', atm2ocn_map)
if (fldchk(is_local%wrap%FBImp(compatm,compatm), 'Sa_shum_wiso', rc=rc)) then
call addmap(fldListFr(compatm)%flds, 'Sa_shum_wiso', compocn, mapbilnr, 'one', atm2ocn_map)
end if
diff --git a/mediator/med_phases_aofluxes_mod.F90 b/mediator/med_phases_aofluxes_mod.F90
index 582a622a4..c0c442a7f 100644
--- a/mediator/med_phases_aofluxes_mod.F90
+++ b/mediator/med_phases_aofluxes_mod.F90
@@ -398,6 +398,12 @@ subroutine med_aofluxes_init(gcomp, aoflux_in, aoflux_out, rc)
else
ocn_surface_flux_scheme = 0
end if
+#ifdef CESMCOUPLED
+ if (mastertask) then
+ write(logunit,*)
+ write(logunit,'(a)') trim(subname)//' ocn_surface_flux_scheme is '//trim(cvalue)
+ end if
+#endif
! bottom level potential temperature and/or botom level density
! will need to be computed if not received from the atm
@@ -1050,7 +1056,7 @@ subroutine med_aofluxes_update(gcomp, aoflux_in, aoflux_out, rc)
nMax=aoflux_in%lsize, &
zbot=aoflux_in%zbot, ubot=aoflux_in%ubot, vbot=aoflux_in%vbot, thbot=aoflux_in%thbot, qbot=aoflux_in%shum, &
s16O=aoflux_in%shum_16O, sHDO=aoflux_in%shum_HDO, s18O=aoflux_in%shum_18O, rbot=aoflux_in%dens, &
- tbot=aoflux_in%tbot, us=aoflux_in%uocn, vs=aoflux_in%vocn, ts=aoflux_in%tocn, &
+ tbot=aoflux_in%tbot, us=aoflux_in%uocn, vs=aoflux_in%vocn, pslv=aoflux_in%psfc, ts=aoflux_in%tocn, &
mask=aoflux_in%mask, seq_flux_atmocn_minwind=0.5_r8, &
sen=aoflux_out%sen, lat=aoflux_out%lat, lwup=aoflux_out%lwup, &
r16O=aoflux_in%roce_16O, rhdo=aoflux_in%roce_HDO, r18O=aoflux_in%roce_18O, &
@@ -1507,6 +1513,8 @@ subroutine set_aoflux_in_pointers(fldbun_a, fldbun_o, aoflux_in, lsize, xgrid, r
! Set pointers for aoflux_in attributes
! Note that if computation is on the xgrid, fldbun_a and fldbun_o are both fldbun_x
+ use med_methods_mod , only : FB_fldchk => med_methods_FB_FldChk
+
! input/output variables
type(ESMF_FieldBundle) , intent(inout) :: fldbun_a
type(ESMF_FieldBundle) , intent(inout) :: fldbun_o
@@ -1575,6 +1583,11 @@ subroutine set_aoflux_in_pointers(fldbun_a, fldbun_o, aoflux_in, lsize, xgrid, r
if (chkerr(rc,__LINE__,u_FILE_u)) return
end if
+ if (FB_fldchk(fldbun_a, 'Sa_pslv', rc=rc)) then
+ call fldbun_getfldptr(fldbun_a, 'Sa_pslv', aoflux_in%psfc, xgrid=xgrid, rc=rc)
+ if (chkerr(rc,__LINE__,u_FILE_u)) return
+ end if
+
! if either density or potential temperature are computed, will need bottom level pressure
if (compute_atm_dens .or. compute_atm_thbot) then
call fldbun_getfldptr(fldbun_a, 'Sa_pbot', aoflux_in%pbot, xgrid=xgrid, rc=rc)