Skip to content

Commit 963c652

Browse files
Assuring the last day of each year is December 31
1 parent 5b2a53a commit 963c652

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/eccc-rdrs/rdrs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ for yr in $yearsRange; do
272272

273273
# setting the end point, either the end of current year, or the $endDate
274274
# last time-step of the current year
275-
endOfCurrentYearUnix=$(date --date="$yr-01-01 +1year -1day" "+%s")
275+
endOfCurrentYearUnix=$(date --date="$yr-01-01 23:00:00 +1year -1day" "+%s")
276276
if [[ $endOfCurrentYearUnix -le $endDateUnix ]]; then
277277
endPointUnix=$endOfCurrentYearUnix
278278
else
@@ -287,7 +287,7 @@ for yr in $yearsRange; do
287287

288288
# creating file name
289289
file="${toDateFormatted}12.nc" # current file name
290-
290+
291291
# extracting variables from the files and spatial subsetting
292292
# assuring the process finished using an `until` loop
293293
until ncks -A -v ${variables} \

0 commit comments

Comments
 (0)