ESCOMP / CMEPS

NUOPC Community Mediator for Earth Prediction Systems
https://escomp.github.io/CMEPS/
22 stars 78 forks source link

fix bug in med_diag_mod for ice runoff #497

Closed mvertens closed 1 month ago

mvertens commented 1 month ago

Description of changes

fix bug in med_diag_mod for handling ice runoff to and from dglc and also added capability to send sea-ice thickness from CICE to WW3. This will only happen if both CICE and WW3 advertise these fields.

Specific notes

the following change was made in med_diag_mod.F90

old:
if ( fldbun_fldchk(is_local%wrap%FBImp(comprof,comprof), 'Forr_rofl_glc', rc=rc)) then
  call diag_rof(is_local%wrap%FBImp(comprof,comprof), 'Forr_rofi_glc' , f_watr_roff, ic, areas, budget_local, minus=.true., rc=rc)
endif
new:
if ( fldbun_fldchk(is_local%wrap%FBImp(comprof,comprof), 'Forr_rofl_glc', rc=rc)) then 
  call diag_rof(is_local%wrap%FBImp(comprof,comprof), 'Forr_rofl_glc' , f_watr_roff, ic, areas, budget_local, minus=.true., rc=rc)
end if

Contributors other than yourself, if any: @billsacks (who found this issue)

CMEPS Issues Fixed: None

Are changes expected to change answers? bfb

Any User Interface Changes (namelist or namelist defaults changes)? No

Testing performed

Ran the following noresm configuration for 7 years

GRID: a%ne30np4.pg3_l%ne30np4.pg3_oi%tnx1v4_r%r05_w%null_z%null_g%gris4_m%tnx1v4
COMPSET: 1850_CAM%DEV%LT%NORESM%CAMoslo_CLM51%SP_CICE_BLOM%ECO_MOSART_DGLC%NOEVOLVE_SWAV_SESP

and obtained budgets that looked acceptable.

Screenshot 2024-08-11 at 7 48 25 PM