Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 23 additions & 1 deletion ufs/ccpp/data/MED_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ module MED_typedefs
type MED_control_type
logical :: lseaspray !< flag for sea spray parameterization
logical :: use_med_flux !< flag for using atmosphere-ocean fluxes form mediator
logical :: use_cdeps_inline !< default no data from cdeps inline
integer :: ivegsrc !< land use dataset choice 0 => USGS, 1 => IGBP, 2 => UMD
integer :: lsm !< flag for land surface model
integer :: lsm_noahmp !< flag for NOAH MP land surface model
Expand Down Expand Up @@ -215,6 +216,12 @@ module MED_typedefs
type MED_coupling_type
real(kind=kind_phys), pointer :: dtsfcin_med(:) => null() !< sfc latent heat flux over ocean
real(kind=kind_phys), pointer :: dqsfcin_med(:) => null() !< sfc sensible heat flux over ocean
!-- lake surface temperature from cdeps inline
real(kind=kind_phys), pointer :: mask_dat (:) => null() !< land-sea mask from cdeps inline
real(kind=kind_phys), pointer :: tsfco_dat (:) => null() !< sfc temperature from cdeps inline
real(kind=kind_phys), pointer :: tice_dat (:) => null() !< sfc temperature over ice from cdeps inline
real(kind=kind_phys), pointer :: hice_dat (:) => null() !< sfc ice thickness from cdeps inline
real(kind=kind_phys), pointer :: fice_dat (:) => null() !< sfc ice fraction from cdeps inline
contains
procedure :: create => coupling_create !< allocate array data
end type MED_coupling_type
Expand Down Expand Up @@ -644,6 +651,7 @@ subroutine control_initialize(model)

model%lseaspray = .false.
model%use_med_flux = .false.
model%use_cdeps_inline = .false.
model%ivegsrc = 2
model%redrag = .false.
model%sfc_z0_type = 0
Expand Down Expand Up @@ -680,15 +688,29 @@ subroutine control_initialize(model)

end subroutine control_initialize

subroutine coupling_create(coupling, im)
subroutine coupling_create(coupling, im, model)
implicit none
class(MED_coupling_type) :: coupling
integer, intent(in) :: im
type(MED_control_type), intent(in) :: model

allocate(coupling%dtsfcin_med(im))
coupling%dtsfcin_med = clear_val
allocate(coupling%dqsfcin_med(im))
coupling%dqsfcin_med = clear_val

if (model%use_cdeps_inline) then
allocate (coupling%tsfco_dat(im))
coupling%tsfco_dat = clear_val
allocate (coupling%mask_dat(im))
coupling%mask_dat = clear_val
allocate (coupling%tice_dat(im))
coupling%tice_dat = clear_val
allocate (coupling%hice_dat(im))
coupling%hice_dat = clear_val
allocate (coupling%fice_dat(im))
coupling%fice_dat = clear_val
endif

end subroutine coupling_create

Expand Down
46 changes: 46 additions & 0 deletions ufs/ccpp/data/MED_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,12 @@
units = flag
dimensions = ()
type = logical
[use_cdeps_inline]
standard_name = do_cdeps_inline
long_name = flag for using data provided by CDEPS inline (default false)
units = flag
dimensions = ()
type = logical
[ivegsrc]
standard_name = control_for_vegetation_dataset
long_name = land use dataset choice
Expand Down Expand Up @@ -1030,6 +1036,46 @@
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[tsfco_dat]
standard_name = sea_surface_temperature_from_data
long_name = sfc temperature
units = K
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (do_cdeps_inline)
[mask_dat]
standard_name = land_sea_mask_from_data
long_name = landmask
units = flag
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (do_cdeps_inline)
[tice_dat]
standard_name = surface_skin_temperature_over_ice_from_data
long_name = surface skin temperature over ice
units = K
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (do_cdeps_inline)
[hice_dat]
standard_name = sea_ice_thickness_from_data
long_name = sea-ice thickness
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (do_cdeps_inline)
[fice_dat]
standard_name = sea_ice_area_fraction_of_sea_area_fraction_from_data
long_name = sea-ice concentration [0,1]
units = frac
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (do_cdeps_inline)

########################################################################
[ccpp-table-properties]
Expand Down
2 changes: 1 addition & 1 deletion ufs/flux_atmocn_ccpp_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ subroutine flux_atmOcn_ccpp(gcomp, maintask, logunit, nMax, mask, psfc, pbot, &
call physics%statein%create(nMax,physics%model)
call physics%stateout%create(nMax)
call physics%interstitial%create(nMax)
call physics%coupling%create(nMax)
call physics%coupling%create(nMax,physics%model)
call physics%grid%create(nMax)
call physics%sfcprop%create(nMax,physics%model)
call physics%diag%create(nMax)
Expand Down