-
Notifications
You must be signed in to change notification settings - Fork 25
Add ocean subBasins (North and South Atlantic and Pacific) #151
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
Add ocean subBasins (North and South Atlantic and Pacific) #151
Conversation
|
Hello @milenaveneziani! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-10-23 10:04:35 UTC |
|
@xylar: I am trying to test this into MPAS-Analysis, but not having much luck at the moment. I did create a mask file for it and put it in the region_masks directory on compy, but it's still complaining about something. One more thing: I noticed some seems in the subpolar North Atlantic and Pacific. Hope they are OK. Not sure why they form. Let me know if you have an easy way to get rid of them. |
|
The new subBasins do work in MPAS-Analysis, but I had forgotten that the new Hovmoeller plots show total Temperature, for example, not the anomaly like we do for the Global Ocean. Still, I think it is worthwhile to have these subBasins. |
|
@milenaveneziani, this is great work! I'm not worried about the little holes in some regions. I tried fixing them at some point but it's just too difficult. I'd like to discuss with you the overall strategy for creating derived features like these for MPAS-Analysis and making masks from them. I'm not sure if We currently have similar functionality in COMPASS: Shall we chat more about this next week? In the meantime, feel free to add this new |
|
There is the RGMA meeting next week, so not sure about being able to find a time for chatting, but let me throw a few ideas around. I feel like defining regions and geojson features definitely belongs to geometric_features: I'm open to how things are organized though, in terms of folders and so on so forth. As for getting the masking files, not sure. What I can tell you is that I was expecting for MPAS-Analysis to handle it because I think it now handles the extraction of the southern boundary for the MOC calculation, so I just assumed it would do the same for regional masks. But then I saw that the config file was asking for an already computed mask file ( At the moment, I computed the associated mask file for the EC30to60 r2 mesh and I have put it in the diagnostics directory on compy, so that we can use it for our v2 tuning/evaluation process. I could move both that and the geojson file to the public folder. |
So the original idea was definitely thatt
This works, but it is definitely not the preferred option. For every mesh that we consider to be "accepted" in E3SM or another project, we should create permanent versions of the masks and put them on the LCRC server with a date. This saves both a substantial amount of computation time every time the analysis runs and ensures that the mask is the same for every run of MPAS-Analysis. I have tried (successfully, I think) to make things robust enough that this isn't necessary but it's definitely the preferred approach.
I don't think putting files in the diagnostics directories is a good idea. It's fine to create a custom diagnostics directory that you use on compy but putting files in diagonstics on compy but not on LCRC/Anvil means I have a lot of trouble syncing the data later on. The proper way is to put it on LCRC and then sync it to all the machines, including Anvil itself so we have consistent copies everywhere. These kinds of differences between machines have caused problems on Cori recently -- I had to move aside a lot of the diagnostics and mpas_standalone files and resync them from Anvil to make sure they weren't glitchy.
I think that's fine in this case but probably would wait in the future until the PR gets approved and merged (wherever that happens). Otherwise, we have to re-sync if any changes get made. Again, this is precisely what a custom diagnostics folder in MPAS-Analysis is supposed to be for. Over all, I would rally benefit from having a discussion about this. I don't have a problem with this becoming a new "example" here but I do strongly disagree that |
|
I can move the files out of the diagnostics directory, no problem. sure, we can talk: week after next would be best. And we can leave this PR open for the time being. |
|
@milenaveneziani, we didn't get a chance to discuss this PR this week. Next week will be hard, obviously. We could chat the week after. But let's keep the online discussion going a bit. So I could see the benefit of having script for provenance for creating I still think it's not a good idea to include the |
|
Yes, good idea to keep the online discussion going. Here are my 2c.
Sure, that sounds reasonable to me.
I tend not to agree with this one for a few reasons. We need to have an easy way to compute region masks that we deem significant for our purposes. The ones that I can think of at the moment are: 1) Southern Ocean and Arctic regions; 2) ocean basins and subbasins; 3) MOC related regions and transects; and 4) El Nino regions. I think it is great that MPAS-Analysis can now handle the create-a-mask-from-geojson-feature step, but then, for things to work nicely, we need for MPAS-Analysis to access those geojson files. Considering that those feature files are not mesh-dependent and they are not enormous (tens of Mb), I think it would be handy to keep them in the public repo. |
So the problem is that they would only be available to MPAS-Analysis and MPAS-Tools if they become part of the conda package, which is part of every conda environment that I install, so it really does add up to a lot of data. We would have to be sure that the time saved would be worth the space they take up. If this is the route you want to go, we need to put them somewhere within
MPAS-Analysis already needs a lot of data from the LCRC server, so it still seems to me that having the geojson files next to the mesh-specific mask files on that server makes sense. Alternatively, if your script goes somewhere within |
Yes, I agree that this would be a good alternative. This way, if we decide to update or add some regions to the feature file, we don't have to update the repo everywhere, just the script in |
|
And yes, I think that the time it takes to make the feature is negligible. The making of the mask file is more substantial in terms of computational time for large meshes. |
|
@xylar: I have rearranged the new script file as per our discussion. |
|
@milenaveneziani, if you want to go the route I suggested last, the script will need to become a module and it will need to move to a subdirectory within The suggestion to move it to |
feature_aggregation_scripts/ocean_subBasin_regions/ocean_subBasin_regions.py
Show resolved
Hide resolved
feature_aggregation_scripts/ocean_subBasin_regions/ocean_subBasin_regions.py
Outdated
Show resolved
Hide resolved
feature_aggregation_scripts/ocean_subBasin_regions/ocean_subBasin_regions.py
Outdated
Show resolved
Hide resolved
feature_aggregation_scripts/ocean_subBasin_regions/ocean_subBasin_regions.py
Outdated
Show resolved
Hide resolved
feature_aggregation_scripts/ocean_subBasin_regions/ocean_subBasin_regions.py
Outdated
Show resolved
Hide resolved
d8ac788 to
8eab6c7
Compare
c9ed895 to
786d80f
Compare
|
sorry, a rebase to squash commits didn't go perfectly, but now I'm almost done. Just need to make that last change. |
|
Okay, so there would be one last step: adding this to the documentation. If you want to do that, you would edit: |
|
If you want, I can do the last few steps tomorrow to get this over the finish line. |
|
ok, I'll make these last two steps later this evening. Thanks @xylar! |
|
I'll give it a try and if you could check it tomorrow that'd be great. |
|
@xylar: I followed all the steps you mentioned to update the documentation, except for the change of |
|
Yep, I added an |
These are causing serious problems with the autogenerated documentation.
5215980 to
5394c24
Compare
|
I needed to rebase because I made some conflicting changes in #152. I removed the unneeded and problematic imports. I added an image to the documentation to hopefully give it a little more pep. |
|
Great, thanks @xylar! Looks great. |
|
Thank you for this hard work, @milenaveneziani |
|
Thanks @xylar! Now, basically the thing to do is to tell MPAS-Analysis to use this module for subbasin regions? |
|
Well, we would need to do a new release of Which analysis task did you have in mind would use these new features? |
Originally, I was thinking of the regional Hovmoeller diagrams, but then I remembered that at the moment they show evolution of the absolute T and S, while I was thinking at regional evolution of the anomalies. So, one intermediate step would be to add a choice to plot Hovmoeller diagrams for anomalies (basically similarly to what we do for the global T and S, but without using the layerWeightedAvg AM). I could look into this. The other obvious place(s) where these could be used is the regional profiles and/or regional T/S diagrams. |
|
Yep, I was looking into that ( regional profiles and regional T/S diagrams). So your original idea of generating a We will need to think of how to make that work with this new approach to aggregating features from |
|
Regarding Hovmoller plots, we really need a new analysis task for that because the existing one is intended for computing climatologies and the Hovmoller plots are just a side effect. The time bounds aren't really what you would typically want. And, as you point out, you would at least want the option for them to be anomalies (or to plot both the full and anomaly time series). |
One option is to keep the |
|
About the Hovmoeller plots: I wonder if they could fit better under the regional time series task? We would 'only' have to load the full 3d fields instead of a z range. |
That sounds about right. I'll have to think about the details -- how we know which stuff maps to which geometric features aggregation function. |
That's a really great option I somehow hadn't thought of. It will still take some work but should indeed be doable. |
|
@milenaveneziani, just so you know, I haven't forgotten about this, just haven't got to it yet. |

This adds the oceanSubBasinsRegions feature file, by combining existent features into a North Atlantic (subpolar and subtropical gyre), a South Atlantic, North Pacific and South Pacific. Southern Ocean is left as is, and the Arctic Ocean feature is also created.
This is intended to be used for regional Hovmoeller diagrams, where more granularity in region definition is necessary.