-
Notifications
You must be signed in to change notification settings - Fork 122
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
[develop] Refactor setup.py to remove use of global variables. #505
Changes from 21 commits
6b46fa3
b8fe83d
abd00c4
3a017e1
1779051
75f1a27
de3bef4
e045a6b
1bb963f
4cec6f0
29272d5
db4e7eb
24bf06e
bb540cc
884e0b1
a3ae539
946df71
4469643
5a7b6d8
139ec9e
487b812
1afaaa7
3b82d28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -797,7 +797,12 @@ Please correct and rerun." | |
# | ||
#----------------------------------------------------------------------- | ||
# | ||
|
||
# Save the environment variable since a default will override when | ||
# sourced. | ||
save_USHdir=${USHdir} | ||
source_config ${USHdir}/config_defaults.yaml | ||
USHdir=${save_USHdir} | ||
christinaholtNOAA marked this conversation as resolved.
Show resolved
Hide resolved
|
||
MACHINE_FILE=${machine_file:-"${USHdir}/machine/${machine,,}.yaml"} | ||
source_config ${MACHINE_FILE} | ||
source_config ${test_config_fp} | ||
|
@@ -1026,7 +1031,7 @@ model_ver="we2e"" | |
# | ||
# Set NCO mode OPSROOT | ||
# | ||
OPSROOT=\"${opsroot}\"" | ||
OPSROOT=\"${opsroot:-$OPSROOT}\"" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not use the default when the user does not provide a value? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not related to this particular change, but have you tested that specifying OPSROOT from the command line still works. That and 5 other root directories are passed through the environment on WCOSS2 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @danielabdi-noaa Thanks for bringing that to my attention. I did not notice that was a thing, and have most definitely messed it up. I will look into that mechanism a bit more. Just to clarify, those env variables are passed at configuration time? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, they are available during worklfow generation and will override any config settings for OPSROOT, COMROOT etc. |
||
|
||
fi | ||
# | ||
|
@@ -1314,10 +1319,13 @@ exist or is not a directory: | |
# | ||
#----------------------------------------------------------------------- | ||
# | ||
$USHdir/generate_FV3LAM_wflow.py || \ | ||
$USHdir/generate_FV3LAM_wflow.py | ||
|
||
if [ $? != 0 ] ; then | ||
print_err_msg_exit "\ | ||
Could not generate an experiment for the test specified by test_name: | ||
test_name = \"${test_name}\"" | ||
fi | ||
|
||
done | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ user: | |
RUN_ENVIR: community | ||
workflow: | ||
DATA_TABLE_TMPL_FN: data_table | ||
DIAG_TABLE_TMPL_FN: diag_table | ||
FIELD_TABLE_TMPL_FN: field_table | ||
DIAG_TABLE_TMPL_FN: diag_table.FV3_GFS_v15p2 | ||
FIELD_TABLE_TMPL_FN: field_table.FV3_GFS_v15p2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The setup.py script no longer does this for us, so we need to specify it here in full. |
||
MODEL_CONFIG_TMPL_FN: model_configure | ||
NEMS_CONFIG_TMPL_FN: nems.configure | ||
CCPP_PHYS_SUITE: FV3_GFS_v15p2 | ||
|
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.
Members should be named with a consistent set of zeros so it's predictable from experiment to experiment. I set it to 3 here so that we can support the vast majority of use cases.