-
Notifications
You must be signed in to change notification settings - Fork 25
Change how groupName is set; update setup_ocean_basins #74
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
Conversation
All geojson files produced by all features scripts except split_features.py and set_group_name.py now automatically set the groupName property of the feature collection to 'enterGroupName'. split_features.py produces individual feature files without a groupName property (as before). The new script set_group_name.py is used to set the groupName property of an existing feature file. The driver scripts setup_MOC_basins.py and setup_ocean_basins.py have been updated to produce fewer output files, each of which has its own group name.
|
@pwolfram and @milenaveneziani, I think there is a problem with the workflow that results from how groupNames are being set after #67. Intuitively, a user might expect to set the This merge seeks to make the workflow more intuitive. The only means to set the
|
|
In the process of updating the driver scripts that currently use |
|
@milenaveneziani, I am not retaining the unmasked MOC basins (before the region below either 6S or 34S is masked out) at all in Also, is there any point in your workflow when you need the individual basin files (e.g. |
|
@milenaveneziani, these changes to the driver scripts may require changes to your workflow on the MPAS-O side. Let me know if you require changes to this PR to make that easier or if I've broken something. |
TestingI have made sure that the combined driver script modified by this PR produce the expected output files with the expected group names. I made sure that features created by I made sure that |
|
@xylar: I am going to test this now. Here is what I thought I could do:
|
|
@xylar: I did the tests I mentioned and all seems fine. I created the following gists to show the results:
|
|
Should we also allow setup_ocean_basins to add Global_Ocean_65N_to_65S to the MOCBasins group? |
|
@milenaveneziani, sorry, I didn't get to that earlier. I just added |
|
@milenaveneziani, it looks like we're having no problem creating the |
|
Thanks @xylar for adding the Global feature. I ran the MOCBasin feature through the mask creator tool, using the EC60to30 mesh, and the mask file looks good to me in terms of the variables/structure, etc (the file is on IC, here: /usr/projects/climate/milena/MPAS-git-repositories/MPAS-Tools/grid_gen/mesh_conversion_tools/MOCBasinRegionsMask_oEC60to30.151031.nc). Two odd things that I find are:
ncdump -v constituentsRegions $maskfile
@DieMuhkuh, @q-rai: do you mind taking a look at the mask file I mentioned above and see if you think it's the correct format for the MOC and MHT regional AM to work? |
Interesting. The weird text you're seeing for
That all looks correct to me. The two groups ( |
|
I guess I didn't really know what to expect from 'all'. Is it simply all the regions in all groups besides 'all' itself? |
|
Yes, I would expect |
|
I'd say let us not worry about this now. |
|
@milenaveneziani I looked at the mask file you pointed to and I think this will work for the MOC AM and also for the MHT AM (although Anne might want to confirm the last statement herself). |
|
@milenaveneziani, I'll do some quick testing and assuming everything is ok I'll merge. |
|
First, let's make sure the unresolved comments above have been addressed: @xylar, I missed the comment above:
Did this get addressed? If not, we probably need an issue for it- especially if we merge this without fixing it. Note, however, that I think the 64-limit on the character string may be a consequence of how the netCDF file is defined. Also, did @q-rai get a change to review this above @DieMuhkuh? I'd rather wait than merge something that is broken, unless we all agree that is ok. |
|
@pwolfram: about the first question you ask: No, it was not addressed, but it may be that we don't need to address it, unless we decide to increase the max character limit to much more than 64. Problem is: how much longer can it be? The constituent regions could be many many, so we will never know what limit to use. |
|
I think we can merge. @pwolfram, the NetCDF provenance issue is not something that can be addressed in this repo in any case. It relates to MPAS-Tools, specifically to the mask creator. I don't think the 64-character limit is a NetCDF issue, just a choice made in the mask creator itself. I agree with @milenaveneziani that it would be hard to determine a length that would be sufficient, so maybe best to let it go. If there are issues with MOC/MHT later, we can address them with a follow-up PR. |
|
@milenaveneziani and @xylar, I suppose we will agree to ignore the character overflow question for now. I've posted an issue at MPAS-Dev/MPAS-Tools#145 and it is possible that we could automate selection of the string length if necessary. |
|
@xylar, the resultant files from Even the name changes from Some perspective on this would be really helpful. If you want me to merge without further testing that is ok too. |
|
@pwolfram, I don't understand what you're seeing. I'm going to give you a quick call to discuss. |
|
We sorted out this issues and a new PR will be submitted soon to handle alphabetization of geojson output in preparation for checking BFB and CI testing. |
|
Note, there are some tricky issues with alphabetization of geojson output and we may be back to a custom writer that would require more discussion. @xylar and I will keep this in mind for the future. |
|
@milenaveneziani I think it should be fine as long as there are region groups defined. I tried looking at the file but wtrw isn't letting me connect right now. I'll try again tomorrow. |
|
@pwolfram, @DieMuhkuh : my suggestion is to merge this, then test #78 with the meshfiles that we create within the MOC AM, and then merge #78 as well. |
|
@milenaveneziani, this has already been merged. |
|
oh, of course! didn't realize that.. :) |
All geojson files produced by all features scripts except
split_features.py and set_group_name.py now automatically set the
groupName property of the feature collection to 'enterGroupName'.
split_features.py produces individual feature files without a
groupName property (as before). The new script set_group_name.py
is used to set the groupName property of an existing feature file.
The driver scripts setup_MOC_basins.py has been merged into
setup_ocean_basins.py, and the combined script has been updated
to produce fewer output files, each of which has its own group name.