-
Notifications
You must be signed in to change notification settings - Fork 251
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
Move regression test input data outside baseline directories #312
Closed
DusanJovic-NOAA
wants to merge
5
commits into
ufs-community:develop
from
DusanJovic-NOAA:rt_separate_input
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c4c1d1d
Add $INPUTDATA_ROOT
DusanJovic-NOAA e726047
Merge remote-tracking branch 'origin/develop' into rt_separate_input
DusanJovic-NOAA d7a7ad3
Update utest
DusanJovic-NOAA 53080c9
rt.sh: Remove LOCKDIR before trying to stop ecflow in cleanup()
DusanJovic-NOAA 275c097
Merge remote-tracking branch 'origin/develop' into rt_separate_input
DusanJovic-NOAA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
rm -fr INPUT RESTART | ||
inputdir=FV3_input_data_127 | ||
if [ $WARM_START = .F. ]; then | ||
cp -r @[RTPWD]/${inputdir}/INPUT . | ||
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT . | ||
mkdir RESTART | ||
else | ||
mkdir INPUT RESTART | ||
cp -r @[RTPWD]/${inputdir}/RESTART/* ./INPUT | ||
cp -r @[INPUTDATA_ROOT]/${inputdir}/RESTART/* ./INPUT | ||
fi | ||
cp @[RTPWD]/${inputdir}/INPUT/aerosol.dat . | ||
cp @[RTPWD]/${inputdir}/INPUT/co2historicaldata_201*.txt . | ||
cp @[RTPWD]/${inputdir}/INPUT/sfc_emissivity_idx.txt . | ||
cp @[RTPWD]/${inputdir}/INPUT/solarconstant_noaa_an.txt . | ||
cp @[RTPWD]/${inputdir}/ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 ./global_o3prdlos.f77 | ||
cp @[RTPWD]/${inputdir}/global_h2o_pltc.f77 ./global_h2oprdlos.f77 | ||
cp @[RTPWD]/${inputdir}/*grb . | ||
cp @[RTPWD]/${inputdir}/*_table . | ||
cp @[RTPWD]/${inputdir}/diag_table_mg3tke diag_table | ||
cp @[RTPWD]/${inputdir}/field_table_csawmg3shoc field_table | ||
cp @[RTPWD]/${inputdir}/*configure . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/INPUT/aerosol.dat . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/INPUT/co2historicaldata_201*.txt . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/INPUT/sfc_emissivity_idx.txt . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/INPUT/solarconstant_noaa_an.txt . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 ./global_o3prdlos.f77 | ||
cp @[INPUTDATA_ROOT]/${inputdir}/global_h2o_pltc.f77 ./global_h2oprdlos.f77 | ||
cp @[INPUTDATA_ROOT]/${inputdir}/*grb . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/*_table . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/diag_table_mg3tke diag_table | ||
cp @[INPUTDATA_ROOT]/${inputdir}/field_table_csawmg3shoc field_table | ||
cp @[INPUTDATA_ROOT]/${inputdir}/*configure . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
rm -fr INPUT RESTART | ||
inputdir=FV3_input_data_127 | ||
if [ $WARM_START = .F. ]; then | ||
cp -r @[RTPWD]/${inputdir}/INPUT . | ||
cp -r @[INPUTDATA_ROOT]/${inputdir}/INPUT . | ||
mkdir RESTART | ||
else | ||
mkdir INPUT RESTART | ||
cp -r @[RTPWD]/${inputdir}/RESTART/* ./INPUT | ||
cp -r @[INPUTDATA_ROOT]/${inputdir}/RESTART/* ./INPUT | ||
fi | ||
cp @[RTPWD]/${inputdir}/INPUT/aerosol.dat . | ||
cp @[RTPWD]/${inputdir}/INPUT/co2historicaldata_201*.txt . | ||
cp @[RTPWD]/${inputdir}/INPUT/sfc_emissivity_idx.txt . | ||
cp @[RTPWD]/${inputdir}/INPUT/solarconstant_noaa_an.txt . | ||
cp @[RTPWD]/${inputdir}/ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 ./global_o3prdlos.f77 | ||
cp @[RTPWD]/${inputdir}/global_h2o_pltc.f77 ./global_h2oprdlos.f77 | ||
cp @[RTPWD]/${inputdir}/*grb . | ||
cp @[RTPWD]/${inputdir}/*_table . | ||
cp @[RTPWD]/${inputdir}/diag_table_mg3tke diag_table | ||
cp @[RTPWD]/${inputdir}/field_table_csawmg3shoc field_table | ||
cp @[RTPWD]/${inputdir}/*configure . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/INPUT/aerosol.dat . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/INPUT/co2historicaldata_201*.txt . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/INPUT/sfc_emissivity_idx.txt . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/INPUT/solarconstant_noaa_an.txt . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 ./global_o3prdlos.f77 | ||
cp @[INPUTDATA_ROOT]/${inputdir}/global_h2o_pltc.f77 ./global_h2oprdlos.f77 | ||
cp @[INPUTDATA_ROOT]/${inputdir}/*grb . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/*_table . | ||
cp @[INPUTDATA_ROOT]/${inputdir}/diag_table_mg3tke diag_table | ||
cp @[INPUTDATA_ROOT]/${inputdir}/field_table_csawmg3shoc field_table | ||
cp @[INPUTDATA_ROOT]/${inputdir}/*configure . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
rm -fr INPUT RESTART | ||
if [ $WARM_START = .F. ]; then | ||
cp -r @[RTPWD]/FV3_input_data/INPUT . | ||
cp -r @[INPUTDATA_ROOT]/FV3_input_data/INPUT . | ||
mkdir RESTART | ||
else | ||
mkdir INPUT RESTART | ||
cp -r @[RTPWD]/FV3_input_data/RESTART/* ./INPUT | ||
cp -r @[INPUTDATA_ROOT]/FV3_input_data/RESTART/* ./INPUT | ||
fi | ||
cp @[RTPWD]/FV3_input_data/INPUT/aerosol.dat . | ||
cp @[RTPWD]/FV3_input_data/INPUT/co2historicaldata_201*.txt . | ||
cp @[RTPWD]/FV3_input_data/INPUT/sfc_emissivity_idx.txt . | ||
cp @[RTPWD]/FV3_input_data/INPUT/solarconstant_noaa_an.txt . | ||
cp @[RTPWD]/FV3_input_data/ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 ./global_o3prdlos.f77 | ||
cp @[RTPWD]/FV3_input_data/global_h2o_pltc.f77 ./global_h2oprdlos.f77 | ||
cp @[RTPWD]/FV3_input_data/*grb . | ||
cp @[RTPWD]/FV3_input_data/*_table . | ||
cp @[RTPWD]/FV3_input_data/diag_table_mgtkers diag_table | ||
#cp @[RTPWD]/FV3_input_data/field_table_mgtkers field_table | ||
cp @[RTPWD]/FV3_input_data/field_table_csawmgshoc field_table | ||
cp @[RTPWD]/FV3_input_data/*configure . | ||
cp @[RTPWD]/FV3_input_data_INCCN_aeroclim/MERRA2/merra2C.aerclim.2003-2014.*nc . | ||
cp @[INPUTDATA_ROOT]/FV3_input_data/INPUT/aerosol.dat . | ||
cp @[INPUTDATA_ROOT]/FV3_input_data/INPUT/co2historicaldata_201*.txt . | ||
cp @[INPUTDATA_ROOT]/FV3_input_data/INPUT/sfc_emissivity_idx.txt . | ||
cp @[INPUTDATA_ROOT]/FV3_input_data/INPUT/solarconstant_noaa_an.txt . | ||
cp @[INPUTDATA_ROOT]/FV3_input_data/ozprdlos_2015_new_sbuvO3_tclm15_nuchem.f77 ./global_o3prdlos.f77 | ||
cp @[INPUTDATA_ROOT]/FV3_input_data/global_h2o_pltc.f77 ./global_h2oprdlos.f77 | ||
cp @[INPUTDATA_ROOT]/FV3_input_data/*grb . | ||
cp @[INPUTDATA_ROOT]/FV3_input_data/*_table . | ||
cp @[INPUTDATA_ROOT]/FV3_input_data/diag_table_mgtkers diag_table | ||
#cp @[INPUTDATA_ROOT]/FV3_input_data/field_table_mgtkers field_table | ||
cp @[INPUTDATA_ROOT]/FV3_input_data/field_table_csawmgshoc field_table | ||
cp @[INPUTDATA_ROOT]/FV3_input_data/*configure . | ||
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/MERRA2/merra2C.aerclim.2003-2014.*nc . | ||
for n in 01 02 03 04 05 06 07 08 09 10 11 12; do | ||
ln -sf merra2C.aerclim.2003-2014.m${n}.nc aeroclim.m${n}.nc | ||
done | ||
cp @[RTPWD]/FV3_input_data_INCCN_aeroclim/mg2_IN_CCN/cam5_4_143_NAAI_monclimo2.nc cam5_4_143_NAAI_monclimo2.nc | ||
cp @[RTPWD]/FV3_input_data_INCCN_aeroclim/mg2_IN_CCN/cam5_4_143_NPCCN_monclimo2.nc cam5_4_143_NPCCN_monclimo2.nc | ||
cp @[RTPWD]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_BC.v1_3.dat optics_BC.dat | ||
cp @[RTPWD]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_OC.v1_3.dat optics_OC.dat | ||
cp @[RTPWD]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_DU.v15_3.dat optics_DU.dat | ||
cp @[RTPWD]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_SS.v3_3.dat optics_SS.dat | ||
cp @[RTPWD]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_SU.v1_3.dat optics_SU.dat | ||
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/mg2_IN_CCN/cam5_4_143_NAAI_monclimo2.nc cam5_4_143_NAAI_monclimo2.nc | ||
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/mg2_IN_CCN/cam5_4_143_NPCCN_monclimo2.nc cam5_4_143_NPCCN_monclimo2.nc | ||
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_BC.v1_3.dat optics_BC.dat | ||
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_OC.v1_3.dat optics_OC.dat | ||
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_DU.v15_3.dat optics_DU.dat | ||
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_SS.v3_3.dat optics_SS.dat | ||
cp @[INPUTDATA_ROOT]/FV3_input_data_INCCN_aeroclim/aer_data/LUTS/optics_SU.v1_3.dat optics_SU.dat |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
mod_def files change more frequently than other input changes, I think it would be good to keep the mod_defs in the baseline directory while the other files live in the INPUTDATA_ROOT directory. This could be done as a second commit for follow up if desired.
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.
May I ask what makes mod_def files changed so frequently when ww3 source code is updated? Is there a way to make ww3 grid def not tied up with source code updates?
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 mod_def files pre-process grid and physics information. The fix file they process does not change and should remain in the INPUTDATA_ROOT directory. However, if a new feature is added, this will change the binary processed file. While not every update of WW3 updates the mod_defs, they will certainly be updated more than any other fixed input file, which is why I would recommend putting this in the baseline directory. A major rewrite/restructuring of WW3 would be required for these files to not need to occasionally be updated including optimization of the pre-processing that occurs in the generation of these mod_def 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.
This PR separates all input files (now located in $INPUTDATA_ROOT) from all output (history) files which we save and call 'baselines'. When the rt.sh is executed with '-c' command line flag (create baseline mode) tests are executed and all output files that we need to save as 'a new baseline' are saved in $NEW_BASELINE which is then moved to develop-YYYYMMDD.
Moving purely input data ( mod_def.* ) from $INPUTDATA_ROOT to a baseline (output) directory will break this clear separation of input vs output, and so rt.sh will need to know that some input data are in $INPUTDATA_ROOT and some are in develop-YYYYMMDD ($RTPWD). It will also need some mechanism of syncing (some) input data from baseline directory over to the new baseline directory, which will be the special case just for these 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.
All mod_def.* files are binary but I see they all start with header like:
^@^@^AÏWAVEWATCH III MODEL DEFINITION FILE2020-06-18
What's the meaning of this date 2020-06-18? Is this some sort of version number of the file? If it is will the 'new' version of the mod_def files have different (version) date? If they will, maybe we can store multiple 'versions' of the mod_def files in same input directory and have rt.sh use the one that specific version of WW3 submoudule needs.
Then when WW3 is updated and it needs new mod_def file we can just add them (as a new version) to the current $INPUTDATA_ROOT, without creating entire new input data directory. Adding new files should not require new input-data-YYYYMMDD.
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.
@DusanJovic-NOAA the 2020-06-18 is coming from: https://github.com/NOAA-EMC/WW3/blob/develop/model/ftn/w3iogrmd.ftn#L70 which is the "version" number of that file. I like your idea of just having WW3 version numbers so that we can add more files without having more and more directories. That is also clean in terms of keeping the input files separate and all together. The only wrinkle with that, is then my ambition of some day adding an automatic generator of that input file when creating the baseline directory doesn't really work in the way I originally was thinking about, but I'm sure something could be worked out for that too.
@junwang-noaa the mod_def files contain a lot of information and sometimes you are just storing that a new feature is "false" and you are not using it but because it's now an option this file will change. Sometimes it changes every commit, many times it does not. You can see a description of all of the inputs that go into this file here: https://github.com/NOAA-EMC/WW3/blob/develop/model/inp/ww3_grid.inp the mod_def will also change if you use a different switch file but are still using the same ww3_grid.inp input 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.
@JessicaMeixner-NOAA @junwang-noaa @DusanJovic-NOAA, If I understand correctly, the INPUTDATA_ROOT dir and its content will also change (slowly, not as frequently as the baseline), right? For example, adding new input files for new regression test cases, replacing old/obsolete files, etc. If that's the case, the WW3 mod_def.* files (typically change less frequently) can still sit in the INPUTDATA_ROOT dir. Whenever, they need to be updated, they can be updated in the INPUTDATA_ROOT dir as well. I assume the INPUTDATA_ROOT dirs will also have different versions (saying INPUTDATA_yyyymmdd). Just a thought. May or may not be useful.