CMEPS
CMEPS copied to clipboard
ndep is passed from ATM to LND, but not ATM to OCN
I tried to modify the MOM6 MARBL driver to receive nitrogen deposition from the mediator instead of reading it in from a file, but the fields were all 0. I turned on mediator history files, and saw atmImp_Faxa_ndep1 and atmImp_Faxa_ndep2 but no corresponding ocnExp fields. I emailed @mvertens who provided me with a fix:
$ git diff
diff --git a/mediator/esmFldsExchange_cesm_mod.F90 b/mediator/esmFldsExchange_cesm_mod.F90
index 149c779..9b8f7b1 100644
--- a/mediator/esmFldsExchange_cesm_mod.F90
+++ b/mediator/esmFldsExchange_cesm_mod.F90
@@ -1963,6 +1963,21 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
end if
end if
+ ! ---------------------------------------------------------------------
+ ! to ocn: nitrogen deposition fields from atm
+ ! ---------------------------------------------------------------------
+ if (phase == 'advertise') then
+ call addfld_to(compocn, 'Faxa_ndep')
+ call addfld_from(compatm, 'Faxa_ndep')
+ else
+ if ( fldchk(is_local%wrap%FBImp(compatm,compatm), 'Faxa_ndep', rc=rc) .and. &
+ fldchk(is_local%wrap%FBExp(compocn) , 'Faxa_ndep', rc=rc)) then
+ call addmap_from(compatm, 'Faxa_ndep', compocn, mapconsf, 'one', atm2ocn_map)
+ call addmrg_to(compocn, 'Faxa_ndep', &
+ mrg_from=compatm, mrg_fld='Faxa_ndep', mrg_type='copy_with_weights', mrg_fracname='ofrac')
+ end if
+ end if
+
! ---------------------------------------------------------------------
! to ocn: enthalpy from atm rain, snow, evaporation
! to ocn: enthalpy from liquid and ice river runoff
I think I need to set up my fork of this repository and then create a branch, but a PR with the above patch will be coming soon.