-
Notifications
You must be signed in to change notification settings - Fork 132
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
update test coverage and test options #129
Conversation
First look at the changes. I have added 7 coverage tests to the base suite and these are passing on conrad with intel. Are we happy with the test names, alt01, alt02, boxdyn, etc? These name match the spreadsheet. Also, the tests may not cover every option specified in the spreadsheet, but I believe most of the settings are. These tests should be further reviewed to make sure they are setup correctly and changes should be suggested. I also plan to update the documentation before this PR is merged. |
I added some documentation and will build on readthedocs to make sure it looks ok. when that is ready, I'll add a link. |
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.
- set_nml.fbotxfercdn, set_nml.highfreq need a return at the end of the file
- set_nml.pondoff is also 'ageoff'
- calc_tsfc and tr_pond_* were removed from set_nml.swccsm3, but these actually need to be set this way for this kind of shortwave. How is that enforced now?
- dg_scripts.rst needs more editing but this can be cleaned up later
Overall this looks okay to me. I'd like to run the suites on one of the computers here and look at the output to check for conflicts, reasonable output, etc. @apcraig did you search the diagnostic output for "WARNING"? I suspect that's how issue #130 came about.
I did not look thru the log files for WARNING messages. I will make the corrections suggested and then have a look at the log files. In some ways, this is a problem with me setting up these configurations, I really don't know how different namelist interact or even what they do in many cases. If there are namelist that have to go together, we should think about how to set them. For instance, if with ccsm3 shortwave, calc_tsfc has to be set a certain way, but for other shortwave options, calc_tsfc can be set various ways, what should we do? I would argue we should have an option to set the shortwave and a separate option to set the calc_tsfc and if those are inconsistent, the model would abort (or be "fixed") at runtime. Otherwise, we run into problems where a user sets swccsm3 (with calc_tsfc also set) and then also chooses a calc_tsfc option separately with --sets and depending on the order that they are set in the list, the namelist will be different with the run sometimes working and other times not. What makes sense to me is that (1) different options are clearly separated if they have any independence (2) options that depend only on each other, can go together. For instance revised_evp is only used when evp is set, so we can have a evp and revp option that also sets the revised_evp flag and we would not have a revised_evp option. (3) the model will abort if options are not consistent. That way the options a user chooses are unlikely to conflict and cause an "order dependency", and the model will only run if reasonable combinations are chosen. This is the best way to guarantee we're testing what we expect to be testing and that users understand what namelist settings they are using. Just my thoughts. I also think we should write down what namelist settings depend on each other and/or conflict with each other. That way we can implement all the necessary checks in the code and also come up with a cleaner set of test configurations. It would be good for that information to also end up in the documentation. |
I have updated the tests and am now running a full test suite on conrad. Will post results when they are done. |
Test results are here under 6065f5c, |
There are lots of several warning messages in the cice.run log files. The box tests and alt01 and alt03 basically have WARNING: runtype, restart, ice_ic are inconsistent: alt02 has WARNING: runtype, restart, ice_ic are inconsistent: alt04 has WARNING: runtype, restart, ice_ic are inconsistent: |
Okay, thanks for checking. I'll work through these and suggest changes. |
Working through the warnings, one set at a time...
namelist combination:
code:
Recommendation: |
namelist combination:
The problem here is an inconsistency between the namelist settings and the test suite settings.
which changes the default ice_in from
to
which the code would normally accept (it ignores the value of restart in this case).
which makes
which is inconsistent with the default initial condition (ice_ic). |
Recommendation: make alt01 and alt02 smoke tests also. |
One that I've run into is tests with histfreq changed to 'd','x','x','x','x'. There are no variables on the daily stream, so we need at least one as: f_aice = 'd' Dave |
Actually, I think the idea was that alt01-alt04 should be restart tests, since this is the only opportunity to check restarts for those options and doing this would cover the smoke test. You can try to do that by removing the icdefault option. I’m not sure whether the other options would still be consistent. There are cases where you cannot restart from an existing restart file (e.g. if the number of layers or categories is different), but if you're doing both runs together (the initial one and then the restart run) it should work.
EDIT: changed the recommendation below to set restart = .false.
|
Continuing with alt03 and alt04... I see now that the test is doing two runs, first 'initial' then 'continue'. The inconsistency is actually with the value of restart:
Recommendation: |
code:
This does not reset anything. It runs this way, and the warning is appropriate, per the physics. |
code:
The intent here is "Are you sure you really want to do this?" |
code:
If this is the only test with kcatbound=-1, then we need to set ncat=1. Otherwise set kcatbound to a different value. |
namelist combination:
code:
Recommendation: Set tr_pond_cesm = .false. and make sure that option is tested somewhere else (with shortwave = 'dEdd'). |
I will update these with some reference to discussion #130. @eclare108213, just a clarification on the restart with ice_ic='none' or 'default'. If that is the case, we want restart=.false. on the initial run? Then we want restart=.true. on the continue run? And if I understand the logic, that means when runtype=initial, the ice_ic is used and the restart flag is ignored. When ice_ic=continue, the ice_ic is ignored and the restart file is defined in pointer_file=ice.restart_file. And in all cases, the dumpfreq defines whether restarts are written and that is independent of the restart and runtype. Do I understand correctly? I don't think I do. Can you just summarize how runtype, ice_ic, and restart interact with each other and what happens in various settings. |
There is a table in the documentation that mapped out the various combinations of parameters for initializing and/or continuing a run. If ice_ic = 'none' or 'default' then we do want restart=F. For continuation runs restart=T. We can also use restart=T for a run starting from a restart file from some other run, when we aren't continuing the previous run (e.g. the data could be different). In that case, runtype='initial' and ice_ic is set to the restart filename and restart=T. That's actually my standard starting configuration for CICE, using the default restart file that's available with the other input data. pointer_file is used for continuation runs. dumpfreq is about writing restart files, so yes it's independent of restart and runtype values. I hope I'm remember all of this correctly... |
Thanks Elizabeth, that helps. I will try to fix the testing. |
I found the table, http://cice-consortium-cice.readthedocs.io/en/master/user_guide/ug_implementation.html#initialization-and-coupling. |
My latest update has alt01-05 passing exact restart with no namelist input ERRORS. There are a couple warning messages (reduce no of blocks) and then for alt04, WARNING: ktherm = 1 and tfrz_option = mushy The box smoke tests are all working, I will try changing these to restart tests. The gx1prod is failing with Current forcing data year = 1978 I think this is progress overall. We still need a working advection=upwind case. I will run a full test suite now on conrad. |
Thanks @apcraig CORRECTION: tfrz_option is in the spreadsheet, under forcing_nml. I changed the value for alt04. |
Test results look fine. The decomp tests are failing because the frz_onset field is different, but all other fields are the same. It wasn't doing that before. Any idea why that is happening? I think we could consider merging this PR to make some progress. There is still more to do. |
I've looked at the frz_onset non-bit-for-bit with different decomps and can't understand it. It looks like frz_onset is just a diagnostics. The runs are bit-for-bit physics and looking closer, only one gridcell is different in the frz_onset field in two different runs. I think we should add an issue and defer for now. |
I think this is ready for merge. I will run a full suite with 4 compilers on conrad tonight. |
If the conrad tests are successful I'll go ahead and merge this. |
Test results from conrad are here, https://github.com/CICE-Consortium/Test-Results/wiki/cice_by_hash_forks hash 09df2f6 There are 3 outstanding issues
I think the problem grid cell with frz_onset is near land and is on the edge of the block for some of the decompositions (but not all). We need to debug further. I don't have a good sense of what might be causing this. I did have a quick look at the implementation and nothing jumps out at me other than the field seems to be uninitialized, but when I fixed that, it did not change answers. I recommend we merge this at this point. We also still need an upwind test case. |
Add new setting options and add new tests. Add ability to generate a set of test options using the test_files.$option format.
Developer(s): tcraig
Are the code changes bit for bit, different at roundoff level, or more substantial? bit-for-bit
Is the documentation being updated with this PR? (Y/N) Y
Other Relevant Details: