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
13 changes: 10 additions & 3 deletions scripts/gwf-ncar-conus_ii/conus_ii.sh
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,14 @@ for yr in $yearsRange; do
# current timestamp formatted to conform to CONUSII naming convention
toDateFormatted=$(date --date "$toDate" "+$format")

# ignore leap days
day=$(date --date "$toDate" "+%m%d")
if [[ "$day" == "0229" ]]; then
toDate=$(date --date "$toDate 1hours") # current time-step
toDateUnix=$(date --date "$toDate" +"%s") # current UNIX EPOCH
continue
fi

# copy files to $cache
cp "${datasetDir}/${yr}/${fileStruct}_${toDateFormatted}" \
"${cacheDir}/${yr}/${fileStruct}_${toDateFormatted}"
Expand Down Expand Up @@ -469,10 +477,10 @@ for yr in $yearsRange; do
-d "$lonVar","$lonLimsIdx" \
"$cacheDir/$yr/$f2" "$cacheDir/$yr/$f2"; do

echo "$(basename $0): Process killed: restarting process" >$2
echo "$(basename $0): Process killed: restarting process" >$2
sleep 5;
done

done

# increment time-step by one unit
Expand All @@ -499,7 +507,6 @@ for yr in $yearsRange; do
# sorting files to make sure the time-series is correct
IFS=$'\n' files=($(sort <<<"${files[*]}")); unset IFS


# check the $timeScale variable
case "${timeScale,,}" in

Expand Down