Skip to content
Merged
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
14 changes: 8 additions & 6 deletions scripts/katana/katana.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@
module load miniforge
mamba activate katana

START_YEAR=2019
START_MONTH=10

## Update these variables with the actual paths ##
KATANA_OUTPUT_DIR=/path/to/katana/output/

## Update path to katana ini file ##
KATANA_INI=/path/to/katana.ini
## -------------------------------------------- ##

# Extract variables from ini file.
START_DATE=$(grep -E '^start_date' "$KATANA_INI" | cut -d':' -f2- | xargs)
START_YEAR=$(date -d "$START_DATE" +%Y)
START_MONTH=$(date -d "$START_DATE" +%m)
INPUT_DIR=$(grep -E '^hrrr_directory' "$KATANA_INI" | cut -d':' -f2 | awk '{$1=$1;print}')
KATANA_OUTPUT_DIR=$(grep -E '^out_location' "$KATANA_INI" | cut -d':' -f2 | awk '{$1=$1;print}')

for MONTH in {0..11}; do
START=($(date -d "${START_MONTH}/01/${START_YEAR} + ${MONTH} month" "+%m %Y"))
END=($(date -d "${START_MONTH}/01/${START_YEAR} + $((MONTH + 1)) month" "+%m %Y"))
Expand Down