@@ -18,6 +18,12 @@ function plot_season (args)
1818'run getenv ENDDATE'
1919 enddate = result
2020
21+ * Test to see if Source Experiment is an ANALYSIS
22+ * -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
23+ 'run getenv "ANALYSIS"'
24+ analysis = result
25+
26+
2127'q gxout'
2228 gxout = sublin ( result , 4 )
2329 gxout = subwrd ( gxout , 6 )
@@ -154,7 +160,7 @@ while( num <= numrc )
154160 basename = result
155161 length = strlen ( basename ) - 3
156162 say 'original length = 'length
157- ' ! echo 'basename' | cut - b1 - 'length' | cut - d . - f2 > CMPID . txt '
163+ ' ! echo 'basename' | cut - b14 - 'length' > CMPID . txt '
158164 'run getenv CMPID '
159165 CMPID . num = result
160166
@@ -167,53 +173,15 @@ while( num <= numrc )
167173 'run getenv "TEM_NAME"'
168174 TEM_NAME . num = result
169175 say 'TEM_Collection = ' TEM_NAME . num
170- * pause
171-
172- num = num + 1
173- endwhile
174-
175- n = 1
176- while ( n <= numfiles )
177- 'set dfile ' n
178- 'getinfo desc'
179- desc = result
180- node = ''
181- m = 1
182- '!remove NODE.txt'
183- '!basename ' desc ' | cut -d. -f' m ' >> NODE.txt'
184- 'run getenv "NODE"'
185- node = result
186- EXP . n = node
187- say 'EXP' n ' = ' EXP . n
188- m = m + 1
189- '!remove NODE.txt'
190- '!basename ' desc ' | cut -d. -f' m ' >> NODE.txt'
191- 'run getenv "NODE"'
192- node = result
193-
194- TEM_Collection = TEM_NAME . n
195- say 'NODE = ' node
196- say 'TEM_Collection = 'TEM_Collection
197-
198- while ( node != TEM_Collection )
199-
200- EXP . n = EXP . n '.' node
201- say 'EXP' n ' = ' EXP . n
202- m = m + 1
203- '!remove NODE.txt'
204- '!basename ' desc ' | cut -d. -f' m ' >> NODE.txt'
205- 'run getenv "NODE"'
206- node = result
207- endwhile
208176
209177* Generate and Use WSTAR files stored in OUTPUT directory
210178* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
211- FILE . n = 'WSTAR_' talats '.' EXP . n
212- LOCATION = '../'
213- LOCATION = ''
179+ FILE . num = 'WSTAR_' talats '.' CMPID . num
180+ LOCATION = '../'
181+ LOCATION = ''
214182
215- n = n + 1
216- endwhile
183+ num = num + 1
184+ endwhile
217185
218186 axmax = - 1e15
219187 axmin = 1e15
@@ -228,6 +196,7 @@ n = 1
228196while ( n <= numfiles )
229197
230198 'set dfile ' n
199+ if ( ( analysis = true ) | ( ( analysis != true ) & ( CMPID . n != 'MERRA-2' ) ) )
231200
232201 'run getdates'
233202 'getinfo tmin'
@@ -476,6 +445,10 @@ while( n<=numfiles )
476445* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
477446* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
478447
448+ * End if ( ANALYSIS ) test
449+ * -- -- -- -- -- -- -- -- -- -- -- -
450+ endif
451+
479452* End File Loop
480453* -- -- -- -- -- -- -
481454 n = n + 1
@@ -613,6 +586,7 @@ while( n<=numfiles )
613586 if ( pltfile . m = n )
614587
615588 'set dfile ' n
589+ if ( ( analysis = true ) | ( ( analysis != true ) & ( CMPID . n != 'MERRA-2' ) ) )
616590 'run getdates'
617591 'getinfo tmin'
618592 tmin = result
@@ -666,6 +640,11 @@ while( n<=numfiles )
666640 endif
667641
668642 endif
643+
644+ * ENDIF for ANALYSIS Test
645+ * -- -- -- -- -- -- -- -- -- -- -- -
646+ endif
647+
669648 m = m + 1
670649 endwhile
671650n = n + 1
@@ -696,6 +675,7 @@ while( n<=numfiles )
696675 while ( m <= numfiles )
697676 if ( pltfile . m = n )
698677 'set dfile ' n
678+ if ( ( analysis = true ) | ( ( analysis != true ) & ( CMPID . n != 'MERRA-2' ) ) )
699679
700680 'set grid off'
701681 'set xlopts 1 3 0.06'
@@ -857,6 +837,11 @@ while( n<=numfiles )
857837 say 'ydif : 'ydif
858838
859839 endif
840+
841+ * ENDIF for ANALYSIS Test
842+ * -- -- -- -- -- -- -- -- -- -- -- -
843+ endif
844+
860845 m = m + 1
861846 endwhile
862847n = n + 1
@@ -899,16 +884,17 @@ endif
899884 m = 1
900885 while ( m <= numfiles )
901886 if ( pltfile . m = n )
887+ 'set dfile ' n
888+ if ( ( analysis = true ) | ( ( analysis != true ) & ( CMPID . n != 'MERRA-2' ) ) )
902889 if ( numargs > 2 )
903890 index = id . n
904891 tags = tags ''index
905892 if ( exps = '' )
906- exps = EXP . n
893+ exps = CMPID . n
907894 else
908- exps = exps '.' EXP . n
895+ exps = exps '.' CMPID . n
909896 endif
910897 endif
911- 'set dfile ' n
912898
913899 'run getenv BEGDATE'
914900 begdate = result
@@ -937,8 +923,13 @@ endif
937923 k = 1
938924 '!echo ' k ' 6 ' color . n ' >> plot_' season '.stack'
939925
940- '!echo \(' id . n '\) ' EXP . n ' >> plot_' season '.stack'
926+ '!echo \(' id . n '\) ' CMPID . n ' >> plot_' season '.stack'
941927 endif
928+
929+ * ENDIF for ANALYSIS Test
930+ * -- -- -- -- -- -- -- -- -- -- -- -
931+ endif
932+
942933 m = m + 1
943934 endwhile
944935 n = n + 1
0 commit comments