-
Notifications
You must be signed in to change notification settings - Fork 115
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] Transition the var_defns bash file to YAML. #1098
base: develop
Are you sure you want to change the base?
Changes from 1 commit
55b500b
46c4805
87e549f
59d07d4
446f6eb
38f9daa
8496c68
e5b28da
16da1ef
444f1f0
a12f6fb
4bec6b7
0d86ab0
a6513cb
f08e3ef
94d7970
4ef89f6
874af4b
d2a0bc2
253590f
e242490
241ef5d
f360da3
b31f6c7
2ed368f
8b9eb07
0a8cf97
5502cdc
b368974
b7bacbc
d7378dc
e29b3b4
d3f40c6
8f7ac15
50be36a
1acdb48
ce0a6e6
ff4f030
1afdf51
060ecc9
072e8eb
2ce08ae
85070ad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Use UW-compliant YAML for var_defns.sh file. Update loading tasks script for not having all required variables in environment.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,19 @@ | |
# | ||
#----------------------------------------------------------------------- | ||
# | ||
# The J-Job script for checking the post output. | ||
# | ||
# Run-time environment variables: | ||
# | ||
# GLOBAL_VAR_DEFNS_FP | ||
# ENSMEM_INDX | ||
# CDATE | ||
# | ||
# Experiment variables | ||
# | ||
# user.SCRIPTSdir | ||
# user.USHdir | ||
# workflow.EXPTDIR | ||
# | ||
#----------------------------------------------------------------------- | ||
# | ||
|
@@ -16,7 +28,12 @@ | |
#----------------------------------------------------------------------- | ||
# | ||
. $USHdir/source_util_funcs.sh | ||
source_config_for_task "" ${GLOBAL_VAR_DEFNS_FP} | ||
for sect in (user workflow) ; do | ||
for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ | ||
--output-block ${sect}) ; do | ||
export $var | ||
done | ||
done | ||
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. This is the pattern I've added to explicitly state which sections of the var_defns file should be "sourced". The bash util helps us run a UW tool that translates YAML to bash and then exports it line-by-line. This sort of thing will go away with a full integration of uwtools drivers (planned work in upcoming EPIC PI 13). |
||
. $USHdir/job_preamble.sh | ||
# | ||
#----------------------------------------------------------------------- | ||
|
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 command sources everything in the bash file that does not start with "task_", so the environment is now narrowed to the specific script with the new implementation.