-
Notifications
You must be signed in to change notification settings - Fork 52
Consolidate base directory for diagnostics (obs, mapping and mask files) into one config option #500
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
@milenaveneziani, this came up when I was trying to explain config files to Karthik on his visit last week. It became clear to me that things are unnecessarily complicated now that we have a standard directory structure and should be simplified. Let me know if you have concerns. It would be great if you could run a test or two but I know you're preparing for AGU just like I am... |
@xylar, I just took a quick look. I wonder if it is a good idea to not allow the user to specify the various directories manually, if they want to. |
[regions] | ||
# Directory containing mask files for ocean basins and ice shelves | ||
regionMaskDirectory = /lus/theta-fs0/projects/ClimateEnergy_2/diagnostics/mpas_analysis/region_masks | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the section below removed from this config file (same goes for other sections in other config files)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the whole point of this PR. People shouldn't need to point to these directories manually now that the directory structure is standardized.
Are you thinking that people would need to make their own region masks and point to those directories? I guess that's conceivable, particularly for non-standard grids.
My thought was that we want the example config files to be relatively simple. I guess you prefer to keep them relatively verbose and to point out to users that they could point the mappingSubdirectory
and/or regionMaskSubdirectory
as an absolute path?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, in this case I only meant the section below that has other (unrelated) things in it.
I would only keep config.example more verbose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. The way comments work on GitHub, all I see are the previous 3 lines to your comment so that wasn't clear. It could be that i need to put the MOC section back in but I don't think the rest of this is helpful. It just makes it a lot harder to change default options because all of the example config files have to be changed to match. I think the examples should be relatively lean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, agree that only the MOC section should be put back in for this specific config files, while the others are redundant/arbitrary.
You can still specify the paths to any of the directories as absolute paths, so someone could specify them manually. However, I think we want to discourage folks from having their own directory structure going forward so I don't know that this capability needs to be well advertised. |
Well, why not? If the user needs to play with the directory structure for one reason or another, we should let them know they can. |
[regions] | ||
# Directory containing mask files for ocean basins and ice shelves | ||
regionMaskDirectory = /lus/theta-fs0/projects/ClimateEnergy_2/diagnostics/mpas_analysis/region_masks | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is another example of section (below this comment) that seems unrelated to this PR and that is being removed. Not sure if it was intentional or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really think we don't want this stuff in the example config files, so, yes, it was intentional.
|
||
# directory where sea ice observations are stored | ||
baseDirectory = /lcrc/group/acme/diagnostics/observations/SeaIce | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also this piece below about timeSeriesSeaIceAreaVol
. And similarly for other config example files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it seems this may be the last config file with this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are all default options being copied into example config files. I realize they might demonstrate to users some of the capabilities that they could customize but we have several hundred such options at this point and these few are just arbitrary in my view. As I said, they make changing defaults very difficult and I think they confuse and overwhelm new users rather than providing helpful direction. That's why I think we want to keep the examples as more the minimum set of options needed to analyze that particular example run and rely on documentation, config.example and config.default to point out additional options.
Okay, I think that sounds like a good plan. |
# in its calculation, whereas the postprocessing script does. | ||
# NOTE: this is a temporary option that will be removed once the online | ||
# MOC takes into account the bolus velocity when GM is on. | ||
usePostprocessingScript = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will put the MOC section back. That was removed by mistake.
e981415
to
90deded
Compare
@milenaveneziani, thanks very much for all the helpful comments. Sorry if I'm grumpy about them sometimes. And I know I also have strong opinions sometime. But you can always feel free to have strong opinions, too. You are nearly always right when you push me to do things a different way, so I appreciate that. |
I believe I've addressed the concerns you raised but please let me know if you notice anything more that I missed. I will re-test on my side but I would also appreciate it if you could do a test or 2 yourself, perhaps giving an absolute path to the regions, mapping or observations subdirectories and make sure it does, in fact, work for you. |
No problem. Remember, I am a 'stuff keeper' :D Ok, I will run a test hopefully tomorrow. |
Ah, right! I should cc Gennaro on these messages. He would understand ;-) |
@milenaveneziani, have you had a chance to test this one? Are you happy with it now? |
This includes a baseDirectory and the mapping and region-masks subdirectories, using the standard directory layout as on the E3SM diagnostics server. The various *Observations sections have also been modified to reference this new standard base directory so users will need to change very little to set up a new config file. Many tasks and quite a bit of documentation needed to be updated to handle these seemlingly minor changes. Example config files will be updated in a separate commit.
Various other sections and options were removed as a result of the simplification.
* Clarify in both that various subdirectories could also be absolute paths * Put these subdirectories in config.example so users can see that they are there to be modified if needed.
90deded
to
06d559e
Compare
@milenaveneziani, I believe this PR is just waiting on testing from you. Is that correct? |
oh cute, there is an actual stickler-ci reviewer! funny. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My test passed.
Excellent! Thank you for testing, @milenaveneziani. |
This merge consolidates the base directory for diagnostics in each config file into one
baseDirectory
option in the new[diagnostics]
section. This means there is only one option that needs to be changed in order to point to the diagnostics directory on each machine instead of needing to set this directory in 4 or 5 different places.The new
[diagnostics]
section includes thebaseDirectory
as well as the mapping and region-masks subdirectories, using the standard directory layout as on the E3SM diagnostics server.The various
*Observations
sections (for ocean, sea ice and icebergs) have also been modified to reference this new standard base directory so users will need to change very little to set up a new config file.Many tasks and quite a bit of documentation needed to be updated to handle these seemingly minor changes.
Example config file have also been updated with new diagnostics section. Various other sections and options were removed as a result of the simplification.
A bug was fixed (for my convenience in debugging the code) in the
PlotClimatologyMpasSubtask
wheredecode()
was being called ondepthSlice
even though this is already a string (not an array of bytes) in python 3. This bug shouldn't affect analysis performed with python 2.