Skip to content

Commit af4e7eb

Browse files
Merge branch 'main' into feature/wjiang/bill_remap_upper_stretched_cube_in
2 parents 8dd4e92 + 04f0e60 commit af4e7eb

File tree

5 files changed

+111
-109
lines changed

5 files changed

+111
-109
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
### Changed
1717

18+
- Move to use `time_ave_util.x` from MAPL instead of `time_ave.x`
19+
1820
### Fixed
1921

2022
### Removed

post/gcmclim.script

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ endif
4141

4242
# Capture Input Arguments
4343
# -----------------------
44-
set source = 'NULL'
45-
set collections = 'ALL'
46-
set NCPUS = 'NULL'
47-
set expid = 'NULL'
44+
set source = 'NULL'
45+
set collections = 'ALL'
46+
set NCPUS = 'NULL'
47+
set expid = 'NULL'
4848
set filetype = 'monthly'
4949
set diurnal = ''
5050
@ nostrict = 0
@@ -106,15 +106,15 @@ endif
106106
echo Use: NCPUS = $NCPUS
107107

108108
if( $NCPUS == "NULL" | $NCPUS == 1 ) then
109-
set TIMEAVE_x = "$GEOSUTIL/bin/time_ave.x"
109+
set TIMEAVE_x = "$GEOSUTIL/bin/time_ave_util.x"
110110
else
111111
if ( ! $?RUN_CMD ) then
112112
echo " "
113113
echo "Environment variable RUN_CMD must be defined before use\!"
114114
echo " "
115115
exit 1
116116
endif
117-
set TIMEAVE_x = "$RUN_CMD $NCPUS $GEOSUTIL/bin/time_ave.x"
117+
set TIMEAVE_x = "$RUN_CMD $NCPUS $GEOSUTIL/bin/time_ave_util.x"
118118
endif
119119

120120

@@ -238,9 +238,9 @@ foreach MON (01 02 03 04 05 06 07 08 09 10 11 12)
238238
if( $MON2 > 12 ) @ MON2 = $MON2 - 12
239239
if( $MON3 > 12 ) @ MON3 = $MON3 - 12
240240

241-
if( $MON1 < 10 ) set MON1 = 0$MON1
242-
if( $MON2 < 10 ) set MON2 = 0$MON2
243-
if( $MON3 < 10 ) set MON3 = 0$MON3
241+
if( $MON1 < 10 ) set MON1 = 0$MON1
242+
if( $MON2 < 10 ) set MON2 = 0$MON2
243+
if( $MON3 < 10 ) set MON3 = 0$MON3
244244

245245
if( $MON1 == "01" ) set SEASON = JFM
246246
if( $MON1 == "02" ) set SEASON = FMA
@@ -257,7 +257,7 @@ foreach MON (01 02 03 04 05 06 07 08 09 10 11 12)
257257
set season = `echo $SEASON | tr "[:upper:]" "[:lower:]"`
258258

259259
if( $MM == -99 | $MM == $MON1 | $MM == $MON2 | $MM == $MON3 ) then
260-
260+
261261
if( `echo $SEASONS` =~ \*${SEASON}\* ) then
262262
/bin/rm -f $fname.clim.$SEASON.$ext
263263
/bin/rm -f $season.tabl
@@ -329,15 +329,15 @@ if( `echo $SEASONS` =~ \*ANN\* ) then
329329
$fname.clim.JJA.$ext \
330330
$fname.clim.SON.$ext`
331331

332-
$TIMEAVE_x -hdf $ANNfiles -strict false -tag $fname.clim.ANN -noquad -ntmin 1 $diurnal
332+
$TIMEAVE_x -hdf $ANNfiles -strict false -tag $fname.clim.ANN -noquad -ntmin 1 $diurnal
333333
if( "$diurnal" == "" ) then
334334
/bin/mv $fname.clim.ANN.*.$ext $fname.clim.ANN.$ext
335335
else
336336
/bin/rm $fname.clim.ANN.*.$ext
337337
/bin/mv $fname.clim.ANN_diurnal.*.$ext $fname.clim.ANN.$ext
338338
endif
339-
set year = `echo $begdate | cut -c1-4`
340-
set month = `echo $begdate | cut -c5-6`
339+
set year = `echo $begdate | cut -c1-4`
340+
set month = `echo $begdate | cut -c5-6`
341341
if( $month == "01" ) set MON = JAN
342342
if( $month == "02" ) set MON = FEB
343343
if( $month == "03" ) set MON = MAR
@@ -372,8 +372,8 @@ if( "$diurnal" == "" ) then
372372
else
373373
set timinc = "mo"
374374
endif
375-
set year = `echo $begdate | cut -c1-4`
376-
set month = `echo $begdate | cut -c5-6`
375+
set year = `echo $begdate | cut -c1-4`
376+
set month = `echo $begdate | cut -c5-6`
377377
if( $month == "01" ) set MON = JAN
378378
if( $month == "02" ) set MON = FEB
379379
if( $month == "03" ) set MON = MAR

post/gcmpost.script

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -679,13 +679,13 @@ sleep 5
679679
echo " Performing time average ..."
680680
if(! -e time_ave.rc ) ln -s $GEOSUTIL/post/time_ave.rc .
681681
if( $NCPUS == "NULL" | $NCPUS == 1 | !($?RUN_CMD) ) then
682-
$GEOSUTIL/bin/time_ave_nompi.x -hdf $locals -rc time_ave.rc \
683-
-tag $expid.$collection.monthly \
682+
$GEOSUTIL/bin/time_ave_util.x -hdf $locals -rc time_ave.rc \
683+
-tag $expid.$collection.monthly \
684684
-d $expid.$collection.diurnal $STRICT $IGNORE_NAN
685685
else
686-
$RUN_CMD $NCPUS $GEOSUTIL/bin/time_ave.x -hdf $locals -rc time_ave.rc \
686+
$RUN_CMD $NCPUS $GEOSUTIL/bin/time_ave_util.x -hdf $locals -rc time_ave.rc \
687687
-tag $expid.$collection.monthly \
688-
-d $expid.$collection.diurnal $STRICT $IGNORE_NAN
688+
-d $expid.$collection.diurnal $STRICT $IGNORE_NAN
689689
endif
690690
endif
691691

post/gcmpost_CPLFCSTfull.script

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -67,24 +67,24 @@ endif
6767
@ n = 1
6868
while( $n <= $nmax )
6969

70-
if( "$argv[$n]" == "-source" ) then
71-
@ n = $n + 1
72-
setenv SOURCE $argv[$n]
70+
if( "$argv[$n]" == "-source" ) then
71+
@ n = $n + 1
72+
setenv SOURCE $argv[$n]
7373
endif
7474

7575
if( "$argv[$n]" == "-recover" ) then
7676
@ n = $n + 1
77-
set RECDATE = $argv[$n]
77+
set RECDATE = $argv[$n]
7878
endif
7979

80-
if( "$argv[$n]" == "-ncpus" ) then
81-
@ n = $n + 1
82-
set NCPUS = $argv[$n]
80+
if( "$argv[$n]" == "-ncpus" ) then
81+
@ n = $n + 1
82+
set NCPUS = $argv[$n]
8383
endif
8484

85-
if( "$argv[$n]" == "-expid" ) then
86-
@ n = $n + 1
87-
set EXPID = $argv[$n]
85+
if( "$argv[$n]" == "-expid" ) then
86+
@ n = $n + 1
87+
set EXPID = $argv[$n]
8888
endif
8989

9090
if( "$argv[$n]" == "-expiy" ) then
@@ -97,41 +97,41 @@ while( $n <= $nmax )
9797
set EXPIE = $argv[$n]
9898
endif
9999

100-
if( "$argv[$n]" == "-clim" ) then
100+
if( "$argv[$n]" == "-clim" ) then
101101
set CLIMO = 'TRUE'
102102
endif
103103

104-
if( "$argv[$n]" == "-nostrict" ) then
104+
if( "$argv[$n]" == "-nostrict" ) then
105105
set STRICT = '-strict false'
106106
endif
107107

108-
if( "$argv[$n]" == "-ana" ) then
108+
if( "$argv[$n]" == "-ana" ) then
109109
set ANA = '-ana'
110110
endif
111111

112-
if( "$argv[$n]" == "-ddf" ) then
113-
@ n = $n + 1
114-
set DDF = $argv[$n]
112+
if( "$argv[$n]" == "-ddf" ) then
113+
@ n = $n + 1
114+
set DDF = $argv[$n]
115115
endif
116116

117-
if( "$argv[$n]" == "-history" ) then
118-
@ n = $n + 1
119-
set HISTORYRC = $argv[$n]
117+
if( "$argv[$n]" == "-history" ) then
118+
@ n = $n + 1
119+
set HISTORYRC = $argv[$n]
120120
endif
121121

122-
if( "$argv[$n]" == "-begdate" ) then
123-
@ n = $n + 1
124-
set BEGDATE = $argv[$n]
122+
if( "$argv[$n]" == "-begdate" ) then
123+
@ n = $n + 1
124+
set BEGDATE = $argv[$n]
125125
endif
126126

127-
if( "$argv[$n]" == "-enddate" ) then
128-
@ n = $n + 1
129-
set ENDDATE = $argv[$n]
127+
if( "$argv[$n]" == "-enddate" ) then
128+
@ n = $n + 1
129+
set ENDDATE = $argv[$n]
130130
endif
131131

132-
if( "$argv[$n]" == "-list" ) then
133-
@ n = $n + 1
134-
set LIST = $argv[$n]
132+
if( "$argv[$n]" == "-list" ) then
133+
@ n = $n + 1
134+
set LIST = $argv[$n]
135135
endif
136136

137137
if( "$argv[$n]" == "-plots" ) then
@@ -373,7 +373,7 @@ if( $PLOTS[1] != "NULL" ) then
373373
set PATH = ''
374374
set node = `echo $DSET | cut -d / -f$m `
375375
while( $node != $FILE )
376-
set node = `echo $node | sed -e 's/%y4/\#/g' `
376+
set node = `echo $node | sed -e 's/%y4/\#/g' `
377377
set node = `echo $node | sed -e "s/%m2/\#/g" `
378378
set node = `echo $node | sed -e "s/%d2/\#/g" `
379379
set node = `echo $node | sed -e "s/%h2/\#/g" `
@@ -452,7 +452,7 @@ end
452452

453453
if( $numlocs[$nstream] != 0 ) then
454454

455-
# Extract Extension (last node) from Typical Local File
455+
# Extract Extension (last node) from Typical Local File
456456
# -----------------------------------------------------
457457
@ loc = 1
458458
while( $loc != 0 )
@@ -514,13 +514,13 @@ foreach collection ( $collections )
514514
@ endloc = $begloc + $numdates[$m] - 1
515515
set streamdates = `echo $dates[${begloc}-${endloc}]`
516516

517-
if( $streamdates[1] != 0 ) then
517+
if( $streamdates[1] != 0 ) then
518518
foreach date ( $streamdates )
519519
echo $collection $streamdates Current Date: $date
520520

521521
if( -e $SOURCE/holding/$collection/$date ) then
522522
cd $SOURCE/holding/$collection/$date
523-
523+
524524
set locals = `/bin/ls -1 | grep ${expid}.${collection} | grep -v monthly | grep -v diurnal`
525525
set num = `/bin/ls -1 | grep ${expid}.${collection} | grep -v monthly | grep -v diurnal | wc -l`
526526

@@ -583,11 +583,11 @@ foreach collection ( $collections )
583583
echo " Performing time average ..."
584584
if(! -e time_ave.rc ) ln -s $GEOSUTIL/post/time_ave.rc .
585585
if( $NCPUS == "NULL" | $NCPUS == 1 | !($?RUN_CMD) ) then
586-
$GEOSUTIL/post/time_ave_nompi.x -hdf $locals -rc time_ave.rc \
587-
-tag $expid.$collection.monthly \
588-
-d $expid.$collection.diurnal $STRICT
586+
$GEOSUTIL/post/time_ave_util.x -hdf $locals -rc time_ave.rc \
587+
-tag $expid.$collection.monthly \
588+
-d $expid.$collection.diurnal $STRICT
589589
else
590-
$RUN_CMD $NCPUS $GEOSUTIL/post/time_ave.x -hdf $locals -rc time_ave.rc \
590+
$RUN_CMD $NCPUS $GEOSUTIL/post/time_ave_util.x -hdf $locals -rc time_ave.rc \
591591
-tag $expid.$collection.monthly \
592592
-d $expid.$collection.diurnal $STRICT
593593
endif
@@ -626,7 +626,7 @@ set AGCM_JM = `grep AGCM_JM: $HOMDIR/AGCM.rc | cut -d':' -f2`
626626
if (${RAT} == 6) set CUBE = TRUE
627627

628628
set HIRES = FALSE
629-
if( $AGCM_IM >= 1152 | ($AGCM_IM >= 360 & $CUBE == TRUE ) ) set HIRES = TRUE
629+
if( $AGCM_IM >= 1152 | ($AGCM_IM >= 360 & $CUBE == TRUE ) ) set HIRES = TRUE
630630

631631

632632
# Move and Archive Monthly Means and Dailies
@@ -647,7 +647,7 @@ foreach collection ( $collections )
647647

648648
@ endloc = $begloc + $numdates[$m] - 1
649649
set streamdates = `echo $dates[${begloc}-${endloc}]`
650-
if( $streamdates[1] != 0 ) then
650+
if( $streamdates[1] != 0 ) then
651651
foreach date ( $streamdates )
652652
if( -e $SOURCE/holding/$collection/$date ) then
653653
set locdir = $SOURCE/holding/$collection/$date
@@ -677,7 +677,7 @@ foreach collection ( $collections )
677677
set month = `echo $fdate | cut -c5-6`
678678
set day = `echo $fdate | cut -c7-8`
679679
set hour = `echo $fdate | cut -c10-11`
680-
680+
681681
#set archive = `echo $archives[$m] | sed -e "s/%c/$collection/ g" | \
682682
# sed -e "s/%y4/$expyear/ g" | \
683683
# sed -e "s/%m2/$month/ g" | \
@@ -902,7 +902,7 @@ if( $num != 0 ) then
902902
# ---------------
903903
/bin/rm -f xdf.tabl
904904

905-
# Extract Extension (last node) from Monthly Mean File
905+
# Extract Extension (last node) from Monthly Mean File
906906
# ----------------------------------------------------
907907
@ m = 1
908908
while( $m != 0 )
@@ -968,8 +968,8 @@ end # End ForEach Output Stream Loop
968968
endif # End PLOTS Option
969969

970970
#######################################################################
971-
# Submit Quickplot Job
972-
# --------------------
971+
# Submit Quickplot Job
972+
# --------------------
973973
# Note: $num, $monthlies, and ${date_node}
974974
# are from last output stream examined
975975
#######################################################################
@@ -995,7 +995,7 @@ cd $SOURCE/plot
995995
@ m = $m + 1
996996
end
997997
endif
998-
998+
999999
set CMPEXP = `echo $CMPEXP`
10001000

10011001
if( $PLOTS[1] != "NULL" ) set STATUS = ON
@@ -1105,8 +1105,8 @@ endif
11051105

11061106
# Create Plot Lists
11071107
# ---------------------------------------------------------------------------------
1108-
if( -e portrait.list ) /bin/rm -f portrait.list
1109-
if( -e landscape.list ) /bin/rm -f landscape.list
1108+
if( -e portrait.list ) /bin/rm -f portrait.list
1109+
if( -e landscape.list ) /bin/rm -f landscape.list
11101110
if( -e dummy ) /bin/rm -f dummy
11111111

11121112
echo ' '

0 commit comments

Comments
 (0)