Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow mask variables to be retrieved from nems.configure #588

Conversation

DeniseWorthen
Copy link
Contributor

@DeniseWorthen DeniseWorthen commented Jan 20, 2022

Pull Request Summary

Retrieves mask_value_water and mask_value_land if present in nems.configure and med_present is true.

Description

Currently, when used in UWM, wmesmf sets the import and export mask values for the grid from the default values.

! --- Default Mask Convention for import/export fields
      INTEGER, PARAMETER :: DEFAULT_MASK_WATER =  0
      INTEGER, PARAMETER :: DEFAULT_MASK_LAND  =  1

These values are opposite the normal interpretation and CMEPS is then forced to set the dstMaskValue and srcMaskValues used for RH creation opposite to their normal sense. In med_map_mod, the currently used values in CMEPS for HAFS are (n1 is the source side and n2 is the destination side)

       elseif (n1 == compatm .and. n2 == compwav) then
          dstMaskValue = 1
       elseif (n1 == compwav .and. n2 == compatm) then
          srcMaskValue = 1
          dstMaskValue = ispval_mask
       endif

Both the dstMaskValue when the destination is compwav and the srcMaskValue when compwav is the source are reversed. That is, the dstMaskValue should indicate where the wave grid is masked when it is the destination. It should be 0 (ie, don't interpolate to the land points). The srcMaskValue should indicate what points to ignore when wave is the source. It should be 0 (ie, don't interpolate from land points on the wave grid).

When HAFS is switched to the new cap, the mask values will be set with the correct interpretation for CMEPS. A PR for CMEPS # 266 is the first step in implementing the new wave cap in UWM. In order for the existing cap to continue to work for HAFS, it is required to allow non-default mask values to be set from nems.configure:

  mask_value_water = 1
  mask_value_land = 0

These will be consistent with the dstMaskValue and srcMaskValue used by CMEPS.

These configuration variables will not be added to the HAFS nems.configure in UWM until CMEPS is also updated.

Issue(s) addressed

Commit Message

Retrieve mask_value_water and mask_value_land if present in nems.configure and med_present is true.

Check list

Testing

Baselines were run on both Cheyenne.intel and Cheyenne.gnu using a feature branch of CMEPS incorporating changes required for S2SW coupling. All baselines were B4B. Tested hash #f297618 of FB updcmeps_wavcpl

  • How were these changes tested?
  • Are the changes covered by regression tests? (If not, why? Do new tests need to be added?)
  • Have the matrix regression tests been run (if yes, please note HPC and compiler)?
  • Please provide the summary output of matrix.comp (matrix.Diff.txt, matrixCompFull.txt and matrixCompSummary.txt):
  • Please indicate the expected changes in the regression test output (Note the known list of non-identical tests).
  • Please provide the summary output of matrix.comp (matrix.Diff.txt, matrixCompFull.txt and matrixCompSummary.txt):

* optionally retrieve maskvaluewater and maskvalueland if
present in nems.configure
@DeniseWorthen DeniseWorthen marked this pull request as ready for review January 23, 2022 20:04
@aliabdolali
Copy link
Contributor

The ufs-weather-model regtests have been successful on hera with the WW3/ufs-weather-model with these changes.
WW3 standalone regtests ran successfully and a PR is made to the develop branch #589

@aliabdolali aliabdolali self-requested a review January 24, 2022 03:05
@aliabdolali aliabdolali merged commit 1066ab6 into NOAA-EMC:dev/ufs-weather-model Jan 24, 2022
JessicaMeixner-NOAA pushed a commit to JessicaMeixner-NOAA/WW3 that referenced this pull request Jan 24, 2022
Retrieve mask_value_water and mask_value_land if present in nems.configure and med_present is true.
aliabdolali pushed a commit to aliabdolali/WW3 that referenced this pull request Jan 25, 2022
Retrieve mask_value_water and mask_value_land if present in nems.configure and med_present is true.
aliabdolali pushed a commit that referenced this pull request Jan 25, 2022
Retrieve mask_value_water and mask_value_land if present in nems.configure and med_present is true.
@DeniseWorthen DeniseWorthen deleted the feature/addconfigs4hafs branch February 9, 2022 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants