Skip to content
This repository has been archived by the owner on Oct 23, 2020. It is now read-only.

Adding Region Support for Surface Area Weighted Averages #1313

Open
wants to merge 3 commits into
base: ocean/develop
Choose a base branch
from

Conversation

q-rai
Copy link

@q-rai q-rai commented May 4, 2017

Region file support for this analysis member.

  • On/off switches for both hard-wired regions and region files through namelist, like Water Mass Census.
  • Replaced single region scratch variable for mask with a variable 'surfaceMask' which stores the mask for all regions.
  • Compute the surfaceMask in init step to avoid recomputing it multiple times (similar to what @vanroekel has done for Layer Volume Weighted Averages).
  • Minimized range of loops to reduce redundant computations.

- On/off switches for both hard-wired regions and region files through namelist, like Water Mass Census.
- Replaced single region scratch variable for mask with a variable 'surfaceMask' which stores the mask for all regions.
- Compute the surfaceMask in init step to avoid recomputing it multiple times (similar to what @vanroekel has done for Layer Volume Weighted Averages).
- Minimized range of loops to reduce redundant computations.
@q-rai
Copy link
Author

q-rai commented May 4, 2017

Note: Still requires some testing and rebasing to a more current version of the repo (this is based off of a mid-March commit).

Anne S Berres added 2 commits May 9, 2017 17:34
I noticed the typo in this variable and when I wanted to fix it, it turned out that it's not used anywhere.
I also added in a comment explaining the 'global' region in the hard-wired mask routine.
@q-rai
Copy link
Author

q-rai commented May 11, 2017

Testing:
I wrote some code to compute some stats on the output of
2f1d07c (hard-wired regions only; ocean/develop version)
and
6d523db (hard-wired regions and mask file-based regions; my version)

which can be found here:
https://gist.github.com/q-rai/78d82aaeca0b5e3d44ddf4b4e092ec0a

The output is identical between hard-wired regions and mask-based regions in my version. However, it looks similar but not identical to the original; I’m not quite sure what the cause is.
Here are some example images; commit numbers are in the caption. From left to right it’s ocean/develop-hard-wired, mine-hard-wired, mine-regionmask.
sawa_avgsurfacewindstressmagnitude
sawa_avgsurfacetemperature
sawa_maxboundarylayerdepth
sawa_maxsurfacessh
sawa_minsurfacetemperature
sawa_minsurfacessh

Region numbers for reference:

  • 0 Arctic (lat > 60)
  • 1 Equatorial (lat in [-15,15])
  • 2 Southern Ocean (lat < -50)
  • 3 Nino 3 (lat in [-5,5], lon in [210,270])
  • 4 Nino 4 (lat in [-5,5], lon in [160,120])
  • 5 Nino 3.4(lat in [-5,5], lon in [190,240])
  • global

@mark-petersen
Copy link
Contributor

@vanroekel this one had a huge swath of conflicts too. Darn it. Procrastination bites again. I'll try to do this one next week too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants