diff --git a/bld/namelist_files/namelist_definition.xml b/bld/namelist_files/namelist_definition.xml index 26ec0d371c..2583f76ca7 100644 --- a/bld/namelist_files/namelist_definition.xml +++ b/bld/namelist_files/namelist_definition.xml @@ -7942,6 +7942,13 @@ mass and thermodynamic properties. Default: Set by build-namelist. + +Enthalpy flux terms explicitly computed and added in atmosphere and +passed to MOM6 +Default: FALSE + + > user_nl_cam + echo "nhtfrq = -24,0,0" >> user_nl_cam +else + echo "avgflag_pertape(1) = 'I'" >> user_nl_cam + echo "avgflag_pertape(2) = 'A'" >> user_nl_cam + echo "nhtfrq = -96,0,0" >> user_nl_cam +endif +echo "interpolate_output = .true., .false., .true., .false., .false., .true., .true." >> user_nl_cam +echo "interpolate_nlat = 192, 192, 192, 192, 192, 192, 192" >> user_nl_cam +echo "interpolate_nlon = 288, 288, 288, 288, 288, 288, 288" >> user_nl_cam + +echo "print_energy_errors = .true." >> user_nl_cam +echo "se_statefreq = 1" >> user_nl_cam +echo "avgflag_pertape(1) = 'I'" >> user_nl_cam +echo "fincl1 = 'U','V','T','Q','PRECT','PRECC','PRECL','OMEGA500'" >> user_nl_cam +echo "se_ftype=1" >> user_nl_cam +echo "thermo_budget_history = .true." >> user_nl_cam +echo "thermo_budget_histfile_num = 2" >> user_nl_cam +echo "avgflag_pertape(2) = 'N'" >> user_nl_cam +echo "ndens(2) = 1" >> user_nl_cam +echo "nhtfrq =-24,1,-24,1,-24" >> user_nl_cam + +echo "!avgflag_pertape(3) = 'I'" >> user_nl_cam +echo "!fincl3 = 'FRAIN_coupler','FSNOW_coupler','FEVAP_coupler','FRAIN_AC','FSNOW_AC','FEVAP_AC','FRAIN_BC','FSNOW_BC','FEVAP_BC','FRAIN_tot','FSNOW_tot','FEVAP_tot','dtot_wv','dtot_ice','dtot_liq','dtot_wv_coupler','dtot_ice_coupler','dtot_liq_coupler','rliqbc','HRAIN_AC','HSNOW_AC','HEVAP_AC','HRAIN_BC','HSNOW_BC','HEVAP_BC','HRAIN','HSNOW','HEVAP','SHFLX','FRHS_FLX','FRHS_FLXA','FRHS_FLXB','FRHS_FLXC','te_tnd','heating','radiation','te_sen','te_lat','T','TS','imbalance','enth_flx','PRECT','PRECC','PRECL','zmQ','prect_diagnosed','evap_te_pver','evap_se_pver','evap_ke_pver','evap_po_pver','evap_te_pver_cpdry','evap_se_pver_cpdry','evap_ke_pver_cpdry','evap_po_pver_cpdry','evap_lat_pver','evap_cpwv_pver','zm_te','zm_se','zm_ke','zm_po','zm_enth','zm_lat','cp_dycore_init','cp_dycore','zm_te_dme','heating_zm','heating_zm_cpice','zm_te_constantP','te_tnd_cnst_lat','cpice_dme_surf','zm_se_dme','mwv_lsT_minus_ls00_T','mliq_lfT_minus_lf00_T','Fliq_lfT_minus_lf00_TS','dmwv_dt','dmliq_dt','zm_se_constantP'" >> user_nl_cam + +echo "!avgflag_pertape(4) = 'I'" >> user_nl_cam +echo "!fincl4 = 'FRAIN_coupler','FSNOW_coupler','FEVAP_coupler','FRAIN_AC','FSNOW_AC','FEVAP_AC','FRAIN_BC','FSNOW_BC','FEVAP_BC','FRAIN_tot','FSNOW_tot','FEVAP_tot','dtot_wv','dtot_ice','dtot_liq','dtot_wv_coupler','dtot_ice_coupler','dtot_liq_coupler','rliqbc','HRAIN_AC','HSNOW_AC','HEVAP_AC','HRAIN_BC','HSNOW_BC','HEVAP_BC','HRAIN','HSNOW','HEVAP','SHFLX','FRHS_FLX','FRHS_FLXA','FRHS_FLXB','FRHS_FLXC','te_tnd','heating','radiation','te_sen','te_lat','T','TS','imbalance','enth_flx','PRECT','PRECC','PRECL','zmQ','prect_diagnosed','evap_te_pver','evap_se_pver','evap_ke_pver','evap_po_pver','evap_te_pver_cpdry','evap_se_pver_cpdry','evap_ke_pver_cpdry','evap_po_pver_cpdry','evap_lat_pver','evap_cpwv_pver','zm_te','zm_se','zm_ke','zm_po','zm_enth','zm_lat','cp_dycore_init','cp_dycore','zm_te_dme','heating_zm','heating_zm_cpice','zm_te_constantP','te_tnd_cnst_lat','cpice_dme_surf','zm_se_dme','mwv_lsT_minus_ls00_T','mliq_lfT_minus_lf00_T','Fliq_lfT_minus_lf00_TS','dmwv_dt','dmliq_dt','zm_se_constantP'" >> user_nl_cam + + +qcmd -A $proj -- ./case.build +./case.submit diff --git a/src/utils/air_composition.F90 b/src/utils/air_composition.F90 index 6046ffebf1..4e682d2d57 100644 --- a/src/utils/air_composition.F90 +++ b/src/utils/air_composition.F90 @@ -25,6 +25,8 @@ module air_composition ! get_mbarv: molecular weight of dry air public :: get_mbarv + logical, public :: compute_enthalpy_flux=.false. + private :: air_species_info integer, parameter :: unseti = -HUGE(1) @@ -140,7 +142,7 @@ module air_composition subroutine air_composition_readnl(nlfile) use namelist_utils, only: find_group_name use spmd_utils, only: masterproc, mpicom, masterprocid - use spmd_utils, only: mpi_character + use spmd_utils, only: mpi_character, mpi_logical use cam_logfile, only: iulog ! Dummy argument: filepath for file containing namelist input @@ -154,9 +156,12 @@ subroutine air_composition_readnl(nlfile) character(len=lsize) :: bline ! Variable components of dry air and water species in air - namelist /air_composition_nl/ dry_air_species, water_species_in_air + namelist /air_composition_nl/ dry_air_species, water_species_in_air, compute_enthalpy_flux !----------------------------------------------------------------------- + call mpi_bcast(compute_enthalpy_flux, 1, mpi_logical, masterprocid, mpicom, ierr) + if (ierr /= 0) call endrun(subname//": FATAL: mpi_bcast: compute_enthalpy_flux") + banner = repeat('*', lsize) bline = "***"//repeat(' ', lsize - 6)//"***" @@ -201,6 +206,9 @@ subroutine air_composition_readnl(nlfile) dry_air_species_num + water_species_in_air_num if (masterproc) then + if (compute_enthalpy_flux) then + write(iulog, *) "Computing enthalpy flux: compute_enthalpy_flux=",compute_enthalpy_flux + endif write(iulog, *) banner write(iulog, *) bline