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

Passing additional surface variables into the atmospheric model #28 #29

Merged
merged 8 commits into from
Nov 27, 2023
Merged
20 changes: 17 additions & 3 deletions coupled/atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ module atmos_model_mod
real, dimension(:,:), pointer :: q_star =>null() ! moisture scale
real, dimension(:,:), pointer :: shflx =>null() ! sensible heat flux !miz
real, dimension(:,:), pointer :: lhflx =>null() ! latent heat flux !miz
real, dimension(:,:), pointer :: wind =>null() ! absolute wind at lowest atmos model level with gust corrections (w_atm of surface_flux output)
real, dimension(:,:), pointer :: thv_atm =>null() ! virtual temperature at lowest atmos model level
real, dimension(:,:), pointer :: thv_surf =>null() ! virtual temperature at the surface
real, dimension(:,:), pointer :: rough_mom =>null() ! surface roughness (used for momentum)
real, dimension(:,:), pointer :: frac_open_sea =>null() ! non-seaice fraction (%)
real, dimension(:,:,:), pointer :: data =>null() !collective field for "named" fields above
Expand Down Expand Up @@ -533,7 +536,13 @@ subroutine update_atmos_model_down( Surface_boundary, Atmos )
Atmos%Surf_diff, &
Atmos%gust(is:ie,js:je), &
Rad_flux(1)%control, &
Rad_flux(1)%block(blk) )
Rad_flux(1)%block(blk), &
shflx = Surface_boundary%shflx (isw:iew,jsw:jew), & ! shflx required by NCEP TKE-based EDMF
lhflx = Surface_boundary%lhflx (isw:iew,jsw:jew), & ! evap required by NCEP TKE-based EDMF
wind = Surface_boundary%wind (isw:iew,jsw:jew), & ! sfc wind required by NCEP TKE-based EDMF
thv_atm = Surface_boundary%thv_atm (isw:iew,jsw:jew), & ! 2m thv required by NCEP TKE-based EDMF
thv_surf= Surface_boundary%thv_surf(isw:iew,jsw:jew) ) ! sfc thv required by NCEP TKE-based EDMF

enddo

call physics_driver_down_endts (1, 1)
Expand Down Expand Up @@ -1412,9 +1421,14 @@ subroutine lnd_ice_atm_bnd_type_chksum(id, timestep, bnd_type)
write(outunit,100) 'lnd_ice_atm_bnd_type%b_star ',mpp_chksum(bnd_type%b_star )
write(outunit,100) 'lnd_ice_atm_bnd_type%q_star ',mpp_chksum(bnd_type%q_star )
#ifndef use_AM3_physics
write(outunit,100) 'lnd_ice_atm_bnd_type%shflx ',mpp_chksum(bnd_type%shflx )!miz
write(outunit,100) 'lnd_ice_atm_bnd_type%lhflx ',mpp_chksum(bnd_type%lhflx )!miz
if(associated(bnd_type%shflx)) &
write(outunit,100) 'lnd_ice_atm_bnd_type%shflx ',mpp_chksum(bnd_type%shflx )!miz
if(associated(bnd_type%lhflx)) &
write(outunit,100) 'lnd_ice_atm_bnd_type%lhflx ',mpp_chksum(bnd_type%lhflx )!miz
#endif
write(outunit,100) 'lnd_ice_atm_bnd_type%wind ',mpp_chksum(bnd_type%wind )
write(outunit,100) 'lnd_ice_atm_bnd_type%thv_atm ',mpp_chksum(bnd_type%thv_atm )
write(outunit,100) 'lnd_ice_atm_bnd_type%thv_surf ',mpp_chksum(bnd_type%thv_surf )
Comment on lines +1429 to +1431
Copy link
Contributor

Choose a reason for hiding this comment

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

Just double checking these entities will be defined for all non-AM5 simulations as well e.g. AM3/AM4.

write(outunit,100) 'lnd_ice_atm_bnd_type%rough_mom ',mpp_chksum(bnd_type%rough_mom )
! write(outunit,100) 'lnd_ice_atm_bnd_type%data ',mpp_chksum(bnd_type%data )

Expand Down