Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto PR - main β†’ MAPL-v3 - Updates for Stratospheric Transport #63

Merged
merged 9 commits into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [2.0.7] - 2024-02-21

### Changed

- Update of transport plots.

### Fixed

- Fixed `q gxout` bug affecting the stats montage plots.

## [2.0.6] - 2024-02-21

### Added
Expand Down
9 changes: 6 additions & 3 deletions plots/grads_util/corcmp.gs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ endwhile

n = 0

'run getenv GEOSUTIL'
GEOSUTIL = result

'run getenv SOURCE'
SOURCE = result

Expand Down Expand Up @@ -157,10 +160,10 @@ endwhile

if( x <= xdim )
if( rms = 0 )
'corcmp_plot.gs -field 'field' -numexp 'ntot' 'dsc' -desc 'desc' -debug 'debug
'rmscmp_plot.gs -field 'field' -numexp 'ntot' 'dsc' -desc 'desc' -rms 'rms' -debug 'debug
'run 'GEOSUTIL'/plots/grads_util/corcmp_plot.gs -field 'field' -numexp 'ntot' 'dsc' -desc 'desc' -debug 'debug
'run 'GEOSUTIL'/plots/grads_util/rmscmp_plot.gs -field 'field' -numexp 'ntot' 'dsc' -desc 'desc' -rms 'rms' -debug 'debug
else
'rmscmp_plot.gs -field 'field' -numexp 'ntot' 'dsc' -desc 'desc' -rms 'rms' -debug 'debug
'run 'GEOSUTIL'/plots/grads_util/rmscmp_plot.gs -field 'field' -numexp 'ntot' 'dsc' -desc 'desc' -rms 'rms' -debug 'debug
endif
endif

Expand Down
48 changes: 34 additions & 14 deletions plots/grads_util/corcmp_plot.gs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ function corcmp (args)
numargs = result

'run getenv SOURCE'
SOURCE = result
SOURCE = result
'run getenv GEOSUTIL'
GEOSUTIL = result

field = h
desc = ''
Expand Down Expand Up @@ -498,6 +500,15 @@ critval95 = subwrd(result,3)
'q defval astudtout 1 1'
critval99 = subwrd(result,3)
* Set critval for Synoptic Variability Confidence Interval
* --------------------------------------------------------
synopconf = 0.95
asynopconf = 1 - synopconf
'astudt 'dof' 'asynopconf
'q defval astudtout 1 1'
critsynop = subwrd(result,3)

say 'CRITVAL for Synoptic Variability estimates based on 'synopconf*100' % Confidence'

* Estimate Statistically Significant Range for Synoptic Variability from Average of All Experiment
* ------------------------------------------------------------------------------------------------
Expand All @@ -513,7 +524,7 @@ while( m<=mexps )
endwhile
'define zvarave = zvarave / 'mexps
'define se = sqrt( (zvar0 + zvarave)/'numfiles' )'
'define dx = se*'critval95
'define dx = se*'critsynop
'define rUave = (exp( 2*(zave0+dx))-1)/(exp( 2*(zave0+dx))+1)'
'define rLave = (exp( 2*(zave0-dx))-1)/(exp( 2*(zave0-dx))+1)'

Expand All @@ -530,7 +541,7 @@ while( m<=mexps )
'define rUp68'm' = 2*(exp( 2*dx)-1)/(exp( 2*dx)+1)'
'define rLp68'm' = 2*(exp(-2*dx)-1)/(exp(-2*dx)+1)'

'define dx = se*'critval95
'define dx = se*'critval90
'define rUp90'm' = 2*(exp( 2*dx)-1)/(exp( 2*dx)+1)'
'define rLp90'm' = 2*(exp(-2*dx)-1)/(exp(-2*dx)+1)'

Expand All @@ -542,6 +553,10 @@ while( m<=mexps )
'define rUp99'm' = 2*(exp( 2*dx)-1)/(exp( 2*dx)+1)'
'define rLp99'm' = 2*(exp(-2*dx)-1)/(exp(-2*dx)+1)'

'define dx = se*'critsynop
'define rUsyn'm' = 2*(exp( 2*dx)-1)/(exp( 2*dx)+1)'
'define rLsyn'm' = 2*(exp(-2*dx)-1)/(exp(-2*dx)+1)'

m = m + 1
endwhile

Expand Down Expand Up @@ -643,8 +658,8 @@ endwhile
'draw ylab Anomaly Correlation'


* Plot 95% Confidence Intervals for Synoptic Variance from Average of All Experiment
* ----------------------------------------------------------------------------------
* Plot critsynop Confidence Intervals for Synoptic Variance from Average of All Experiment
* ----------------------------------------------------------------------------------------
'set cmark 0'
'set cthick 2'
'set cstyle 3'
Expand Down Expand Up @@ -715,8 +730,8 @@ endif
m = m + 1
endwhile
* Compute Upper and Lower Bounds for 95% Confidence Interval Values for Synoptic Variability
* ------------------------------------------------------------------------------------------
* Compute Upper and Lower Bounds for critsynop Confidence Interval Values for Synoptic Variability
* ------------------------------------------------------------------------------------------------
'set dfile 'dfile
'set t 'tmin
'd rUave'
Expand Down Expand Up @@ -751,6 +766,11 @@ valrUp99.m = subwrd(result,4)
'd rLp99'm
valrLp99.m = subwrd(result,4)

'd rUsyn'm
valrUsyn.m = subwrd(result,4)
'd rLsyn'm
valrLsyn.m = subwrd(result,4)

'set t 'tbeg.m' 'tdif.m
'minmax rave'm'-rave0'
raveMX.m = subwrd(result,1)
Expand All @@ -767,16 +787,16 @@ endwhile
* Plot Difference plus Significance
* ---------------------------------
axfac = 1.2
axmax = valrUp95.1*axfac
axmin = valrLp95.1*axfac
axmax = valrUsyn.1*axfac
axmin = valrLsyn.1*axfac
* Compute Axis Limits based on Error Bars
* ---------------------------------------
if( mexps>1 )
m = 2
while( m<=mexps )
if( valrUp95.m*axfac > axmax ) ; axmax = valrUp95.m*axfac ; endif
if( valrLp95.m*axfac < axmin ) ; axmin = valrLp95.m*axfac ; endif
if( valrUsyn.m*axfac > axmax ) ; axmax = valrUsyn.m*axfac ; endif
if( valrLsyn.m*axfac < axmin ) ; axmin = valrLsyn.m*axfac ; endif
m = m + 1
endwhile
else
Expand Down Expand Up @@ -836,7 +856,7 @@ if( mexps=1 )
'd rUp99'm'*1000;rLp99'm'*1000'
else
'set ccolor 'expcol.m
'd rUp95'm'*1000;rLp95'm'*1000'
'd rUsyn'm'*1000;rLsyn'm'*1000'
endif

m = m + 1
Expand Down Expand Up @@ -1014,9 +1034,9 @@ endwhile
'!/bin/mkdir -p 'SOURCE'/corcmp'
if( nday = ndaymax )
'myprint2 -name 'SOURCE'/corcmp/stats_'label'_corcmp_'reg'_'level'_'months' -rotate 90 -density 100x100'
'run 'GEOSUTIL'/plots/grads_util/myprint2 -name 'SOURCE'/corcmp/stats_'label'_corcmp_'reg'_'level'_'months' -rotate 90 -density 100x100'
else
'myprint2 -name 'SOURCE'/corcmp/stats_'label'_corcmp_'reg'_'level'_'months'_'nday'DAY -rotate 90 -density 100x100'
'run 'GEOSUTIL'/plots/grads_util/myprint2 -name 'SOURCE'/corcmp/stats_'label'_corcmp_'reg'_'level'_'months'_'nday'DAY -rotate 90 -density 100x100'
endif
if( debug = "TRUE" )
Expand Down
12 changes: 7 additions & 5 deletions plots/grads_util/corcmpz_plot.gs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ function corcmpz (args)
numargs = result

'run getenv SOURCE'
SOURCE = result
SOURCE = result
'run getenv GEOSUTIL'
GEOSUTIL = result

field = h
desc = ''
Expand Down Expand Up @@ -705,9 +707,9 @@ say 'EXP'm' Field: 'name' Region: 'region
'!/bin/mkdir -p 'SOURCE'/corcmp'
if( nday = ndaymax )
'myprint2 -name 'SOURCE'/corcmp/'expdsc.m'_'expdsc.m'_stats_'label'_corcmp_'reg'_z_'months' -rotate 90 -density 100x100'
'run 'GEOSUTIL'/plots/grads_util/myprint2 -name 'SOURCE'/corcmp/'expdsc.m'_'expdsc.m'_stats_'label'_corcmp_'reg'_z_'months' -rotate 90 -density 100x100'
else
'myprint2 -name 'SOURCE'/corcmp/'expdsc.m'_'expdsc.m'_stats_'label'_corcmp_'reg'_z_'months'_'nday'DAY -rotate 90 -density 100x100'
'run 'GEOSUTIL'/plots/grads_util/myprint2 -name 'SOURCE'/corcmp/'expdsc.m'_'expdsc.m'_stats_'label'_corcmp_'reg'_z_'months'_'nday'DAY -rotate 90 -density 100x100'
endif
if( debug = "TRUE" )
say "Hit ENTER for next plot"
Expand Down Expand Up @@ -1099,9 +1101,9 @@ say 'EXP'm' Field: 'name' Region: 'region
'!/bin/mkdir -p 'SOURCE'/corcmp'
if( nday = ndaymax )
'myprint2 -name 'SOURCE'/corcmp/'expdsc.0'_'expdsc.m'_stats'loopflag'_'label'_corcmp_'reg'_z_'months' -rotate 90 -density 100x100'
'run 'GEOSUTIL'/plots/grads_util/myprint2 -name 'SOURCE'/corcmp/'expdsc.0'_'expdsc.m'_stats'loopflag'_'label'_corcmp_'reg'_z_'months' -rotate 90 -density 100x100'
else
'myprint2 -name 'SOURCE'/corcmp/'expdsc.0'_'expdsc.m'_stats'loopflag'_'label'_corcmp_'reg'_z_'months'_'nday'DAY -rotate 90 -density 100x100'
'run 'GEOSUTIL'/plots/grads_util/myprint2 -name 'SOURCE'/corcmp/'expdsc.0'_'expdsc.m'_stats'loopflag'_'label'_corcmp_'reg'_z_'months'_'nday'DAY -rotate 90 -density 100x100'
endif

if( debug = "TRUE" )
Expand Down
28 changes: 8 additions & 20 deletions plots/grads_util/getdates.gs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
function getdates


* Initialize Time based on Existance of Pre-Set Environment Variables
* -------------------------------------------------------------------
* ----------------------------------------------------------------------
* Note: BEGDATE & ENDDATE are set from the QUICKPLOT setdates utility.
* SETDATES is called from the Control Experiment: EXPID. Thus,
* EXPID determines the BEGDATE & ENDATE, while the comparison CMPIDs
* are evaluated using the pre-determined BEGDATE & ENDDATE.
* ----------------------------------------------------------------------
'run getenv "BEGDATE"'
begdate = result
'run getenv "ENDDATE"'
Expand Down Expand Up @@ -40,8 +44,8 @@ if( tmin<1 | tmax>tdim )
enddate = result
'set t 1 'tdim

* Set TIME Boundaries based on CLIM tabl file (if necessary)
* ----------------------------------------------------------
* Check for TIME Boundaries based on ddf files which contain Climatology MetaCode
* -------------------------------------------------------------------------------
'getinfo desc'
desc = result
'!froot 'desc
Expand All @@ -64,21 +68,6 @@ if( tmin<1 | tmax>tdim )
endwhile

if( begYYYYMM != 'NULL' & endYYYYMM != 'NULL' )
* if( basename = clim.tabl )
* 'q ctlinfo'
* title = sublin(result,2)
* n = 1
* word = subwrd(title,n)
* while( word != '' )
* n = n + 1
* word = subwrd(title,n)

* if( word = "Climatology:" )
* begYYYYMM = subwrd(title,n+1)
* endYYYYMM = subwrd(title,n+3)
* endif
* endwhile

begyear = substr(begYYYYMM,1,4)
begmonth = substr(begYYYYMM,5,2)
month = getmon(begmonth)
Expand All @@ -88,7 +77,6 @@ if( tmin<1 | tmax>tdim )
endmonth = substr(endYYYYMM,5,2)
month = getmon(endmonth)
enddate = time''month''endyear

endif
endif

Expand Down
10 changes: 3 additions & 7 deletions plots/grads_util/makezdif2.gs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ endwhile
undef = result
' set undef ' undef

'q gxout'
gxout = sublin(result,4)
gxout = subwrd(gxout ,6)

'getinfo zfreq'
zfreq = result
if( zfreq = 'varying' )
Expand Down Expand Up @@ -277,9 +273,9 @@ endwhile

'close 'newfile

* Reset Initial Environment Settings
* ----------------------------------
'set gxout 'gxout
* Reset GXOUT Graphic Environment
* -------------------------------
'set gxout contour'
'set dfile 'dfile
'set x 'xpos
'set y 'ypos
Expand Down
10 changes: 3 additions & 7 deletions plots/grads_util/makezdif3.gs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ endwhile
undef = result
' set undef ' undef

'q gxout'
gxout = sublin(result,4)
gxout = subwrd(gxout ,6)

'getinfo zfreq'
zfreq = result
if( zfreq = 'varying' )
Expand Down Expand Up @@ -316,9 +312,9 @@ endwhile

*'close 'newfile

* Reset Initial Environment Settings
* ----------------------------------
'set gxout 'gxout
* Reset GXOUT Graphic Environment
* -------------------------------
'set gxout contour'
'set dfile 'dfile
'set x 'xpos
'set y 'ypos
Expand Down
2 changes: 1 addition & 1 deletion plots/grads_util/pause.gs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ while ( num <= numargs )
endwhile
say string
endif
say 'Hit n for Next, or c to Clear ...'
say 'Hit ENTER for next plot, or c to Clear ...'
pull flag
if( flag = 'c' )
'c'
Expand Down
Loading
Loading