-
Notifications
You must be signed in to change notification settings - Fork 216
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
refactor CPLHIST mode and add DATM CPLHIST topo capability #1950
Conversation
…put to be consistent with python3
doc/source/data_models/data-atm.rst
Outdated
"DATM_CLMNCEP_YR_START", "I compsets only - data model starting year to loop data over" | ||
"DATM_CLMNCEP_YR_END", "I compsets only - data model ending year to loop data over" | ||
|
||
.. note:: If ``DATM_MODE`` is set to ``CPLHIST``, it is normally assumed that the model domain will be identical to **all** of the stream domains. To ensure this, the xml variables ``ATM_DOMAIN_PATH`` and ``ATM_DOMAIN_FILE`` are ignored and a valid setting **must be given** for ``DATM_CPLHIST_DOMAIN_FILE``. If ``DATM_CPLHIST_DOMAIN_FILE`` is set to ``null``, then the datm component domain information is read in from the first coupler history file in the target stream and it is assumed that the first coupler stream file that is pointed to contains the domain information for that stream. This is the default mode that should be used for this mode. Alternatively, ``DATM_CPLHIST_DOMAIN_FILE`` can be set to ``$ATM_DOMAIN_PATH/$ATM_DOMAIN_FILE`` in a non-default configuration. |
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.
In another discussion, it was thought that 'none'
is more user accessible than 'null'
. Is it possible to use 'none'
in this context?
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.
Unfortunately, this is not really possible in this case. A 'null' value is hard-wired as the default value in the data model shr strdata input namelist - and it would be good to be consistent with the code. This could be changed -but I'm really wary to do this now.
Is #1877 'fixed' by this change? If so, please add it to the 'Fixes' section of the header. |
#1407 is fixed by this, right? So it should be added to the "Fixes" section. |
Minor documentation point: In your big initial comment, you have three blocks showing the tests you ran. The second is missing information on what compset that's referring to. |
From your documentation in this PR, it looks like you need to explicitly set |
@billsacks - It is the out of the box default - but its always good to explicitly state
it for consistency of specifying what xmlchange commands are needed.
…On Wed, Oct 4, 2017 at 4:46 PM, Bill Sacks ***@***.***> wrote:
From your documentation in this PR, it looks like you need to explicitly
set ./xmlchange DATM_CPLHIST_DOMAIN_FILE=null? From our earlier
discussions, I thought this was going to be the out-of-the-box default?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1950 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHlxE3ORmV55PHWNn-t8mADhnt1Zyg2oks5spArUgaJpZM4Pt_Lq>
.
|
@billsacks -. It is the default but it helps to have it explicitly set as well. I have also addressed your comment as to the documentation. |
@billsacks, @gold2718 - I have explicitly added the fixes in the PR. |
@mvertens I tried setting up a case (out of alpha07d with new cime) with:
This gave (among other things):
Do these "must be" messages indicate problems? If not, I find them confusing, because this wording suggests to me that something is wrong. |
These do not indicate problems. They need to let the user know that if you
use a stream file to obtain the domain and you are picking the stream file
- rather than just having the first stream file be picked - then you need
to have the following naming convention. I think its important to point
this out - but maybe another wording would be useful.
…On Wed, Oct 11, 2017 at 10:28 AM, Bill Sacks ***@***.***> wrote:
@mvertens <https://github.com/mvertens> I tried setting up a case (out of
alpha07d with new cime) with:
./create_newcase --case tg_new_1011 --compset T1850G --res f09_g16 --run-unsupported
cd tg_new_1011
./case.setup
./preview_namelists
This gave (among other things):
Calling /glade2/scratch2/sacks/cesm_code/cesm2_0_alpha07d_newCime/cime/src/components/data_comps/dlnd/cime_config/buildnml
.... Obtaining DLND model domain info from stream sno.cplhist
.... lonname must be xc
.... latname must be yc
.... areaname must be area
.... fracname must be frac
Do these "must be" messages indicate problems? If not, I find them
confusing, because this wording suggests to me that something is wrong.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1950 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHlxE4eKU8yp3Nt_8eXm6VeT2IsWo-1Uks5srOydgaJpZM4Pt_Lq>
.
|
I found these confusing (seeming to indicate a problem), and Mariana was okay with just removing them.
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 looks great. Thanks a lot for adding cplhist topo capability, and also thanks for cleaning up a bunch of inconsistent things with the data models and improving the documentation!
I have pushed some commits with minor cleanup that I was pretty confident about. I have added a few line comments with some things that I was less confident about and wanted to run by you.
doc/source/data_models/data-lnd.rst
Outdated
"DLND_CPLHIST_DIR", "Coupler history data mode directory containing coupler history data" | ||
"DLND_CPLHIST_YR_ALIGN", "Coupler history data model simulation year corresponding to data starting year" | ||
"DLND_CPLHIST_YR_START", "Coupler history data model starting year to loop data over" | ||
"DLND_CPLHIST_YR_END", "Coupler history data model ending year to loop data over" | ||
|
||
.. note:: If ``DLND_MODE`` is set to ``CPLHIST``, it is normally assumed that the model domain will be identical to **all** of the stream domains. To ensure this, the xml variables ``LND_DOMAIN_PATH`` and ``LND_DOMAIN_FILE`` are ignored and a valid setting **must be given** for ``DLND_CPLHIST_DOMAIN_FILE``. If ``DLND_CPLHIST_DOMAIN_FILE`` is set to ``null``, then the dlnd component domain information is read in from the first coupler history file in the target stream and it is assumed that the first coupler stream file that is pointed to contains the domain information for that stream. This is the default mode that should be used for this mode. Alternatively, ``DLND_CPLHIST_DOMAIN_FILE`` can be set to ``$LND_DOMAIN_PATH/$LND_DOMAIN_FILE`` in a non-default configuration. |
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.
Based on our email communication, I think this documentation for DLND_CPLHIST_DOMAIN_FILE is wrong - specifically related to the default behavior (it seems copied from DATM, but I thought the operation was different for DLND).
@@ -17,7 +17,7 @@ | |||
<desc option="CRUv7"> CLM CRU NCEP v7 data set </desc> | |||
<desc option="GSW"> GSWP3 data set </desc> | |||
<desc option="GSWP3v1"> GSWP3v1 data set </desc> | |||
<desc option="CPLHIST"> Coupler hist data set </desc> | |||
<desc option="CPLHIST"> Coupler hist data set (assumes that model grid and stream domains are the same)</desc> |
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 actually assumed, or is it just the default?
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 think this is the default IF the domain file is set to null. In this case if you ask for a different model grid and you obtain the domain from the first stream file then you will have an inconsistent set of mapping files relative to the actual domain that is being used. In that case I think the model should abort - but I've never tried 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.
Thanks for the clarification. But I guess my point is: I don't think CPLHIST mode itself assumes that the model grid and stream domains are the same. Rather, the default if the domain file is set to null assumes that these two domains are the same.
I'm not quite sure if I'm right in my understanding there... and if I am right, I'm not quite sure how and where to document this... but I can think more about how to document this clearly if you want me to.
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.
Yes - I agree with your statement that the default if the domain file is set to null assumes that these two domains are the same. I think that one possible way to state this is that CPLHIST mode is strongly recommended to be run only when the model domain and the couple history forcing are on the same domain. Thoughts?
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.
Yes, I like that wording.
</values> | ||
<group>run_component_datm</group> | ||
<file>env_run.xml</file> | ||
<desc>Simulation year corresponding to starting year (only used for CPLHIST3HrWx mode)</desc> | ||
<desc>Simulation year corresponding to starting year (only used when DATM_MODE is CPLHIST)</desc> |
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.
Since the user now needs to set this manually, I think the documentation should be expanded. Here's my suggestion, but I'd like you to confirm this, because I'm not confident of my understanding of this variable:
<desc>Simulation year corresponding to DATM_CPLHIST_YR_START. This will usually be the same as the year in RUN_STARTDATE, but it can be set to a different year to start the simulation with a different year of forcing data. (Only used when DATM_MODE is CPLHIST.)</desc>
Whatever documentation we add for this one, the same documentation should be added for DLND and DROF CPLHIST_YR_ALIGN.
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'm not sure this is right. Say you had an 1850 simulation and you were writing coupler history output for years 220-230. Now you wanted to use that output to spin-up the ocean. You now start from year 1 in the ocean - but cycle over years 220-230. I think it will be more confusing to add this documentation. Frankly, I think that cplhist mode is really geared to more expert users. We could give some examples in the documentation for clarity - but I think that would be better in the user's guide as opposed to the xml 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.
My understanding of the align year is that, in order to do what you're suggesting, you would set the align year to 1, which I think is consistent with my suggested wording. And I do still think that, for spinup runs, the typical operation would be to set the align year to the year in RUN_STARTDATE... and if that is correct (we could ask Keith L & Keith O to confirm), I do feel it would be helpful to add a brief sentence to that effect so that people don't have to dig all through the user's guide to see how to set this unintuitive value.
But I'll let that go if you still disagree :-) - in which case, I'm fine with putting additional documentation in the user's guide instead of the xml file, as long as it appears somewhere. Your idea of providing some examples of typical use cases sounds like a good one, regardless of whether this extra documentation appears in the xm file. (And I'm fine with that being deferred to a separate issue/pr - in that case we should open an issue for it.)
@@ -1616,8 +1628,6 @@ | |||
scientific modes supported by the model, they are listed below. The | |||
mode is selected by a character string set in the strdata namelist | |||
variable dataMode. | |||
datamode = "CPLHIST" |
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 think CPLHIST should also be removed from the list of valid values for this variable; do you agree?
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.
Yes! Good catch. I'm changing that. Along with some other small fixes I am seeing that need to be made.
<valid_values></valid_values> | ||
<default_value>null</default_value> | ||
<values match="last"> | ||
<value compset="2000.*_DLND%SCPL" grid="l%0.9x1.25">$LND_DOMAIN_PATH/$LND_DOMAIN_FILE</value> |
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 are there these duplicated entries for all the different time periods? Why not have a single entry with a compset match of "_DLND%SCPL"?
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.
Another good catch! You're right. I'll change that.
NOTE: if this is set to 'null', then domain information is read in from the first | ||
coupler history file in the target stream and it is assumed that the first coupler | ||
stream file that is pointed to contains the domain information for that stream. | ||
This is the default mode that should be used when DLND_MODE is CPLHIST or GLC_CPLHIST. |
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 last sentence is wrong for DLND, I think.
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 for catching this as well. Actually this was wrong in DATM, DROF and DLND. I've changed the xml documentation in all three config_component.xml files.
@@ -76,7 +98,7 @@ | |||
|
|||
<entry id="DLND_CPLHIST_YR_ALIGN"> | |||
<type>integer</type> | |||
<default_value>1</default_value> | |||
<default_value>-999</default_value> |
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.
See above comment for DATM_CPLHIST_YR_ALIGN: whatever documentation is added for that one should also be added for DLND_CPLHIST_YR_ALIGN
I would run this by Keith L and Keith O to determine if how they use this.
If we can clarify this in one or two sentences then I am fine with bringing
this into config_component.xml. I just would rather not have a long
explanation.
…On Wed, Oct 11, 2017 at 8:20 PM, Bill Sacks ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/components/data_comps/datm/cime_config/config_component.xml
<#1950 (comment)>:
> </values>
<group>run_component_datm</group>
<file>env_run.xml</file>
- <desc>Simulation year corresponding to starting year (only used for CPLHIST3HrWx mode)</desc>
+ <desc>Simulation year corresponding to starting year (only used when DATM_MODE is CPLHIST)</desc>
My understanding of the align year is that, in order to do what you're
suggesting, you would set the align year to 1, which I think is consistent
with my suggested wording. And I do still think that, for spinup runs, the
typical operation would be to set the align year to the year in
RUN_STARTDATE... and if that is correct (we could ask Keith L & Keith O to
confirm), I do feel it would be helpful to add a brief sentence to that
effect so that people don't have to dig all through the user's guide to see
how to set this unintuitive value.
But I'll let that go if you still disagree :-) - in which case, I'm fine
with putting additional documentation in the user's guide instead of the
xml file, as long as it appears somewhere. Your idea of providing some
examples of typical use cases sounds like a good one, regardless of whether
this extra documentation appears in the xm file. (And I'm fine with that
being deferred to a separate issue/pr - in that case we should open an
issue for it.)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1950 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHlxEzyAs9JK8nNCpQrB2lyc8Rfe6ZG5ks5srXd6gaJpZM4Pt_Lq>
.
|
Description from Keith Lindsay, example from Keith Oleson
…1950) Limit performance archiving to specific projects on each system To allow for automatic performance archiving on ACME production platforms for ACME allocations without also forcing this on non-ACME allocations, add a new XML variable to config_machines.xml and env_run.xml: <SAVE_TIMING_DIR_PROJECTS>proj1,proj2</SAVE_TIMING_DIR_PROJECTS> If (a) PROJECT is one of the projects in this list and (b) SAVE_TIMING is true and (c) SAVE_TIMING_DIR is a legal location, then performance archiving into SAVE_TIMING_DIR will take place. Otherwise it will not. If the first element of the list is ANY, then any allocation will pass test (a). If SAVE_TIMING_DIR_PROJECTS is missing for a given machine in config_machines.xml, then no allocation will pass test (a). Fixes #1949 BFB * origin/worleyph/cime/save_timing_dir_projects: put SAVE_TIMING_DIR_PROJECTS in env_run.xml simplify implementation of is_save_timing_dir_project fix typo in comment in machines.py change logger.warning to logger.info modify logger output when archiving performance data Improve support for project-specific performance archiving
…1950) Limit performance archiving to specific projects on each system To allow for automatic performance archiving on ACME production platforms for ACME allocations without also forcing this on non-ACME allocations, add a new XML variable to config_machines.xml and env_run.xml: <SAVE_TIMING_DIR_PROJECTS>proj1,proj2</SAVE_TIMING_DIR_PROJECTS> If (a) PROJECT is one of the projects in this list and (b) SAVE_TIMING is true and (c) SAVE_TIMING_DIR is a legal location, then performance archiving into SAVE_TIMING_DIR will take place. Otherwise it will not. If the first element of the list is ANY, then any allocation will pass test (a). If SAVE_TIMING_DIR_PROJECTS is missing for a given machine in config_machines.xml, then no allocation will pass test (a). Fixes #1949 BFB * origin/worleyph/cime/save_timing_dir_projects: put SAVE_TIMING_DIR_PROJECTS in env_run.xml simplify implementation of is_save_timing_dir_project fix typo in comment in machines.py change logger.warning to logger.info modify logger output when archiving performance data Improve support for project-specific performance archiving
…1950) Limit performance archiving to specific projects on each system To allow for automatic performance archiving on ACME production platforms for ACME allocations without also forcing this on non-ACME allocations, add a new XML variable to config_machines.xml and env_run.xml: <SAVE_TIMING_DIR_PROJECTS>proj1,proj2</SAVE_TIMING_DIR_PROJECTS> If (a) PROJECT is one of the projects in this list and (b) SAVE_TIMING is true and (c) SAVE_TIMING_DIR is a legal location, then performance archiving into SAVE_TIMING_DIR will take place. Otherwise it will not. If the first element of the list is ANY, then any allocation will pass test (a). If SAVE_TIMING_DIR_PROJECTS is missing for a given machine in config_machines.xml, then no allocation will pass test (a). Fixes #1949 BFB * origin/worleyph/cime/save_timing_dir_projects: put SAVE_TIMING_DIR_PROJECTS in env_run.xml simplify implementation of is_save_timing_dir_project fix typo in comment in machines.py change logger.warning to logger.info modify logger output when archiving performance data Improve support for project-specific performance archiving
This PR has several features:
adding the following new xml variables in DATM, DLND and DOCN
DATM_CPLHIST_DOMAIN_FILE, DLND_CPLHIST_DOMAIN_FILE, DROF_CPLHIST_DOMAIN_FILE
These new xml variables are the full pathname for domain file
for datm, dlnd and drof when the corresponding data model mode
is set to CPLHIST.
NOTE: if any of these xml variables set to 'null',
then domain information is read in from the first coupler
history file in the target stream.
NOTE: it is assumed that when
DXXX_CPLHIST_DOMAIN_FILE='null'
that the first coupler stream file that is pointed
to contains the domain information for that stream.
NOTE: This is the default mode that should be used when the data model
DXXX_MODE is CPLHIST
.xxx_mode (e.g. atm_mode)
variables in dxxx_comp_mod.F90 and dxxx_shr_mod.F90 withdatamode
- to reduce confusion.Additional testing:
Verified that using this CIME branch to replace cime/ in cesm2_0_alpha07d,
the following cases ran successfully on cheyenne with data that was already there:
Test suite: scripts_regression_tests
Test baseline: did not compare against baselines
Test namelist changes: None
Test status: should be bfb
Fixes #1877
Fixes #1407
User interface changes?: added new xml variables discussed above
Update gh-pages html (Y/N)?: Y
Code review: