Skip to content

Simple enthalpy

Peter Hjort Lauritzen edited this page Oct 24, 2024 · 3 revisions

Debugging coupler code

A run was performed where all coupling time-steps were 1800s so everything is in sync (no averaging of fluxes). By comparing the atmlmp_Faxa_X where X= hsnow, hrain and hevap fields with the corresponding variables in CAM (````hsnow_liq_ref, hrain_liq_ref```, ```hevap_liq_ref```) we found that the CAM fields are offset by one, i.e. coupler time stamp ```0001-01-04-00000``` is the same as CAM field ```0001-01-04-001800```:

Screenshot 2024-10-24 at 11 33 32 AM Screenshot 2024-10-24 at 11 34 13 AM

Comparing fluxes in CAM with MOM6

The enthalpy fluxes from CAM `(hsnow_liq_ref, ```hrain_liq_ref```, ```hevap_liq_ref```) are multiplied by ```OCNFRAC``` and the area to compute means (to compare to MOM6) are multiplied by ```OCNFRAC+ICEFRAC```. Explain?

enthalpy_flux_method = 1

MOM6 enthalpy flux computations done in CAM using liquid reference state.

The total energy budget was debugged in this setup with user_nl_cam:

enthalpy_flux_method = 1

seasalt_emis_scale             = 0.75D0
clubb_c8                =  4.95

Ndens = 2,2,2,2,2,2,2,2,1,2
mfilt               =       0,       5,     20,      40,      12,       120,      1,   1, 1, 1
interpolate_output  =  .true.,  .true., .true., .false., .false., .true.,  .true., .false., .false., .true.
interpolate_nlat    =     192,     192,    192,     192,     192,     192,   192, 192,     192,    192
interpolate_nlon    =     288,     288,    288,     288,     288,     288,   288 , 288,     288,    288



avgflag_pertape(9) = 'N'
thermo_budget_histfile_num             = 9
thermo_budget_history          = .true.


nhtfrq = 0,0,0,0,0,0,-1,1,1,-1

fincl7 = 'PRECT', 'PRECC', 'FLUT', 'U850', 'U200', 'V850', 'V200', 'OMEGA500', 'TS', 'PSL'

fincl8 = 'EFIX','enth_prec_ac_hice:A','enth_prec_ac_hliq:A','enth_prec_bc_hice:A','enth_prec_bc_hliq:A','enth_prec_ac_fice:A','enth_prec_ac_fliq:A','enth_prec_bc_fice:A',
'enth_prec_bc_fliq:A','enth_evap_hevap:A','cpice_srf:A','te_tnd:A','te_lat:A','ls_srf:A','lf_srf:A','dEdt_dme:A','dEdt_physics:A',
'dEdt_cpdycore:A','residual:A','dEdt_enth_fix:A','enth_fix_fct_bc_tot:A','enth_fix_fct_ac_tot:A','enthalpy_heating_fix_bc:A','enthalpy_heating_fix_ac:A',
'dEdt_efix_physics:A','EFIX:A','enth_flux_to_not_ocn:A','enth_flux_to_ocn:A','hsnow_liq_ref:A','hrain_liq_ref:A','hevap_liq_ref:A', 'OCNFRAC:A'
fincl10 = 'enth_flux_to_not_ocn:A','enth_flux_to_ocn:A','hsnow_liq_ref:A','hrain_liq_ref:A','hevap_liq_ref:A', 'OCNFRAC:A'

Using instananious output around day 1 we could check that the enthalpy flux passed to MOM6 is now fixed with the atmospheric energy fixer:

Screenshot 2024-10-08 at 4 55 39 PM

Plot (a) is enthalpy flux computed in CAM passed to MOM6. We make sure that the total energy fixer fixes for flux passed to ocean:

Screenshot 2024-10-08 at 4 57 02 PM

Plot (b) is energy tendency from updating cp and pressure which is fixer by the energy fixer. Plot (c) is dycore energy tendency and (d) is the energy fixer in the following time-step that fixes these errors.

At the bottom of the plot is the residual (physics-dynamics coupling errors) which is very small indicating that the implementation is correct.

Clone this wiki locally