Skip to content

Commit

Permalink
Merge pull request #32 from antarctica/plotting_output
Browse files Browse the repository at this point in the history
Plotting output
  • Loading branch information
thomaszwagerman authored Feb 5, 2025
2 parents 8e266b6 + f65463e commit 29093af
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ENVS.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export PIPELINE_DIRECTORY=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev
export DATA_DIR=${DATA_DIR:-${PIPELINE_DIRECTORY}/data/ERA5/monthly}
export OUTPUT_DIR=${OUTPUT_DIR:-${PIPELINE_DIRECTORY}/output}

## Output plotting
# Specify whether a plot should also be written out
export OUTPUT_PLOTTING=false

# Specify environment so it does not need to be called prior to running
export ASLI_VENV=${ASLI_VENV:-${PIPELINE_DIRECTORY}/asli_env/bin/activate}

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cdsapi==0.7.5
configparser==7.1.0
pathlib==1.0.1
rdflib==7.1.1
rocrate=0.13.0
rocrate==0.13.0
s3fs==2024.6.1
setuptools==75.3.0
xarray==2024.6.0
Expand Down
7 changes: 7 additions & 0 deletions src/01_run_asli_calculations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ set -e
# output.csv will need to be renamed to sensible unique identifier
echo "Running job on $NUM_CORES cores."
asli_calc $DATA_DIR/era5_mean_sea_level_pressure_monthly_*.nc -o $OUTPUT_DIR/asli_calculation_$FILE_IDENTIFIER.csv -n $NUM_CORES

# If OUTPUT_PLOTTING is set to true also output plots
if [[ "${OUTPUT_PLOTTING}" == true ]]; then
for plot_year in $(seq $START_YEAR $END_YEAR);
do asli_plot $DATA_DIR/era5_mean_sea_level_pressure_monthly_*.nc -y $plot_year -i $OUTPUT_DIR/asli_calculation_$FILE_IDENTIFIER.csv -o $OUTPUT_DIR/asli_plot_$plot_year.png;
done
fi

0 comments on commit 29093af

Please sign in to comment.