Skip to content
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

Plotting output #32

Merged
merged 4 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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