Skip to content

Commit 68b5752

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/sdrabenh/gcm_v12
2 parents 7f43f62 + 1c88bb9 commit 68b5752

File tree

6 files changed

+122
-69
lines changed

6 files changed

+122
-69
lines changed

CHANGELOG.md

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

2929
### Deprecated
3030

31+
## [2.1.3] - 2024-10-08
32+
33+
### Fixed
34+
35+
- Plots package bug fixes for EXPID names containing periods and TEM diagnostics
36+
3137
## [2.1.2] - 2024-07-30
3238

3339
### Changed

plots/res/epflx.gs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ endif
264264

265265
' set string 1 c 6 '
266266
' set strsiz 0.12 '
267-
' draw string 5.60501 8.4 Eliassen-Palm Flux Divergence from 'desc
267+
' draw string 5.60501 8.4 Eliassen-Palm Flux Divergence from 'expid
268268
' set strsiz 0.12 '
269269
' draw string 5.60501 8.1 'season' ('nseasons') ('begdate' - 'enddate')'
270270

plots/res/epflx_diff.gs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,11 +494,11 @@ endif
494494

495495
' set strsiz 0.10 '
496496
' set string 4 c 6 '
497-
' draw string 2.85 8.2 'desc
497+
' draw string 2.85 8.2 'expid
498498
' set string 1 c 6 '
499499
' draw string 5.6 8.2 minus'
500500
' set string 5 c 6 '
501-
' draw string 8.35 8.2 'desc2
501+
' draw string 8.35 8.2 'cmpid
502502
' set string 1 c 6 '
503503

504504
' set strsiz 0.10 '

plots/res/plot_season.gs

Lines changed: 39 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -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
228196
while( 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
671650
n = 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
862847
n = 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

plots/res/setup_epflx.gs

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,39 +53,62 @@ while( num <= numrc )
5353
basename = result
5454
length = strlen(basename) - 3
5555
say 'original length = 'length
56-
'!echo 'basename' | cut -b1-'length' > CMPID.txt'
56+
'!echo 'basename' | cut -b14-'length' > CMPID.txt'
5757
'run getenv CMPID '
5858
CMPID.num = result
5959

6060
say ' CMPID #'num' = 'CMPID.num
6161
say 'CTLFILE #'num' = 'CTLFILE.num
6262

63+
* Determine TEM Collection name
64+
* -----------------------------
65+
'!remove BASE.txt'
66+
'!basename 'CTLFILE.num' >> BASE.txt'
67+
'run getenv "BASE"'
68+
BASE = result
69+
70+
m = 1
71+
'!remove NODE.txt'
72+
'!basename 'CTLFILE.num' | cut -d. -f'm' >> NODE.txt'
73+
'run getenv "NODE"'
74+
node = result
75+
EXP = node
76+
say 'M: 'm' EXP = 'EXP
77+
78+
while( EXP != CMPID.num )
79+
m = m + 1
80+
'!remove NODE.txt'
81+
'!basename 'CTLFILE.num' | cut -d. -f'm' >> NODE.txt'
82+
'run getenv "NODE"'
83+
node = result
84+
EXP = EXP'.'node
85+
say 'M: 'm' EXP = 'EXP
86+
endwhile
87+
88+
say 'Final EXP: 'EXP
89+
m = m + 1
90+
6391
'!remove TEM_NAME.txt.'
64-
'!basename 'CTLFILE.num' | cut -d. -f2 > TEM_NAME.txt'
92+
'!basename 'CTLFILE.num' | cut -d. -f'm' > TEM_NAME.txt'
6593
say 'run getenv "TEM_NAME"'
6694
'run getenv "TEM_NAME"'
6795
TEM_NAME.num = result
6896
say 'TEM_Collection = 'TEM_NAME.num
6997
70-
'!remove EXPID.txt.'
71-
'!echo 'CMPID.num' | cut -d. -f2 > EXPID.txt'
72-
say 'run getenv "EXPID"'
73-
'run getenv "EXPID"'
74-
expid.num = result
75-
7698
7799
'run setenv DFILE DFILE.'num
78100
'run getenv DFILE'
79101
DFILE = result
80102
'run setenv 'DFILE' 'num
81103

82104

105+
expid.num = CMPID.num
83106
say 'EXPID.'num' = 'expid.num
84107
say 'DFILE.'num' = 'num
85108
pause
86109

87110
'xdfopen 'CTLFILE.num
88-
if( CMPID.num = 'VERIFICATION.'expid ) ; nexpid = num ; endif
111+
if( CMPID.num = expid ) ; nexpid = num ; endif
89112
num = num + 1
90113
endwhile
91114

@@ -362,8 +385,8 @@ while( k > 0 )
362385
season = subwrd(seasons,k)
363386
if( season != '' )
364387
k = k+1
365-
say 'Running: epflx.gs 'expid.n' 'season' 'n'A 'output
366-
say '-------------------------------------------------'
388+
say 'Running epflx.gs: 'expid.n' 'TEM_NAME.n' 'season' 'n'A 'output
389+
say '--------------------------------------------------------------'
367390
'set x 1'
368391
'sety'
369392
'setz'
@@ -390,7 +413,7 @@ while( k > 0 )
390413

391414
n = 1
392415
while( n<=numfiles )
393-
if( CMPID.n != 'VERIFICATION.'expid )
416+
if( CMPID.n != expid )
394417
k = 1
395418
while( k > 0 )
396419
season = subwrd(seasons,k)

0 commit comments

Comments
 (0)