Skip to content

Jigsaw mesh creation - #74

Merged
pwolfram merged 7 commits into
MPAS-Dev:ocean/developfrom
sbrus89:jigsaw_mesh_creation
Sep 25, 2018
Merged

pwolfram merged 7 commits into
MPAS-Dev:ocean/developfrom
sbrus89:jigsaw_mesh_creation

Conversation

@sbrus89

@sbrus89 sbrus89 commented Aug 27, 2018

Copy link
Copy Markdown

This pull request adds the capabilities to do coastal refined meshes using the jigsaw workflow.

@pwolfram
pwolfram changed the base branch from master to ocean/develop August 27, 2018 22:31
@pwolfram

Copy link
Copy Markdown
Contributor

@mark-petersen, I'm proposing we keep this PR over #59 from which it is derived (accounting for updates to recent ocean/develop).

@sbrus89
sbrus89 force-pushed the jigsaw_mesh_creation branch from 372e0b5 to 7268d07 Compare August 29, 2018 14:54
@pwolfram

pwolfram commented Sep 4, 2018

Copy link
Copy Markdown
Contributor

@mark-petersen, just a friendly follow-up reminder about getting your review and so that this can be merged in this week...

@mark-petersen

Copy link
Copy Markdown
Contributor

Thanks. It is on my short list for today.

@pwolfram

pwolfram commented Sep 4, 2018

Copy link
Copy Markdown
Contributor

Thanks @mark-petersen, we are looking forward to your feedback!

@mark-petersen

Copy link
Copy Markdown
Contributor

@sbrus89 could you test the head of this PR to generate your standard coastal-refined mesh?

@sbrus89
sbrus89 force-pushed the jigsaw_mesh_creation branch from dc157de to 525053b Compare September 5, 2018 22:14
@mark-petersen

Copy link
Copy Markdown
Contributor

@pwolfram I'm running some tests on this, will get it merged in. Passed nightly regression suite.

Do you remember what MpasMeshGenerator.sh refers to here? It is in ocean/develop and unchanged in the PR, but it doesn't seem to point to anything.

testing_and_setup/compass/general.config.ocean:mesh_generator = FULL_PATH_TO_EXECUTABLE_MESH_GENERATION_SCRIPT
testing_and_setup/compass/ocean/soma/4km/32to4km/config_init1.xml:      <add_executable source="mesh_generator" dest="MpasMeshGenerator.sh"/>
testing_and_setup/compass/ocean/soma/8km/32to8km/config_init1.xml:      <add_executable source="mesh_generator" dest="MpasMeshGenerator.sh"/>

Did that point to the old jigsaw calling scripts? If so, I can leave it. I just want to remember to delete this line in a later commit, because right now the user doesn't know how to fill it in:

testing_and_setup/compass/general.config.ocean:mesh_generator = FULL_PATH_TO_EXECUTABLE_MESH_GENERATION_SCRIPT

@mark-petersen

Copy link
Copy Markdown
Contributor

@sbrus89 and @pwolfram Two questions:

  1. I would like to add all new cases into a new directory, so that we have two directories:
  • everything with previous method will be left here:
    testing_and_setup/compass/ocean/global_ocean
  • everything created by jigsaw will be here:
    testing_and_setup/compass/ocean/global_ocean_jigsaw
    That way, it is clear separation between the old and new process, and I can see which cases need to be 'converted' to the new process. @sbrus89 I assume your *JS directories just mean jigsaw?
  1. I finally came up with an alphabetized set of names for directories:
  • base_mesh
  • culled_mesh
  • initial_state
  • prep_spinup1
  • prep_spinup2
  • simulation

where the directory formerly named forward is now simulation. The prep_ prefix is for order, but we can then use prep_XXX for anything else as well, before the big run.

I will proceed with those (nice easy work at the conference), but I'm happy to hear feedback.

@pwolfram

Copy link
Copy Markdown
Contributor

@mark-petersen, along these lines, I already used jigsaw a few months ago for SOMA (https://github.com/MPAS-Dev/MPAS-Model/tree/master/testing_and_setup/compass/ocean/soma/4km/32to4km) but this is using the old way to setup test cases with jigsaw, so this gives a clear separation between what needs done in the long term to migrate to only using JIGSAW.

I think this organization is ok, but it may be a little artificial and may make things strange when building test suites in the short term. There is a danger here too of having workflow divergence, e.g., supporting two ways of doing things may give people too many options. I would propose all new test cases must use the new system.

Also, once we have cleaned out global_ocean, I'd recommend moving global_ocean_jigsaw back to global_ocean. Is this what you were thinking?

@pwolfram

Copy link
Copy Markdown
Contributor

@mark-petersen, MpasMeshGenerator.sh was from the previous workflow and pointed to https://github.com/MPAS-Dev/MPAS-Tools/blob/master/mesh_tools/triangle_jigsaw_to_netcdf/build_mesh.sh. This was the previous way I built meshes with JIGSAW for the Q2 workflow. I think we should delete this once we migrate the SOMA 32to4 and 32to8 cases over to the new system because it isn't in use anywhere else.

@sbrus89

sbrus89 commented Sep 11, 2018

Copy link
Copy Markdown
Author

@mark-petersen Yes, the JS in the directory names is for jigsaw. I believe the only one that should have that is the EC60to30JS just to differentiate it from the original version. The other jigsaw meshes I added all begin with USDE or USNA since they are coastal refinements of either Delaware Bay or the US North American coast.

@mark-petersen

Copy link
Copy Markdown
Contributor

@pwolfram, I do want to migrate all global ocean cases to jigsaw, but need to have the old workflow for comparison, and to reproduce V1 meshes, at least for a while. Having separate directories makes it more clear which process we are using. It would be easy to change the name back later.

@pwolfram pwolfram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some minor questions / comments are added below. Looks great and the results are awesome!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

May want to make this 1000.0 just to be clear it is a float (and to avoid integer division issues).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should the lines above be templated to have a general header?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems like this entire script is a complete copy. Perhaps this is ok but it may be worth only having one master copy of this type of code around for clarity.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Done.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same comment as previous-- should this be a command line argument option?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want all this commented out code to be included in this PR?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this commented out code above be included in the PR?

@pwolfram

Copy link
Copy Markdown
Contributor

@mark-petersen and @sbrus89, I had a few minor comments that may be worth considering prior to a final merge. Thanks for all your hard work on this process!

@mark-petersen

Copy link
Copy Markdown
Contributor

@sbrus89 I am done for the night. Could you test your cases in this updated repo? I changed some names, but I tried to update everything. There is a chance that a link is broken.

I separated your coastal routines from the mesh_definitions.py file because you needed two python libraries that were not standard on our IC python installation, and I thought it was cleaner to separate them anyway. See if that works.

Also, did you mean to leave in this file: testing_and_setup/compass/ocean/global_ocean/template.sub

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@sbrus89 I added that import here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@sbrus89 here is the coastal file with your stuff. You probably want to name this something more specific than params, because it refers to a specific case. Best also to not put actual paths in the file here.

@sbrus89 sbrus89 Sep 13, 2018 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@mark-petersen I agree. I'll change the name to default_params, since each case's define_base_mesh.py imports and then modifies each option.

Can I add the bathy data file to the initial_condition_database so it can be linked with the config_base_mesh.xml file?

@mark-petersen

Copy link
Copy Markdown
Contributor

Also, if you look in the QU60 and QU240 directories, I really simplified things, and made links to standard config files where I could. @sbrus89 I was afraid to change your US* files any more because I didn't want to break them. But you might find that you can simplify some of your files by just linking in as well.

@sbrus89

sbrus89 commented Sep 14, 2018

Copy link
Copy Markdown
Author

@mark-petersen I think I addressed most of the issues that you and Phil pointed out. I tested all three of my coastal mesh cases and they are working as expected. Let me know if there's anything else I can do on my end to help! Thanks again.

@pwolfram

Copy link
Copy Markdown
Contributor

@mark-petersen, are we ready to merge this now? I can get in some of my other test cases from here. Thanks!

Steven Brus and others added 3 commits September 24, 2018 09:27
 - Remove extra test cases
 - Remove test py files
 - Return general.config.ocean to default
 - Add USDEQU120cr10rr1 case
 - update EC60to30

@mark-petersen mark-petersen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am all done now. I tested my new cases, and also the EC60to30, and everything works. I also tested the the standard nightly test suite, which does not use these new cases yet, just to be safe.

@sbrus89 I used autopep8 to standardize the formatting, which changed your files too. Why don't you run one of your cases for a final check. Then @pwolfram can merge in, or I can, but I am flying out again in just a bit. Thanks for your work on this!

@pwolfram

Copy link
Copy Markdown
Contributor

@sbrus89, please just let me know when you are ready following a final check and I'll do a quick check to make sure this works with the new cases I've built before I merge. Thanks for all the hard work on this @mark-petersen and @sbrus89!

@sbrus89

sbrus89 commented Sep 25, 2018

Copy link
Copy Markdown
Author

@pwolfram I ran a final check and everything works as expected. The autopep8 changes made some strange formatting choices in some places in coastal_tools.py. I have a commit that cleans some of that up, but I don't have to include it if you'd rather leave things as-is.

@pwolfram

Copy link
Copy Markdown
Contributor

@sbrus89, please include the commit and I'll test once you push it.

@sbrus89

sbrus89 commented Sep 25, 2018

Copy link
Copy Markdown
Author

@pwolfram, Sounds good. I just did.

@pwolfram

Copy link
Copy Markdown
Contributor

Awesome, we sorted through the key issues with a fresh checkout on IC:

image

@pwolfram
pwolfram merged commit c94a887 into MPAS-Dev:ocean/develop Sep 25, 2018
pwolfram added a commit that referenced this pull request Sep 25, 2018
    This PR provides functionality to use JIGSAW for COMPASS workflows
    and adds some new coastally refined mesh capabilites.

    * sbrus89/jigsaw_mesh_creation:
      Change some autopep8 formatting in coastal_tools.py
      remove old mesh definition tools
      autopep8 formatting
      Clean up for the pull request
      Add coastal refinement capability.
      Add mesh generation from jigsaw into Compass.
matthewhoffman added a commit that referenced this pull request Oct 25, 2018
This commit matches bit-for-bit MPAS-O stand alone nightly regression
test with previous e3sm/develop commit.  Parent-branch merges into
ocean/develop in this merge include:
* 6e57d28 Merge branch 'ocean/add_iceberg_fluxes' into ocean/develop
* 95042e2 Merge branch 'ocean/bgc_fesedflux_bug' into ocean/develop
* 9ff33c6 Merge PR #90 'ocean/USNAEC60to30cr8'
* 0f713df Merge PR #74 'ocean/jigsaw_mesh_creation' into ocean/develop
@sbrus89
sbrus89 deleted the jigsaw_mesh_creation branch March 8, 2019 23:12
ashwathsv pushed a commit to ashwathsv/MPAS-Model that referenced this pull request Jul 21, 2020
    This PR provides functionality to use JIGSAW for COMPASS workflows
    and adds some new coastally refined mesh capabilites.

    * sbrus89/jigsaw_mesh_creation:
      Change some autopep8 formatting in coastal_tools.py
      remove old mesh definition tools
      autopep8 formatting
      Clean up for the pull request
      Add coastal refinement capability.
      Add mesh generation from jigsaw into Compass.
barlage pushed a commit to barlage/MPAS-Model that referenced this pull request Jan 21, 2025
…m to WRF standards (MPAS-Dev#74)

* Updating MYNN-EDMF submodule in MPAS, including file name changes to conform to WRF/MPAS norms.

* updating MYNN-EDMF submodule with file name changes conforming to WRF

* Fixing gnu-related compile error (From Mike Barlage) in MYNN submodule

* Updating MYNN-EDMF submodule to better generalize the previous precision patch.
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