diff --git a/CHANGELOG.md b/CHANGELOG.md index fdd471b1..901c274b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/plots/grads_util/corcmp.gs b/plots/grads_util/corcmp.gs index 125a2a65..f3e0d6d7 100644 --- a/plots/grads_util/corcmp.gs +++ b/plots/grads_util/corcmp.gs @@ -53,6 +53,9 @@ endwhile n = 0 +'run getenv GEOSUTIL' + GEOSUTIL = result + 'run getenv SOURCE' SOURCE = result @@ -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 diff --git a/plots/grads_util/corcmp_plot.gs b/plots/grads_util/corcmp_plot.gs index 53bcf0e0..66ba21ad 100644 --- a/plots/grads_util/corcmp_plot.gs +++ b/plots/grads_util/corcmp_plot.gs @@ -4,7 +4,9 @@ function corcmp (args) numargs = result 'run getenv SOURCE' - SOURCE = result + SOURCE = result +'run getenv GEOSUTIL' + GEOSUTIL = result field = h desc = '' @@ -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 * ------------------------------------------------------------------------------------------------ @@ -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)' @@ -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)' @@ -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 @@ -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' @@ -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' @@ -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) @@ -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 @@ -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 @@ -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" ) diff --git a/plots/grads_util/corcmpz_plot.gs b/plots/grads_util/corcmpz_plot.gs index 5aad7664..0be999ad 100644 --- a/plots/grads_util/corcmpz_plot.gs +++ b/plots/grads_util/corcmpz_plot.gs @@ -4,7 +4,9 @@ function corcmpz (args) numargs = result 'run getenv SOURCE' - SOURCE = result + SOURCE = result +'run getenv GEOSUTIL' + GEOSUTIL = result field = h desc = '' @@ -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" @@ -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" ) diff --git a/plots/grads_util/getdates.gs b/plots/grads_util/getdates.gs index 760534f0..15c79a1c 100644 --- a/plots/grads_util/getdates.gs +++ b/plots/grads_util/getdates.gs @@ -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"' @@ -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 @@ -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) @@ -88,7 +77,6 @@ if( tmin<1 | tmax>tdim ) endmonth = substr(endYYYYMM,5,2) month = getmon(endmonth) enddate = time''month''endyear - endif endif diff --git a/plots/grads_util/makezdif2.gs b/plots/grads_util/makezdif2.gs index 7b20a816..e8907fad 100644 --- a/plots/grads_util/makezdif2.gs +++ b/plots/grads_util/makezdif2.gs @@ -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' ) @@ -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 diff --git a/plots/grads_util/makezdif3.gs b/plots/grads_util/makezdif3.gs index 7967625d..2a76e629 100644 --- a/plots/grads_util/makezdif3.gs +++ b/plots/grads_util/makezdif3.gs @@ -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' ) @@ -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 diff --git a/plots/grads_util/pause.gs b/plots/grads_util/pause.gs index 4ffda00a..d89bce27 100644 --- a/plots/grads_util/pause.gs +++ b/plots/grads_util/pause.gs @@ -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' diff --git a/plots/grads_util/rmscmp_plot.gs b/plots/grads_util/rmscmp_plot.gs index fc34596d..13389218 100644 --- a/plots/grads_util/rmscmp_plot.gs +++ b/plots/grads_util/rmscmp_plot.gs @@ -4,7 +4,9 @@ function rmscmp (args) numargs = result 'run getenv SOURCE' - SOURCE = result + SOURCE = result +'run getenv GEOSUTIL' + GEOSUTIL = result field = h desc = '' @@ -554,9 +556,18 @@ critval999 = subwrd(result,3) 'q defval astudtout 1 1' critval9999 = 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 (90% Confidence) -* ----------------------------------------------------------------------------------------------------------------- +* Estimate Statistically Significant Range for Synoptic Variability from Average of All Experiment +* ------------------------------------------------------------------------------------------------ 'set dfile 'dfile 'set t 1 'tmin 'define zvarave = lev-lev' @@ -572,7 +583,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 = pow( abs(zave0+dx),'irmsfact' )' 'define rLave = pow( abs(zave0-dx),'irmsfact' )' @@ -609,6 +620,10 @@ while( m<=mexps ) 'define rUp9999'm' = pow( abs(zave0+dx),'irmsfact' ) - pow( abs(zave0),'irmsfact' )' 'define rLp9999'm' = pow( abs(zave0-dx),'irmsfact' ) - pow( abs(zave0),'irmsfact' )' +'define dx = se*'critsynop +'define rUsyn'm' = pow( abs(zave0+dx),'irmsfact' ) - pow( abs(zave0),'irmsfact' )' +'define rLsyn'm' = pow( abs(zave0-dx),'irmsfact' ) - pow( abs(zave0),'irmsfact' )' + m = m + 1 endwhile @@ -745,8 +760,8 @@ endif -* 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' @@ -832,8 +847,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 Synoptic Variability Confidence Interval Values +* ---------------------------------------------------------------------------------- 'set dfile 'dfile 'set t 'tmin 'd rUave' @@ -842,8 +857,8 @@ valrU = subwrd(result,4) valrL = subwrd(result,4) -* Compute Upper & Lower Bounds for 95% Confidence Interval Values for Paired Hypothesis Test -* ------------------------------------------------------------------------------------------ +* Compute Upper & Lower Bounds for Range of Confidence Interval Values for Paired Hypothesis Test +* ----------------------------------------------------------------------------------------------- m = 1 while( m<=mexps ) 'set dfile 'ddif.m @@ -879,16 +894,21 @@ valrUp9999.m = subwrd(result,4) 'd rLp9999'm valrLp9999.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) raveMN.m = subwrd(result,2) 'set t 'tdif.m -say 'tdif.'m': 'tdif.m' 68.00% Confidence rUp: 'valrUp68.m' rLp: 'valrLp68.m' raveMN: 'raveMN.m' raveMX: 'raveMX.m -say 'tdif.'m': 'tdif.m' 90.00% Confidence rUp: 'valrUp90.m' rLp: 'valrLp90.m' raveMN: 'raveMN.m' raveMX: 'raveMX.m -say 'tdif.'m': 'tdif.m' 95.00% Confidence rUp: 'valrUp95.m' rLp: 'valrLp95.m' raveMN: 'raveMN.m' raveMX: 'raveMX.m -say 'tdif.'m': 'tdif.m' 99.00% Confidence rUp: 'valrUp99.m' rLp: 'valrLp99.m' raveMN: 'raveMN.m' raveMX: 'raveMX.m -say 'tdif.'m': 'tdif.m' 99.90% Confidence rUp: 'valrUp999.m' rLp: 'valrLp999.m' raveMN: 'raveMN.m' raveMX: 'raveMX.m +say 'tdif.'m': 'tdif.m' 68.00% Confidence rUp: ' valrUp68.m' rLp: ' valrLp68.m' raveMN: 'raveMN.m' raveMX: 'raveMX.m +say 'tdif.'m': 'tdif.m' 90.00% Confidence rUp: ' valrUp90.m' rLp: ' valrLp90.m' raveMN: 'raveMN.m' raveMX: 'raveMX.m +say 'tdif.'m': 'tdif.m' 95.00% Confidence rUp: ' valrUp95.m' rLp: ' valrLp95.m' raveMN: 'raveMN.m' raveMX: 'raveMX.m +say 'tdif.'m': 'tdif.m' 99.00% Confidence rUp: ' valrUp99.m' rLp: ' valrLp99.m' raveMN: 'raveMN.m' raveMX: 'raveMX.m +say 'tdif.'m': 'tdif.m' 99.90% Confidence rUp: ' valrUp999.m' rLp: ' valrLp999.m' raveMN: 'raveMN.m' raveMX: 'raveMX.m say 'tdif.'m': 'tdif.m' 99.99% Confidence rUp: 'valrUp9999.m' rLp: 'valrLp9999.m' raveMN: 'raveMN.m' raveMX: 'raveMX.m m = m + 1 endwhile @@ -897,16 +917,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 @@ -981,7 +1001,7 @@ if( mexps=1 ) * 'd rUp9999'm'*1000;rLp9999'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 @@ -1172,9 +1192,9 @@ endwhile if( rms = 4 ) ; rms_label = '_PHASE' ; endif if( nday = ndaymax ) - 'myprint2 -name 'SOURCE'/corcmp/stats_'label'_rmscmp'rms_label'_'reg'_'level'_'months' -rotate 90 -density 100x100' + 'run 'GEOSUTIL'/plots/grads_util/myprint2 -name 'SOURCE'/corcmp/stats_'label'_rmscmp'rms_label'_'reg'_'level'_'months' -rotate 90 -density 100x100' else - 'myprint2 -name 'SOURCE'/corcmp/stats_'label'_rmscmp'rms_label'_'reg'_'level'_'months'_'nday'DAY -rotate 90 -density 100x100' + 'run 'GEOSUTIL'/plots/grads_util/myprint2 -name 'SOURCE'/corcmp/stats_'label'_rmscmp'rms_label'_'reg'_'level'_'months'_'nday'DAY -rotate 90 -density 100x100' endif if( debug = "TRUE" ) diff --git a/plots/grads_util/rmscmpz_plot.gs b/plots/grads_util/rmscmpz_plot.gs index 4c990fd9..91e59a37 100644 --- a/plots/grads_util/rmscmpz_plot.gs +++ b/plots/grads_util/rmscmpz_plot.gs @@ -4,7 +4,9 @@ function rmscmpz (args) numargs = result 'run getenv SOURCE' - SOURCE = result + SOURCE = result +'run getenv GEOSUTIL' + GEOSUTIL = result field = h desc = '' @@ -804,10 +806,11 @@ say 'EXP'm' Field: 'name' Region: 'region if( rms = 4 ) ; rms_label = '_PHASE' ; endif if( nday = ndaymax ) - 'myprint2 -name 'SOURCE'/corcmp/'expdsc.m'_'expdsc.m'_stats'loopflag'_'label'_rmscmp'rms_label'_'reg'_z_'months' -rotate 90 -density 100x100' + 'run 'GEOSUTIL'/plots/grads_util/myprint2 -name 'SOURCE'/corcmp/'expdsc.m'_'expdsc.m'_stats'loopflag'_'label'_rmscmp'rms_label'_'reg'_z_'months' -rotate 90 -density 100x100' else - 'myprint2 -name 'SOURCE'/corcmp/'expdsc.m'_'expdsc.m'_stats'loopflag'_'label'_rmscmp'rms_label'_'reg'_z_'months'_'nday'DAY -rotate 90 -density 100x100' + 'run 'GEOSUTIL'/plots/grads_util/myprint2 -name 'SOURCE'/corcmp/'expdsc.m'_'expdsc.m'_stats'loopflag'_'label'_rmscmp'rms_label'_'reg'_z_'months'_'nday'DAY -rotate 90 -density 100x100' endif +pause if( debug = "TRUE" ) say "Hit ENTER for next plot" pull flag @@ -1249,10 +1252,11 @@ say 'EXP'm' Field: 'name' Region: 'region if( rms = 4 ) ; rms_label = '_PHASE' ; endif if( nday = ndaymax ) - 'myprint2 -name 'SOURCE'/corcmp/'expdsc.0'_'expdsc.m'_stats'loopflag'_'label'_rmscmp'rms_label'_'reg'_z_'months' -rotate 90 -density 100x100' + 'run 'GEOSUTIL'/plots/grads_util/myprint2 -name 'SOURCE'/corcmp/'expdsc.0'_'expdsc.m'_stats'loopflag'_'label'_rmscmp'rms_label'_'reg'_z_'months' -rotate 90 -density 100x100' else - 'myprint2 -name 'SOURCE'/corcmp/'expdsc.0'_'expdsc.m'_stats'loopflag'_'label'_rmscmp'rms_label'_'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'_rmscmp'rms_label'_'reg'_z_'months'_'nday'DAY -rotate 90 -density 100x100' endif +pause if( debug = "TRUE" ) say "Hit ENTER for next plot" diff --git a/plots/grads_util/seasonal b/plots/grads_util/seasonal index 8597f4af..bff1ba1b 100644 --- a/plots/grads_util/seasonal +++ b/plots/grads_util/seasonal @@ -33,8 +33,8 @@ offset = subwrd(args,3) if( offset="" ) ; offset = 0 ; endif if( file="_" ) ; file = "" ; endif -* Initialize Time based on Existance of Environment Variables -* ----------------------------------------------------------- +* Initialize Time based on Existance of BEGDATE & ENDDATE Environment Variables +* ----------------------------------------------------------------------------- 'run getenv "DO_STD"' do_std = result 'run getenv "BEGDATE"' @@ -47,6 +47,21 @@ if( file="_" ) ; file = "" ; endif 'run uppercase 'do_std do_std = result +* Check if ddf file contains Climatology MetaCode +* ----------------------------------------------- + ClimMetaCode = 'FALSE' + 'q ctlinfo' + title = sublin(result,2) + n = 1 + word = subwrd(title,n) + while( word != '' ) + n = n + 1 + word = subwrd(title,n) + if( word = "Climatology:" ) + ClimMetaCode = 'TRUE' + endif + endwhile + tmin = 0 tmax = tdim + 1 @@ -64,14 +79,16 @@ endif if( tmin<1 | tmax>tdim ) tmin = 1 - 'set t ' tmin - 'getinfo date' - begdate = result - 'set t 'tdim - 'getinfo date' - enddate = result - tmax = tdim - 'run setenv "CLIMATE" Climatology' + 'set t ' tmin + 'getinfo date' + begdate = result + 'set t 'tdim + 'getinfo date' + enddate = result + tmax = tdim + if( ClimMetaCode = 'FALSE' ) + 'run setenv "CLIMATE" Climatology' + endif endif 'set time 'begdate diff --git a/plots/grads_util/seasonalf b/plots/grads_util/seasonalf index 47f02d81..e927875d 100644 --- a/plots/grads_util/seasonalf +++ b/plots/grads_util/seasonalf @@ -45,8 +45,8 @@ endwhile zmax = result -* Initialize Time based on Existance of Environment Variables -* ----------------------------------------------------------- +* Initialize Time based on Existance of BEGDATE & ENDDATE Environment Variables +* ----------------------------------------------------------------------------- 'run getenv "DO_STD"' do_std = result 'run getenv "BEGDATE"' @@ -59,6 +59,21 @@ endwhile 'run uppercase 'do_std do_std = result +* Check if ddf file contains Climatology MetaCode +* ----------------------------------------------- + ClimMetaCode = 'FALSE' + 'q ctlinfo' + title = sublin(result,2) + n = 1 + word = subwrd(title,n) + while( word != '' ) + n = n + 1 + word = subwrd(title,n) + if( word = "Climatology:" ) + ClimMetaCode = 'TRUE' + endif + endwhile + tmin = 0 tmax = tdim + 1 @@ -83,7 +98,9 @@ if( tmin<1 | tmax>tdim ) 'getinfo date' enddate = result tmax = tdim - 'run setenv "CLIMATE" Climatology' + if( ClimMetaCode = 'FALSE' ) + 'run setenv "CLIMATE" Climatology' + endif endif 'set time 'begdate diff --git a/plots/grads_util/setdates.gs b/plots/grads_util/setdates.gs index 40d1c8ad..a03c3a2a 100644 --- a/plots/grads_util/setdates.gs +++ b/plots/grads_util/setdates.gs @@ -1,7 +1,9 @@ function setdates -* Create Environment Variables for Seasonal Utility -* ------------------------------------------------- +* Create Environment Variables for Seasonal and Seasonalf Utilities +* Note: TBEG & TEND are set from QUICKPLOT command line inputs. +* BEGDATE & ENDDATE are set from QUICKPLOT setdates utility. +* ----------------------------------------------------------------- 'getinfo date' date = substr(result,1,5) @@ -10,8 +12,8 @@ function setdates 'run getenv "TEND" ' TEND = result -* Compute TIME Boundaries based on Input TBEG & TEND -* -------------------------------------------------- +* Compute TIME Boundaries based on QUICKPLOT Input TBEG & TEND +* ------------------------------------------------------------ if( TBEG != NULL & TEND != NULL ) begyear = substr(TBEG,1,4) @@ -26,14 +28,8 @@ if( TBEG != NULL & TEND != NULL ) else -'getinfo desc' - desc = result -'!froot 'desc -'run getenv FROOT' - basename = result - -* Compute TIME Boundaries based on CLIM tabl file -* ----------------------------------------------- +* Initialize TIME Boundaries to NULL unless plots are using ddf files which contain Climatology MetaCode +* ------------------------------------------------------------------------------------------------------ begYYYYMM = 'NULL' endYYYYMM = 'NULL' 'q ctlinfo' @@ -41,56 +37,39 @@ else 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 + n = n + 1 + word = subwrd(title,n) + if( word = "Climatology:" ) + begYYYYMM = subwrd(title,n+1) + endYYYYMM = subwrd(title,n+3) + endif endwhile -*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 - -if( begYYYYMM != 'NULL' & endYYYYMM != 'NULL' ) - - begyear = substr(begYYYYMM,1,4) - begmonth = substr(begYYYYMM,5,2) - month = getmon(begmonth) - begdate = date''month''begyear - - endyear = substr(endYYYYMM,1,4) - endmonth = substr(endYYYYMM,5,2) - month = getmon(endmonth) - enddate = date''month''endyear - -else - -* Compute TIME Boundaries based on XDF tabl file -* ---------------------------------------------- -'getinfo tdim' - tdim = result - -'set t '1 -'getinfo date' - begdate = result -'set t 'tdim -'getinfo date' - enddate = result - -endif +* Set TIME Boundaries based on ddf files Climatology MetaCode or Time Dimensions +* ------------------------------------------------------------------------------ + if( begYYYYMM != 'NULL' & endYYYYMM != 'NULL' ) + begyear = substr(begYYYYMM,1,4) + begmonth = substr(begYYYYMM,5,2) + month = getmon(begmonth) + begdate = date''month''begyear + + endyear = substr(endYYYYMM,1,4) + endmonth = substr(endYYYYMM,5,2) + month = getmon(endmonth) + enddate = date''month''endyear + else +* Compute TIME Boundaries based on ddf Time Dimensions +* ---------------------------------------------------- + 'getinfo tdim' + tdim = result + + 'set t '1 + 'getinfo date' + begdate = result + 'set t 'tdim + 'getinfo date' + enddate = result + endif endif diff --git a/plots/grads_util/zonal.gs b/plots/grads_util/zonal.gs deleted file mode 100644 index f87521e0..00000000 --- a/plots/grads_util/zonal.gs +++ /dev/null @@ -1,144 +0,0 @@ -function zonal (args) - -'run getvar U DYN' - uname = subwrd(result,1) - ufile = subwrd(result,2) -'run getvar V DYN' - vname = subwrd(result,1) - vfile = subwrd(result,2) -'run getvar T DYN' - tname = subwrd(result,1) - tfile = subwrd(result,2) -'run getvar Q MOIST' - qname = subwrd(result,1) - qfile = subwrd(result,2) -'run getvar RH2 MOIST' - rhname = subwrd(result,1) - rhfile = subwrd(result,2) - - -* Initialize Environment using U-Wind File -* ---------------------------------------- -'set dfile 'ufile -'setdates' -'setx' -'sety' -'setz' -'sett' - -'getinfo xdim' - xdim = result -'getinfo ydim' - ydim = result -'getinfo zdim' - zdim = result -'getinfo tdim' - tdim = result - -'run setenv "XDIM" 'xdim -'run setenv "YDIM" 'ydim -'run setenv "ZDIM" 'zdim -'run setenv "TDIM" 'tdim - -'define zeros = lev-lev' -'makez zeros z' - -* Create Zonal Means -* ------------------ -if( ufile != "NULL" ) - 'set dfile ' ufile - 'makez ' uname' z' -else - 'chckname 'uname - 'makez 'uname' z' -endif - -if( vfile != "NULL" ) - 'set dfile ' vfile - 'makez ' vname' z' -else - 'chckname 'vname - 'makez 'vname' z' -endif - -if( tfile != "NULL" ) - 'set dfile ' tfile - 'makez ' tname' z' -else - 'chckname 'tname - 'makez 'tname' z' -endif - -if( qfile != "NULL" ) - 'set dfile ' qfile - 'makez ' qname' z' -else - 'chckname 'qname - 'makez 'qname' z' -endif - -if( rhfile != "NULL" ) - 'set dfile 'rhfile - 'makez 'rhname' z' -else - 'chckname 'rhname - 'makez 'rhname' z' -endif - -* Assume vsts Quadratic is in TFILE -* --------------------------------- -if( tfile != "NULL" ) - 'set dfile ' tfile - 'chckname vsts' - 'makez vsts z' -else - 'chckname vsts' - 'makez vsts z' -endif - - -* Define Pressure Variables -* ------------------------- -'set dfile 'ufile -'set x 1' -'sety' -'setz' -'define pl = lev' -'define pk = pow(pl,2/7)' - -'set gxout fwrite' - -'getinfo tmax' - tmax = result -'getinfo zmax' - zmax = result - -* Write data -* ---------- -t=1 -while(t<=tmax) - 'set t 't - say 'Writing Data T = 't - - z=1 - while(z<=zmax) - 'set z 'z - -if( ufile != "NULL" ) ; 'd ' uname'z' ; else ; 'd zerosz' ; endif -if( vfile != "NULL" ) ; 'd ' vname'z' ; else ; 'd zerosz' ; endif -if( tfile != "NULL" ) ; 'd ' tname'z' ; else ; 'd zerosz' ; endif -if( qfile != "NULL" ) ; 'd ' qname'z' ; else ; 'd zerosz' ; endif -if( rhfile != "NULL" ) ; 'd 'rhname'z' ; else ; 'd zerosz' ; endif -if( tfile != "NULL" ) ; 'd vstsz' ; else ; 'd zerosz' ; endif - - 'd pl' - 'd pk' - - z=z+1 - endwhile - -t=t+1 -endwhile - -'quit' -return diff --git a/plots/gwd/gwd b/plots/gwd/gwd index 15a3a684..9d36ba9d 100644 --- a/plots/gwd/gwd +++ b/plots/gwd/gwd @@ -246,6 +246,7 @@ say result 'seasonal dtdtrayz' + m = 10 while( m <= 14 ) if( qfile.m != "NULL" ) diff --git a/plots/hcmp/hcmp2 b/plots/hcmp/hcmp2 index 31a3580a..3a1c4135 100644 --- a/plots/hcmp/hcmp2 +++ b/plots/hcmp/hcmp2 @@ -612,9 +612,9 @@ endwhile * ----------------------------------- 'run getenv "CLIMATE"' climate.numexp = result - anafile = cfile.numexp - anadsc = cdesc.numexp - ananam = ctag.numexp + anafile = cfile.numexp + anadsc = cdesc.numexp + ananam = ctag.numexp climcmp.ananam = climate.numexp say 'numexp = 'numexp @@ -758,53 +758,53 @@ say '----------------------------------------------------------' while( k <= numexp ) say 'Checking Comparison Experiment k = 'k' CTAG = 'ctag.k' TYPE = 'type.k' for Closeness to Verifications (MERRA-2 ... CMPEXP:V)' - TAG = k + TAG = k if( ( ctag.k = "MERRA-2" | type.k = V ) & cname.k != 'NULL' ) -* Loop over Seasons to Process -* ---------------------------- - m = 1 -while( m > 0 ) - season = subwrd(seasons,m) +* Loop over Seasons to Process +* ---------------------------- + m = 1 + while( m > 0 ) + season = subwrd(seasons,m) -if( season = '' ) - m = -1 -else - m = m+1 - say 'Processing Season: 'season - -'set dfile 'qfile -'set gxout shaded' -'rgbset' -'run getenv "DIFFTYPE"' - DIFFTYPE = result -'run setenv "LEVTYPE" 'DIFFTYPE'LEVS' - -* Horizontal Closeness Plot (Experiment_vs_Comparison to Verification) -* -------------------------------------------------------------------- - n = 1 - while( n <= numexp ) - say 'Testing 'qtag' and 'ctag.n' for closeness with 'ctag.TAG - - if( ctag.n != "merra" & ctag.n != "MERRA-2" & ctag.n != ctag.TAG & type.n != V & cname.n != 'NULL' ) - say 'Closeness plot between exp: 'qtag - say ' cexp: 'ctag.n - say ' obs: 'ctag.TAG + if( season = '' ) + m = -1 + else + m = m+1 + say 'Processing Season: 'season + + 'set dfile 'qfile + 'set gxout shaded' + 'rgbset' + 'run getenv "DIFFTYPE"' + DIFFTYPE = result + 'run setenv "LEVTYPE" 'DIFFTYPE'LEVS' + +* Horizontal Closeness Plot (Experiment_vs_Comparison to Verification) +* -------------------------------------------------------------------- + n = 1 + while( n <= numexp ) + say 'Testing 'qtag' and 'ctag.n' for closeness with 'ctag.TAG + if( ctag.n != "merra" & ctag.n != "MERRA-2" & ctag.n != ctag.TAG & type.n != V & cname.n != 'NULL' ) + + say 'Closeness plot between exp: 'qtag + say ' cexp: 'ctag.n + say ' obs: 'ctag.TAG nname = ctag.n kname = ctag.k say ' climexp: 'climexp say ' climcmp: 'climcmp.nname say ' climobs: 'climcmp.kname - say ' Total numexp: 'numexp - say '' + say ' Total numexp: 'numexp + say '' 'define zcmp'TAG''season' = regrid2( qcmp'TAG''season',0.625,0.5,bs_p1,0,-90 )' 'define zcmp'n''season' = regrid2( qcmp'n''season' ,0.625,0.5,bs_p1,0,-90 )' 'define zmod'season' = regrid2( qmod'season' ,0.625,0.5,bs_p1,0,-90 )' - flag = "" - while ( flag = "" ) + flag = "" + while ( flag = "" ) say 'Performing Closeness plots to: 'ctag.TAG' k = 'k 'closeness -CVAR 'zcmp''n' -MVAR 'zmod' -OVAR 'zcmp''TAG' -CNAME 'ctag.n' -MNAME 'EXPORT' -ONAME 'ctag.TAG' -CDESC 'cdesc.n' -MDESC 'qdesc' -ODESC 'cdesc.TAG' -MFILE 'qfile' -MBEGDATE 'bdate' -MENDDATE 'edate' -CFILE 'cfile.n' -OFILE 'cfile.TAG' -CBEGDATE 'begdate.n' -CENDDATE 'enddate.n' -OBEGDATE 'begdate.k' -OENDDATE 'enddate.k' -EXPID 'expid' -PREFIX 'NULL' -SEASON 'season' -OUTPUT 'output' -CLIMEXP 'climexp' -CLIMCMP 'climcmp.nname' -CLIMOBS 'climcmp.kname' -GC 'GC' -MATH 'NULL' -LEVEL 'level @@ -837,26 +837,26 @@ else * ' -MATH 'NULL * ' -LEVEL 'level - 'myprint -name 'output'/horiz_'ctag.n'_'pname'_'level'_closeness_'ctag.TAG'.'season + 'myprint -name 'output'/horiz_'ctag.n'_'pname'_'level'_closeness_'ctag.TAG'.'season - if( debug = "debug" ) - say "Hit ENTER to repeat plot, or NON-BLANK to continue" - pull flag - else - flag = "next" - endif - 'c' - endwhile ;* END While_FLAG Loop + if( debug = "debug" ) + say "Hit ENTER to repeat plot, or NON-BLANK to continue" + pull flag + else + flag = "next" + endif + 'c' + endwhile ;* END While_FLAG Loop endif ;* END ctag.n Test - n = n + 1 + n = n + 1 endwhile ;* END While_N Loop over NUMEXPs * ----------------------------------------- -endif ;* End Season Test + endif ;* End Season Test * ------------------------ -endwhile ;* END SEASON Loop + endwhile ;* End Season Loop * --------------------------- else @@ -1190,6 +1190,7 @@ while( month != '' ) month = subwrd(months,m) endwhile + *********************************************************************************** say ' ' diff --git a/plots/landscape.script b/plots/landscape.script index 602bb268..a1f2891f 100755 --- a/plots/landscape.script +++ b/plots/landscape.script @@ -264,7 +264,7 @@ end if( $plot == $plotname.$n ) $grads $batch -l -c "run template -EXPID $expid -EXPORT KHRAD:TURBULENCE -LEVELS $levels -PTOP 300 -SEASON $seasons -OUTPUT $output -ZLOG OFF -DEBUG $debug " ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 if( $plot == $plotname.$n ) $grads $batch -l -c "run template -EXPID $expid -EXPORT EKH:TURBULENCE -LEVELS $levels -PTOP 300 -SEASON $seasons -OUTPUT $output -ZLOG OFF -DEBUG $debug " ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 if( $plot == $plotname.$n ) $grads $batch -l -c "run template -EXPID $expid -EXPORT EKM:TURBULENCE -LEVELS $levels -PTOP 300 -SEASON $seasons -OUTPUT $output -ZLOG OFF -DEBUG $debug " ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 - if( $plot == $plotname.$n ) $grads $batch -l -c "run template -EXPID $expid -EXPORT RI:TURBULENCE -LEVELS $levels -SEASON $seasons -OUTPUT $output -ZLOG OFF -DEBUG $debug " ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 + if( $plot == $plotname.$n ) $grads $batch -l -c "run template -EXPID $expid -EXPORT RI:TURBULENCE -LEVELS $levels -SEASON $seasons -OUTPUT $output -ZLOG OFF -DEBUG $debug " ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 if( $plot == $plotname.$n ) $grads $batch -l -c "run template -EXPID $expid -EXPORT INTDIS:TURBULENCE -LEVELS $levels -PTOP 300 -SEASON $seasons -OUTPUT $output -ZLOG OFF -DEBUG $debug " ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 if( $plot == $plotname.$n ) $grads $batch -l -c "run template -EXPID $expid -EXPORT TOPDIS:TURBULENCE -LEVELS $levels -PTOP 300 -SEASON $seasons -OUTPUT $output -ZLOG OFF -DEBUG $debug " ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 diff --git a/plots/lcmp/VERIFICATION.MERRA2.rc b/plots/lcmp/VERIFICATION.MERRA2.rc index 4dd4e7fd..e7c6a41e 100644 --- a/plots/lcmp/VERIFICATION.MERRA2.rc +++ b/plots/lcmp/VERIFICATION.MERRA2.rc @@ -2,8 +2,8 @@ OBSNAM: MERRA2 OBSDSC: GEOSadas-5_12_4_(MERRA2) - filename: 'VERIFICATION/MERRA2_MEANS/inst3_3d_asm_Np/xdf.tabl' - filetype: 'HDF' + filename: 'VERIFICATION/MERRA2_MEANS/instM_3d_asm_Np' + filetype: 'BIN' fields: 'ZLE' , 'DYN' , 'H' , 1 'T' , 'DYN' , 'T' , 1 'U' , 'DYN' , 'U' , 1 diff --git a/plots/portrait.script b/plots/portrait.script index 3a06913c..24eb7f16 100755 --- a/plots/portrait.script +++ b/plots/portrait.script @@ -213,7 +213,7 @@ endif # Prognostic Horizontal Mean Moist Comparisons # -------------------------------------------- set EXPORTS = `echo Q RH2` - set LEVS = '1000 925 850 700 600 500 400 300 250 200 150 100 70 50 30' + set LEVS = '1000 925 850 700 600 500 400 300 250 200 150 100 70 50 30' foreach EXPORT ($EXPORTS) foreach LEV ($LEVS) if( $plot == $plotname.$n ) $grads $batch -p -c "run $GEOSUTIL/plots/hcmp/hcmp2 $EXPORT MOIST $LEV $expid $output $debug $seasons " ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 @@ -223,7 +223,7 @@ endif # Prognostic Horizontal Mean QL & QI Comparisons # ---------------------------------------------- set EXPORTS = `echo QLTOT QITOT` - set LEVS = '1000 925 850 700 600 500 400 300 250 200 150 100 70 50 30' + set LEVS = '1000 925 850 700 600 500 400 300 250 200 150 100 70 50 30' foreach EXPORT ($EXPORTS) foreach LEV ($LEVS) if( $plot == $plotname.$n ) $grads $batch -p -c "run $GEOSUTIL/plots/hcmp/hcmp2 $EXPORT AGCM $LEV $expid $output $debug $seasons " ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 @@ -281,10 +281,10 @@ endif # Residual Circulation # -------------------- if( $plot == residual ) then - $GEOSUTIL/plots/res/makeres $source + $GEOSUTIL/plots/res/makeres $source setenv ORIENTATION PORTRAIT - $grads $batch -p -c "run $GEOSUTIL/plots/res/res $expid $output $debug $seasons " + $grads $batch -p -c "run $GEOSUTIL/plots/res/res $expid $output $debug $seasons " setenv ORIENTATION LANDSCAPE $grads $batch -l -c "run $GEOSUTIL/plots/res/res $expid $output $debug $seasons " @@ -812,7 +812,6 @@ if( $MAKE_LIST == TRUE | "$CMPEXP" != "NULL" ) then if( $plot == $plotname.$n ) $grads $batch -p -c "run gencmpz -EXPID $expid -EXPORT RSU_LS:MOIST -SEASON $seasons -OUTPUT $output -DEBUG $debug -PTOP 10" ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 set LEVS = '1000 975 950 925 900 850 800 750 700 650 600 550 500 450 400 350 300 250 200 150 100' - foreach LEV ($LEVS) if( $plot == $plotname.$n ) $grads $batch -p -c "run gencmp -EXPID $expid -SEASON $seasons -OUTPUT $output -DEBUG $debug -EXPORT DUDT:MOIST -LEVEL $LEV " ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 if( $plot == $plotname.$n ) $grads $batch -p -c "run gencmp -EXPID $expid -SEASON $seasons -OUTPUT $output -DEBUG $debug -EXPORT DVDT:MOIST -LEVEL $LEV " ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 @@ -857,7 +856,7 @@ if( $MAKE_LIST == TRUE | "$CMPEXP" != "NULL" ) then if( $plot == $plotname.$n ) $grads $batch -p -c "run gencmpz -EXPID $expid -EXPORT KHRAD:TURBULENCE -SEASON $seasons -OUTPUT $output -DEBUG $debug -PTOP 300" ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 if( $plot == $plotname.$n ) $grads $batch -p -c "run gencmpz -EXPID $expid -EXPORT EKH:TURBULENCE -SEASON $seasons -OUTPUT $output -DEBUG $debug -PTOP 300" ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 if( $plot == $plotname.$n ) $grads $batch -p -c "run gencmpz -EXPID $expid -EXPORT EKM:TURBULENCE -SEASON $seasons -OUTPUT $output -DEBUG $debug -PTOP 300" ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 - if( $plot == $plotname.$n ) $grads $batch -p -c "run gencmpz -EXPID $expid -EXPORT RI:TURBULENCE -SEASON $seasons -OUTPUT $output -DEBUG $debug -PTOP 10" ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 + if( $plot == $plotname.$n ) $grads $batch -p -c "run gencmpz -EXPID $expid -EXPORT RI:TURBULENCE -SEASON $seasons -OUTPUT $output -DEBUG $debug -PTOP 10" ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 if( $plot == $plotname.$n ) $grads $batch -p -c "run gencmpz -EXPID $expid -EXPORT INTDIS:TURBULENCE -SEASON $seasons -OUTPUT $output -DEBUG $debug -PTOP 300" ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 if( $plot == $plotname.$n ) $grads $batch -p -c "run gencmpz -EXPID $expid -EXPORT TOPDIS:TURBULENCE -SEASON $seasons -OUTPUT $output -DEBUG $debug -PTOP 300" ; set plots = `echo $plots $plotname.$n` ; @ n = $n + 1 diff --git a/plots/res/VERIFICATION.merra.rc b/plots/res/VERIFICATION.merra.rc deleted file mode 100644 index 8a061e38..00000000 --- a/plots/res/VERIFICATION.merra.rc +++ /dev/null @@ -1,10 +0,0 @@ - -OBSNAM: merra -OBSDSC: GEOSdas-2_1_4_(MERRA) - - filename: 'VERIFICATION/MERRA/residual.merra.ctl' - filetype: 'BIN' - fields: 'STR' , 'DYN' , 'STR' , 1 - 'RES' , 'DYN' , 'RES' , 1 - 'DUM' , 'DYN' , 'DUM' , 1 - :: diff --git a/plots/res/epflx.gs b/plots/res/epflx.gs index d324bbc3..e1f7e682 100644 --- a/plots/res/epflx.gs +++ b/plots/res/epflx.gs @@ -115,9 +115,8 @@ rc = arrow(xrit-0.25,ybot+0.2,arrlen,arrscl) ' vpage 2 1 2 2 -top 0.6 -bot -0.10' ' set ccolor rainbow' ' set csmooth on' -' set lev 1000 100 ' -' set lev 1000 80 ' -' set lev 925 80 ' +' set lev 925 8 ' +' setlevs ' ' shades 1.00' ' d epfdiv' ' cbarn -xmid 6 ' @@ -140,8 +139,6 @@ rc = arrow(xrit-0.25,ybot+0.2,arrlen,arrscl) ' vpage 1 2 2 2 -top 0.25 -bot 0.25' ' set ccolor rainbow' ' set csmooth on' -' set lev 1000 100 ' -' set lev 1000 80 ' ' set lev 925 80 ' ' set zlog off ' ' shades 1.00' diff --git a/plots/res/epflx_diff.gs b/plots/res/epflx_diff.gs index ffe9d22c..d4fa3b91 100644 --- a/plots/res/epflx_diff.gs +++ b/plots/res/epflx_diff.gs @@ -120,26 +120,27 @@ say 'ENDDATE = 'enddate skipval = result if(skipval < 1 ) ; skipval = 1 ; endif -'set gxout shaded' -'set arrlab off' - -' set grads off ' -' set ylopts 1 3 0.15 ' - - -' vpage 1 1 2 2 -top 0.6 -bot -0.10' -' set csmooth on' -' set lev 925 1' -' setlevs ' - +* Compute Generic CINT for EPDIFF +* ------------------------------- +' set lev 500 10' ' shades epdiff 0' cint = subwrd(result,1) cint = 100 * cint 'getint 'cint cint = result / 100 -'shades 'cint -' d epdiff' +'set gxout shaded' +'set arrlab off' +'set grads off ' +'set ylopts 1 3 0.15 ' + +' vpage 1 1 2 2 -top 0.6 -bot -0.10' +' set lev 1000 0.8' +' set lev 925 0.8' +' setlevs ' +' set csmooth on' +' shades 'cint +' d epdiff' ' cbarn -xmid 6 -ndot 0' ' draw ylab hPa ' ' set ccolor 1' @@ -167,16 +168,11 @@ rc = arrow(xrit-0.25,ybot+0.2,arrlen,arrscl) ' vpage 2 1 2 2 -top 0.6 -bot -0.10' ' set csmooth on' -' set lev 925 100' - -' shades epdiff 0' - cint = subwrd(result,1) - cint = 100 * cint -'getint 'cint - cint = result / 100 -'shades 'cint - -' d epdiff' +' set lev 1000 8' +' set lev 925 8' +' setlevs ' +' shades 'cint +' d epdiff' ' cbarn -xmid 6 -ndot 0' ' draw ylab hPa ' ' set ccolor 1' @@ -204,17 +200,11 @@ rc = arrow(xrit-0.25,ybot+0.2,arrlen,arrscl) ' vpage 1 2 2 2 -top 0.25 -bot 0.25' ' set csmooth on' -' set lev 925 100' +' set lev 1000 80' +' set lev 925 80' ' set zlog off ' - -' shades epdiff 0' - cint = subwrd(result,1) - cint = 100 * cint -'getint 'cint - cint = result / 100 -'shades 'cint - -' d epdiff' +' shades 'cint +' d epdiff' ' cbarn -xmid 6 -ndot 0' ' draw ylab hPa ' ' set ccolor 1' @@ -243,10 +233,11 @@ rc = arrow(xrit-0.25,ybot+0.2,arrlen,arrscl) ' vpage 2 2 2 2 -top 0.25 -bot 0.25' ' set csmooth on' ' set grads off ' -' set lev 100 8' -' set lev 100 20' +' set lev 100 18' ' set zlog on ' +* Compute Stratospheric CINT for EPDIFF +* ------------------------------------- ' shades epdiff 0' cint = subwrd(result,1) cint = 100 * cint @@ -254,7 +245,7 @@ rc = arrow(xrit-0.25,ybot+0.2,arrlen,arrscl) cint = result / 100 'shades 'cint -' d epdiff' +' d epdiff' ' cbarn -xmid 6 -ndot 1' ' draw ylab hPa ' ' set ccolor 1' diff --git a/plots/res/plot_season.gs b/plots/res/plot_season.gs index 5446ec62..fad0ea39 100644 --- a/plots/res/plot_season.gs +++ b/plots/res/plot_season.gs @@ -2,6 +2,7 @@ function plot_season (args) talats = subwrd(args,1) output = subwrd(args,2) + M2FLAG = subwrd(args,3) 'run getenv NSMOOTH' nsmooth = result @@ -12,10 +13,21 @@ function plot_season (args) 'run getenv MASKFILE' maskfile = result +'run getenv BEGDATE' + begdate = result +'run getenv ENDDATE' + enddate = result + +'q gxout' + gxout = sublin(result,4) + gxout = subwrd(gxout,6) + * Choose "indv" or "avrg" for Turn-Around Lats (talats) based on Turn-Around Functions (tafunc) "wstr" or "psi" * ------------------------------------------------------------------------------------------------------------- -* talats = avrg -* talats = indv + if( talats = avrg ) ; talatsz = 'Averaged' ; endif + if( talats = indv ) ; talatsz = 'Individual' ; endif + if( talats = hard ) ; talatsz = 'Hard-Wired' ; endif + if( talats = levl ) ; talatsz = 'Level-Dependent' ; endif tafunc = psi tafunc = wstr @@ -26,6 +38,21 @@ function plot_season (args) levmin = 20 levmax = 100 + +* Set Default Turn-Around Latitudes +* --------------------------------- + hardmin = -999 + hardmax = -999 + +* Set Turn-Around Latitudes to User-Defined Values +* ------------------------------------------------ + if( talats = hard ) + hardmin = -90.00 + hardmax = 90.00 + hardmin = -47.34 + hardmax = 27.74 + endif + * ------------------------------------ 'numargs 'args @@ -37,42 +64,176 @@ function plot_season (args) RSLV = (result-1)/2 CRSLV = C''RSLV -'set xlab on' - - hardmin = 60 - hardmax = 90 - hardmin = -999 - hardmax = -999 - numargs = numfiles + tags = '' + exps = '' +if( numargs=2 ) n = 1 while( n<=numfiles ) pltfile.n = n n = n + 1 endwhile +endif -'set vpage off' -'set parea off' +if( numargs>2 & M2FLAG != 'NOM2' ) + n = 1 + while( n<=numargs+2 ) + index = subwrd(args,n+2) + if( index=a ) ; pltfile.n = 1 ; endif + if( index=b ) ; pltfile.n = 2 ; endif + if( index=c ) ; pltfile.n = 3 ; endif + if( index=d ) ; pltfile.n = 4 ; endif + if( index=e ) ; pltfile.n = 5 ; endif + if( index=f ) ; pltfile.n = 6 ; endif + if( index=g ) ; pltfile.n = 7 ; endif + if( index=h ) ; pltfile.n = 8 ; endif + if( index=i ) ; pltfile.n = 9 ; endif + if( index=j ) ; pltfile.n = 10 ; endif + if( index=k ) ; pltfile.n = 11 ; endif + if( index=l ) ; pltfile.n = 12 ; endif + if( index=m ) ; pltfile.n = 13 ; endif + if( index=n ) ; pltfile.n = 14 ; endif + if( index=o ) ; pltfile.n = 15 ; endif + say 'n = 'n' index = 'index' pltfile = 'pltfile.n + n = n + 1 + endwhile +endif -'set xlopts 1 4 0.10' -'set ylopts 1 4 0.10' -'set string 1 c 5' -'set strsiz 0.07' +if( numargs>2 & M2FLAG = 'NOM2' ) + n = 1 + while( n<=numargs+3 ) + index = subwrd(args,n+3) + if( index=a ) ; pltfile.n = 1 ; endif + if( index=b ) ; pltfile.n = 2 ; endif + if( index=c ) ; pltfile.n = 3 ; endif + if( index=d ) ; pltfile.n = 4 ; endif + if( index=e ) ; pltfile.n = 5 ; endif + if( index=f ) ; pltfile.n = 6 ; endif + if( index=g ) ; pltfile.n = 7 ; endif + if( index=h ) ; pltfile.n = 8 ; endif + if( index=i ) ; pltfile.n = 9 ; endif + if( index=j ) ; pltfile.n = 10 ; endif + if( index=k ) ; pltfile.n = 11 ; endif + if( index=l ) ; pltfile.n = 12 ; endif + if( index=m ) ; pltfile.n = 13 ; endif + if( index=n ) ; pltfile.n = 14 ; endif + if( index=o ) ; pltfile.n = 15 ; endif + say 'n = 'n' index = 'index' pltfile = 'pltfile.n + n = n + 1 + endwhile +endif + +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ +* Get Experiment Names +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ + + n = 1 + while( n<=numfiles ) + 'set dfile 'n + 'getinfo desc' + desc = result + node = '' + m = 2 + '!remove NODE.txt' + '!basename 'desc' | cut -d. -f'm' >> NODE.txt' + 'run getenv "NODE"' + node = result + EXP.n = node + say 'EXP'n' = 'EXP.n + m = m + 1 + '!remove NODE.txt' + '!basename 'desc' | cut -d. -f'm' >> NODE.txt' + 'run getenv "NODE"' + node = result + while( node != 'ctl' & node != 'data' ) + EXP.n = EXP.n'.'node + say 'EXP'n' = 'EXP.n + m = m + 1 + '!remove NODE.txt' + '!basename 'desc' | cut -d. -f'm' >> NODE.txt' + 'run getenv "NODE"' + node = result + endwhile + +* Generate and Use WSTAR files stored in OUTPUT directory +* ------------------------------------------------------- + FILE.n = 'WSTAR_'talats'.'EXP.n + LOCATION = '../' + LOCATION = '' + + n = n + 1 + endwhile + + axmax = -1e15 + axmin = 1e15 + +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ +* Loop over ALL experiments to Compute Latitudinally-Averged Data +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ -'set vpage 0 11 0 8.5' -'set parea 1.0 7 0.75 8' -'set grads off' -axmax = -1e15 -axmin = 1e15 n = 1 while( n<=numfiles ) - m = 1 - while( m<=numargs ) - if( pltfile.m = n ) + 'set dfile 'n + + 'run getdates' + 'getinfo tmin' + tmin = result + 'getinfo tmax' + tmax = result + tdim = tmax - tmin + 1 + + 'set lev 'levmax + 'getinfo zpos' + zmin = result + 'set lev 'levmin + 'getinfo zpos' + zmax = result + zdim = zmax - zmin + 1 + say 'File: 'n' zmax: 'zmax' zmin: 'zmin' zdim: 'zdim + + levels = '' + z = zmin + while( z <= zmax ) + 'set z ' z + 'getinfo level' + level = result + levels = levels' 'level + z = z+1 + endwhile + say 'Levels: 'levels + say ' ' + +* ------------------------------------------------------------------------ +* Compute w* for Level- and Time- Independentment Turn-Around Latitudes +* ------------------------------------------------------------------------ + + if( talats=indv | talats=avrg | talats=hard ) + 'set lev 'levmax' 'levmin 'set y 1' + if( hardmin != -999 ) ; latmin = latmax ; endif + if( hardmax != -999 ) ; latmax = hardmax ; endif + + if(talats=avrg) + if(tafunc=wstr) + 'run getenv wstr'season'latmx' ; latmax = result + 'run getenv wstr'season'latmn' ; latmin = result + endif + if(tafunc=psi) + 'run getenv psi'season'latmx' ; latmax = result + 'run getenv psi'season'latmn' ; latmin = result + endif + 'getint 'latmax*100 + latmax = result/100 + 'getint 'latmin*100 + latmin = result/100 + endif if(talats=indv) if(tafunc=wstr) @@ -83,53 +244,243 @@ while( n<=numfiles ) 'run getenv psi'season'latmx'n ; latmax = result 'run getenv psi'season'latmn'n ; latmin = result endif + 'getint 'latmax*100 + latmax = result/100 + 'getint 'latmin*100 + latmin = result/100 endif - if(talats=avrg) - if(tafunc=wstr) - 'run getenv wstr'season'latmx' ; latmax = result - 'run getenv wstr'season'latmn' ; latmin = result - endif - if(tafunc=psi) - 'run getenv psi'season'latmx' ; latmax = result - 'run getenv psi'season'latmn' ; latmin = result - endif + say 'define dumdum'n' = ave(w'type''season''time''n',lat='latmin',lat='latmax')*1000' + 'define dumdum'n' = ave(w'type''season''time''n',lat='latmin',lat='latmax')*1000' + 'minmax dumdum'n + dmax = subwrd(result,1) + dmin = subwrd(result,2) + say 'talats: 'talats' File: 'n' latmin: 'latmin' latmax: 'latmax' wstar_min = 'dmin' wstar_max = 'dmax + if(dmax > axmax ) ; axmax = dmax ; endif + if(dmin < axmin ) ; axmin = dmin ; endif + 'q dims' + say result +* pause + +* End if( talats=indv | talats=avrg | talats=hard ) test +* ------------------------------------------------------ endif - if( hardmin != -999 ) ; latmin = latmax ; endif - if( hardmax != -999 ) ; latmax = hardmax ; endif +* ------------------------------------------------------------------------ +* Compute w* for Level- and Time- Dependentment Turn-Around Latitudes +* ------------------------------------------------------------------------ + + if( talats=levl ) + +* Create CTL File for Each Experiment +* ----------------------------------- + ioflag = 1-sublin( read(LOCATION''FILE.n'.ctl'),1 ) + say 'ioflag for 'LOCATION''FILE.n'.ctl: 'ioflag +* pause + if( ioflag = 0 ) + + '!remove 'LOCATION''FILE.n'.ctl' + '!touch 'LOCATION''FILE.n'.ctl' + '!echo dset ^'FILE.n'.data >> 'LOCATION''FILE.n'.ctl' + '!echo title WSTAR >> 'LOCATION''FILE.n'.ctl' + '!echo undef 1e15 >> 'LOCATION''FILE.n'.ctl' + '!echo xdef 1 linear -180 1 >> 'LOCATION''FILE.n'.ctl' + '!echo ydef 1 linear -90 1 >> 'LOCATION''FILE.n'.ctl' + '!echo zdef 'zdim' levels 'levels' >> 'LOCATION''FILE.n'.ctl' + '!echo tdef 'tdim' linear 'begdate' 1mo >> 'LOCATION''FILE.n'.ctl' + '!echo vars 3 >> 'LOCATION''FILE.n'.ctl' + '!echo minlats 'zdim' 0 minlats >> 'LOCATION''FILE.n'.ctl' + '!echo maxlats 'zdim' 0 maxlats >> 'LOCATION''FILE.n'.ctl' + '!echo wstrlats 'zdim' 0 wstar >> 'LOCATION''FILE.n'.ctl' + '!echo endvars >> 'LOCATION''FILE.n'.ctl' + +* Loop over Time to create Time-Dependent Level Data +* -------------------------------------------------- + t = tmin + while( t<= tmax ) + 'set t 't + 'getinfo date' + date = result + say 'Date: 'date + +* Loop over Levels +* ---------------- + z = zmin + while( z <= zmax ) + 'set z ' z + 'set x 1' + 'sety' + 'getinfo level' + level = result + + dummy = get_lats( 'wstar'n ) + latmin.t.z = subwrd(dummy,1) + latmax.t.z = subwrd(dummy,2) + +* Compute Transport Poleward of Turn-Around Latitudes +* --------------------------------------------------- +* if( latmin.t.z != 1e15 & latmax.t.z != 1e15 ) +* latmin.t.z = latmax.t.z +* latmax.t.z = 90 +* endif + + 'd 'latmin.t.z + a = subwrd(result,4) + 'd 'latmax.t.z + b = subwrd(result,4) + +* Compute w* Averaged between Turn-Around Latitudes +* ------------------------------------------------- + if( a = 1e15 | b = 1e15 ) + dumw.t.z = 1e15 + else +* say 'd ave(wstar'n',lat='a',lat='b')*1000' + 'd ave(wstar'n',lat='a',lat='b')*1000' + result1 = sublin(result,2) + dumw.t.z = subwrd(result1,4) + endif - say 'LATMIN: 'latmin - say 'LATMAX: 'latmax + say ' Level: 'level' Lats: 'latmin.t.z' 'latmax.t.z' wstar: 'dumw.t.z - 'getint 'latmax*100 - latmax = result/100 - 'getint 'latmin*100 - latmin = result/100 +* End Level Loop +* -------------- + z = z+1 + endwhile - say 'Turn-Around wstr'n' latmin: 'latmin - say 'Turn-Around wstr'n' latmax: 'latmax +* End Time Loop +* ------------- + t = t+1 + endwhile + +* ------------------------------------------------------------------------ +* Create DATA File for Each Experiment +* ------------------------------------------------------------------------ + + 'set gxout fwrite' + 'set fwrite 'LOCATION''FILE.n'.data' - 'define dumdum = ave(w'type''season''time''n',lat='latmin',lat='latmax')*1000' - 'minmax dumdum' - dmax = subwrd(result,1) - dmin = subwrd(result,2) - say 'File: 'n' min = 'dmin' max = 'dmax + t = tmin + while( t<= tmax ) + + 'set t 't + 'set y 1' + z = zmin + while( z <= zmax ) + 'set z 'z + 'd 'latmin.t.z + z = z+1 + endwhile + z = zmin + while( z <= zmax ) + 'set z 'z + 'd 'latmax.t.z + z = z+1 + endwhile + z = zmin + while( z <= zmax ) + 'set z 'z + 'd 'dumw.t.z + z = z+1 + endwhile + t = t+1 + endwhile + + 'disable fwrite' + 'set gxout 'gxout + +* End IOFLAG Test +* --------------- + endif + +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ + +* Note: Scaling will be based on ALL experiments +* ---------------------------------------------- + 'open 'LOCATION''FILE.n'.ctl' + 'getinfo numfiles' + dumfile = result + 'set dfile 'dumfile + 'set x 1' + 'set y 1' + 'setz ' + 'run getdates' +* 'run setenv DO_STD TRUE' + 'seasonal wstrlats 'n + + 'minmax wstrlats'season''n + dmax = subwrd(result,1) + dmin = subwrd(result,2) + say 'talats: 'talats' File: 'n' wstar_min = 'dmin' wstar_max = 'dmax if(dmax > axmax ) ; axmax = dmax ; endif if(dmin < axmin ) ; axmin = dmin ; endif - endif - m = m + 1 - endwhile -n = n + 1 + + 'close 'dumfile + +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ + +* End if( talats=levl ) test +* -------------------------- + endif + +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ + +* End File Loop +* ------------- + n = n + 1 endwhile - axmin = axmin - ( 0.1*axmax ) - axmax = axmax * 1.1 - 'set axlim 0.22999 0.44001' - if( axmin < 0.22999 | axmax > 0.44001 ) - 'set axlim 'axmin' 'axmax + +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ +* Plot Latitudinally-Averaged WSTAR Vertical Profiles +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ + +'set vpage off' +'set parea off' + +'set xlopts 1 4 0.10' +'set ylopts 1 4 0.10' +'set string 1 c 5' +'set strsiz 0.07' + +'set vpage 0 11 0 8.5' +'set parea 1.0 7 0.75 8' +'set grads off' +'set xlab on' + + say 'Initial axmin: 'axmin' axmax: 'axmax + delax = ( axmax - axmin )/15 + axmin = axmin - delax + axmax = axmax + delax + say 'Adjusted axmin: 'axmin' axmax: 'axmax + + if( season = 'DJF' ) + if( axmin >= 0.24 ) + axmin = 0.23999 + endif + if( axmax <= 0.48 ) + axmax = 0.48001 + endif + endif + if( season = 'JJA' ) + if( axmin >= 0.14 ) + axmin = 0.13999 + endif + if( axmax <= 0.32 ) + axmax = 0.32001 + endif endif + say 'Final axmin: 'axmin' axmax: 'axmax + say ' ' + axmin = 0.21509 + axmax = 0.44501 + 'set axlim 'axmin' 'axmax + id.1 = 'a' id.2 = 'b' id.3 = 'c' @@ -146,8 +497,6 @@ endwhile id.14 = 'n' id.15 = 'o' -color.1 = 23 -color.2 = 25 color.3 = 28 color.4 = 33 color.5 = 35 @@ -162,15 +511,9 @@ color.13 = 63 color.14 = 65 color.15 = 68 - color.1 = 23 - color.2 = 25 color.3 = 27 - color.4 = 33 - color.5 = 35 color.6 = 39 - color.7 = 58 - color.8 = 42 color.9 = 44 color.10 = 46 @@ -204,15 +547,26 @@ color.15 = 68 color.6 = 7 color.7 = 12 +* color.1 = 4 +* color.2 = 5 +* color.3 = 3 +* color.4 = 1 +* color.5 = 1 +* color.6 = 3 +* color.7 = 1 -* Plot Turn-Around Average -* ------------------------ +* Plot Latitudinally-Averaged WSTAR for Selected Input Files +* ---------------------------------------------------------- n = 1 while( n<=numfiles ) m = 1 - while( m<=numargs ) + while( m<=numfiles ) if( pltfile.m = n ) + 'set dfile 'n + 'run getdates' + 'getinfo tmin' + tmin = result 'getinfo desc' desc.n = result '!remove DESC.txt' @@ -224,7 +578,7 @@ while( n<=numfiles ) 'set zlog on' 'set y 1' 'set grid on' - 'set t 1' + 'set t 'tmin 'set ccolor 'color.n 'set cthick 3' if( n=1 ) ; 'set cthick 10' ; endif @@ -232,65 +586,35 @@ while( n<=numfiles ) k = n - 3 * math_int(n/3) + 1 'set cstyle 'k 'set cstyle '1 -* if( n=2 ) ; 'set cstyle 1' ; endif 'set cmark 0' -* 'set cmark 3' - - - if(talats=indv) - if(tafunc=wstr) - 'run getenv wstr'season'latmx'n ; latmax = result - 'run getenv wstr'season'latmn'n ; latmin = result - endif - if(tafunc=psi) - 'run getenv psi'season'latmx'n ; latmax = result - 'run getenv psi'season'latmn'n ; latmin = result - endif - endif - - if(talats=avrg) - if(tafunc=wstr) - 'run getenv wstr'season'latmx' ; latmax = result - 'run getenv wstr'season'latmn' ; latmin = result - endif - if(tafunc=psi) - 'run getenv psi'season'latmx' ; latmax = result - 'run getenv psi'season'latmn' ; latmin = result - endif - endif - - - if( hardmin != -999 ) ; latmin = latmax ; endif - if( hardmax != -999 ) ; latmax = hardmax ; endif - - 'getint 'latmax*100 - latmax = result/100 - 'getint 'latmin*100 - latmin = result/100 - say 'Turn-Around wstr'n' latmin: 'latmin - say 'Turn-Around wstr'n' latmax: 'latmax +* Plot wstar based on Level-Dependent Turn-Around Latitudes +* --------------------------------------------------------- + if( talats=levl ) + 'd wstrlats'season''n - +* Add Standard Deviation to selected experiments +* ---------------------------------------------- +* if( n=4 ) +* 'set cstyle 3' +* 'set cthick 1' +* 'set ccolor 1' +* 'd wstrlats'season''n' + wstrlats'season'std'n +* 'set cstyle 3' +* 'set cthick 1' +* 'set ccolor 1' +* 'd wstrlats'season''n' - wstrlats'season'std'n +* endif -* Perform Smoothing Option -* ------------------------ - if( nsmooth > 0 ) - 'sety' - 'define wstrsmth = smth9( w'type''season''time''n')' - countr = 1 - while( countr < nsmooth ) - 'define wstrsmth = smth9( wstrsmth )' - countr = countr + 1 - endwhile - 'set y 1' - 'd ave(wstrsmth,lat='latmin',lat='latmax')*1000' - else - 'd ave(w'type''season''time''n',lat='latmin',lat='latmax')*1000' - endif + else +* Plot wstar based on Level-Independent Turn-Around Latitudes +* ----------------------------------------------------------- + 'd dumdum'n + 'q dims' + endif endif m = m + 1 @@ -299,8 +623,12 @@ n = n + 1 endwhile 'draw ylab Pressure (hPa)' -* Plot Latitude x Height Cross-Section -* ------------------------------------ +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ +* Plot Latitude x Height WSTAR Cross-Sections +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ + if(3>2) 'set vpage off' 'set parea off' @@ -308,16 +636,15 @@ if(3>2) 'set vpage 7.0 11.0 0.0 8.5' count = 0 -ymax = 8.35 ymax = 8.55 ymin = ymax -ydel = 0.24 -ydif = 0.00 + ydel = 0.24 + ydif = 0.00 n = 1 while( n<=numfiles ) m = 1 - while( m<=numargs ) + while( m<=numfiles ) if( pltfile.m = n ) 'set dfile 'n @@ -399,6 +726,7 @@ while( n<=numfiles ) endif 'set string 1 c 4' + if ( talats=indv | talats=avrg | talats=hard ) if(talats=indv) if(tafunc=wstr) 'run getenv wstr'season'latmx'n ; latmax = result @@ -421,7 +749,7 @@ while( n<=numfiles ) endif endif - if( hardmin != -999 ) ; latmin = latmax ; endif + if( hardmin != -999 ) ; latmin = hardmin ; endif if( hardmax != -999 ) ; latmax = hardmax ; endif 'getint 'latmax*100 @@ -435,30 +763,64 @@ while( n<=numfiles ) 'set strsiz 0.055' 'draw string 'xmid' 'ytit' Turnaround Lats: 'latmin' 'latmax + 'set axlim -90 90' + 'set y 1' + 'set xaxis -90 90 30' + 'set digsiz 0.02' + 'set ccolor 1' + 'set cmark 3' + 'define zlatmin = 'latmin + 'define zlatmax = 'latmax + 'd zlatmin' + 'set ccolor 1' + 'set cmark 3' + 'd zlatmax' + 'set lat -90 90' + + else + + 'open 'LOCATION''FILE.n'.ctl' + 'getinfo numfiles' + newfile = result + 'set dfile 'newfile + 'set axlim -90 90' + 'set xaxis -90 90 30' + 'set x 1' + 'set y 1' + 'set t 1' + 'set lev 'levmax' 'levmin + 'seasonal minlats' + 'seasonal maxlats' + 'set t 1' + 'set digsiz 0.02' + 'set ccolor 1' + 'set cmark 3' + 'd minlats'season + 'set ccolor 1' + 'set cmark 3' + 'd maxlats'season + 'close 'newfile + 'set lat -90 90' + + endif + ydif = ydif + ydel say 'ydif: 'ydif -* pause - endif m = m + 1 endwhile n = n + 1 endwhile -endif -*ydif = ymax-ymin -ymax = ybot - 0.2 -ymin = ymax-ydif -say 'ymin: 'ymin' ymax: 'ymax -if( ymin < 0.1 ) ; ymin = 0.1 ; endif + ymax = ybot - 0.2 + ymin = ymax-ydif + say 'ymin: 'ymin' ymax: 'ymax + if( ymin < 0.1 ) ; ymin = 0.1 ; endif say 'ymin: 'ymin' ymax: 'ymax +endif -'run getenv BEGDATE' - begdate = result -'run getenv ENDDATE' - enddate = result 'set vpage off' 'set parea off' @@ -471,20 +833,10 @@ else func = tafunc endif -if(talats=avrg) - if(type=star) - 'draw string 3.94 8.38 w* (Using Averaged Turn-Around Lats)' - else - 'draw string 3.94 8.38 W_'type' (Using Averaged 'func' Turn-Around Lats)' - endif -endif - -if(talats=indv) - if(type=star) - 'draw string 3.94 8.38 w* (Using Individual Turn-Around Lats)' - else - 'draw string 3.94 8.38 W_'type' (Using Individual 'func' Turn-Around Lats)' - endif +if(type=star) + 'draw string 3.94 8.38 w* (Using 'talatsz' Turn-Around Lats)' +else + 'draw string 3.94 8.38 W_'type' (Using Averaged 'func' Turn-Around Lats)' endif 'set strsiz 0.10' @@ -493,42 +845,20 @@ endif '!remove DESC.txt' '!echo 'count' > plot_'season'.stack' - n = 1 - while( n<=numfiles ) - 'set dfile 'n - 'getinfo desc' - desc = result - node = '' - m = 2 - '!remove NODE.txt' - '!basename 'desc' | cut -d. -f'm' >> NODE.txt' - 'run getenv "NODE"' - node = result - EXP.n = node - say 'EXP'n' = 'EXP.n - m = m + 1 - '!remove NODE.txt' - '!basename 'desc' | cut -d. -f'm' >> NODE.txt' - 'run getenv "NODE"' - node = result - while( node != 'ctl' & node != 'data' ) - EXP.n = EXP.n'.'node - say 'EXP'n' = 'EXP.n - m = m + 1 - '!remove NODE.txt' - '!basename 'desc' | cut -d. -f'm' >> NODE.txt' - 'run getenv "NODE"' - node = result - endwhile - n = n + 1 - endwhile - - n = 1 while( n<=numfiles ) m = 1 - while( m<=numargs ) + while( m<=numfiles ) if( pltfile.m = n ) + if( numargs>2 ) + index = id.n + tags = tags''index + if( exps = '' ) + exps = EXP.n + else + exps = exps'.'EXP.n + endif + endif 'set dfile 'n 'run getenv BEGDATE' @@ -595,7 +925,115 @@ endif 'set vpage off' 'set parea off' -if(talats=indv) ; filename = 'WSTAR_Profile_using_Individual_TALATS.'season ; endif -if(talats=avrg) ; filename = 'WSTAR_Profile_using_Averaged_TALATS.'season ; endif +if( tags = '' ) + filename = 'WSTAR_Profile_using_'talatsz'_TALATS.'season +else +* filename = 'WSTAR_Profile_using_'talatsz'_TALATS.'tags'.'season + filename = 'WSTAR_Profile_using_'talatsz'_TALATS.'exps'.'season +endif 'myprint -name 'output'/'filename + +return + +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ +* ------------------------------------------------------------------------ + +function get_lats( wstr ) + +* say 'inside get_lats, wstr = 'wstr +* Find Latitudes of Zero Line Crossings for wstr from each individual file +* ------------------------------------------------------------------------ +foundS = FALSE +foundN = FALSE +wstrlatmax = 1e15 +wstrlatmin = 1e15 + +* Create Smoothed Version of Monthly w* for Turn-Around Latitude Calculation +* -------------------------------------------------------------------------- +'define wstrsmth = smth9( 'wstr' )' + countr = 1 + while( countr < 20 ) + 'define wstrsmth = smth9( wstrsmth )' + countr = countr + 1 + endwhile + +* -------------------------------------------------------------------------- +latendS = -5 +latbegS = -60 + +'set lat 'latbegS +'getinfo ypos' + ybeg = result +'set lat 'latendS +'getinfo ypos' + yend = result + +lat1 = latbegS +'set y 'ybeg +'d wstrsmth' + val1 = subwrd(result,4) + y = ybeg+1 +while( y<= yend ) + 'set y 'y + 'getinfo lat' + lat2 = result + 'd wstrsmth' + val2 = subwrd(result,4) +* say 'lat1: 'lat1' lat2: 'lat2' val1: 'val1' val2: 'val2' val1*val2: 'val1*val2 +* pause + if( val1*val2 <= 0 ) + foundS = TRUE + if( val1=val2 ) + wstrlatmin = lat1 + else + wstrlatmin = lat1 - val1*( lat1-lat2 )/( val1-val2 ) + endif + y = yend + 1 + else + val1 = val2 + lat1 = lat2 + endif + y = y + 1 +endwhile + +* -------------------------------------------------------------------------- +latbegN = 60 +latendN = 5 + +'set lat 'latbegN +'getinfo ypos' + ybeg = result +'set lat 'latendN +'getinfo ypos' + yend = result +lat1 = latbegN +'set y 'ybeg +'d wstrsmth' + val1 = subwrd(result,4) + y = ybeg-1 +while( y>= yend ) + 'set y 'y + 'getinfo lat' + lat2 = result + 'd wstrsmth' + val2 = subwrd(result,4) +* say 'lat1: 'lat1' lat2: 'lat2' val1: 'val1' val2: 'val2' val1*val2: 'val1*val2 +* pause + if( val1*val2 <= 0 ) + foundN = TRUE + if( val1=val2 ) + wstrlatmax = lat1 + else + wstrlatmax = lat1 - val1*( lat1-lat2 )/( val1-val2 ) + endif + y = yend - 1 + else + val1 = val2 + lat1 = lat2 + endif + y = y - 1 +endwhile + +return wstrlatmin' 'wstrlatmax' 'foundS' 'foundN diff --git a/plots/res/res b/plots/res/res index 942552e1..9ae1f9d6 100644 --- a/plots/res/res +++ b/plots/res/res @@ -45,6 +45,7 @@ endwhile 'set dfile 'modfil1 'sety' 'setz' +'setdates' 'getdates' 'run getenv "BEGDATE"' begdate = result @@ -122,7 +123,7 @@ else * Make LANDSCAPE Plots * -------------------- - if( orientation = LANDSCAPE ) + if( orientation = LANDSCAPE ) flag = "" while ( flag = "" ) 'run 'geosutil'/plots/res/res_1 'expid' 'season' 'output' 'obsid' 'obsdsc' 'nmod' 'nobs @@ -135,16 +136,16 @@ else endif 'c' endwhile - endif + endif * Make PORTRAIT Plots * ------------------- - if( orientation = PORTRAIT ) + if( orientation = PORTRAIT ) flag = "" - 'makezdif -q1 str'season'mod -file1 'modfil1' -q2 str'season'obs -file2 'obsfil1' -name strdif ' - 'makezdif -q1 res'season'mod -file1 'modfil2' -q2 res'season'obs -file2 'obsfil2' -name resdif ' -* 'makezdif -q1 str'season'mod -file1 'modfil1' -q2 str'season'obs -file2 'obsfil1' -name strdif -ptop 1' -* 'makezdif -q1 res'season'mod -file1 'modfil2' -q2 res'season'obs -file2 'obsfil2' -name resdif -ptop 1' +* 'makezdif -q1 str'season'mod -file1 'modfil1' -q2 str'season'obs -file2 'obsfil1' -name strdif ' +* 'makezdif -q1 res'season'mod -file1 'modfil2' -q2 res'season'obs -file2 'obsfil2' -name resdif ' + 'makezdif -q1 str'season'mod -file1 'modfil1' -q2 str'season'obs -file2 'obsfil1' -name strdif -ptop 1' + 'makezdif -q1 res'season'mod -file1 'modfil2' -q2 res'season'obs -file2 'obsfil2' -name resdif -ptop 1' 'q define' say 'Defined Variables: 'result @@ -173,7 +174,7 @@ else endif 'c' endwhile - endif + endif * End SEASON to PLOT Test * ----------------------- diff --git a/plots/res/res_3.gs b/plots/res/res_3.gs index f6777988..cbbe220f 100644 --- a/plots/res/res_3.gs +++ b/plots/res/res_3.gs @@ -117,7 +117,6 @@ say 'ZDIFILE: 'result 'setz' 'set lev 900 1' -'set lev 900 0.02' 'minmax resdifz' dqmax = subwrd(result,1) dqmin = subwrd(result,2) @@ -138,7 +137,6 @@ endif 'set vpage off' 'set parea off' -'set clab off' * Make Plot: Top Panel * -------------------- @@ -146,10 +144,6 @@ endif 'set parea 1.5 7.0 7.70 10.50' 'set grads off' -*'setz' -'setlevs' -'set ylopts 1 3 0.09' - 'set gxout shaded' 'set clevs 0' 'set ccols 84 0' @@ -163,23 +157,6 @@ endif 'set cmin -100' 'd res'season'mod' -'set ccolor 1' -'set cint 1' -'set cmax 5' -'set cmin -5' -'d res'season'mod' - -'set ccolor 1' -'set cint 0.1' -'set cmax 1' -'set cmin -1' -'d res'season'mod' - -'set ccolor 1' -'set cint 0.01' -'set cmax 0.1' -'set cmin -0.1' -'d res'season'mod' * Make Plot: Middle Panel * ----------------------- @@ -188,10 +165,6 @@ endif 'set parea 1.5 7.0 4.30 7.10' 'set grads off' -*'setz' -'setlevs' -'set ylopts 1 3 0.09' - 'set gxout shaded' 'set clevs 0' 'set ccols 84 0' @@ -206,25 +179,6 @@ endif 'd res'season'obs' -'set ccolor 1' -'set cint 1' -'set cmax 5' -'set cmin -5' -'d res'season'obs' - -'set ccolor 1' -'set cint 0.1' -'set cmax 1' -'set cmin -1' -'d res'season'obs' - -'set ccolor 1' -'set cint 0.01' -'set cmax 0.1' -'set cmin -0.1' -'d res'season'obs' - - * Make Plot: Bottom Panel * ----------------------- 'set parea off' @@ -232,10 +186,6 @@ endif 'set parea 1.5 7.0 0.90 3.70' 'set grads off' -*'setz' -'setlevs' -'set ylopts 1 3 0.09' - 'set gxout shaded' 'set clevs 0' 'set ccols 84 0' @@ -246,6 +196,7 @@ endif 'set x 1' 'set t 1' 'sety' +'setz' if( CINTDIFF != NULL ) * -------------------- @@ -327,11 +278,7 @@ endif 'set z 'z1' 'z2 'set t 1' -*'setz' -'setlevs' -'set ylopts 1 3 0.09' - -'cbarn -scale 0.9 -snum 0.5 -ymid 0.40' +'cbarn -scale 0.9 -snum 0.5' 'set gxout contour' 'set clopts 1 3 0.06' 'set ccolor 1' @@ -340,37 +287,16 @@ endif 'set cmin -100' 'd res'season'obs' -'set ccolor 1' -'set cint 1' -'set cmax 5' -'set cmin -5' -'d res'season'obs' - -'set ccolor 1' -'set cint 0.1' -'set cmax 1' -'set cmin -1' -'d res'season'obs' - -'set ccolor 1' -'set cint 0.01' -'set cmax 0.1' -'set cmin -0.1' -'d res'season'obs' - 'set vpage off' 'set parea off' 'set vpage 0 8.5 0.0 11' -'set string 1 l 4' -'set strsiz 0.07' -'draw string 0.05 0.10 ( EXPID: 'expid' )' - 'set string 1 c 6' 'set strsiz .11' -'draw string 4.25 10.75 'expdsc' 'season' ('nmod')' +'draw string 4.25 10.85 EXPID: 'expid +'draw string 4.25 10.6 'expdsc' 'season' ('nmod')' 'draw string 4.25 7.23 'obsdsc' 'season' ('nobs') ('climate')' if( dn != 0 ) diff --git a/plots/res/setup_epflx.gs b/plots/res/setup_epflx.gs index 5c82ba8a..89c81137 100644 --- a/plots/res/setup_epflx.gs +++ b/plots/res/setup_epflx.gs @@ -3,12 +3,28 @@ function setup_epflx (args) source = subwrd(args,1) expid = subwrd(args,2) output = subwrd(args,3) -season = subwrd(args,4) -say 'Running: setup_epflx 'source' 'expid' 'output' 'season -say '-------------------------------------------------------' +* Define Seasons to Process +* ------------------------- +seasons = '' + k = 4 +while( k > 0 ) + season = subwrd(args,k) +if( season = '' ) + k = -1 +else + seasons = seasons % ' ' % season +k = k+1 +endif +endwhile +'uppercase 'seasons + seasons = result + +say 'Running: setup_epflx 'source' 'expid' 'output' 'seasons +say '--------------------------------------------------------' say ' ' + 'getinfo numfiles' numfiles = result @@ -162,10 +178,20 @@ endwhile n = 1 while( n<=numfiles ) -say 'Running: epflx.gs 'CMPID.n' 'season' A'n' 'output -say '-------------------------------------------------' -'run 'geosutil'/plots/res/epflx.gs 'CMPID.n' 'season' A'n' 'output -'c' + k = 1 + while( k > 0 ) + season = subwrd(seasons,k) + if( season != '' ) + k = k+1 + say 'Running: epflx.gs 'CMPID.n' 'season' A'n' 'output + say '-------------------------------------------------' + 'run 'geosutil'/plots/res/epflx.gs 'CMPID.n' 'season' A'n' 'output + pause + 'c' + else + k = -1 + endif + endwhile n = n + 1 endwhile @@ -173,28 +199,25 @@ endwhile n = 1 while( n<=numfiles ) if( CMPID.n != expid ) - -* flag = "" -* while ( flag = "" ) - say 'Running: epflx_diff.gs 'expid' 'CMPID.n' 'season' A'nexpid' A'n' 'output - say '----------------------------------------------------' - 'run 'geosutil'/plots/res/epflx_diff.gs 'expid' 'CMPID.n' 'season' A'nexpid' A'n' 'output -* say "Hit ENTER to repeat plot" -* say "Type 'next' for next plot, 'done' for next field" -* pull flag -* endwhile - 'c' -* flag = "" -* while ( flag = "" ) - say 'Running: epflx_diff.gs 'CMPID.n' 'expid' 'season' A'n' A'nexpid' 'output - say '----------------------------------------------------' - 'run 'geosutil'/plots/res/epflx_diff.gs 'CMPID.n' 'expid' 'season' A'n' A'nexpid' 'output -* say "Hit ENTER to repeat plot" -* say "Type 'next' for next plot, 'done' for next field" -* pull flag -* endwhile - 'c' - + k = 1 + while( k > 0 ) + season = subwrd(seasons,k) + if( season != '' ) + k = k+1 + say 'Running: epflx_diff.gs 'expid' 'CMPID.n' 'season' A'nexpid' A'n' 'output + say '----------------------------------------------------' + 'run 'geosutil'/plots/res/epflx_diff.gs 'expid' 'CMPID.n' 'season' A'nexpid' A'n' 'output + pause + 'c' + say 'Running: epflx_diff.gs 'CMPID.n' 'expid' 'season' A'n' A'nexpid' 'output + say '----------------------------------------------------' + 'run 'geosutil'/plots/res/epflx_diff.gs 'CMPID.n' 'expid' 'season' A'n' A'nexpid' 'output + pause + 'c' + else + k = -1 + endif + endwhile endif n = n + 1 endwhile diff --git a/plots/res/setup_wstar.gs b/plots/res/setup_wstar.gs index ff4f08f5..9905c1a3 100644 --- a/plots/res/setup_wstar.gs +++ b/plots/res/setup_wstar.gs @@ -1,9 +1,36 @@ function setup_wstar (args) +say ' ' +say 'Inside setup_wstar' +say ' ' +*pause + +* ------------------------------------------------- +* Set TIME flag: A => Common Times, B => All Times +* ------------------------------------------------- + TFLAG = A +* ------------------------------------------------- +* ------------------------------------------------- + source = subwrd(args,1) expid = subwrd(args,2) output = subwrd(args,3) -season = subwrd(args,4) + +* Define Seasons to Process +* ------------------------- +seasons = '' + k = 4 +while( k > 0 ) + season = subwrd(args,k) +if( season = '' ) + k = -1 +else + seasons = seasons % ' ' % season +k = k+1 +endif +endwhile +'uppercase 'seasons + seasons = result 'getinfo numfiles' numfiles = result @@ -12,6 +39,7 @@ if( numfiles = 'NULL' ) * Loop over Experiment Datasets * ----------------------------- +say '' 'getpwd' pwd = result @@ -23,11 +51,17 @@ if( numfiles = 'NULL' ) while( num <= numrc ) loc = num + 1 rcfile = subwrd( rcinfo,loc ) + say 'num = 'num' rcfile = 'rcfile '!grep filename 'rcfile' | cut -d'"\' -f2 > CTLFILE.txt" 'run getenv CTLFILE ' CTLFILE.num = result - '!echo `basename 'rcfile' | cut -d. -f2 > CMPID.txt`' + '!basename 'rcfile' > BASENAME.txt' + 'run getenv BASENAME' + basename = result + length = strlen(basename) - 3 + say 'original length = 'length + '!echo 'basename' | cut -b1-'length' > CMPID.txt' 'run getenv CMPID ' CMPID.num = result @@ -42,10 +76,6 @@ endwhile numfiles = result endif -* Set TIME flag: A => Common Times, B => All Times -* ------------------------------------------------- -time = A - '!/bin/rm -f LOCKFILE' 'q files' @@ -58,13 +88,17 @@ time = A 'run setenv MASKFILE ' maskfile 'run setenv NUMFILES ' numfiles +say '' say 'Files:' 'q files' say result say 'MASKFILE: 'maskfile +say '' * Initialize BEGDATE and ENDATE for each Experiment * ------------------------------------------------- +say 'Initializing BEGDATE and ENDATE for each Experiment:' +say '----------------------------------------------------' n = 1 while( n<=numfiles ) 'set dfile 'n @@ -81,12 +115,33 @@ while( n<=numfiles ) say 'begdate.'n': 'begdate.n' enddate.'n': 'enddate.n n = n + 1 endwhile +say '' -'run setenv TIME A' +* ------------------------------------------- +* Compute Seasonal Means for Common Times (A) +* ------------------------------------------- +if( TFLAG = 'A' ) +'run setenv TIME 'TFLAG * Find time subset which includes all files * ----------------------------------------- 'set dfile 1' +say 'Calling SETDATES for File1' +say '--------------------------' +'setdates' +say 'Calling GETDATES for File1' +say '--------------------------' +'getdates' + +'run getenv BEGDATE' + BEGDATE = result +'run getenv ENDDATE' + ENDDATE = result +say ' ' + + +say 'Finding Common Times between Experiments' +say '----------------------------------------' begtimeA = 1 endtimeA = tdim.1 @@ -99,25 +154,45 @@ while( n<=numfiles ) time = result if( time > begtimeA ) say begdate.n' > 'begdateA - begdateA = begdate.n - begtimeA = time + begdateA = begdate.n + begtimeA = time endif 'set time 'enddate.n 'getinfo time' time = result if( time < endtimeA ) say enddate.n' < 'enddateA - enddateA = enddate.n - endtimeA = time + pause + enddateA = enddate.n + endtimeA = time endif n = n + 1 endwhile +pause * Hardwire Beginning and Ending Dates * ----------------------------------- say ' ' -say 'begdateA = 'begdateA -say 'enddateA = 'enddateA +say 'Pre-Set Environment Variable BEGDATE: 'BEGDATE +say 'Pre-Set Environment Variable ENDDATE: 'ENDDATE +say ' Computed Common Dates begdateA: 'begdateA +say ' Computed Common Dates enddateA: 'enddateA +say ' ' +pause + +* Compare with Pre-Set Environment Variables +* ------------------------------------------ + 'set time 'BEGDATE + 'getinfo time' + begtime = result + 'set time 'ENDDATE + 'getinfo time' + endtime = result + + if( begtime >= begtimeA & endtime <= endtimeA ) + begdateA = BEGDATE + enddateA = ENDDATE + endif * Compute Seasonal Means for Subset Times (A) * ------------------------------------------- @@ -136,6 +211,7 @@ say ' ' say 'getdates' 'getdates' say ' ' + pause n = 1 while( n<=numfiles ) @@ -168,7 +244,36 @@ while( n<=numfiles ) * 'seasonal vstar A'n n = n + 1 endwhile +endif +* ------------------------------------------- +* ------------------------------------------------------------- +* Compute Seasonal Means for ALL Times (B) (Not fully tested) +* ------------------------------------------------------------- +if( TFLAG = 'B' ) + 'run setenv TIME 'TFLAG + '!remove BEGDATE.txt' + '!remove ENDDATE.txt' + n = 1 + while( n<=numfiles ) + 'set dfile 'n + 'set x 1' + 'sety' + 'setz' + 'sett' + 'define wstar'n' = wstar.'n + 'seasonal wstar B'n + 'seasonal res B'n +* 'seasonal epfy B'n +* 'seasonal epfz B'n +* 'seasonal epfdiv B'n +* 'seasonal wmean B'n +* 'seasonal weddy B'n +* 'seasonal vstar B'n + n = n + 1 + endwhile +endif +* ---------------------------------------- 'set display color white' @@ -179,12 +284,94 @@ endwhile 'run getenv "GEOSUTIL"' geosutil = result + k = 1 +while( k > 0 ) + season = subwrd(seasons,k) + if( season != '' ) + k = k+1 + +* Plot turn-around-latitudes +* --------------------------- + 'run 'geosutil'/plots/res/turn_around_lats.gs 'season' 'output + pause + 'c' + +* Plot wstar profiles for ALL experiments +* ---------------------------------------- + 'run 'geosutil'/plots/res/plot_season.gs levl 'output + pause + 'c' + 'run 'geosutil'/plots/res/plot_season.gs avrg 'output + pause + 'c' + 'run 'geosutil'/plots/res/plot_season.gs indv 'output + pause + 'c' + +* Plot wstar profiles for Individual experiments +* ----------------------------------------------- + say ' ' + 'q files' + say result + say ' ' + + n = 1 + while( n<=numfiles ) + 'set dfile 'n + 'getinfo desc' + desc = result + node = '' + m = 2 + '!remove NODE.txt' + '!basename 'desc' | cut -d. -f'm' >> NODE.txt' + 'run getenv "NODE"' + node = result + EXP.n = node + say 'EXP'n' = 'EXP.n + m = m + 1 + '!remove NODE.txt' + '!basename 'desc' | cut -d. -f'm' >> NODE.txt' + 'run getenv "NODE"' + node = result + while( node != 'ctl' & node != 'data' ) + EXP.n = EXP.n'.'node + say 'EXP'n' = 'EXP.n + m = m + 1 + '!remove NODE.txt' + '!basename 'desc' | cut -d. -f'm' >> NODE.txt' + 'run getenv "NODE"' + node = result + endwhile + if( EXP.n = expid ) + nexpid = n + endif + n = n + 1 + endwhile + + alfbet = 'abcdefghijklmnopqrstuvwxyz' + alfexp = substr(alfbet,nexpid,1) + say 'alfexp = 'alfexp + pause + + n = 1 + while( n<=numfiles ) + if( n != nexpid ) + string = substr(alfbet,n,1) + 'run 'geosutil'/plots/res/plot_season.gs levl 'output' 'alfexp' 'string + pause + 'c' + 'run 'geosutil'/plots/res/plot_season.gs avrg 'output' 'alfexp' 'string + pause + 'c' + 'run 'geosutil'/plots/res/plot_season.gs indv 'output' 'alfexp' 'string + pause + 'c' + endif + n = n + 1 + endwhile -'run 'geosutil'/plots/res/turn_around_lats.gs 'season' 'output -'c' - -'run 'geosutil'/plots/res/plot_season.gs avrg 'output -'c' -'run 'geosutil'/plots/res/plot_season.gs indv 'output -'c' + else + k = -1 + endif +endwhile diff --git a/plots/res/turn_around_lats.gs b/plots/res/turn_around_lats.gs index c2a8cf81..36b045d3 100644 --- a/plots/res/turn_around_lats.gs +++ b/plots/res/turn_around_lats.gs @@ -73,21 +73,31 @@ nmax = numfiles 'run getenv MASKFILE' maskfile = result say 'MASKFILE: 'maskfile -*pause wstrlatmx = 0 wstrlatmn = 0 psilatmx = 0 psilatmn = 0 +filecount = 0 * Loop over Files * --------------- +say 'Looping over files 'nbeg' to 'nmax' to find TA Lats' n =nbeg while( n<=nmax ) 'set dfile 'n 'set x 1' 'sety' +'getinfo desc' + desc = result +'getinfo label' + label = result + +say ' File: 'n +say ' DESC: 'desc +say ' ' + 'set lev 'levmax 'getinfo zpos' zmin = result @@ -97,8 +107,8 @@ while( n<=nmax ) * Initialization * -------------- -z = zmin -'set z 'z + z = zmin +'set z ' z 'define wstr'season''time''n' = lev-lev' 'define psi'season''time''n' = lev-lev' @@ -107,19 +117,22 @@ z = zmin ptot = 0.0 while( z<=zmax ) +'set z ' z 'getinfo level' level = result -zm1 = z-1 + + zm1 = z-1 'set z 'zm1 'getinfo level' levm1 = result delph = (levm1 - level)/2 -zp1 = z+1 + zp1 = z+1 'set z 'zp1 'getinfo level' levp1 = result delp = delph + (level - levp1)/2 +'set z ' z 'run setenv TAABS 'taabs if( taabs = TRUE ) 'define wstr'season''time''n' = wstr'season''time''n' + ( wstar'season''time''n' + abs( wstar'season''time''n' ) )/2 *'delp @@ -128,8 +141,6 @@ else endif 'define psi'season''time''n' = psi'season''time''n' + res'season''time''n'*'delp - - ptot = ptot + delp say 'File: 'n' levm1: 'levm1' lev: 'level' levp1: 'levp1' delp = 'delp' ptot = 'ptot z = z + 1 @@ -154,7 +165,6 @@ say ' ' 'define wstr'season''time''n' = wstrsmth ' 'define psi'season''time''n' = psismth ' endif -*'d wstr'season''time''n * Get Latitudes for Locations of Maximum and Minimum psi from each individual file @@ -172,59 +182,70 @@ say ' ' * Find Latitudes of Zero Line Crossings for wstr from each individual file * ------------------------------------------------------------------------ -latbegS = -30 -latendS = -60 -latbegN = 15 -latendN = 60 - dummy = get_lats( 'wstr'season''time''n ) wstrlatmn.n = subwrd(dummy,1) wstrlatmx.n = subwrd(dummy,2) + foundS.n = subwrd(dummy,3) + foundN.n = subwrd(dummy,4) * Compute Averaged LatMax and LatMin from Integrated wstr and psi * --------------------------------------------------------------- -'set dfile 1' -say 'wstrlatmx = 'wstrlatmx' + 'wstrlatmx.n -wstrlatmx = wstrlatmx + wstrlatmx.n -wstrlatmn = wstrlatmn + wstrlatmn.n +if( foundS.n = TRUE & foundN.n = TRUE ) + filecount = filecount + 1 + wstrlatmx = wstrlatmx + wstrlatmx.n + wstrlatmn = wstrlatmn + wstrlatmn.n + psilatmx = psilatmx + psilatmx.n + psilatmn = psilatmn + psilatmn.n +endif - psilatmx = psilatmx + psilatmx.n - psilatmn = psilatmn + psilatmn.n -'set dfile 'n +say 'File: 'n' wstrlatmin: 'wstrlatmn.n' wstrlatmax: 'wstrlatmx.n' psilatmin: 'psilatmn.n' psilatmax: 'psilatmx.n +say ' ' +pause n = n + 1 endwhile -wstrlatmx = wstrlatmx / (nmax-nbeg+1) -wstrlatmn = wstrlatmn / (nmax-nbeg+1) - - psilatmx = psilatmx / (nmax-nbeg+1) - psilatmn = psilatmn / (nmax-nbeg+1) - +say 'File Count for Averaged Max & Min: 'filecount +if( filecount != 0 ) + wstrlatmx = wstrlatmx / filecount + wstrlatmn = wstrlatmn / filecount + psilatmx = psilatmx / filecount + psilatmn = psilatmn / filecount +endif say ' ' -n = nbeg + + n =nbeg while( n<=nmax ) say 'File: 'n' psi'season'latmn = ' psilatmn.n ' psi'season'latmx = ' psilatmx.n n = n + 1 endwhile say 'Average psi'season'latmn = ' psilatmn ' psi'season'latmx = ' psilatmx say ' ' +*pause say ' ' -n = nbeg + n =nbeg while( n<=nmax ) say 'File: 'n' wstr'season'latmn = ' wstrlatmn.n ' wstr'season'latmx = ' wstrlatmx.n -'run setenv wstr'season'latmx'n' 'wstrlatmx.n -'run setenv wstr'season'latmn'n' 'wstrlatmn.n -'run setenv psi'season'latmx'n' ' psilatmx.n -'run setenv psi'season'latmn'n' ' psilatmn.n +if( foundS.n = TRUE & foundN.n = TRUE ) + 'run setenv wstr'season'latmx'n' 'wstrlatmx.n + 'run setenv wstr'season'latmn'n' 'wstrlatmn.n + 'run setenv psi'season'latmx'n' ' psilatmx.n + 'run setenv psi'season'latmn'n' ' psilatmn.n +else + 'run setenv wstr'season'latmx'n' 'wstrlatmx + 'run setenv wstr'season'latmn'n' 'wstrlatmn + 'run setenv psi'season'latmx'n' ' psilatmx + 'run setenv psi'season'latmn'n' ' psilatmn +endif n = n + 1 endwhile say 'Average wstr'season'latmn = ' wstrlatmn ' wstr'season'latmx = ' wstrlatmx say ' ' +*pause * ---------------------------------------------------- @@ -246,10 +267,10 @@ bot = 0.3 'parea 1 1 1 2.5 -left 'left' -right 'right' -top 'top' -bot 'bot -xmid_wstar = subwrd(result,1) -ymid_wstar = subwrd(result,4) -ytop_wstar = subwrd(result,3) -ybot_wstar = subwrd(result,2) +xmid_wstar = subwrd(result,1) +ymid_wstar = subwrd(result,4) +ytop_wstar = subwrd(result,3) +ybot_wstar = subwrd(result,2) @@ -264,14 +285,14 @@ ybot_wstar = subwrd(result,2) dlat1 = result count = 0 -n = nbeg + n =nbeg while( n<=nmax ) 'set dfile 'n 'getinfo dlat' dlat = result say 'File 'n' dlat'n' = 'dlat 'sety' -if( dlat = dlat1 ) +if( dlat = dlat1 & foundS.n = TRUE & foundN.n = TRUE ) 'set dfile 1' 'define wstrave = wstrave + 1000*wstr'season''time''n count = count + 1 @@ -328,7 +349,8 @@ endwhile dummy = get_lats( 'wstrave' ) wstrlatmn = subwrd(dummy,1) wstrlatmx = subwrd(dummy,2) - + foundS = subwrd(dummy,3) + foundN = subwrd(dummy,4) 'set string 1 c 6' 'set strsiz 0.14' @@ -427,7 +449,7 @@ endwhile * Compute Turn-Around Lats based on psiave * ----------------------------------------- -'set lat -60' +'set lat -70' 'getinfo ypos' ybeg = result 'set lat 0' @@ -443,7 +465,7 @@ endwhile 'set lat 0' 'getinfo ypos' ybeg = result -'set lat 60' +'set lat 70' 'getinfo ypos' yend = result 'set y 'ybeg' 'yend @@ -596,10 +618,17 @@ ymax = subwrd(result,6) k = n - 3 * math_int(n/3) + 1 k = 1 + if( foundS.n = TRUE & foundN.n = TRUE ) 'getint 'wstrlatmx.n*100 latmax = result/100 'getint 'wstrlatmn.n*100 latmin = result/100 + else + 'getint 'wstrlatmx*100 + latmax = result/100 + 'getint 'wstrlatmn*100 + latmin = result/100 + endif '!echo 'k' 6 'color.n' >> turn_around_'season'.stack' say "!echo \("id.n"\) "EXP.n" \("latmin" , "latmax"\) >> turn_around_"season".stack" @@ -633,8 +662,12 @@ function get_lats( wstr ) say 'inside get_lats, wstr = 'wstr * Find Latitudes of Zero Line Crossings for wstr from each individual file * ------------------------------------------------------------------------ -latbegS = -30 -latendS = -60 +foundS = FALSE +foundN = FALSE +latbegS = -15 +latendS = -70 +latbegN = 15 +latendN = 70 'set lat 'latbegS 'getinfo ypos' @@ -653,9 +686,10 @@ while( y>= yend ) lat2 = result 'd 'wstr val2 = subwrd(result,4) - say 'lat1: 'lat1' lat2: 'lat2' val1: 'val1' val2: 'val2' val1*val2: 'val1*val2 +* say 'lat1: 'lat1' lat2: 'lat2' val1: 'val1' val2: 'val2' val1*val2: 'val1*val2 * pause if( val1*val2 <= 0 ) + foundS = TRUE if( val1=val2 ) wstrlatmin = lat1 else @@ -669,8 +703,10 @@ while( y>= yend ) y = y - 1 endwhile -latbegN = 15 -latendN = 60 +latbegS = -15 +latendS = -70 +latbegN = 15 +latendN = 70 'set lat 'latbegN 'getinfo ypos' @@ -682,7 +718,7 @@ lat1 = latbegN 'set y 'ybeg 'd 'wstr val1 = subwrd(result,4) -say 'y = 'ybeg' val = 'val1 +*say 'y = 'ybeg' val = 'val1 y = ybeg+1 while( y<= yend ) 'set y 'y @@ -690,9 +726,10 @@ while( y<= yend ) lat2 = result 'd 'wstr val2 = subwrd(result,4) - say 'lat1: 'lat1' lat2: 'lat2' val1: 'val1' val2: 'val2' val1*val2: 'val1*val2 +* say 'lat1: 'lat1' lat2: 'lat2' val1: 'val1' val2: 'val2' val1*val2: 'val1*val2 * pause if( val1*val2 <= 0 ) + foundN = TRUE if( val1=val2 ) wstrlatmax = lat1 else @@ -706,4 +743,4 @@ while( y<= yend ) y = y + 1 endwhile -return wstrlatmin' 'wstrlatmax +return wstrlatmin' 'wstrlatmax' 'foundS' 'foundN diff --git a/plots/res/zonal.gs b/plots/res/zonal.gs index e1275d11..6f7f1e60 100644 --- a/plots/res/zonal.gs +++ b/plots/res/zonal.gs @@ -41,21 +41,48 @@ say 'EXPDSC: 'expdsc * Note: Assume that we ALWAYS want to create an updated residual.EXPID.ctl and residual.EXPID.data * ------------------------------------------------------------------------------------------------- -* Check for exp/residual.data -* --------------------------- +* Check for residual.EXPID.data under source home directory +* --------------------------------------------------------- 'run getenv "SOURCE"' source = result say 'Checking for 'source'/residual.'expid'.ctl' + '!remove CHECKFILE.txt' '!chckfile 'source'/residual.'expid'.ctl' 'run getenv CHECKFILE' expid.ctl = result +'!remove CHECKFILE.txt' +'!chckfile 'source'/residual.'expid'.data' + 'run getenv CHECKFILE' + expid.data = result + expid.ctl = NULL + pause EXPID.CTL = expid.ctl + +* Check for residual.EXPID.data under plot Output directory +* --------------------------------------------------------- +if( expid.ctl = 'NULL' ) + say 'Checking for 'pwd'/../residual.'expid'.ctl' + + '!remove CHECKFILE.txt' + '!chckfile 'pwd'/../residual.'expid'.ctl' + 'run getenv CHECKFILE' + expid.ctl = result + '!remove CHECKFILE.txt' + '!chckfile 'pwd'/../residual.'expid'.data' + 'run getenv CHECKFILE' + expid.data = result + pause EXPID.DATA = expid.data +endif -* Check EP_UPDATE to over-ride default -* ------------------------------------ +* Check EP_UPDATE to over-ride defaults +* ------------------------------------- 'run getenv EP_UPDATE' EP_UPDATE = result +* Setting EP_UPDATE = TRUE to force re-calculation +* ------------------------------------------------ +* EP_UPDATE = TRUE + if( expid.ctl = 'NULL' | EP_UPDATE != 'NULL' ) * Updated method to overwrite existing residual.EXPID.data @@ -63,16 +90,32 @@ if( expid.ctl = 'NULL' | EP_UPDATE != 'NULL' ) say '!/bin/mv -f 'source'/residual.'expid'.ctl 'source'/residual.'expid'.ctl.old ' say '!/bin/mv -f 'source'/residual.'expid'.data 'source'/residual.'expid'.data.old ' - '!/bin/mv -f 'source'/residual.'expid'.ctl 'source'/residual.'expid'.ctl.old ' - '!/bin/mv -f 'source'/residual.'expid'.data 'source'/residual.'expid'.data.old ' - expid.ctl = 'NULL' + '!remove CHECKFILE.txt' + '!chckfile 'source'/residual.'expid'.ctl' + 'run getenv CHECKFILE' + CHECKFILE = result + if( CHECKFILE != 'NULL' ) + '!/bin/mv -f 'source'/residual.'expid'.ctl 'source'/residual.'expid'.ctl.old ' + endif + + '!remove CHECKFILE.txt' + '!chckfile 'source'/residual.'expid'.data' + 'run getenv CHECKFILE' + CHECKFILE = result + if( CHECKFILE != 'NULL' ) + '!/bin/mv -f 'source'/residual.'expid'.data 'source'/residual.'expid'.data.old ' + endif + + expid.ctl = 'NULL' else -* Previous method to use existing residual.EXPID.data -* --------------------------------------------------- +* Using existing residual.EXPID.data +* ---------------------------------- say 'Using existing residual.EXPID.data' - '!/bin/cp 'source'/residual.'expid'.ctl .' - '!/bin/cp 'source'/residual.'expid'.data .' +* '!/bin/cp 'source'/residual.'expid'.ctl .' +* '!/bin/cp 'source'/residual.'expid'.data .' + '!/bin/cp 'expid.ctl' .' + '!/bin/cp 'expid.data' .' '!remove sedfile' '!touch sedfile' '!echo "s?@EXPID?"'expid'?g >> sedfile' @@ -83,6 +126,13 @@ else '!remove VERIFICATION.rc.tmpl' endif +say ' ' +say 'expid: 'expid +say 'expid.ctl: 'expid.ctl +say 'expid.data: 'expid.data +say ' ' +*pause + * Perform residual calculations * ----------------------------- if( expid.ctl = 'NULL' ) @@ -322,6 +372,13 @@ say ' 'geosutil'/bin/zonal_'arch'.x -tag 'expid' -desc 'descm '!sed -f sedfile VERIFICATION.rc.tmpl > VERIFICATION.'expid'.rc' '!remove VERIFICATION.rc.tmpl' +* Copy DATA to plot Output and Source Directory +* --------------------------------------------- +'!/bin/cp -f residual.'expid'.ctl ../' +'!/bin/cp -f residual.'expid'.data ../' +'!/bin/cp -f VERIFICATION.'expid'.rc ../' +'!/bin/cp -f ../residual.'expid'.* ../../' + endif * ----------------------------------------------------- @@ -374,23 +431,48 @@ say 'GETVAR output: 'result say 'Comparison ID: 'obsid say 'Comparison Desc: 'obsdsc +pause -* Check for exp/residual.data -* Note: if exp/residual.data exists, then create an associated VERIFICATION.obsid.rc -* ----------------------------------------------------------------------------------- +* Check for residual.OBSID.data in comparison experiment directory +* Note: if residual.OBSID.data exists, then create an associated VERIFICATION.obsid.rc +* ------------------------------------------------------------------------------------- say 'Checking for 'exp'/residual.'obsid'.ctl' '!remove CHECKFILE.txt' '!chckfile 'exp'/residual.'obsid'.ctl' 'run getenv CHECKFILE' obsid.ctl = result - say 'obsid.ctl = 'obsid.ctl +'!remove CHECKFILE.txt' +'!chckfile 'exp'/residual.'obsid'.data' + 'run getenv CHECKFILE' + obsid.data = result + obsid.ctl = NULL + +* Check for residual.OBSID.data in plot Output directory +* ------------------------------------------------------ +if( obsid.ctl = 'NULL' ) + say 'Checking for 'pwd'/../residual.'obsid'.ctl' + '!remove CHECKFILE.txt' + '!chckfile 'pwd'/../residual.'obsid'.ctl' + 'run getenv CHECKFILE' + obsid.ctl = result + '!remove CHECKFILE.txt' + '!chckfile 'pwd'/../residual.'obsid'.data' + 'run getenv CHECKFILE' + obsid.data = result +endif + +* Setting obsid.ctl = NULL to force re-calculation +* ------------------------------------------------ +* obsid.ctl = 'NULL' if( obsid.ctl != 'NULL' ) - say 'Creating VERIFICATION.'obsid'.rc for 'exp'/residual.'obsid'.data' - '!/bin/cp 'exp'/residual.'obsid'.ctl .' - '!/bin/cp 'exp'/residual.'obsid'.data .' + say 'Creating VERIFICATION.'obsid'.rc for 'pwd'/../residual.'obsid'.data' +* '!/bin/cp 'pwd'/../residual.'obsid'.ctl .' +* '!/bin/cp 'pwd'/../residual.'obsid'.data .' + '!/bin/cp 'obsid.ctl' .' + '!/bin/cp 'obsid.data' .' '!remove sedfile' '!touch sedfile' '!echo "s?@EXPID?"'obsid'?g >> sedfile' @@ -414,14 +496,21 @@ say 'Comparison Desc: 'obsdsc say 'VERIFICATION.'obsid'.rc exists' endif -* Perform residual calculations -* ----------------------------- + +* Setting obsid.rc = NULL to force re-calculation +* ----------------------------------------------- +* obsid.rc = 'NULL' + say ' ' say 'obsid: 'obsid say 'obsid.ctl: 'obsid.ctl +say 'obsid.data: 'obsid.data say 'obsid.rc: 'obsid.rc say ' ' +*pause +* Perform residual calculations +* ----------------------------- if( obsid != 'ERA5' & ( obsid.ctl = 'NULL' | obsid.rc = 'NULL' ) ) 'set dfile 'vfile @@ -642,6 +731,12 @@ say ' 'geosutil'/bin/zonal_'arch'.x -tag 'obsid' -desc 'desco '!remove VERIFICATION.rc.tmpl' '!cat sedfile' +* Copy DATA to Output Directory +* ----------------------------- +'!/bin/cp -f residual.'obsid'.ctl ../' +'!/bin/cp -f residual.'obsid'.data ../' +'!/bin/cp -f VERIFICATION.'obsid'.rc ../' + * End VERIFICATION.obsid.rc CHECKFILE Test * ---------------------------------------- endif diff --git a/plots/zcmp/progz b/plots/zcmp/progz index 367d84fa..227c589f 100644 --- a/plots/zcmp/progz +++ b/plots/zcmp/progz @@ -308,7 +308,7 @@ if( EXPORT = "T" ) ; facm = 1 ; nplots = 4 ; ptops = "30 30:L 10:L 0.1:L if( EXPORT = "Q" ) ; facm = 1000 ; nplots = 1 ; ptops = "30" ; endif if( EXPORT = "ZLE" ) ; facm = 1 ; nplots = 3 ; ptops = "30 30:L 0.1:L" ; endif if( EXPORT = "RH2" ) ; facm = 100 ; nplots = 2 ; ptops = "30 30:L" ; endif -if( EXPORT = "OMEGA" ) ; facm = 864 ; nplots = 1 ; ptops = "30" ; endif +if( EXPORT = "OMEGA" ) ; facm = 864 ; nplots = 3 ; ptops = "30 30:L 10:L" ; endif if( EXPORT = "O3" ) ; facm = 1e6 ; nplots = 2 ; ptops = "30 0.1:L" ; endif if( EXPORT = "QLTOT" ) ; facm = 1e6 ; nplots = 1 ; ptops = "30" ; endif if( EXPORT = "QITOT" ) ; facm = 1e6 ; nplots = 1 ; ptops = "30" ; endif @@ -418,7 +418,7 @@ say '----------------------------------------------------------' while( k <= numexp ) say 'Checking Comparison Experiment k = 'k' CTAG = 'ctag.k' TYPE = 'type.k' for Closeness to Verifications (MERRA-2 ... CMPEXP:V)' - TAG = k + TAG = k if( ( ctag.k = "MERRA-2" | type.k = V ) & cname.k != 'NULL' ) @@ -503,11 +503,11 @@ say 'Checking Comparison Experiment k = 'k' CTAG = 'ctag.k' TYPE = 'type.k' for zdifile3 = result -* Make ZCLOSEPLT -* -------------- - nplot = 1 - while( nplot <= nplots ) - plttop = subwrd( ptops,nplot ) +* Make ZCLOSEPLT +* -------------- + nplot = 1 + while( nplot <= nplots ) + plttop = subwrd( ptops,nplot ) say 'Performing Closeness plots to: 'ctag.TAG' k = 'k nname = ctag.n @@ -515,8 +515,8 @@ say 'Checking Comparison Experiment k = 'k' CTAG = 'ctag.k' TYPE = 'type.k' for say 'climcmp: 'climcmp.nname say 'climobs: 'climcmp.kname - flag = "" - while ( flag = "" ) + flag = "" + while ( flag = "" ) 'run 'geosutil'/plots/zcmp/zcloseplt -EXPID 'expid' -EXPORT 'EXPORT' -ALIAS 'mname' -QFILE 'zdifile1' -CFILE 'zdifile2' -OFILE 'zdifile3' -ONAME 'ctag.TAG' -CNAME 'ctag.n' -MBDATE 'begdate.expnam' -MEDATE 'enddate.expnam' -CBDATE 'begdate.nname' -CEDATE 'enddate.nname' -OBDATE 'begdate.kname' -OEDATE 'enddate.kname' -QDESC 'qdesc ' -ODESC 'cdesc.n' -OUTPUT 'output' -SEASON 'season' -PTOP 'plttop' -CLIMEXP 'climexp' -CLIMCMP 'climcmp.nname' -CLIMOBS 'climcmp.kname * 'run 'geosutil'/plots/zcmp/zcloseplt -EXPID 'expid @@ -542,17 +542,17 @@ say 'Checking Comparison Experiment k = 'k' CTAG = 'ctag.k' TYPE = 'type.k' for * ' -CLIMCMP 'climcmp.nname * ' -CLIMOBS 'climcmp.kname - if( debug = "debug" ) - say "Hit ENTER to repeat plot" - say "Type 'next' for next plot, 'done' for next field" - pull flag - else - flag = "next" - endif - 'c' + if( debug = "debug" ) + say "Hit ENTER to repeat plot" + say "Type 'next' for next plot, 'done' for next field" + pull flag + else + flag = "next" + endif + 'c' endwhile ;* END While_FLAG Loop - nplot = nplot + 1 + nplot = nplot + 1 endwhile ;* END While_NPLOT Loop endif ;* END ctag.n Test n = n + 1 @@ -590,7 +590,7 @@ if( EXPORT = "T" ) ; facm = 1 ; faco = 1 ; nplots = 4 ; ptops = "30 if( EXPORT = "Q" ) ; facm = 1000 ; faco = 1000 ; nplots = 1 ; ptops = "30" ; endif if( EXPORT = "ZLE" ) ; facm = 1 ; faco = 1 ; nplots = 3 ; ptops = "30 30:L 0.1:L" ; endif if( EXPORT = "RH2" ) ; facm = 100 ; faco = 100 ; nplots = 2 ; ptops = "30 30:L" ; endif -if( EXPORT = "OMEGA" ) ; facm = 864 ; faco = 864 ; nplots = 1 ; ptops = "30" ; endif +if( EXPORT = "OMEGA" ) ; facm = 864 ; faco = 864 ; nplots = 3 ; ptops = "30 30:L 10:L" ; endif if( EXPORT = "O3" ) ; facm = 1e6 ; faco = 1e6 ; nplots = 2 ; ptops = "30 0.1:L" ; endif if( EXPORT = "QLTOT" ) ; facm = 1e6 ; faco = 1e6 ; nplots = 1 ; ptops = "30" ; endif if( EXPORT = "QITOT" ) ; facm = 1e6 ; faco = 1e6 ; nplots = 1 ; ptops = "30" ; endif diff --git a/plots/zcmp/zcloseplt b/plots/zcmp/zcloseplt index 8d31dc5e..72bd7c79 100644 --- a/plots/zcmp/zcloseplt +++ b/plots/zcmp/zcloseplt @@ -500,7 +500,7 @@ if( scale = LOG ) ; 'setlevs' ; endif say 'int dqrel = 'dqrel if( dpct = 'NULL' ) - dpct = 0.1 + dpct = 0.1 else 'd 'dpct dpct = subwrd(result,4) @@ -631,7 +631,7 @@ if( climexp != 'Actual' | climobs != 'Actual' ) 'set strsiz .08' 'set string 2 l 7' 'draw string 0.050 10.00 WARNING:' -'set strsiz .07' + 'set strsiz .07' 'set string 1 l 4' 'draw string 0.050 9.85 Actual Dates' 'draw string 0.050 9.70 NOT Used!' diff --git a/post/flat2hdf.F b/post/flat2hdf.F index 0896dd2e..eda92bbc 100644 --- a/post/flat2hdf.F +++ b/post/flat2hdf.F @@ -163,20 +163,22 @@ end subroutine read_ctl print * print *, '2-D Fields:' do n=1,n2d - print *, trim(name2d(n)),' ',trim(titl2d(n)) + write(6,1001) trim(name2d(n)),trim(titl2d(n)) enddo print * print *, '3-D Fields:' do n=1,n3d - print *, trim(name3d(n)),' ',trim(titl3d(n)) + write(6,1001) trim(name3d(n)),trim(titl3d(n)) enddo print * print *, 'Files: ' do n=1,nfiles - print *, n,trim(fname(n)) + write(6,1002) n,trim(fname(n)) enddo print * + 1001 format(1x,a,' ',a) + 1002 format(1x,i0,' ',a) C ********************************************************************** C **** Read and Interpolate Eta File **** @@ -199,20 +201,22 @@ end subroutine read_ctl close(10) if( lrec.eq.-1 ) then - print *, 'Opening ',trim(fname(n)),' access = sequential, endian: ',trim(endian) + write(6,1003) trim(fname(n)),trim(endian) if( trim(endian).eq.'big_endian' ) then open (10,file=trim(fname(n)),form='unformatted',access='sequential',convert='big_endian') else open (10,file=trim(fname(n)),form='unformatted',access='sequential') endif else - print *, 'Opening ',trim(fname(n)),' access = direct, endian: ',trim(endian) + write(6,1004) trim(fname(n)),trim(endian) if( trim(endian).eq.'big_endian' ) then open (10,file=trim(fname(n)),form='unformatted',access='direct',recl=im*jm*4,convert='big_endian') else open (10,file=trim(fname(n)),form='unformatted',access='direct',recl=im*jm*4) endif endif + 1003 format(1x,'Opening: ',a,', access = sequential, endian: ',a) + 1004 format(1x,'Opening: ',a,', access = direct , endian: ',a) rc = 0 ntime = 0 @@ -227,15 +231,16 @@ end subroutine read_ctl if( rc.eq.0 ) then call flat2hdf ( q2d,q3d,name2d,name3d,titl2d,titl3d,n2d,n3d,undef, - . im,jm,lm,lats,lons,levs,nymd,nhms,ndt, - . fid,hdfcreate,hdfile,yrev,ecmwf ) + . im,jm,lm,lats,lons,levs,nymd,nhms,ndt, + . fid,hdfcreate,hdfile,yrev,ecmwf ) call tick (nymd,nhms,ndt) hdfcreate = .false. else call gfio_close ( fid,gfrc ) lrec = 0 print * - print *, 'Created: ',trim(hdfile) + write(6,1005) trim(hdfile) + 1005 format(1x,'Created: ',a) print * endif enddo @@ -462,8 +467,15 @@ subroutine flat2hdf ( q2d,q3d,name2d,name3d,titl2d,titl3d,n2d,n3d,undef, do n=1,n3d call writit( q3d(1,1,1,n),im,jm,1,lm,id,name3d(n),nymd,nhms,yrev ) - if( name3d(n).eq.'Temperature' ) tmpu = q3d(:,:,:,n) - if( name3d(n).eq.'Relative_humidity' ) rh = q3d(:,:,:,n) + + if( trim( name3d(n) ).eq.'tmpu' .or. + . trim( name3d(n) ).eq.'tmpes' .or. + . trim( name3d(n) ).eq.'temperature' ) tmpu = q3d(:,:,:,n) + + if( trim( name3d(n) ).eq.'rh' .or. + . trim( name3d(n) ).eq.'rhes' .or. + . trim( name3d(n) ).eq.'relative_humidi' ) rh = q3d(:,:,:,n) + enddo if( ecmwf ) then diff --git a/post/gcmclim.script b/post/gcmclim.script index 28ea564a..c10b2d0b 100755 --- a/post/gcmclim.script +++ b/post/gcmclim.script @@ -24,6 +24,7 @@ USAGE: echo " [-month MM]" echo " [-diurnal]" echo " [-ncpus NCPUS]" + echo " [-nostrict]" echo " " echo "where: SOURCE is your location of your Experiment" echo " COLLECTION is the Collection Name from HISTORY.rc (Default: ALL)" @@ -31,6 +32,7 @@ USAGE: echo " files affected by month MM" echo " -diurnal is an optional parameter to process" echo " monthly mean diurnal files" + echo " -nostrict is an optional parameter to Disable STRICT time processing" echo " NCPUS is an optional parameter to specify NCPUS to use" echo " " exit 1 @@ -45,6 +47,7 @@ endif set expid = 'NULL' set filetype = 'monthly' set diurnal = '' +@ nostrict = 0 @ MM = -99 @ nargs = $#argv @ n = 1 @@ -69,6 +72,9 @@ while( $n <= $nargs ) set filetype = 'diurnal' set diurnal = ' -d ' endif + if( "$argv[$n]" == "-nostrict" ) then + @ nostrict = 1 + endif @ n = $n + 1 end if( $source == 'NULL' ) goto USAGE @@ -195,7 +201,7 @@ while( $n <= 12 ) /bin/rm -f clim.tabl # to ensure a complete, updated clim.tabl for plots set files = `/bin/ls -1 $fname.*$curmonth.$ext | grep -v clim` $GEOSUTIL/post/check_clim $fname ${begdate} $enddate $curmonth $ext - if( $status == 0 ) then + if( $status == 0 | $nostrict == 1 ) then $TIMEAVE_x -hdf $files -strict false -tag $fname.clim -noquad -ntmin 1 $diurnal if( "$diurnal" == "" ) then /bin/mv $fname.clim.${curdate}.$ext $fname.clim.M$curmonth.$ext diff --git a/post/gcmpost.script b/post/gcmpost.script index 1f7b45ad..64087fa1 100755 --- a/post/gcmpost.script +++ b/post/gcmpost.script @@ -1343,7 +1343,7 @@ endif $GEOSUTIL/plots/configure source $SOURCE/plot/.quickplotrc - set ntypes = "L P" + set ntypes = "P L" foreach type ($ntypes) if( $type == "L" ) then @@ -1374,6 +1374,15 @@ foreach plot ($nplots) endif end endif + if( $type == "P" ) then + foreach xyz (residual) + set tseries = `grep "$plot " portrait.list | grep $xyz` + if( $#tseries > 0 ) then + set begplt = $begdate + set endplt = $enddate + endif + end + endif if( $BEGDATE != "NULL" ) set begplt = $BEGDATE if( $ENDDATE != "NULL" ) set endplt = $ENDDATE diff --git a/post/stats.F90 b/post/stats.F90 index 7658325a..70d9de3b 100644 --- a/post/stats.F90 +++ b/post/stats.F90 @@ -326,8 +326,9 @@ end subroutine init_levs endif if( rcfile /= "NULL" ) then - print *, 'Stats RC File: ',trim(rcfile) + print *, 'Stats RC File:' print *, '-------------- ' + write(6,1001) trim(rcfile) print * endif @@ -1007,6 +1008,12 @@ end subroutine init_levs else corr(iregion,lev,nfield,nt) = c1/(sqrt(c2)*sqrt(c3)) endif + if( r1.lt.0.0 .or. r2.lt.0.0 .or. r3.lt.0.0 ) then + print *, 'Changing Sign for MSE Round-Off Error: r1,r2,r3 = ',r1,r2,r3 + r1 = abs(r1) + r2 = abs(r2) + r3 = abs(r3) + endif rms(iregion,lev,nfield,nt,1) = sqrt(r1) rms(iregion,lev,nfield,nt,2) = sqrt(r2) rms(iregion,lev,nfield,nt,3) = sqrt(r3) @@ -1276,7 +1283,7 @@ end subroutine init_levs 5001 format('DSET ^',a) 5002 format('TITLE Stats',/,'FORMAT sequential big_endian') - 5003 format('UNDEF ',g12.6) + 5003 format('UNDEF ',g13.6) 5004 format('XDEF ',i3,' LINEAR 1 1') 8004 format('XDEF ',i3,' LINEAR -180 ',f8.5) 5005 format('YDEF 1 LINEAR 1 1') @@ -1348,8 +1355,8 @@ SUBROUTINE BOUNDS (LAT1,LAT2,LONG1,LONG2, & ! write(6,100) lat1 ,jbeg, lat2,jend, & ! long1,ibeg,long2,iend - 100 format(/1x,f6.1,' (',i3,')',2x,f6.1,' (',i3,')',/, & - 1x,f6.1,' (',i3,')',2x,f6.1,' (',i3,')',/) +! 100 format(/1x,f6.1,' (',i3,')',2x,f6.1,' (',i3,')',/, & +! 1x,f6.1,' (',i3,')',2x,f6.1,' (',i3,')',/) return end