Skip to content

Commit

Permalink
Merge tag 'cmeps0.14.70' into feature/trigrid
Browse files Browse the repository at this point in the history
cmeps0.14.70
  • Loading branch information
Mariana Vertenstein committed Jun 25, 2024
2 parents 5624c70 + b2cb575 commit 293a46f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
4 changes: 0 additions & 4 deletions cesm/driver/esm.F90
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,6 @@ subroutine esm_init_pelayout(driver, maxthreads, rc)
#ifndef NO_MPI2
use mpi , only : MPI_COMM_NULL, mpi_comm_size
#endif
use m_MCTWorld , only : mct_world_init => init

#ifdef MED_PRESENT
use med_internalstate_mod , only : med_id
Expand Down Expand Up @@ -1164,9 +1163,6 @@ subroutine esm_init_pelayout(driver, maxthreads, rc)

enddo

call mct_world_init(componentCount+1, GLOBAL_COMM, comms, comps)


deallocate(petlist, comms, comps, comp_iamin, comp_comm_iam)

end subroutine esm_init_pelayout
Expand Down
6 changes: 3 additions & 3 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
config["COMP_OCN"] = case.get_value("COMP_OCN")
config["COMP_ROF"] = case.get_value("COMP_ROF")
config["COMP_WAV"] = case.get_value("COMP_WAV")
config["CAMDEV"] = "True" if "CAM%DEV" in case.get_value("COMPSET") else "False"
config["CAMDEV"] = "True" if "CAM70" in case.get_value("COMPSET") else "False"

if (
(
Expand Down Expand Up @@ -146,10 +146,10 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
if config["COMP_OCN"] == "docn" and "aqua" in case.get_value("DOCN_MODE"):
nmlgen.set_value("aqua_planet", value=".true.")

# make sure that variable add_gusts is only set to true if compset includes cam_dev
# make sure that variable add_gusts is only set to true if compset includes cam7 physics
add_gusts = literal_to_python_value(nmlgen.get_value("add_gusts"), type_="logical")
if add_gusts:
expect("CAM%DEV" in case.get_value("COMPSET"),"ERROR: add_gusts can only be set if CAM%DEV in compset {}".format(case.get_value("COMPSET")))
expect("CAM70" in case.get_value("COMPSET"),"ERROR: add_gusts can only be set if CAM70 in compset {}".format(case.get_value("COMPSET")))

# --------------------------------
# Overwrite: set component coupling frequencies
Expand Down
7 changes: 4 additions & 3 deletions mediator/esmFldsExchange_ufs_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ subroutine esmFldsExchange_ufs(gcomp, phase, rc)
deallocate(flds)

! from med: fields returned by the atm/ocn flux computation, otherwise unadvertised
allocate(flds(8))
flds = (/'So_tref ', 'So_qref ', 'So_ustar ', 'So_re ','So_ssq ', 'So_u10 ', &
'So_duu10n', 'Faox_lat '/)
allocate(flds(12))
flds = (/'So_tref ', 'So_qref ', 'So_ustar ', 'So_re ', 'So_ssq ', &
'So_u10 ', 'So_duu10n ', 'Faox_lat ', 'So_ugustOut ', 'So_u10withGust', &
'So_u10res ', 'Faxa_rainc '/)
do n = 1,size(flds)
fldname = trim(flds(n))
if (phase == 'advertise') then
Expand Down
14 changes: 8 additions & 6 deletions mediator/med_phases_aofluxes_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1075,9 +1075,9 @@ subroutine med_aofluxes_update(gcomp, aoflux_in, aoflux_out, rc)
taux=aoflux_out%taux, tauy=aoflux_out%tauy, tref=aoflux_out%tref, qref=aoflux_out%qref, &
ocn_surface_flux_scheme=ocn_surface_flux_scheme, &
add_gusts=add_gusts, &
duu10n=aoflux_out%duu10n, &
duu10n=aoflux_out%duu10n, &
ugust_out = aoflux_out%ugust_out, &
u10res = aoflux_out%u10res, &
u10res = aoflux_out%u10res, &
ustar_sv=aoflux_out%ustar, re_sv=aoflux_out%re, ssq_sv=aoflux_out%ssq, &
missval=0.0_r8)

Expand All @@ -1102,7 +1102,7 @@ subroutine med_aofluxes_update(gcomp, aoflux_in, aoflux_out, rc)
ocn_surface_flux_scheme=ocn_surface_flux_scheme, &
sen=aoflux_out%sen, lat=aoflux_out%lat, lwup=aoflux_out%lwup, evap=aoflux_out%evap, &
taux=aoflux_out%taux, tauy=aoflux_out%tauy, tref=aoflux_out%tref, qref=aoflux_out%qref, &
duu10n=aoflux_out%duu10n, &
duu10n=aoflux_out%duu10n, &
missval=0.0_r8)
#ifdef UFS_AOFLUX
end if
Expand All @@ -1111,7 +1111,7 @@ subroutine med_aofluxes_update(gcomp, aoflux_in, aoflux_out, rc)
#endif

do n = 1,aoflux_in%lsize
if (aoflux_in%mask(n) /= 0) then
if (aoflux_in%mask(n) /= 0) then
aoflux_out%u10(n) = aoflux_out%u10res(n)
aoflux_out%u10_withGust(n) = sqrt(aoflux_out%duu10n(n))
end if
Expand Down Expand Up @@ -1601,8 +1601,10 @@ subroutine set_aoflux_in_pointers(fldbun_a, fldbun_o, aoflux_in, lsize, xgrid, r
if (chkerr(rc,__LINE__,u_FILE_u)) return
call fldbun_getfldptr(fldbun_a, 'Sa_shum', aoflux_in%shum, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
call fldbun_getfldptr(fldbun_a, 'Faxa_rainc', aoflux_in%rainc, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
if (associated(aoflux_in%rainc)) then
call fldbun_getfldptr(fldbun_a, 'Faxa_rainc', aoflux_in%rainc, xgrid=xgrid, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
end if
end if

! extra fields for ufs.frac.aoflux
Expand Down
2 changes: 1 addition & 1 deletion ufs/ccpp/data/MED_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@
long_name = model 2m diagnostics use the temperature and humidity calculated by the lake model
units = flag
dimensions = ()
type = integer
type = logical
[lkm]
standard_name = control_for_lake_model_execution_method
long_name = control for lake model execution: 0=no lake, 1=lake, 2=lake+nsst
Expand Down

0 comments on commit 293a46f

Please sign in to comment.