CMEPS icon indicating copy to clipboard operation
CMEPS copied to clipboard

Model specific mask values

Open danrosen25 opened this issue 4 years ago • 1 comments

I would like to move away from hard coding mask values based on the coupling_mode (see code in med_map_mod.F90). Several applications use multiple compset configurations, each would require a new 'coupling_mode' setting. I think esmFld.F90 variables such as compocn_omask, compocn_lmask, compatm_lmask, etc make the most sense and these variables can be configured by the app_mode files (e.g. esmFldsExchange_cesm_mod.F90). The defaults should be the 'ispval_mask' value.

Current Code Example

if (trim(coupling_mode) == 'cesm') then
  dstMaskValue = ispval_mask
  srcMaskValue = ispval_mask
  if (n1 == compocn .or. n1 == compice) srcMaskValue = 0
  if (n2 == compocn .or. n2 == compice) dstMaskValue = 0
  else if (coupling_mode(1:4) == 'nems') then
    if (n1 == compatm .and. (n2 == compocn .or. n2 == compice)) then
      srcMaskValue = 1
      dstMaskValue = 0

danrosen25 avatar Aug 13 '20 16:08 danrosen25