Skip to content

Commit 76dea63

Browse files
Standard Variables Separation and Dedicated Scripts for Bash_Utils and Preamble Functions (NOAA-EMC#4638)
- All functions from bash_utils.sh and preamble.sh are separated into individual scripts for improved organization. - Standard variables previously set in jjob_header and config.base are now managed in a dedicated script for clearer and more consistent handling.
1 parent 250b013 commit 76dea63

File tree

110 files changed

+1394
-464
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1394
-464
lines changed

dev/job_cards/rocoto/prep.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /usr/bin/env bash
2-
2+
set -x
33
###############################################################
44
# Source FV3GFS workflow modules
55
source "${HOMEglobal}/dev/ush/load_modules.sh" run
@@ -12,6 +12,12 @@ fi
1212
export job="prep"
1313
export jobid="${job}.$$"
1414
source "${HOMEglobal}/ush/jjob_header.sh" -e "prep" -c "base prep"
15+
#{% if false %}
16+
source "${HOMEglobal}/ush/jjob_standard_vars.sh"
17+
#{% else %}
18+
#{% include jjob_var_setup.j2 %}
19+
#{% endif %}
20+
source "${HOMEglobal}/dev/ush/jjob_shell_setup.sh"
1521

1622
# Strip 'enkf' from RUN for pulling data
1723
RUN_local="${RUN/enkf/}"

dev/jobs/JGDAS_AERO_ANALYSIS_GENERATE_BMATRIX

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
#! /usr/bin/env bash
2+
set -x
23

34
source "${HOMEglobal}/ush/jjob_header.sh" -e "aeroanlgenb" -c "base aeroanl aeroanlgenb"
45

6+
#{% if false %}
7+
source "${HOMEglobal}/ush/jjob_standard_vars.sh"
8+
#{% else %}
9+
#{% include jjob_var_setup.j2 %}
10+
#{% endif %}
11+
12+
source "${USHglobal}/jjob_shell_setup.sh"
13+
514
##############################################
615
# Set variables used in the script
716
##############################################

dev/jobs/JGDAS_ATMOS_CHGRES_FORENKF

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
#! /usr/bin/env bash
2+
set -x
23

34
source "${HOMEglobal}/ush/jjob_header.sh" -e "anal" -c "base anal echgres"
45

6+
#{% if false %}
7+
source "${HOMEglobal}/ush/jjob_standard_vars.sh"
8+
#{% else %}
9+
#{% include jjob_var_setup.j2 %}
10+
#{% endif %}
11+
12+
source "${USHglobal}/jjob_shell_setup.sh"
13+
514
##############################################
615
# Set variables used in the script
716
##############################################

dev/jobs/JGDAS_ATMOS_GEMPAK

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
#! /usr/bin/env bash
2+
set -x
23

34
source "${HOMEglobal}/ush/jjob_header.sh" -e "gempak" -c "base gempak"
45

6+
#{% if false %}
7+
source "${HOMEglobal}/ush/jjob_standard_vars.sh"
8+
#{% else %}
9+
#{% include jjob_var_setup.j2 %}
10+
#{% endif %}
11+
12+
source "${USHglobal}/jjob_shell_setup.sh"
13+
514
export GRIB=${GRIB:-pgrb2f}
615
export EXT=""
716
export DBN_ALERT_TYPE=${DBN_ALERT_TYPE:-GDAS_GEMPAK}

dev/jobs/JGDAS_ATMOS_GEMPAK_META_NCDC

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
#! /usr/bin/env bash
2+
set -x
23

34
############################################
45
# GDAS GEMPAK META NCDC PRODUCT GENERATION
56
############################################
67

78
source "${HOMEglobal}/ush/jjob_header.sh" -e "gempak_meta" -c "base gempak"
89

10+
#{% if false %}
11+
source "${HOMEglobal}/ush/jjob_standard_vars.sh"
12+
#{% else %}
13+
#{% include jjob_var_setup.j2 %}
14+
#{% endif %}
15+
16+
source "${USHglobal}/jjob_shell_setup.sh"
17+
918
# Now set up GEMPAK/NTRANS environment
1019

1120
# datatype.tbl specifies the paths and filenames of files

dev/jobs/JGDAS_ATMOS_VERFOZN

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
#! /usr/bin/env bash
2+
set -x
23

34
#############################################################
45
# Set up environment for GDAS Ozone Monitor job
56
#############################################################
67
source "${HOMEglobal}/ush/jjob_header.sh" -e "verfozn" -c "base verfozn"
78

9+
#{% if false %}
10+
source "${HOMEglobal}/ush/jjob_standard_vars.sh"
11+
#{% else %}
12+
#{% include jjob_var_setup.j2 %}
13+
#{% endif %}
14+
15+
source "${USHglobal}/jjob_shell_setup.sh"
16+
817
#############################################
918
# determine PDY and cyc for previous cycle
1019
#############################################

dev/jobs/JGDAS_ATMOS_VERFRAD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
#! /usr/bin/env bash
2+
set -x
23

34
#############################################################
45
# Set up environment for GDAS Radiance Monitor job
56
#############################################################
67
source "${HOMEglobal}/ush/jjob_header.sh" -e "verfrad" -c "base verfrad"
78

9+
#{% if false %}
10+
source "${HOMEglobal}/ush/jjob_standard_vars.sh"
11+
#{% else %}
12+
#{% include jjob_var_setup.j2 %}
13+
#{% endif %}
14+
15+
source "${USHglobal}/jjob_shell_setup.sh"
16+
817
#############################################
918
# determine PDY and cyc for previous cycle
1019
#############################################

dev/jobs/JGDAS_ENKF_POST

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
#! /usr/bin/env bash
2+
set -x
23

34
source "${HOMEglobal}/ush/jjob_header.sh" -e "epos" -c "base epos"
45

6+
#{% if false %}
7+
source "${HOMEglobal}/ush/jjob_standard_vars.sh"
8+
#{% else %}
9+
#{% include jjob_var_setup.j2 %}
10+
#{% endif %}
11+
12+
source "${USHglobal}/jjob_shell_setup.sh"
13+
514
##############################################
615
# Set variables used in the script
716
##############################################

dev/jobs/JGDAS_FIT2OBS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
#! /usr/bin/env bash
2+
set -x
23

34
source "${HOMEglobal}/ush/jjob_header.sh" -e "fit2obs" -c "base fit2obs"
45

6+
#{% if false %}
7+
source "${HOMEglobal}/ush/jjob_standard_vars.sh"
8+
#{% else %}
9+
#{% include jjob_var_setup.j2 %}
10+
#{% endif %}
11+
12+
source "${USHglobal}/jjob_shell_setup.sh"
13+
514
##############################################
615
# Set variables used in the script
716
##############################################

dev/jobs/JGEFS_WAVE_STAT

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
#! /usr/bin/env bash
2+
set -x
23

34
source "${HOMEglobal}/ush/jjob_header.sh" -e "wave_stat" -c "base wave wave_stat"
5+
6+
#{% if false %}
7+
source "${HOMEglobal}/ush/jjob_standard_vars.sh"
8+
#{% else %}
9+
#{% include jjob_var_setup.j2 %}
10+
#{% endif %}
11+
12+
source "${USHglobal}/jjob_shell_setup.sh"
413
source "${USHglobal}/wave_domain_grid.sh"
514

615
# Set COM Paths
@@ -20,7 +29,6 @@ fi
2029

2130
# Execute the Script
2231
#"${SCRglobal}/exgefs_wave_stat.sh"
23-
export err=$?
2432
err_chk
2533
##########################################
2634
## Remove the Temporary working directory

0 commit comments

Comments
 (0)