NOAA-EMC / CMEPS

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

prep ocn cleanup #13

Closed DeniseWorthen closed 3 years ago

DeniseWorthen commented 4 years ago

Issue #12, #10

junwang-noaa commented 3 years ago

Denise, do we commit this PR now or commit with your DATM-MOM6_CICE6 PR?

On Fri, Sep 18, 2020 at 2:53 PM Denise Worthen notifications@github.com wrote:

@DeniseWorthen commented on this pull request.

In mediator/med_phases_prep_ocn_mod.F90 https://github.com/NOAA-EMC/CMEPS/pull/13#discussion_r491133052:

-

  • ! local variables
  • type(InternalState) :: is_local
  • real(R8), pointer :: ocnwgt1(:) ! NEMS_orig_data
  • real(R8), pointer :: icewgt1(:) ! NEMS_orig_data
  • real(R8), pointer :: wgtp01(:) ! NEMS_orig_data
  • real(R8), pointer :: wgtm01(:) ! NEMS_orig_data
  • real(R8), pointer :: customwgt(:) ! NEMS_orig_data
  • real(R8), pointer :: ifrac(:)
  • real(R8), pointer :: ofrac(:)
  • integer :: lsize
  • integer :: n
  • real(R8) , parameter :: const_lhvap = 2.501e6_R8 ! latent heat of evaporation ~ J/kg
  • character(len=*), parameter :: subname='(med_phases_prep_ocn_custom_nemsdata)'
  • !---------------------------------------
  • if (trim(coupling_mode) == 'nems_orig' .or. trim(coupling_mode) == 'nems_frac') then

For the first part of your question, yes these do not need to be calculated in prep-ocn because they're able to be done via the auto-merge in esmFldsExchange: LN 259 https://github.com/DeniseWorthen/CMEPS/blob/af0d961386080ced7f63a14ca194b4c2bbe5a95d/mediator/esmFldsExchange_nems_mod.F90#L259. This is where you're "merging" (really just weighting by ofrac) for example the sensible heat flux calculated by the compmed.

The CMEPS aoflux calculation is the same aoflux calculation done by the NEMS mediator, using the atm import state. When we switched to bulk formulas for the NEMS mediator, it is equivalent to using just ofrac weighting. I was able to reproduce the current DATM-MOM6-CICE5 baseline with a NEMS mediator using only ofrac https://github.com/DeniseWorthen/NEMS/blob/ea1558ad219150465e42c2e6d95982665f9e5b80/src/module_MEDIATOR.F90#L5478. In this case, all the ocean fluxes are coming from the aoflux calculation, weighted by ofrac.

Some fields are sent separately to MOM6 from ice and atm but that is how MOM6 expects them so that it can do it's budgeting.

— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/CMEPS/pull/13#discussion_r491133052, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI7D6TKJS7IS2GDMT4ATH3DSGOUAVANCNFSM4RNMGLTQ .

DeniseWorthen commented 3 years ago

I think we need to this this PR first because I haven't retained any NEMS mediator files in my cice6-cmeps datm branch. Committing my cmeps-cice6 branch will involve switching CICE and CMEPS at the same time. How much testing do we need to do for that? Do we need to test NEMS mediator with CICE6 first and then compare NEMS/CICE6 to CMEPS/CICE6?

junwang-noaa commented 3 years ago

Yes,s please compare NEMS/CICE6 to CMEPS/CICE6, if the results are comparable, we can switch to CMEPS/CICE6.

DeniseWorthen commented 3 years ago

I realize I mis-spoke. We can't run NEMS+CICE6 (the cice6 cap is mesh based).

We can compare NEMS+CICE5 with CMEPS+CICE5.

junwang-noaa commented 3 years ago

That is good too.