From b7611317232671253b8ce85c268276a69dcc0fea Mon Sep 17 00:00:00 2001 From: Zhihong Tan Date: Thu, 21 Sep 2023 17:13:09 -0400 Subject: [PATCH 1/4] ADDED SURFACE VARIABLES REQUIRED BY NCEP TKE-EDMF The shflx, lhflx, wind, thv_atm, thv_surf variables are passed from the surface coupler to the atmospheric model as required by the NCEP TKE-EDMF scheme. And some useful diagnostics are added to output the surface fluxes before the implicit surface coupling. --- full/atm_land_ice_flux_exchange.F90 | 163 ++++++++++++++++++++++++++++ shared/surface_flux.F90 | 18 ++- 2 files changed, 180 insertions(+), 1 deletion(-) diff --git a/full/atm_land_ice_flux_exchange.F90 b/full/atm_land_ice_flux_exchange.F90 index 45323dc1..d1e48e33 100644 --- a/full/atm_land_ice_flux_exchange.F90 +++ b/full/atm_land_ice_flux_exchange.F90 @@ -109,12 +109,17 @@ module atm_land_ice_flux_exchange_mod id_u_star, id_b_star, id_q_star, id_u_flux, id_v_flux, & id_t_surf, id_t_flux, id_r_flux, id_q_flux, id_slp, & id_t_atm, id_u_atm, id_v_atm, id_wind, & + id_thv_atm, id_thv_surf, & ! ZNT id_t_ref, id_rh_ref, id_u_ref, id_v_ref, id_wind_ref, & id_del_h, id_del_m, id_del_q, id_rough_scale, & id_t_ca, id_q_surf, id_q_atm, id_z_atm, id_p_atm, id_gust, & id_t_ref_land, id_rh_ref_land, id_u_ref_land, id_v_ref_land, & id_q_ref, id_q_ref_land, id_q_flux_land, id_rh_ref_cmip, & id_hussLut_land, id_tasLut_land, id_t_flux_land + integer :: id_t_surf_in, id_t_ca_in, id_q_surf_in, & ! ZNT 09/03/2020 + id_q_surf_raw, id_t_atm_in, id_q_atm_in, & + id_t_surf_out, id_t_ca_out, id_q_surf_out, id_t_atm_delt, id_q_atm_delt, & + id_t_flux_first, id_t_flux_second, id_q_flux_first, id_q_flux_second integer :: id_co2_atm_dvmr, id_co2_surf_dvmr ! 2017/08/15 jgj added integer :: id_co2_bot, id_co2_flux_pcair_atm, id_o2_flux_pcair_atm @@ -571,6 +576,9 @@ subroutine atm_land_ice_flux_exchange_init(Time, Atm, Land, Ice, atmos_ice_bound allocate( land_ice_atmos_boundary%shflx(is:ie,js:je) )!miz allocate( land_ice_atmos_boundary%lhflx(is:ie,js:je) )!miz #endif + allocate( land_ice_atmos_boundary%wind(is:ie,js:je) ) !ZNT + allocate( land_ice_atmos_boundary%thv_atm(is:ie,js:je) ) !ZNT + allocate( land_ice_atmos_boundary%thv_surf(is:ie,js:je) )!ZNT allocate( land_ice_atmos_boundary%rough_mom(is:ie,js:je) ) allocate( land_ice_atmos_boundary%frac_open_sea(is:ie,js:je) ) ! initialize boundary values for override experiments (mjh) @@ -598,6 +606,9 @@ subroutine atm_land_ice_flux_exchange_init(Time, Atm, Land, Ice, atmos_ice_bound land_ice_atmos_boundary%shflx=0.0 land_ice_atmos_boundary%lhflx=0.0 #endif + land_ice_atmos_boundary%wind=0.0 ! ZNT + land_ice_atmos_boundary%thv_atm=0.0 ! ZNT + land_ice_atmos_boundary%thv_surf=0.0 ! ZNT land_ice_atmos_boundary%rough_mom=0.01 land_ice_atmos_boundary%frac_open_sea=0.0 @@ -679,6 +690,7 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar ex_rough_mom, ex_rough_heat, ex_rough_moist, & ex_rough_scale,& ex_q_star, & + ex_thv_atm, ex_thv_surf, & ! ZNT ex_cd_q, & ex_ref, ex_ref_u, ex_ref_v, ex_u10, & ex_ref2, & @@ -1128,6 +1140,7 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar !$OMP ex_gust,ex_flux_t,ex_flux_tr,ex_flux_lw, & !$OMP ex_flux_u,ex_flux_v,ex_cd_m,ex_cd_t,ex_cd_q, & !$OMP ex_wind,ex_u_star,ex_b_star,ex_q_star, & + !$OMP ex_thv_atm,ex_thv_surf, & ! ZNT !$OMP ex_dhdt_surf,ex_dedt_surf,ex_dfdtr_surf, & !$OMP ex_drdt_surf,ex_dhdt_atm,ex_dfdtr_atm, & !$OMP ex_dtaudu_atm, ex_dtaudv_atm,dt,ex_land, & @@ -1145,6 +1158,7 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar ex_flux_t(is:ie), ex_flux_tr(is:ie,isphum), ex_flux_lw(is:ie), ex_flux_u(is:ie), ex_flux_v(is:ie), & ex_cd_m(is:ie), ex_cd_t(is:ie), ex_cd_q(is:ie), & ex_wind(is:ie), ex_u_star(is:ie), ex_b_star(is:ie), ex_q_star(is:ie), & + ex_thv_atm(is:ie), ex_thv_surf(is:ie), & ! ZNT ex_dhdt_surf(is:ie), ex_dedt_surf(is:ie), ex_dfdtr_surf(is:ie,isphum), ex_drdt_surf(is:ie), & ex_dhdt_atm(is:ie), ex_dfdtr_atm(is:ie,isphum), ex_dtaudu_atm(is:ie), ex_dtaudv_atm(is:ie), & dt, & @@ -1164,6 +1178,7 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar ex_flux_t, ex_flux_tr(:,isphum), ex_flux_lw, ex_flux_u, ex_flux_v, & ex_cd_m, ex_cd_t, ex_cd_q, & ex_wind, ex_u_star, ex_b_star, ex_q_star, & + ex_thv_atm, ex_thv_surf, & ! ZNT ex_dhdt_surf, ex_dedt_surf, ex_dfdtr_surf(:,isphum), ex_drdt_surf, & ex_dhdt_atm, ex_dfdtr_atm(:,isphum), ex_dtaudu_atm, ex_dtaudv_atm, & dt, & @@ -1173,6 +1188,38 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar endif #endif +! ZNT 09/03/2020: some diagnoses before implicit update + if ( id_t_surf_in > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_t_surf, xmap_sfc) + used = send_data ( id_t_surf_in, diag_atm, Time ) + endif + if ( id_t_ca_in > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_t_ca, xmap_sfc) + used = send_data ( id_t_ca_in, diag_atm, Time ) + endif + if ( id_t_atm_in > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_t_atm, xmap_sfc) + used = send_data ( id_t_atm_in, diag_atm, Time ) + endif + if ( id_q_atm_in > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_tr_atm(:,isphum), xmap_sfc) + used = send_data ( id_q_atm_in, diag_atm, Time ) + endif + if ( id_q_surf_in > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_tr_surf(:,isphum), xmap_sfc) + used = send_data ( id_q_surf_in, diag_atm, Time ) + endif + if ( id_t_flux_first > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_flux_t, xmap_sfc) + used = send_data ( id_t_flux_first, diag_atm, Time ) + endif + if ( id_q_flux_first > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_flux_tr(:,isphum), xmap_sfc) + used = send_data ( id_q_flux_first, diag_atm, Time ) + endif +! ZNT 09/03/2020: end of added diagnoses + + ! call mpp_clock_end(fluxClock) zrefm = 10.0 zrefh = z_ref_heat @@ -1394,6 +1441,14 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar call get_from_xgrid (Land_Ice_Atmos_Boundary%u_ref, 'ATM', ex_ref_u , xmap_sfc, complete=.false.) !bqx call get_from_xgrid (Land_Ice_Atmos_Boundary%v_ref, 'ATM', ex_ref_v , xmap_sfc, complete=.true.) !bqx +#ifndef use_AM3_physics + call get_from_xgrid (Land_Ice_Atmos_Boundary%shflx, 'ATM', ex_flux_t , xmap_sfc) !miz; ZNT 04/29/2020 + call get_from_xgrid (Land_Ice_Atmos_Boundary%lhflx, 'ATM', ex_flux_tr(:,isphum), xmap_sfc)!miz; ZNT 04/29/2020 +#endif + call get_from_xgrid (Land_Ice_Atmos_Boundary%wind, 'ATM', ex_wind , xmap_sfc) ! ZNT 04/29/2020 + call get_from_xgrid (Land_Ice_Atmos_Boundary%thv_atm, 'ATM', ex_thv_atm , xmap_sfc) ! ZNT 05/03/2020 + call get_from_xgrid (Land_Ice_Atmos_Boundary%thv_surf, 'ATM', ex_thv_surf , xmap_sfc) ! ZNT 05/03/2020 + #ifdef use_AM3_physics if (do_forecast) then call get_from_xgrid (Ice%t_surf, 'OCN', ex_t_surf, xmap_sfc) @@ -1580,6 +1635,10 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar !------- moisture scale ----------- used = send_data ( id_q_star, Land_Ice_Atmos_Boundary%q_star, Time ) + !------- ZNT: surf and atm virtual potential temperature ----------- + used = send_data ( id_thv_atm, Land_Ice_Atmos_Boundary%thv_atm, Time ) + used = send_data ( id_thv_surf, Land_Ice_Atmos_Boundary%thv_surf, Time ) + !----------------------------------------------------------------------- !------ diagnostics for fields at bottom atmospheric level ------ @@ -1967,6 +2026,8 @@ subroutine flux_down_from_atmos (Time, Atm, Land, Ice, Atmos_boundary, Land_boun integer :: tr, n, m ! tracer indices integer :: is, ie, l, i + real, dimension(size(Atmos_boundary%dt_t,1),size(Atmos_Boundary%dt_t,2)) :: diag_atm ! ZNT + !Balaji call mpp_clock_begin(cplClock) call mpp_clock_begin(fluxAtmDnClock) @@ -2629,6 +2690,20 @@ subroutine flux_down_from_atmos (Time, Atm, Land, Ice, Atmos_boundary, Land_boun used = send_data ( id_tauv, -Atmos_boundary%v_flux, Time ) !Balaji + + +! ZNT 09/03/2020: some diagnoses between implicit update of ATM and SFC + if ( id_t_flux_second > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_flux_t, xmap_sfc) + used = send_data ( id_t_flux_second, diag_atm, Time ) + endif + if ( id_q_flux_second > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_flux_tr(:,isphum), xmap_sfc) + used = send_data ( id_q_flux_second, diag_atm, Time ) + endif +! ZNT 09/03/2020: end of added diagnoses + + call mpp_clock_end(fluxAtmDnClock) call mpp_clock_end(cplClock) !======================================================================= @@ -2848,8 +2923,12 @@ subroutine flux_up_to_atmos ( Time, Land, Ice, Land_Ice_Atmos_Boundary, Land_bou do i = is, ie if(ex_avail(i) .and. (.not.ex_land(i))) then ! note that in this region (over ocean) ex_dt_t_surf == ex_dt_t_ca + ! Note ZNT 09/03/2020: Here the value ex_tr_surf_new(i,isphum) should be updated for analysis + ! workaround for now: calculate q_surf_new from updated flux. ex_delta_tr_n(i,isphum) = ex_f_tr_delt_n(i,isphum) + ex_dt_t_surf(i) * ex_e_q_n(i) ex_flux_tr(i,isphum) = ex_flux_tr(i,isphum) + ex_dt_t_surf(i) * ex_dedt_surf(i) + ex_tr_surf_new(i,isphum) = ex_tr_surf(i,isphum) + & + ex_dt_t_surf(i) * ex_dedt_surf(i) / (-ex_dfdtr_atm(i,isphum)) endif enddo enddo @@ -2885,6 +2964,30 @@ subroutine flux_up_to_atmos ( Time, Land, Ice, Land_Ice_Atmos_Boundary, Land_bou !======================================================================= !-------------------- diagnostics section ------------------------------ +! ZNT 09/03/2020: some diagnoses after implicit update + if ( id_t_atm_delt > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_delta_t_n, xmap_sfc) + used = send_data ( id_t_atm_delt, diag_atm, Time ) + endif + if ( id_q_atm_delt > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_delta_tr_n(:,isphum), xmap_sfc) + used = send_data ( id_q_atm_delt, diag_atm, Time ) + endif + if ( id_t_surf_out > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_t_surf_new, xmap_sfc) + used = send_data ( id_t_surf_out, diag_atm, Time ) + endif + if ( id_t_ca_out > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_t_ca_new, xmap_sfc) + used = send_data ( id_t_ca_out, diag_atm, Time ) + endif + if ( id_q_surf_out > 0 ) then + call get_from_xgrid (diag_atm, 'ATM', ex_tr_surf_new(:,isphum), xmap_sfc) + used = send_data ( id_q_surf_out, diag_atm, Time ) + endif + +! ZNT 09/03/2020: end of added diagnoses + !------- new surface temperature ----------- #ifdef use_AM3_physics if ( id_t_surf > 0 ) then @@ -3432,6 +3535,14 @@ subroutine diag_field_init ( Time, atmos_axes, land_axes, land_pe ) register_diag_field ( mod_name, 'q_star', atmos_axes, Time, & 'moisture scale', 'kg water/kg air' ) + id_thv_atm = & ! ZNT + register_diag_field ( mod_name, 'thv_atm', atmos_axes, Time, & + 'surface air virtual potential temperature', 'K') + + id_thv_surf = & ! ZNT + register_diag_field ( mod_name, 'thv_surf', atmos_axes, Time, & + 'surface virtual potential temperature', 'K') + id_u_flux = & register_diag_field ( mod_name, 'tau_x', atmos_axes, Time, & 'zonal wind stress', 'pa' ) @@ -3530,6 +3641,58 @@ subroutine diag_field_init ( Time, atmos_axes, land_axes, land_pe ) register_diag_field ( mod_name, 'del_q', atmos_axes, Time, & 'ref height interp factor for moisture','none' ) +! ZNT 09/03/2020: additional output fields + id_t_surf_in = & + register_diag_field ( mod_name, 't_surf_in', atmos_axes, Time, & + 'surface temperature before surface exchange', 'deg_k', & + range=trange ) + id_t_ca_in = & + register_diag_field ( mod_name, 't_ca_in', atmos_axes, Time, & + 'canopy air temperature before surface exchange', 'deg_k', & + range=trange ) + id_q_surf_in = & + register_diag_field ( mod_name, 'q_surf_in', atmos_axes, Time, & + 'surface specific humidity before surface exchange', 'kg/kg') + id_q_surf_raw = & + register_diag_field ( mod_name, 'q_surf_raw', atmos_axes, Time, & + 'surface specific humidity, raw input', 'kg/kg') + id_t_atm_in = & + register_diag_field ( mod_name, 't_atm_in', atmos_axes, Time, & + 'temperature at btm level before surface exchange', 'deg_k', & + range=trange ) + id_q_atm_in = & + register_diag_field ( mod_name, 'q_atm_in', atmos_axes, Time, & + 'specific humidity at btm level before surface exchange', 'kg/kg') + id_t_surf_out = & + register_diag_field ( mod_name, 't_surf_out', atmos_axes, Time, & + 'surface temperature after surface exchange', 'deg_k', & + range=trange ) + id_t_ca_out = & + register_diag_field ( mod_name, 't_ca_out', atmos_axes, Time, & + 'canopy air temperature after surface exchange', 'deg_k', & + range=trange ) + id_q_surf_out = & + register_diag_field ( mod_name, 'q_surf_out', atmos_axes, Time, & + 'surface specific humidity after surface exchange', 'kg/kg') + id_t_atm_delt = & + register_diag_field ( mod_name, 't_atm_delt', atmos_axes, Time, & + 'temperature change at btm level during surface exchange', 'deg_k', & + range=trange ) + id_q_atm_delt = & + register_diag_field ( mod_name, 'q_atm_delt', atmos_axes, Time, & + 'specific humidity change at btm level during surface exchange', 'kg/kg') + id_t_flux_first = & + register_diag_field ( mod_name, 'shflx_first', atmos_axes, Time, & + 'sensible heat flux, explicit', 'w/m2' ) + id_q_flux_first = register_diag_field( mod_name, 'evap_first', atmos_axes, Time, & + 'evaporation rate, explicit', 'kg/m2/s' ) + id_t_flux_second = & + register_diag_field ( mod_name, 'shflx_second', atmos_axes, Time, & + 'sensible heat flux, after atm update', 'w/m2' ) + id_q_flux_second = register_diag_field( mod_name, 'evap_second', atmos_axes, Time, & + 'evaporation rate, after atm update', 'kg/m2/s' ) +! ZNT 09/03/2020: end of added output fields + if( land_pe ) then ! set the default filter (for area and subsampling) for consequent calls to ! register_tiled_diag_field diff --git a/shared/surface_flux.F90 b/shared/surface_flux.F90 index b51a0503..e7a2dff9 100644 --- a/shared/surface_flux.F90 +++ b/shared/surface_flux.F90 @@ -210,6 +210,7 @@ subroutine surface_flux_1d ( & flux_t, flux_q, flux_r, flux_u, flux_v, & cd_m, cd_t, cd_q, & w_atm, u_star, b_star, q_star, & + thv_atm, thv_surf, & ! ZNT 05/03/2020 dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm, dtaudv_atm, & dt, land, seawater, avail ) @@ -250,6 +251,8 @@ subroutine surface_flux_1d ( & u_star, & !< Turbulent velocity scale b_star, & !< Turbulent buoyant scale q_star, & !< Turbulent moisture scale + thv_atm, & ! ZNT 05/03/2020 + thv_surf, & ! ZNT 05/03/2020 cd_m, & !< Momentum exchange coefficient cd_t, & ! Heat exchange coefficient cd_q !< Moisture exchange coefficient @@ -262,7 +265,7 @@ subroutine surface_flux_1d ( & ! ---- local vars ---------------------------------------------------------- real, dimension(size(t_atm(:))) :: & - thv_atm, th_atm, tv_atm, thv_surf, & + th_atm, tv_atm, & ! ZNT 05/03/2020: removed thv_atm and thv_surf e_sat, e_sat1, q_sat, q_sat1, p_ratio, & t_surf0, t_surf1, u_dif, v_dif, & rho_drag, drag_t, drag_m, drag_q, rho, & @@ -448,6 +451,8 @@ subroutine surface_flux_1d ( & q_star = 0.0 q_surf = 0.0 w_atm = 0.0 + thv_atm = 0.0 ! ZNT 05/03/2020 + thv_surf = 0.0 ! ZNT 05/03/2020 endwhere ! calculate d(stress component)/d(atmos wind component) @@ -477,6 +482,7 @@ subroutine surface_flux_0d ( & flux_t_0, flux_q_0, flux_r_0, flux_u_0, flux_v_0, & cd_m_0, cd_t_0, cd_q_0, & w_atm_0, u_star_0, b_star_0, q_star_0, & + thv_atm_0, thv_surf_0, & ! ZNT 05/03/2020 dhdt_surf_0, dedt_surf_0, dedq_surf_0, drdt_surf_0, & dhdt_atm_0, dedq_atm_0, dtaudu_atm_0, dtaudv_atm_0, & dt, land_0, seawater_0, avail_0 ) @@ -518,6 +524,8 @@ subroutine surface_flux_0d ( & u_star_0, & !< Turbulent velocity scale b_star_0, & !< Turbulent buoyant scale q_star_0, & !< Turbulent moisture scale + thv_atm_0, & ! ZNT 05/03/2020 + thv_surf_0, & ! ZNT 05/03/2020 cd_m_0, & !< Momentum exchange coefficient cd_t_0, & ! Heat exchange coefficient cd_q_0 !< Moisture exchange coefficient @@ -536,6 +544,7 @@ subroutine surface_flux_0d ( & dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm,dtaudv_atm, & w_atm, u_star, b_star, q_star, & + thv_atm, thv_surf, & ! ZNT 05/03/2020 cd_m, cd_t, cd_q real, dimension(1) :: q_surf @@ -571,6 +580,7 @@ subroutine surface_flux_0d ( & flux_t, flux_q, flux_r, flux_u, flux_v, & cd_m, cd_t, cd_q, & w_atm, u_star, b_star, q_star, & + thv_atm, thv_surf, & ! ZNT 05/03/2020 dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm, dtaudv_atm, & dt, land, seawater, avail ) @@ -593,6 +603,8 @@ subroutine surface_flux_0d ( & b_star_0 = b_star(1) q_star_0 = q_star(1) q_surf_0 = q_surf(1) + thv_atm_0 = thv_atm(1) ! ZNT 05/03/2020 + thv_surf_0 = thv_surf(1) ! ZNT 05/03/2020 cd_m_0 = cd_m(1) cd_t_0 = cd_t(1) cd_q_0 = cd_q(1) @@ -607,6 +619,7 @@ subroutine surface_flux_2d ( & flux_t, flux_q, flux_r, flux_u, flux_v, & cd_m, cd_t, cd_q, & w_atm, u_star, b_star, q_star, & + thv_atm, thv_surf, & ! ZNT 05/03/2020 dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm, dtaudv_atm, & dt, land, seawater, avail ) @@ -648,6 +661,8 @@ subroutine surface_flux_2d ( & u_star, & !< Turbulent velocity scale b_star, & !< Turbulent buoyant scale q_star, & !< Turbulent moisture scale + thv_atm, & ! ZNT 05/03/2020 + thv_surf, & ! ZNT 05/03/2020 cd_m, & !< Momentum exchange coefficient cd_t, & ! Heat exchange coefficient cd_q !< Moisture exchange coefficient @@ -666,6 +681,7 @@ subroutine surface_flux_2d ( & flux_t(:,j), flux_q(:,j), flux_r(:,j), flux_u(:,j), flux_v(:,j), & cd_m(:,j), cd_t(:,j), cd_q(:,j), & w_atm(:,j), u_star(:,j), b_star(:,j), q_star(:,j), & + thv_atm(:,j), thv_surf(:,j), & ! ZNT 05/03/2020 dhdt_surf(:,j), dedt_surf(:,j), dedq_surf(:,j), drdt_surf(:,j), & dhdt_atm(:,j), dedq_atm(:,j), dtaudu_atm(:,j), dtaudv_atm(:,j), & dt, land(:,j), seawater(:,j), avail(:,j) ) From 3b17e21fb1b41a837a02afb3d09e58a1cbcf226e Mon Sep 17 00:00:00 2001 From: Zhihong Tan Date: Fri, 22 Sep 2023 14:32:01 -0400 Subject: [PATCH 2/4] REMOVED THE ADDED DIAG FOR EXPLICIT SFLX The added diagnostics for surface fluxes before the implcit surface coupling have been removed to minimize the changes from the original codes. --- full/atm_land_ice_flux_exchange.F90 | 132 ---------------------------- 1 file changed, 132 deletions(-) diff --git a/full/atm_land_ice_flux_exchange.F90 b/full/atm_land_ice_flux_exchange.F90 index 5eac0a37..0dcdff70 100644 --- a/full/atm_land_ice_flux_exchange.F90 +++ b/full/atm_land_ice_flux_exchange.F90 @@ -116,10 +116,6 @@ module atm_land_ice_flux_exchange_mod id_t_ref_land, id_rh_ref_land, id_u_ref_land, id_v_ref_land, & id_q_ref, id_q_ref_land, id_q_flux_land, id_rh_ref_cmip, & id_hussLut_land, id_tasLut_land, id_t_flux_land - integer :: id_t_surf_in, id_t_ca_in, id_q_surf_in, & ! ZNT 09/03/2020 - id_q_surf_raw, id_t_atm_in, id_q_atm_in, & - id_t_surf_out, id_t_ca_out, id_q_surf_out, id_t_atm_delt, id_q_atm_delt, & - id_t_flux_first, id_t_flux_second, id_q_flux_first, id_q_flux_second integer :: id_co2_atm_dvmr, id_co2_surf_dvmr ! 2017/08/15 jgj added integer :: id_co2_bot, id_co2_flux_pcair_atm, id_o2_flux_pcair_atm @@ -1189,37 +1185,6 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar endif #endif -! ZNT 09/03/2020: some diagnoses before implicit update - if ( id_t_surf_in > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_t_surf, xmap_sfc) - used = fms_diag_send_data ( id_t_surf_in, diag_atm, Time ) - endif - if ( id_t_ca_in > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_t_ca, xmap_sfc) - used = fms_diag_send_data ( id_t_ca_in, diag_atm, Time ) - endif - if ( id_t_atm_in > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_t_atm, xmap_sfc) - used = fms_diag_send_data ( id_t_atm_in, diag_atm, Time ) - endif - if ( id_q_atm_in > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_tr_atm(:,isphum), xmap_sfc) - used = fms_diag_send_data ( id_q_atm_in, diag_atm, Time ) - endif - if ( id_q_surf_in > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_tr_surf(:,isphum), xmap_sfc) - used = fms_diag_send_data ( id_q_surf_in, diag_atm, Time ) - endif - if ( id_t_flux_first > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_flux_t, xmap_sfc) - used = fms_diag_send_data ( id_t_flux_first, diag_atm, Time ) - endif - if ( id_q_flux_first > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_flux_tr(:,isphum), xmap_sfc) - used = fms_diag_send_data ( id_q_flux_first, diag_atm, Time ) - endif -! ZNT 09/03/2020: end of added diagnoses - ! call mpp_clock_end(fluxClock) zrefm = 10.0 @@ -2027,8 +1992,6 @@ subroutine flux_down_from_atmos (Time, Atm, Land, Ice, Atmos_boundary, Land_boun integer :: tr, n, m ! tracer indices integer :: is, ie, l, i - real, dimension(size(Atmos_boundary%dt_t,1),size(Atmos_Boundary%dt_t,2)) :: diag_atm ! ZNT - !Balaji call fms_mpp_clock_begin(cplClock) call fms_mpp_clock_begin(fluxAtmDnClock) @@ -2691,19 +2654,6 @@ subroutine flux_down_from_atmos (Time, Atm, Land, Ice, Atmos_boundary, Land_boun used = fms_diag_send_data ( id_tauv, -Atmos_boundary%v_flux, Time ) !Balaji - - -! ZNT 09/03/2020: some diagnoses between implicit update of ATM and SFC - if ( id_t_flux_second > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_flux_t, xmap_sfc) - used = fms_diag_send_data ( id_t_flux_second, diag_atm, Time ) - endif - if ( id_q_flux_second > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_flux_tr(:,isphum), xmap_sfc) - used = fms_diag_send_data ( id_q_flux_second, diag_atm, Time ) - endif -! ZNT 09/03/2020: end of added diagnoses - call fms_mpp_clock_end(fluxAtmDnClock) call fms_mpp_clock_end(cplClock) !======================================================================= @@ -2923,12 +2873,8 @@ subroutine flux_up_to_atmos ( Time, Land, Ice, Land_Ice_Atmos_Boundary, Land_bou do i = is, ie if(ex_avail(i) .and. (.not.ex_land(i))) then ! note that in this region (over ocean) ex_dt_t_surf == ex_dt_t_ca - ! Note ZNT 09/03/2020: Here the value ex_tr_surf_new(i,isphum) should be updated for analysis - ! workaround for now: calculate q_surf_new from updated flux. ex_delta_tr_n(i,isphum) = ex_f_tr_delt_n(i,isphum) + ex_dt_t_surf(i) * ex_e_q_n(i) ex_flux_tr(i,isphum) = ex_flux_tr(i,isphum) + ex_dt_t_surf(i) * ex_dedt_surf(i) - ex_tr_surf_new(i,isphum) = ex_tr_surf(i,isphum) + & - ex_dt_t_surf(i) * ex_dedt_surf(i) / (-ex_dfdtr_atm(i,isphum)) endif enddo enddo @@ -2964,30 +2910,6 @@ subroutine flux_up_to_atmos ( Time, Land, Ice, Land_Ice_Atmos_Boundary, Land_bou !======================================================================= !-------------------- diagnostics section ------------------------------ -! ZNT 09/03/2020: some diagnoses after implicit update - if ( id_t_atm_delt > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_delta_t_n, xmap_sfc) - used = fms_diag_send_data ( id_t_atm_delt, diag_atm, Time ) - endif - if ( id_q_atm_delt > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_delta_tr_n(:,isphum), xmap_sfc) - used = fms_diag_send_data ( id_q_atm_delt, diag_atm, Time ) - endif - if ( id_t_surf_out > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_t_surf_new, xmap_sfc) - used = fms_diag_send_data ( id_t_surf_out, diag_atm, Time ) - endif - if ( id_t_ca_out > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_t_ca_new, xmap_sfc) - used = fms_diag_send_data ( id_t_ca_out, diag_atm, Time ) - endif - if ( id_q_surf_out > 0 ) then - call fms_xgrid_get_from_xgrid (diag_atm, 'ATM', ex_tr_surf_new(:,isphum), xmap_sfc) - used = fms_diag_send_data ( id_q_surf_out, diag_atm, Time ) - endif - -! ZNT 09/03/2020: end of added diagnoses - !------- new surface temperature ----------- #ifdef use_AM3_physics if ( id_t_surf > 0 ) then @@ -3641,60 +3563,6 @@ subroutine diag_field_init ( Time, atmos_axes, land_axes, land_pe ) fms_diag_register_diag_field ( mod_name, 'del_q', atmos_axes, Time, & 'ref height interp factor for moisture','none' ) -! ZNT 09/03/2020: additional output fields - id_t_surf_in = & - fms_diag_register_diag_field ( mod_name, 't_surf_in', atmos_axes, Time, & - 'surface temperature before surface exchange', 'deg_k', & - range=trange ) - id_t_ca_in = & - fms_diag_register_diag_field ( mod_name, 't_ca_in', atmos_axes, Time, & - 'canopy air temperature before surface exchange', 'deg_k', & - range=trange ) - id_q_surf_in = & - fms_diag_register_diag_field ( mod_name, 'q_surf_in', atmos_axes, Time, & - 'surface specific humidity before surface exchange', 'kg/kg') - id_q_surf_raw = & - fms_diag_register_diag_field ( mod_name, 'q_surf_raw', atmos_axes, Time, & - 'surface specific humidity, raw input', 'kg/kg') - id_t_atm_in = & - fms_diag_register_diag_field ( mod_name, 't_atm_in', atmos_axes, Time, & - 'temperature at btm level before surface exchange', 'deg_k', & - range=trange ) - id_q_atm_in = & - fms_diag_register_diag_field ( mod_name, 'q_atm_in', atmos_axes, Time, & - 'specific humidity at btm level before surface exchange', 'kg/kg') - id_t_surf_out = & - fms_diag_register_diag_field ( mod_name, 't_surf_out', atmos_axes, Time, & - 'surface temperature after surface exchange', 'deg_k', & - range=trange ) - id_t_ca_out = & - fms_diag_register_diag_field ( mod_name, 't_ca_out', atmos_axes, Time, & - 'canopy air temperature after surface exchange', 'deg_k', & - range=trange ) - id_q_surf_out = & - fms_diag_register_diag_field ( mod_name, 'q_surf_out', atmos_axes, Time, & - 'surface specific humidity after surface exchange', 'kg/kg') - id_t_atm_delt = & - fms_diag_register_diag_field ( mod_name, 't_atm_delt', atmos_axes, Time, & - 'temperature change at btm level during surface exchange', 'deg_k', & - range=trange ) - id_q_atm_delt = & - fms_diag_register_diag_field ( mod_name, 'q_atm_delt', atmos_axes, Time, & - 'specific humidity change at btm level during surface exchange', 'kg/kg') - id_t_flux_first = & - fms_diag_register_diag_field ( mod_name, 'shflx_first', atmos_axes, Time, & - 'sensible heat flux, explicit', 'w/m2' ) - id_q_flux_first = & - fms_diag_register_diag_field( mod_name, 'evap_first', atmos_axes, Time, & - 'evaporation rate, explicit', 'kg/m2/s' ) - id_t_flux_second = & - fms_diag_register_diag_field ( mod_name, 'shflx_second', atmos_axes, Time, & - 'sensible heat flux, after atm update', 'w/m2' ) - id_q_flux_second = & - fms_diag_register_diag_field( mod_name, 'evap_second', atmos_axes, Time, & - 'evaporation rate, after atm update', 'kg/m2/s' ) -! ZNT 09/03/2020: end of added output fields - if( land_pe ) then ! set the default filter (for area and subsampling) for consequent calls to ! register_tiled_diag_field From 59c663687295ec0dbe1d23b35e86a482555e931a Mon Sep 17 00:00:00 2001 From: Zhihong Tan Date: Thu, 26 Oct 2023 18:45:55 -0400 Subject: [PATCH 3/4] MODIFIED SIMPLE COUPLER FOR NEW SURFACE FLUX The same code modifications as the full coupler are now incorporated into the simple coupler, which is now compatible with the updated surface_flux subroutine. --- simple/flux_exchange.F90 | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/simple/flux_exchange.F90 b/simple/flux_exchange.F90 index b7cae2f9..a2c7e18d 100644 --- a/simple/flux_exchange.F90 +++ b/simple/flux_exchange.F90 @@ -59,6 +59,7 @@ module flux_exchange_mod id_u_star, id_b_star, id_q_star, id_u_flux, id_v_flux, & id_t_surf, id_t_flux, id_q_flux, id_r_flux, & id_t_atm, id_u_atm, id_v_atm, id_wind, & + id_thv_atm, id_thv_surf, & ! ZNT id_t_ref, id_rh_ref, id_u_ref, id_v_ref, id_q_ref, & id_del_h, id_del_m, id_del_q, id_albedo, id_gust, & id_t_ca, id_q_surf, id_q_atm, id_z_atm, id_p_atm, & @@ -152,7 +153,8 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Boundary ) albedo, albedo_vis_dir, albedo_nir_dir, & albedo_vis_dif, albedo_nir_dif, & del_m, del_h, del_q, land_frac, & - ref, ref2, t_ref, qs_ref, qs_ref_cmip + ref, ref2, t_ref, qs_ref, qs_ref_cmip, & + thv_atm, thv_surf logical, dimension(is:ie,js:je) :: mask, seawater, avail real :: zrefm, zrefh @@ -256,6 +258,7 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Boundary ) flux_t, flux_q, flux_lw, flux_u, flux_v, & cd_m, cd_t, cd_q, wind, & u_star, b_star, q_star, & + thv_atm, thv_surf, & dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm, dtaudv_atm, & dt, Land%mask(:,:,1), seawater, avail ) @@ -282,6 +285,14 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Boundary ) Boundary%b_star = b_star Boundary%q_star = q_star + ! additional boundary variables for use in ncep-edmf + Boundary%shflx = flux_t + Boundary%lhflx = flux_q + Boundary%wind = wind + Boundary%thv_atm = thv_atm + Boundary%thv_surf = thv_surf + + !======================================================================= !-------------------- diagnostics section ------------------------------ @@ -303,6 +314,8 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Boundary ) if ( id_u_star > 0 ) used = fms_diag_send_data ( id_u_star, u_star, Time ) if ( id_b_star > 0 ) used = fms_diag_send_data ( id_b_star, b_star, Time ) if ( id_q_star > 0 ) used = fms_diag_send_data ( id_q_star, q_star, Time ) + if ( id_thv_atm > 0 ) used = fms_diag_send_data ( id_thv_atm, thv_atm, Time ) + if ( id_thv_surf > 0 ) used = fms_diag_send_data ( id_thv_surf, thv_surf, Time ) if ( id_t_atm > 0 ) used = fms_diag_send_data ( id_t_atm, Atm%t_bot, Time ) if ( id_u_atm > 0 ) used = fms_diag_send_data ( id_u_atm, Atm%u_bot, Time ) if ( id_v_atm > 0 ) used = fms_diag_send_data ( id_v_atm, Atm%v_bot, Time ) @@ -791,6 +804,9 @@ subroutine flux_exchange_init ( Time, Atm, Land, Ice, & allocate( land_ice_atmos_boundary%shflx(is:ie,js:je) )!miz allocate( land_ice_atmos_boundary%lhflx(is:ie,js:je) )!miz #endif + allocate( land_ice_atmos_boundary%wind(is:ie,js:je) ) !ZNT + allocate( land_ice_atmos_boundary%thv_atm(is:ie,js:je) ) !ZNT + allocate( land_ice_atmos_boundary%thv_surf(is:ie,js:je) )!ZNT allocate( land_ice_atmos_boundary%rough_mom(is:ie,js:je) ) allocate( land_ice_atmos_boundary%frac_open_sea(is:ie,js:je) ) @@ -818,6 +834,9 @@ subroutine flux_exchange_init ( Time, Atm, Land, Ice, & land_ice_atmos_boundary%shflx=0.0 land_ice_atmos_boundary%lhflx=0.0 #endif + land_ice_atmos_boundary%wind=0.0 ! ZNT + land_ice_atmos_boundary%thv_atm=0.0 ! ZNT + land_ice_atmos_boundary%thv_surf=0.0 ! ZNT land_ice_atmos_boundary%rough_mom=0.01 land_ice_atmos_boundary%frac_open_sea=0.0 @@ -935,10 +954,18 @@ subroutine diag_field_init ( Time, atmos_axes ) fms_diag_register_diag_field ( mod_name, 'b_star', atmos_axes, Time, & 'buoyancy scale', 'm/s2' ) - id_q_star = & - fms_diag_register_diag_field ( mod_name, 'q_star', atmos_axes, Time, & + id_q_star = & + fms_diag_register_diag_field ( mod_name, 'q_star', atmos_axes, Time, & 'moisture scale', 'kg water/kg air' ) + id_thv_atm = & ! ZNT + fms_diag_register_diag_field ( mod_name, 'thv_atm', atmos_axes, Time, & + 'surface air virtual potential temperature', 'K') + + id_thv_surf = & ! ZNT + fms_diag_register_diag_field ( mod_name, 'thv_surf', atmos_axes, Time, & + 'surface virtual potential temperature', 'K') + id_u_flux = & fms_diag_register_diag_field ( mod_name, 'tau_x', atmos_axes, Time, & 'zonal wind stress', 'pa' ) @@ -1156,6 +1183,7 @@ subroutine surface_flux_2d ( & flux_t, flux_q, flux_r, flux_u, flux_v, & cd_m, cd_t, cd_q, & w_atm, u_star, b_star, q_star, & + thv_atm, thv_surf, & ! ZNT 05/03/2020 dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm, dtaudv_atm, & dt, land, seawater, avail ) @@ -1173,6 +1201,7 @@ subroutine surface_flux_2d ( & dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm,dtaudv_atm, & w_atm, u_star, b_star, q_star, & + thv_atm, thv_surf, & ! ZNT 05/03/2020 cd_m, cd_t, cd_q real, intent(inout), dimension(:,:) :: q_surf real, intent(in) :: dt @@ -1189,6 +1218,7 @@ subroutine surface_flux_2d ( & flux_t(:,j), flux_q(:,j), flux_r(:,j), flux_u(:,j), flux_v(:,j), & cd_m(:,j), cd_t(:,j), cd_q(:,j), & w_atm(:,j), u_star(:,j), b_star(:,j), q_star(:,j), & + thv_atm(:,j), thv_surf(:,j), & ! ZNT 05/03/2020 dhdt_surf(:,j), dedt_surf(:,j), dedq_surf(:,j), drdt_surf(:,j), & dhdt_atm(:,j), dedq_atm(:,j), dtaudu_atm(:,j), dtaudv_atm(:,j), & dt, land(:,j), seawater(:,j), avail(:,j) ) From cdc42c7c45c35cf811a17e56686164e800f97bac Mon Sep 17 00:00:00 2001 From: Zhihong Tan Date: Thu, 26 Oct 2023 19:25:01 -0400 Subject: [PATCH 4/4] REMOVED NAME TAGS FROM THE COMMENTS --- full/atm_land_ice_flux_exchange.F90 | 38 ++++++++++++++--------------- shared/surface_flux.F90 | 34 +++++++++++++------------- simple/flux_exchange.F90 | 24 +++++++++--------- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/full/atm_land_ice_flux_exchange.F90 b/full/atm_land_ice_flux_exchange.F90 index 0dcdff70..521c0b30 100644 --- a/full/atm_land_ice_flux_exchange.F90 +++ b/full/atm_land_ice_flux_exchange.F90 @@ -109,7 +109,7 @@ module atm_land_ice_flux_exchange_mod id_u_star, id_b_star, id_q_star, id_u_flux, id_v_flux, & id_t_surf, id_t_flux, id_r_flux, id_q_flux, id_slp, & id_t_atm, id_u_atm, id_v_atm, id_wind, & - id_thv_atm, id_thv_surf, & ! ZNT + id_thv_atm, id_thv_surf, & id_t_ref, id_rh_ref, id_u_ref, id_v_ref, id_wind_ref, & id_del_h, id_del_m, id_del_q, id_rough_scale, & id_t_ca, id_q_surf, id_q_atm, id_z_atm, id_p_atm, id_gust, & @@ -572,9 +572,9 @@ subroutine atm_land_ice_flux_exchange_init(Time, Atm, Land, Ice, atmos_ice_bound allocate( land_ice_atmos_boundary%shflx(is:ie,js:je) )!miz allocate( land_ice_atmos_boundary%lhflx(is:ie,js:je) )!miz #endif - allocate( land_ice_atmos_boundary%wind(is:ie,js:je) ) !ZNT - allocate( land_ice_atmos_boundary%thv_atm(is:ie,js:je) ) !ZNT - allocate( land_ice_atmos_boundary%thv_surf(is:ie,js:je) )!ZNT + allocate( land_ice_atmos_boundary%wind(is:ie,js:je) ) + allocate( land_ice_atmos_boundary%thv_atm(is:ie,js:je) ) + allocate( land_ice_atmos_boundary%thv_surf(is:ie,js:je) ) allocate( land_ice_atmos_boundary%rough_mom(is:ie,js:je) ) allocate( land_ice_atmos_boundary%frac_open_sea(is:ie,js:je) ) ! initialize boundary values for override experiments (mjh) @@ -602,9 +602,9 @@ subroutine atm_land_ice_flux_exchange_init(Time, Atm, Land, Ice, atmos_ice_bound land_ice_atmos_boundary%shflx=0.0 land_ice_atmos_boundary%lhflx=0.0 #endif - land_ice_atmos_boundary%wind=0.0 ! ZNT - land_ice_atmos_boundary%thv_atm=0.0 ! ZNT - land_ice_atmos_boundary%thv_surf=0.0 ! ZNT + land_ice_atmos_boundary%wind=0.0 + land_ice_atmos_boundary%thv_atm=0.0 + land_ice_atmos_boundary%thv_surf=0.0 land_ice_atmos_boundary%rough_mom=0.01 land_ice_atmos_boundary%frac_open_sea=0.0 @@ -686,7 +686,7 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar ex_rough_mom, ex_rough_heat, ex_rough_moist, & ex_rough_scale,& ex_q_star, & - ex_thv_atm, ex_thv_surf, & ! ZNT + ex_thv_atm, ex_thv_surf, & ex_cd_q, & ex_ref, ex_ref_u, ex_ref_v, ex_u10, & ex_ref2, & @@ -1137,7 +1137,7 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar !$OMP ex_gust,ex_flux_t,ex_flux_tr,ex_flux_lw, & !$OMP ex_flux_u,ex_flux_v,ex_cd_m,ex_cd_t,ex_cd_q, & !$OMP ex_wind,ex_u_star,ex_b_star,ex_q_star, & - !$OMP ex_thv_atm,ex_thv_surf, & ! ZNT + !$OMP ex_thv_atm,ex_thv_surf, & !$OMP ex_dhdt_surf,ex_dedt_surf,ex_dfdtr_surf, & !$OMP ex_drdt_surf,ex_dhdt_atm,ex_dfdtr_atm, & !$OMP ex_dtaudu_atm, ex_dtaudv_atm,dt,ex_land, & @@ -1155,7 +1155,7 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar ex_flux_t(is:ie), ex_flux_tr(is:ie,isphum), ex_flux_lw(is:ie), ex_flux_u(is:ie), ex_flux_v(is:ie), & ex_cd_m(is:ie), ex_cd_t(is:ie), ex_cd_q(is:ie), & ex_wind(is:ie), ex_u_star(is:ie), ex_b_star(is:ie), ex_q_star(is:ie), & - ex_thv_atm(is:ie), ex_thv_surf(is:ie), & ! ZNT + ex_thv_atm(is:ie), ex_thv_surf(is:ie), & ex_dhdt_surf(is:ie), ex_dedt_surf(is:ie), ex_dfdtr_surf(is:ie,isphum), ex_drdt_surf(is:ie), & ex_dhdt_atm(is:ie), ex_dfdtr_atm(is:ie,isphum), ex_dtaudu_atm(is:ie), ex_dtaudv_atm(is:ie), & dt, & @@ -1175,7 +1175,7 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar ex_flux_t, ex_flux_tr(:,isphum), ex_flux_lw, ex_flux_u, ex_flux_v, & ex_cd_m, ex_cd_t, ex_cd_q, & ex_wind, ex_u_star, ex_b_star, ex_q_star, & - ex_thv_atm, ex_thv_surf, & ! ZNT + ex_thv_atm, ex_thv_surf, & ex_dhdt_surf, ex_dedt_surf, ex_dfdtr_surf(:,isphum), ex_drdt_surf, & ex_dhdt_atm, ex_dfdtr_atm(:,isphum), ex_dtaudu_atm, ex_dtaudv_atm, & dt, & @@ -1408,12 +1408,12 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar call fms_xgrid_get_from_xgrid (Land_Ice_Atmos_Boundary%v_ref, 'ATM', ex_ref_v , xmap_sfc, complete=.true.) !bqx #ifndef use_AM3_physics - call fms_xgrid_get_from_xgrid (Land_Ice_Atmos_Boundary%shflx, 'ATM', ex_flux_t , xmap_sfc) !miz; ZNT 04/29/2020 - call fms_xgrid_get_from_xgrid (Land_Ice_Atmos_Boundary%lhflx, 'ATM', ex_flux_tr(:,isphum), xmap_sfc)!miz; ZNT 04/29/2020 + call fms_xgrid_get_from_xgrid (Land_Ice_Atmos_Boundary%shflx, 'ATM', ex_flux_t , xmap_sfc) + call fms_xgrid_get_from_xgrid (Land_Ice_Atmos_Boundary%lhflx, 'ATM', ex_flux_tr(:,isphum), xmap_sfc) #endif - call fms_xgrid_get_from_xgrid (Land_Ice_Atmos_Boundary%wind, 'ATM', ex_wind , xmap_sfc) ! ZNT 04/29/2020 - call fms_xgrid_get_from_xgrid (Land_Ice_Atmos_Boundary%thv_atm, 'ATM', ex_thv_atm , xmap_sfc) ! ZNT 05/03/2020 - call fms_xgrid_get_from_xgrid (Land_Ice_Atmos_Boundary%thv_surf, 'ATM', ex_thv_surf , xmap_sfc) ! ZNT 05/03/2020 + call fms_xgrid_get_from_xgrid (Land_Ice_Atmos_Boundary%wind, 'ATM', ex_wind , xmap_sfc) + call fms_xgrid_get_from_xgrid (Land_Ice_Atmos_Boundary%thv_atm, 'ATM', ex_thv_atm , xmap_sfc) + call fms_xgrid_get_from_xgrid (Land_Ice_Atmos_Boundary%thv_surf, 'ATM', ex_thv_surf , xmap_sfc) #ifdef use_AM3_physics if (do_forecast) then @@ -1601,7 +1601,7 @@ subroutine sfc_boundary_layer ( dt, Time, Atm, Land, Ice, Land_Ice_Atmos_Boundar !------- moisture scale ----------- used = fms_diag_send_data ( id_q_star, Land_Ice_Atmos_Boundary%q_star, Time ) - !------- ZNT: surf and atm virtual potential temperature ----------- + !------- surf and atm virtual potential temperature ----------- used = fms_diag_send_data ( id_thv_atm, Land_Ice_Atmos_Boundary%thv_atm, Time ) used = fms_diag_send_data ( id_thv_surf, Land_Ice_Atmos_Boundary%thv_surf, Time ) @@ -3457,11 +3457,11 @@ subroutine diag_field_init ( Time, atmos_axes, land_axes, land_pe ) fms_diag_register_diag_field ( mod_name, 'q_star', atmos_axes, Time, & 'moisture scale', 'kg water/kg air' ) - id_thv_atm = & ! ZNT + id_thv_atm = & fms_diag_register_diag_field ( mod_name, 'thv_atm', atmos_axes, Time, & 'surface air virtual potential temperature', 'K') - id_thv_surf = & ! ZNT + id_thv_surf = & fms_diag_register_diag_field ( mod_name, 'thv_surf', atmos_axes, Time, & 'surface virtual potential temperature', 'K') diff --git a/shared/surface_flux.F90 b/shared/surface_flux.F90 index 6ac2cc7d..8b37a396 100644 --- a/shared/surface_flux.F90 +++ b/shared/surface_flux.F90 @@ -210,7 +210,7 @@ subroutine surface_flux_1d ( & flux_t, flux_q, flux_r, flux_u, flux_v, & cd_m, cd_t, cd_q, & w_atm, u_star, b_star, q_star, & - thv_atm, thv_surf, & ! ZNT 05/03/2020 + thv_atm, thv_surf, & dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm, dtaudv_atm, & dt, land, seawater, avail ) @@ -251,8 +251,8 @@ subroutine surface_flux_1d ( & u_star, & !< Turbulent velocity scale b_star, & !< Turbulent buoyant scale q_star, & !< Turbulent moisture scale - thv_atm, & ! ZNT 05/03/2020 - thv_surf, & ! ZNT 05/03/2020 + thv_atm, & ! Surface air theta_v + thv_surf, & ! Surface theta_v cd_m, & !< Momentum exchange coefficient cd_t, & ! Heat exchange coefficient cd_q !< Moisture exchange coefficient @@ -265,7 +265,7 @@ subroutine surface_flux_1d ( & ! ---- local vars ---------------------------------------------------------- real, dimension(size(t_atm(:))) :: & - th_atm, tv_atm, & ! ZNT 05/03/2020: removed thv_atm and thv_surf + th_atm, tv_atm, & ! thv_atm and thv_surf are moved to output e_sat, e_sat1, q_sat, q_sat1, p_ratio, & t_surf0, t_surf1, u_dif, v_dif, & rho_drag, drag_t, drag_m, drag_q, rho, & @@ -451,8 +451,8 @@ subroutine surface_flux_1d ( & q_star = 0.0 q_surf = 0.0 w_atm = 0.0 - thv_atm = 0.0 ! ZNT 05/03/2020 - thv_surf = 0.0 ! ZNT 05/03/2020 + thv_atm = 0.0 + thv_surf = 0.0 endwhere ! calculate d(stress component)/d(atmos wind component) @@ -482,7 +482,7 @@ subroutine surface_flux_0d ( & flux_t_0, flux_q_0, flux_r_0, flux_u_0, flux_v_0, & cd_m_0, cd_t_0, cd_q_0, & w_atm_0, u_star_0, b_star_0, q_star_0, & - thv_atm_0, thv_surf_0, & ! ZNT 05/03/2020 + thv_atm_0, thv_surf_0, & dhdt_surf_0, dedt_surf_0, dedq_surf_0, drdt_surf_0, & dhdt_atm_0, dedq_atm_0, dtaudu_atm_0, dtaudv_atm_0, & dt, land_0, seawater_0, avail_0 ) @@ -524,8 +524,8 @@ subroutine surface_flux_0d ( & u_star_0, & !< Turbulent velocity scale b_star_0, & !< Turbulent buoyant scale q_star_0, & !< Turbulent moisture scale - thv_atm_0, & ! ZNT 05/03/2020 - thv_surf_0, & ! ZNT 05/03/2020 + thv_atm_0, & ! Surface air theta_v + thv_surf_0, & ! Surface theta_v cd_m_0, & !< Momentum exchange coefficient cd_t_0, & ! Heat exchange coefficient cd_q_0 !< Moisture exchange coefficient @@ -544,7 +544,7 @@ subroutine surface_flux_0d ( & dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm,dtaudv_atm, & w_atm, u_star, b_star, q_star, & - thv_atm, thv_surf, & ! ZNT 05/03/2020 + thv_atm, thv_surf, & cd_m, cd_t, cd_q real, dimension(1) :: q_surf @@ -580,7 +580,7 @@ subroutine surface_flux_0d ( & flux_t, flux_q, flux_r, flux_u, flux_v, & cd_m, cd_t, cd_q, & w_atm, u_star, b_star, q_star, & - thv_atm, thv_surf, & ! ZNT 05/03/2020 + thv_atm, thv_surf, & dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm, dtaudv_atm, & dt, land, seawater, avail ) @@ -603,8 +603,8 @@ subroutine surface_flux_0d ( & b_star_0 = b_star(1) q_star_0 = q_star(1) q_surf_0 = q_surf(1) - thv_atm_0 = thv_atm(1) ! ZNT 05/03/2020 - thv_surf_0 = thv_surf(1) ! ZNT 05/03/2020 + thv_atm_0 = thv_atm(1) + thv_surf_0 = thv_surf(1) cd_m_0 = cd_m(1) cd_t_0 = cd_t(1) cd_q_0 = cd_q(1) @@ -619,7 +619,7 @@ subroutine surface_flux_2d ( & flux_t, flux_q, flux_r, flux_u, flux_v, & cd_m, cd_t, cd_q, & w_atm, u_star, b_star, q_star, & - thv_atm, thv_surf, & ! ZNT 05/03/2020 + thv_atm, thv_surf, & dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm, dtaudv_atm, & dt, land, seawater, avail ) @@ -661,8 +661,8 @@ subroutine surface_flux_2d ( & u_star, & !< Turbulent velocity scale b_star, & !< Turbulent buoyant scale q_star, & !< Turbulent moisture scale - thv_atm, & ! ZNT 05/03/2020 - thv_surf, & ! ZNT 05/03/2020 + thv_atm, & ! Surface air theta_v + thv_surf, & ! Surface theta_v cd_m, & !< Momentum exchange coefficient cd_t, & ! Heat exchange coefficient cd_q !< Moisture exchange coefficient @@ -681,7 +681,7 @@ subroutine surface_flux_2d ( & flux_t(:,j), flux_q(:,j), flux_r(:,j), flux_u(:,j), flux_v(:,j), & cd_m(:,j), cd_t(:,j), cd_q(:,j), & w_atm(:,j), u_star(:,j), b_star(:,j), q_star(:,j), & - thv_atm(:,j), thv_surf(:,j), & ! ZNT 05/03/2020 + thv_atm(:,j), thv_surf(:,j), & dhdt_surf(:,j), dedt_surf(:,j), dedq_surf(:,j), drdt_surf(:,j), & dhdt_atm(:,j), dedq_atm(:,j), dtaudu_atm(:,j), dtaudv_atm(:,j), & dt, land(:,j), seawater(:,j), avail(:,j) ) diff --git a/simple/flux_exchange.F90 b/simple/flux_exchange.F90 index a2c7e18d..1b5815b7 100644 --- a/simple/flux_exchange.F90 +++ b/simple/flux_exchange.F90 @@ -59,7 +59,7 @@ module flux_exchange_mod id_u_star, id_b_star, id_q_star, id_u_flux, id_v_flux, & id_t_surf, id_t_flux, id_q_flux, id_r_flux, & id_t_atm, id_u_atm, id_v_atm, id_wind, & - id_thv_atm, id_thv_surf, & ! ZNT + id_thv_atm, id_thv_surf, & id_t_ref, id_rh_ref, id_u_ref, id_v_ref, id_q_ref, & id_del_h, id_del_m, id_del_q, id_albedo, id_gust, & id_t_ca, id_q_surf, id_q_atm, id_z_atm, id_p_atm, & @@ -804,9 +804,9 @@ subroutine flux_exchange_init ( Time, Atm, Land, Ice, & allocate( land_ice_atmos_boundary%shflx(is:ie,js:je) )!miz allocate( land_ice_atmos_boundary%lhflx(is:ie,js:je) )!miz #endif - allocate( land_ice_atmos_boundary%wind(is:ie,js:je) ) !ZNT - allocate( land_ice_atmos_boundary%thv_atm(is:ie,js:je) ) !ZNT - allocate( land_ice_atmos_boundary%thv_surf(is:ie,js:je) )!ZNT + allocate( land_ice_atmos_boundary%wind(is:ie,js:je) ) + allocate( land_ice_atmos_boundary%thv_atm(is:ie,js:je) ) + allocate( land_ice_atmos_boundary%thv_surf(is:ie,js:je) ) allocate( land_ice_atmos_boundary%rough_mom(is:ie,js:je) ) allocate( land_ice_atmos_boundary%frac_open_sea(is:ie,js:je) ) @@ -834,9 +834,9 @@ subroutine flux_exchange_init ( Time, Atm, Land, Ice, & land_ice_atmos_boundary%shflx=0.0 land_ice_atmos_boundary%lhflx=0.0 #endif - land_ice_atmos_boundary%wind=0.0 ! ZNT - land_ice_atmos_boundary%thv_atm=0.0 ! ZNT - land_ice_atmos_boundary%thv_surf=0.0 ! ZNT + land_ice_atmos_boundary%wind=0.0 + land_ice_atmos_boundary%thv_atm=0.0 + land_ice_atmos_boundary%thv_surf=0.0 land_ice_atmos_boundary%rough_mom=0.01 land_ice_atmos_boundary%frac_open_sea=0.0 @@ -958,11 +958,11 @@ subroutine diag_field_init ( Time, atmos_axes ) fms_diag_register_diag_field ( mod_name, 'q_star', atmos_axes, Time, & 'moisture scale', 'kg water/kg air' ) - id_thv_atm = & ! ZNT + id_thv_atm = & fms_diag_register_diag_field ( mod_name, 'thv_atm', atmos_axes, Time, & 'surface air virtual potential temperature', 'K') - id_thv_surf = & ! ZNT + id_thv_surf = & fms_diag_register_diag_field ( mod_name, 'thv_surf', atmos_axes, Time, & 'surface virtual potential temperature', 'K') @@ -1183,7 +1183,7 @@ subroutine surface_flux_2d ( & flux_t, flux_q, flux_r, flux_u, flux_v, & cd_m, cd_t, cd_q, & w_atm, u_star, b_star, q_star, & - thv_atm, thv_surf, & ! ZNT 05/03/2020 + thv_atm, thv_surf, & dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm, dtaudv_atm, & dt, land, seawater, avail ) @@ -1201,7 +1201,7 @@ subroutine surface_flux_2d ( & dhdt_surf, dedt_surf, dedq_surf, drdt_surf, & dhdt_atm, dedq_atm, dtaudu_atm,dtaudv_atm, & w_atm, u_star, b_star, q_star, & - thv_atm, thv_surf, & ! ZNT 05/03/2020 + thv_atm, thv_surf, & cd_m, cd_t, cd_q real, intent(inout), dimension(:,:) :: q_surf real, intent(in) :: dt @@ -1218,7 +1218,7 @@ subroutine surface_flux_2d ( & flux_t(:,j), flux_q(:,j), flux_r(:,j), flux_u(:,j), flux_v(:,j), & cd_m(:,j), cd_t(:,j), cd_q(:,j), & w_atm(:,j), u_star(:,j), b_star(:,j), q_star(:,j), & - thv_atm(:,j), thv_surf(:,j), & ! ZNT 05/03/2020 + thv_atm(:,j), thv_surf(:,j), & dhdt_surf(:,j), dedt_surf(:,j), dedq_surf(:,j), drdt_surf(:,j), & dhdt_atm(:,j), dedq_atm(:,j), dtaudu_atm(:,j), dtaudv_atm(:,j), & dt, land(:,j), seawater(:,j), avail(:,j) )