-
Notifications
You must be signed in to change notification settings - Fork 25
Removes unneeded reference to groupName #66
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
|
@pwolfram and @milenaveneziani, I'd prefer this not get merged until I get a chance to make sure I understand the usage of group names in MPAS tools. I'm not convinced we want to be removing groupName here just because it got removed elsewhere. |
|
@xylar, this makes sense. We will need some type of way to inject groupName into features, however, because we currently have lost that capability. I'm going to close this for now because it sounds like we need more code using groupName, not less. We can always reopen it later if necessary. |
|
@xylar, @milenaveneziani, and @pwolfram: Let me explain what groupName is supposed to be, why it was added, and how it's used. First, the motivation... When the horizontal stats AM was being created, it was pretty clear that we'd need some capability to allow us to perform regional statistics. The horizontal stats AM, specifically, performs horizontal averages within some region(s) and provides that information to you. When it was being created, it was also clear that we'd like a single instance of the horizontal stats AM to work over more than one region at a time, and assuming other AMs also were able to work over multiple regions, they should be able to work over independent sets of regions. A good example of this is that you might have the horizontal stats AM work over the Lab Sea and the southern ocean, while you might want the MOC AM to work over the Atlantic and the IndoPacific basins. However you wouldn't want them to work over the regions that the other is working on (this is more necessary when the number of regions is very large). So, at the time the initial thought was the define a namelist attribute that was a list of all of the region names you wanted an AM to work over (something like config_horizontalStatsAM_region_list), however this seemed very impractical (to me at least) because this list could become very large if you did have an AM which you wanted computed over say 100 regions. At this point, you run into issues of (1) how to specify so many regions, and (2) how to ensure they don't run over the character limit of a string. So, I added the concept of "featureGroups" (I say feature here, but originally it was just region). The purpose of groups now is that you can refer to several features at the same time with a single name. So, in the example I had above, let's say we named the Lab Sea and the Southern Ocean region group something like "horizStatsGroup" and the Atlantic/IndoPacific basins the "MOCGroup". Now these AMs could have options arguments that are something like Now, that's how they are intended to be used. A bit about how to actually use them... In this repository, when you (previously) run the After you have one or more feature group files, you would move to using the mask creator tool. It's usage is as follows: This tool takes an arbitrary number of After that, usage within actual MPAS is really up to the individual analysis members to have a working implementation, but the idea for AMs which should operate over regions / transects / points is that they should:
Otherwise use whichever was found. If a region was found, build an internal group which only consists of that single region. If a group was found, get the relevant arrays from the regions pool and iterate over them. Hopefully that helps. This might not be the most useful place for this information, so feel free to link it somewhere else if you want to. |
|
@douglasjacobsen: thank you so much for writing such a detailed explanation (and today of all days!). I guess I am only unclear about this step: I seem to understand that you need to feed the mask_creator with a geojson file that contains all the regions in a certain group (say maybe something like MOCgroup.geojson, containing all the *_MOC basins). Is that correct? If so, how do I create this merged, group-based feature? driver_scripts/setup_MOC_basins creates single *_MOC features, for example. |
|
@milenaveneziani So, if you wanted to create a group of features that represent all of the MOC basins, you might use the following workflow: At the end of this, you'll have a features.geojson file that is a single group, but contains both the Atlantic and the IndoPacific MOC regions. This features.geojson file (assuming you don't want any more regions in this group) would then be one of the inputs to the mask creator with the |
|
ah! that's great. Thanks @douglasjacobsen! |
|
As I suggest in #73, |
Following #65, cleans up unused mention of
groupName.