-
Notifications
You must be signed in to change notification settings - Fork 332
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 metadata to MPAS Meshes #507
Add metadata to MPAS Meshes #507
Conversation
Example from the QU240wISC test case:
|
@proteanplanet, the spaces in the attribute names are kind of non-standard and don't format well in |
testing_and_setup/compass/ocean/global_ocean/EC60to30/init/config_E3SM_coupling_files.ini
Outdated
Show resolved
Hide resolved
Hi @xylar, Underscores are fine and I agree that formatting with ncdump is important. With regard to Author and Institution, the only way that's ever worked in a semi-automatic way for me is with environment variables. |
@xylar : Another thought that occurred to me on the Author and Institution problem. Instead of using "Institution" as a field, we could instead use email address, which usually is reflective of the institution anyway. Both name and email address can be grabbed from .gitconfig. Anyhow, just an idea. |
@proteanplanet, that's an idea. I was thinking of the I went ahead and added command-line options for filling in author and institution but that's not a complete solution yet. |
I am pasting Jon's comment here from confluence: "We may need to revisit the naming convention – E3SM tests use periods to separate fields in a test name, meaning create_test SMS.T62_oEC60to30v3.GMPAS-IAF.anvil_intel has the test type (SMS) separated from the grid resolution (T62_oEC60to30v3) and compset (GMPAS-IAF), etc by periods. So the naming convention as it stands would cause problems. Or we at least need a “short” naming convention that would work with these limitations." Do we need to consider this in the current PR? |
Just so I understand, on mesh creation this metadata gets created on its own? This is a ton of metadata to expect someone to have to fill in on creation by hand. @xylar if using the gitconfig to fill email address, can you share how you would swap your personal email for lanl? I would need to do the same. Also, thinking more about the name for meshes, I'd like to propose a change. I think the E3SMv2 is in an odd place. I'd prefer something like
|
Yes, absolutely! That's why this is a discussion. What would the proposed change be? Underscores instead of periods?
First, this doesn't happen at mesh creation but rather at the This also gives us the option of having slightly different metadata for the sea-ice initial condition if desired. Most of the metadata comes from a config file that that the user would not need to alter (it is specific to the test case). Other parts come from the mesh itself, or the conda environment, and are automatic. Only the author and institution are not automatic at the moment but the
My plan would be to have a config option for email address with a default value of
Yes, I think that makes more sense to me, too. It's more similar to what we've done so far and it puts the more relevant info earlier. Did you want |
Here's the updated version of the metadata:
This is without me replacing my personal email address (bots, knock yourselves out!). It uses my work email address if I put into the config file. |
# The following options are detected from .gitconfig if not explicitly entered | ||
author = autodetect | ||
email = autodetect |
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.
@vanroekel, a copy of this file will end up in the e3sm_coupling
directory. You could edit the email
option here and put in your LANL email address.
[mesh] | ||
short_name = ${prefix}_${min_res}to${max_res}km_${levels}L_E3SMv${e3sm_version}_rev${mesh_version} | ||
prefix = EC_wISC | ||
long_name = Eddy Closure mesh with Ice Shelf Cavities for E3SM Version | ||
${e3sm_version}, ${min_res}-${max_res}km resolution, | ||
${levels} vertical levels | ||
description = MPAS Eddy Closure mesh with enhanced resolution around the equator | ||
(30 km) and poles (35 km) with 60-km resolution at mid latitudes | ||
and includes cavities under the ice shelves in the Antarctic. | ||
e3sm_version = 2 | ||
mesh_version = 001 | ||
creation_date = autodetect | ||
min_res = 30 | ||
max_res = 60 | ||
max_depth = autodetect | ||
levels = autodetect | ||
runoff_description = <<<Spreading function described here>>> |
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.
@vanroekel, This is where a lot of the metadata comes from. the various ${blah}
entries come from other config options. (This uses the so-called ExtendedInterpolation for config files.) Anything with autodetect
will get looked up somehow or other.
@xylar, thanks for the explanations. and regarding the tag, that was a mistake, I don't think we should have km twice in there, 12to60km is much better. |
@xylar - I think we need a really short name as well. As useful as it is to have this much information embedded in even the short name, the reality may be that we can't afford the short name that gets used by E3SM to be that long. The resolution for any coupled case has three grid specifications now that we have tri-grids, and I don't believe it will be workable if each of those grids requires 30+ characters to define it (like QU_wISC_240km_64L_E3SMv2_rev001). So we also need a shorthand notation -- my first recommendation is dropping the underscores completely, since they are typically used to separate the meshes for the different components in an E3SM resolution definition (i.e. T62_oEC60to30v3). Can we use the QU240 name as an example, and see exactly what information is necessary for an E3SM name?
This is not great, but has gone from 31 characters to 17 and still has all the information? Anyone else? |
The verbose names were at @maltrud's and @proteanplanet's request, so they'll need to weigh in. I don't see a value in a short name distinct from the "really short name". When would we use the short name? @maltrud and @proteanplanet, does this essentially leave us back where we started with mesh names, with the exception that we now include the number of vertical layers and the E3SM version? The main problem with 5 and 6 above are the numbers running together. For a case without ice shelves, we would have @jonbob and @vanroekel, does anyone outside of the COSIM team need to weight in on these names? Anyone else from infrastructure, water cycle, etc.? |
@xylar - I agree that L64 is more consistent with E2 and r01, that is, the identifier first and the value second. And it has the benefit of keeping the numbers distinct. I think we are squeezed between keeping the names short and wanting as much information as possible. I think that's where the metadata you've added is especially critical. We'll let others weigh in about how much has to be in the actual name... |
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.
This is very nice, @xylar.
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.
Thanks @xylar. I think this is well done.
Each test case with an E3SM coupling step now needs a default and and custom config file for that test case. The custom config file will be used to point to the correct initial condition, give the full mesh name and other metadata, etc. For now, only the 2 EC60to30 test cases have these custom config files, but ther remaining test cases with E3SM coupling steps will have these added later on.
This metadata is formatted according to the specs of @proteanplanet
Switch from institution to email address, which can be parsed from git config (along with the name). Switch metadata from having spaces to underscores. Switch mesh short names from dot separation to underscores.
For example, `ECwISC60to30kmL64E3SMv2r01`
short_name is now what E3SM will hopefully use in test and case names while lon_name is what is getting put in mapping, initial condition, etc.
Also, switch back from wI to wISC even in the short name
d072f56
to
adf34f8
Compare
Tested |
raise ValueError("mesh name not found in path. Please specify " | ||
"the mesh_name in config_E3SM_coupling_files.ini.") | ||
else: | ||
print("- mesh name specified in config file: ", mesh_name) |
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.
would be nice to see both long and short name here.
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.
Okay, I can add this.
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.
Fixed.
It looks like the long name is used everywhere in E3SM file names, not the short name. Was that intentional? I like the short name better. |
That was the consensus as I understood it. Long names where possible but short names in mapping files (and eventually in test and case names) where the long name is too long to be practical. @mark-petersen, I'm reluctant to revisit this after a 50+ message conversation but if you feel strongly, we need to have you and @maltrud come to an agreement on this. |
OK, thanks. I see now. Thanks for pointing that out. I'll go with the decision above. |
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.
Thanks, everyone, for your work on this. This naming convention will really clarify our meshes.
This metadata is formatted according to the specs of @proteanplanet, see examples below.
To do this, each case with an
e3sm_coupling
step has been given its own config file that contains either the mesh metadata or ways to construct it from other keys ofautodetect
it from mesh fields.Config files: