-
Notifications
You must be signed in to change notification settings - Fork 360
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
harden eamxx/prod testmod #6621
Conversation
|
430163a
to
6a6415a
Compare
@@ -29,7 +29,7 @@ | |||
<rest_file_extension>r\.(INSTANT|AVERAGE|MAX|MIN)\.n(step|sec|min|hour|day|month|year)s_x\d*</rest_file_extension> | |||
<rest_file_extension>rhist\.(INSTANT|AVERAGE|MAX|MIN)\.n(step|sec|min|hour|day|month|year)s_x\d*</rest_file_extension> | |||
<!-- The following matches "hi.AVGTYPE.FREQUNITS_xFREQ.TIMESTAMP.nc"--> |
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.
Is this comment still relevant?
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, the only reason I kept is to avoid a merge conflict when the repos are combined: https://github.com/E3SM-Project/scream/blob/25120ff1fd4fb086176d21ebf888d3722a915bb8/cime_config/config_archive.xml#L31-L32.
I also don't think we should keep the logic this way because it is ad-hoc and I had to go to great lengths renaming the prefixes to get it right. We need to settle on a naming convention in the EAMxx IO such that the logic can capture everything without the user having to do special things to make it work. Btw, we already do special thing (disabling the output at t0) to make these comparison tests pass, and we should get rid of that too
@@ -82,6 +83,8 @@ for file in ${output_yaml_files[@]}; do | |||
sed -i "s|horiz_remap_file:.*_to_ne30.*|horiz_remap_file: ${hmapfile}|" ./$(basename ${file}) | |||
sed -i "s|horiz_remap_file:.*_to_DecadalSites.*|horiz_remap_file: ${armmapfile}|" ./$(basename ${file}) | |||
fi | |||
# replace all filename prefixes so that st_archive works... | |||
sed -i "s|eamxx_output.decadal|${case_name}.scream|" ./$(basename ${file}) |
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.
@rljacob I couldn't get this to work with ".eamxx.[...].h" --- I tried changing all sorts of things (in config_files, in config_component, etc.) to no avail, so I guess we have to keep this way for now?
@@ -1,6 +1,6 @@ | |||
%YAML 1.1 | |||
--- | |||
filename_prefix: scream_output.decadal.1dailyAVG_native.h | |||
filename_prefix: eamxx_output.decadal.1dailyAVG_native.h |
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.
The general pattern should be [CASE_name].[model name].h[anystring].[date string].nc
so make this output.decadal.eamxx.h.1dailyAVG_native then in your sed command replace "output.decadal" with "case_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.
I agree.
Then, we have to change this line, right?
<hist_file_extension>.*\.h\.(?!rhist\.).*\.nc$</hist_file_extension>
Currently, this captures: [CASE_name].[model_name].[anystring].h.[date_misc_string].nc
--
Either way, we need to hard-wire the logic (I prefer yours, because it is consistent with other components) in the EAMxx IO. Imho, that should be one of the first steps in reconciling the repos. I can try to do it after this PR.
For this PR, I can add a second hist_file_extension entry to capture your proposed logic
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.
You should be able to use the same regex as eam:
<hist_file_extension>h\d*.*\.nc$</hist_file_extension>
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.
The problem is, EAMxx IO limitation mean that we save the rhist files with the same exact pattern except with "rhist" somewhere before the date info, so we need to exclude those somehow
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.
And rhist files are saved regardless if they're needed or not in EAMxx... at every restart
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, not yet :) it's only in the preset-output tests and this PR. But it is really time we make that a commitment from the EAMxx IO to have a clear signature. I will bring it up during the dev call this week and if people are happy, we can make a permanent change such that we guarantee EAMxx IO saves files with a specific pattern to make everyone happy (tests, Rob, etc.)
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.
Ah, I see that Jim changed the prefix in the testmods. I thought we actually made the change here, making it return
.h
.
The question to settle is whether not we want to adopt a stricter pattern, that is, which one of these do we want?
[anystring].h.[date_specs].nc
[case_name].[model_name].h.[anystring].[date_specs].nc
Note that we do need the model name somewhere (so we maybe should make the code return scream.h, scream.r, scream.rhist, etc.?)
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.
But this conversation is not a blocker for the PR, so we can discuss it separately
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.
Can you create an issue while we wait for the dev call? I think this can be settled in 1 min of typing by a handful of ppl... I'm ok with either pattern, as long as we allow the presence of [anystring] somewhere (rather than rely on h0, h1, h2, ... numbering of the streams).
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.
Done: E3SM-Project/scream#3001
@rljacob one thing that was pretty confusing to me: I don't see anything in the logs about 1994 (start date of this run). But I do see them once I download the saved logs. How can we get ./create_test to print information that's similar to what we see on cdash? |
@@ -29,7 +29,7 @@ | |||
<rest_file_extension>r\.(INSTANT|AVERAGE|MAX|MIN)\.n(step|sec|min|hour|day|month|year)s_x\d*</rest_file_extension> | |||
<rest_file_extension>rhist\.(INSTANT|AVERAGE|MAX|MIN)\.n(step|sec|min|hour|day|month|year)s_x\d*</rest_file_extension> | |||
<!-- The following matches "hi.AVGTYPE.FREQUNITS_xFREQ.TIMESTAMP.nc"--> | |||
<hist_file_extension>hi\.(INSTANT|AVERAGE|MAX|MIN)\.n(step|sec|min|hour|day|month|year)s_x\d*\.\d{4}-\d{2}-\d{2}-\d{5}\.nc$</hist_file_extension> | |||
<hist_file_extension>.*\.h\.(?!rhist\.).*\.nc$</hist_file_extension> |
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.
What's the point of the negative look ahead? There should be no ".h.rhist" file generated by EAMxx. If someone puts ".h" in the filename prefix, they are kind of asking for it...
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 just copied what @jgfouca did: E3SM-Project/scream#2957
Is this ready? |
Yes, it's ready to be merged. We will follow up with another PR to add this testmod to more nightly tests, but for now, we will just run it in here. Thanks! |
harden eamxx/prod testmod makes the ERS eamxx/prod test compare outputs in all files, requiring pulling a bugfix from the scream repo. [BFB]
makes the ERS eamxx/prod test compare outputs in all files, requiring pulling a bugfix from the scream repo.