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

Create mask and mapping files for online MOC and MPAS-Analysis #468

Merged

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented Mar 7, 2020

This merge adds functionality for creating MOC, Antarctic-region, ocean-basin, ice-shelf and transport-transect masks using mpas_tools and geometric_features. It does not require any pre-cached files other than those already part of geometric_features (which now includes all the geometric data when it is installed as part of the compass conda environment).

Mapping files between the mesh and the default comparison grids in MPAS-Analysis are now also created and staged for uploading.

This merge also performs some clean-up:

  • Fixes a typo in ocean_initial_state
  • Removes trailing white space and performs some other PEP8 clean-up (mostly 2 new lines between functions)
  • Points to the initial condition from ssh_adjustment rather than initial_state for test cases with ice-shelf cavities. (This should eventually point to the last restart file from spin-up for most runs, so this is only an intermediate fix.)

@xylar
Copy link
Collaborator Author

xylar commented Mar 7, 2020

I have cherry-picked the commit from #467 so I added the "don't merge" flag. Once #467 is merged and develop is merged into ocean/develop, I'll rebase and remove the redundant commit.

@xylar
Copy link
Collaborator Author

xylar commented Mar 7, 2020

Testing

On my laptop, I have run the init stage including the e3sm_coupling step for:

  • QU240
  • QU240wISC
  • EC60to30wIsC (was not able to complete the ssh_adjustment on my laptop)

The masks are created as expected. For example:

$ ls assembled_files_for_upload/inputdata/ocn/mpas-o/oQU240wISC/
...
oQU240wISC_moc_masks_and_transects.nc

$ ls assembled_files_for_upload/diagnostics/mpas_analysis/region_masks/
oQU240wISC_antarcticRegions.nc      oQU240wISC_oceanBasins.nc
oQU240wISC_iceShelfMasks.nc         oQU240wISC_transportTransects.nc
oQU240wISC_moc_masks_and_transects.nc

Update:
Now also creates mapping files for analysis:

$ ls assembled_files_for_upload/diagnostics/mpas_analysis/maps/
map_oQU240wISC_to_0.5x0.5degree_bilinear.nc
map_oQU240wISC_to_6000.0x6000.0km_10.0km_Antarctic_stereo_bilinear.nc
map_oQU240wISC_to_6000.0x6000.0km_10.0km_Arctic_stereo_bilinear.nc

Further testing is needed to make sure the resulting files actually work as expected in MPAS-Analysis.

The online MOC analysis member will also need to be tested, and may require changes (in particular with the new file name that includes 4 regional MOC basins, not just the Atlantic).

@xylar xylar changed the title Add mask creation for online MOC and MPAS-Aanlysis Create mask and mapping files for online MOC and MPAS-Aanlysis Mar 7, 2020
@xylar xylar force-pushed the add_compass_analysis_masks branch from c31341b to a44f8fc Compare March 7, 2020 21:58
@xylar xylar requested a review from darincomeau March 7, 2020 22:10
@xylar
Copy link
Collaborator Author

xylar commented Mar 7, 2020

@milenaveneziani and @darincomeau, don't worry about reviewing this just yet. At some point, I might ask you to perform an MPAS-Analysis run with the masks and mapping files created by e3sm_coupling. But for now we don't have very many runs to try it out on.

@mark-petersen, your feedback would be appreciated anytime, since you're familiar with the code I'm altering.

@milenaveneziani
Copy link
Contributor

@xylar: would it make sense to add a section for making Arctic regions? I can add it, since I know the different region groups I created.
And I could also test it on an ARRM60to10 run.

@xylar
Copy link
Collaborator Author

xylar commented Mar 8, 2020

@milenaveneziani , sure, feel free.

@xylar
Copy link
Collaborator Author

xylar commented Mar 8, 2020

@milenaveneziani, if you just want to give me a list of regions, I'll be happy to add it, too.

@milenaveneziani
Copy link
Contributor

Hi @xylar, thanks for offering. I seem to understand that you need the full list of regions, not just the group or tag name, right?

@xylar
Copy link
Collaborator Author

xylar commented Mar 9, 2020

@milenaveneziani, a tag would be okay. geometric_features doesn't have a concept of a "group", so that isn't sufficient. If you want to send me a python script that creates the feature collection, I can use that, too. Many of the others come from the "examples" directory.

@milenaveneziani
Copy link
Contributor

A tag is fine. I have added a 'Arctic' tag to regions of the Arctic_Basin and Atlantic_Basin (two other tags) that are relevant to the Arctic and sub-Arctic (such as the Canada Basin and the Labrador Sea). So the 'Arctic' regions would be great to add a this point.

There is also another parallel category, that @proteanplanet (Andrew) requested for comparisons with sea-ice observations, and that is called 'Arctic_NSIDC'. We can add this later if necessary.

@milenaveneziani
Copy link
Contributor

Here is the list of regions associated with the 'Arctic' tag:
Baffin_Bay
Baltic_Sea
Barents_Sea
Canada_Basin
Canadian_Archipelago
Central_Arctic
Chukchi_Sea
East_Siberian_Sea
Greenland_Sea
Hudson_Bay
Irminger_Sea
Kara_Sea
Labrador_Sea
Laptev_Sea
North_Sea
Norwegian_Sea

@milenaveneziani
Copy link
Contributor

ooh, that was nice and quick. thanks. I will start a test soon.

@xylar
Copy link
Collaborator Author

xylar commented Mar 9, 2020

I tested the Arctic regions on the QU240 grid. I get masks for these regions:

 regionNames =
  "Baffin Bay",
  "Baltic Sea",
  "Barents Sea",
  "Canada Basin",
  "Canadian Archipelago",
  "Central Arctic",
  "Chukchi Sea",
  "East Siberian Sea",
  "Greenland Sea",
  "Hudson Bay",
  "Irminger Sea",
  "Kara Sea",
  "Labrador Sea",
  "Laptev Sea",
  "North Sea",
  "Norwegian Sea" ;

Looks the same as your list.

@milenaveneziani
Copy link
Contributor

oops, wait, now I understand why you say we should wait about testing.. This is something that comes during the init step.

@xylar
Copy link
Collaborator Author

xylar commented Mar 9, 2020

Right, this is for generating new meshes, so that's the stage at which it's worth testing. Presumably once @mark-petersen has got enough of these features on a branch for testing, we'll run one of the test cases through the paces all the way to analysis.

Remove some trailing white space.
This way, we make the geojson file on the fly rather than having
to symlink to it.  We also use the new southern transect that
is the true southern boundary of each MOC region, rather than the
approximate transect from previously.
This merge adds functionality for creating antartics- region,
ocean-basin, ice-shelf and transport-transect masks.
For runs with ice-shelf cavities, the E3SM initial condition
needs to come at least after ssh adjustment.  All initial conditions
should probably come after spin-up as well.
@xylar xylar force-pushed the add_compass_analysis_masks branch from 6b0b381 to cc114b1 Compare March 20, 2020 14:37
@mark-petersen mark-petersen changed the title Create mask and mapping files for online MOC and MPAS-Aanlysis Create mask and mapping files for online MOC and MPAS-Analysis Mar 23, 2020
Copy link
Contributor

@mark-petersen mark-petersen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran QU240/init/e3sm_coupling and everything in transects_and_regions was created successfully. We can fine-tune after this glob of PRs is merged in.

@mark-petersen mark-petersen merged commit 52e09d3 into MPAS-Dev:ocean/develop Mar 23, 2020
@xylar xylar deleted the add_compass_analysis_masks branch March 24, 2020 14:22
ashwathsv pushed a commit to ashwathsv/MPAS-Model that referenced this pull request Jul 21, 2020
…evelop

This merge adds functionality for creating MOC, Antarctic-region,
ocean-basin, ice-shelf and transport-transect masks using `mpas_tools`
and `geometric_features`.  It does not require any pre-cached files
other than those already part of `geometric_features` (which now
includes all the geometric data when it is installed as part of the
`compass` conda environment).

Mapping files between the mesh and the default comparison grids in
MPAS-Analysis are now also created and staged for uploading.

This merge also performs some clean-up:
* Fixes a typo in `ocean_initial_state`
* Removes trailing white space and performs some other PEP8 clean-up
* (mostly 2 new lines between functions)
* Points to the initial condition from `ssh_adjustment` rather than
* `initial_state` for test cases with ice-shelf cavities. (This should
* eventually point to the last restart file from spin-up for most runs,
* so this is only an intermediate fix.)
caozd999 pushed a commit to caozd999/MPAS-Model that referenced this pull request Jan 14, 2021
…evelop

This merge adds functionality for creating MOC, Antarctic-region,
ocean-basin, ice-shelf and transport-transect masks using `mpas_tools`
and `geometric_features`.  It does not require any pre-cached files
other than those already part of `geometric_features` (which now
includes all the geometric data when it is installed as part of the
`compass` conda environment).

Mapping files between the mesh and the default comparison grids in
MPAS-Analysis are now also created and staged for uploading.

This merge also performs some clean-up:
* Fixes a typo in `ocean_initial_state`
* Removes trailing white space and performs some other PEP8 clean-up
* (mostly 2 new lines between functions)
* Points to the initial condition from `ssh_adjustment` rather than
* `initial_state` for test cases with ice-shelf cavities. (This should
* eventually point to the last restart file from spin-up for most runs,
* so this is only an intermediate fix.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants