Skip to content

Commit f73ed40

Browse files
authored
Merge pull request #128 from GEOS-ESM/bugfix/movestat-fix
Fix issue with movestat and multi-month seasons
2 parents 69cba9c + c770b9d commit f73ed40

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### Fixed
1717

18+
- Fixed issue with `movestat` which only allowed single-month seasons
19+
1820
### Removed
1921

2022
- Removed detection of OS at NCCS as it is all SLES15 now

plots/movestat

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ else # Interactive Job
3232
# ------------------------------------
3333
if(! -e ~/.WEBSERVER ) then
3434
SERVER:
35-
set server = NULL
35+
set server = NULL
3636
echo " "
3737
echo "Enter WEB Server to use: train"
3838
echo " polar"
@@ -173,9 +173,7 @@ echo " "
173173
if( $season == 'NULL' ) then
174174
set files = `/bin/ls -1 *stats*gif`
175175
set fname = `echo $files[1] | cut -d. -f1`
176-
set fsize = `echo $fname | awk '{print length($0)}'`
177-
@ fsize = $fsize - 2
178-
set season = `echo $fname | cut -b${fsize}-`
176+
set season = `echo $fname | sed 's/.*_//g'`
179177
endif
180178
ssh $webid@${server} mkdir -p ${www}/${webdir}/${season}/corcmp
181179
echo Syncing ${season} Files from $pltdir/corcmp to $webid@${server}:${www}/${webdir}/${season}/corcmp
@@ -190,9 +188,7 @@ echo " "
190188
if( $season == 'NULL' ) then
191189
set files = `/bin/ls -1 *stats*gif`
192190
set fname = `echo $files[1] | cut -d. -f1`
193-
set fsize = `echo $fname | awk '{print length($0)}'`
194-
@ fsize = $fsize - 2
195-
set season = `echo $fname | cut -b${fsize}-`
191+
set season = `echo $fname | sed 's/.*_//g'`
196192
endif
197193
ssh $webid@${server} mkdir -p ${www}/${webdir}/${season}/$DSC
198194
echo Syncing ${season} Files from $pltdir/$DSC to $webid@${server}:${www}/${webdir}/${season}/$DSC
@@ -210,9 +206,7 @@ echo " "
210206
if( $season == 'NULL' ) then
211207
set files = `/bin/ls -1 *stats*gif`
212208
set fname = `echo $files[1] | cut -d. -f1`
213-
set fsize = `echo $fname | awk '{print length($0)}'`
214-
@ fsize = $fsize - 2
215-
set season = `echo $fname | cut -b${fsize}-`
209+
set season = `echo $fname | sed 's/.*_//g'`
216210
endif
217211
ssh $webid@${server} mkdir -p ${www}/${webdir}/${season}/$DSCS[1].$DSC
218212

0 commit comments

Comments
 (0)