#!/bin/tcsh -f # +-======-+ # Copyright (c) 2003-2018 United States Government as represented by # the Admistrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE, # REPRODUCTION, DISTRIBUTION, MODIFICATION AND REDISTRIBUTION OF CERTAIN # COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT AS # REPRESENTED BY THE GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT AGENCY"). # THE UNITED STATES GOVERNMENT, AS REPRESENTED BY GOVERNMENT AGENCY, IS AN # INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT DISTRIBUTIONS OR # REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. ANYONE WHO USES, REPRODUCES, # DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT SOFTWARE, AS DEFINED # HEREIN, OR ANY PART THEREOF, IS, BY THAT ACTION, ACCEPTING IN FULL THE # RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS AGREEMENT. # # Government Agency: National Aeronautics and Space Administration # Government Agency Original Software Designation: GSC-15354-1 # Government Agency Original Software Title: GEOS-5 GCM Modeling Software # User Registration Requested. Please Visit http://opensource.gsfc.nasa.gov # Government Agency Point of Contact for Original Software: # Dale Hithon, SRA Assistant, (301) 286-2691 # # +-======-+ if ( ! $?GEOSUTIL ) then echo " " echo Environment variable GEOSUTIL must be defined before use! echo Set GEOSUTIL to the directory path of the GEOS_util module echo " " exit 1 endif @ nmax = $#argv # Usage # ----- if( $nmax == 0 ) then echo " " echo "Usage:" echo "-----" echo "quickplot -source SOURCE_DIRECTORY" echo " -season SEASON" echo " [-cmpexp CMPEXP_DIRECTORY]" echo " [-latbeg LATBEG]" echo " [-latend LATEND]" echo " [-lonbeg LONBEG]" echo " [-lonend LONEND]" echo " [-begdate BEGDATE]" echo " [-enddate ENDDATE]" echo " [-cintdiff CINTDIFF]" echo " [-type TYPE]" echo " [-plots PLOTS]" echo " [-noplot NOPLOTS]" echo " [-zlog ZLOG]" echo " [-plotsdir PLOTSDIR]" echo " [-hist HISTORY_DIRECTORY]" echo " [-rc HISTORY.rc]" echo " [-ddf DDF_FILE]" echo " [-clim CLIM]" echo " [-taylor TAYLOR]" echo " [-ana ANALYSIS]" echo " [-std STD_DEV ]" echo " [-gradsx GRADSX]" echo " [-cmpexp_only CMPEXP_ONLY]" echo " [-cmpops_only CMPOPS_ONLY]" echo " " echo "where: SOURCE_DIRECTORY: is the source directory for experiment" echo " SEASON: is the season to plot (eg. DJF, JAN)" echo " CMPEXP_DIRECTORY: are the experiment directory(s) to be used for comparison (Default: None)" echo " LATBEG: is the beginning Latitude (Default: -90)" echo " LATEND: is the ending Latitude (Default: 90)" echo " LONBEG: is the beginning Longitude (Default: 0)" echo " LONEND: is the ending Longitude (Default: 360)" echo " BEGDATE: is the YYYYMM to begin time average (Default: Begin Date in File)" echo " ENDDATE: is the YYYYMM to end time average (Default: End Date in File)" echo " CINTDIFF: optional parameter for dynamic CINT calculation for difference plots (Default: OFF)" echo " TYPE: L for Landscape, P for Portrait (Default: BOTH)" echo " PLOTS: prog surf moist turb rad gwd (Default: ALL)" echo " ZLOG: Flag for Zonal Mean ZLOG Option (OFF or ON) (Default: OFF)" echo " NOPLOTS: Any plot(s) you wish to skip (useful with ALL) (Default: NONE)" echo " PLOTSDIR: is the directory to write plots into (Default: SOURCE_DIRECTORY/plots)" echo " HISTORY_DIRECTORY: is the directory containing the HISTORY.rc file (Default: SOURCE_DIRECTORY)" echo " HISTORY.rc: is the full path (including filename) " echo " of the desired rc file to use (Default: SOURCE_DIRECTORY/HISTORY.rc)" echo " DDF_FILE: is the ddf filename (including full path) to use" echo " CLIM: Logical for using Climatology or Actual Dates (Default: CLIM = TRUE)" echo " TAYLOR: Logical for producing Taylor Plots (Default: TAYLOR = TRUE)" echo " ANALYSIS: Logical for producing Analysis Contour Levels (Default: ANALYSIS = FALSE)" echo " STD_DEV: Logical for producing Standard Deviation Plots (Default: STD_DEV = FALSE)" echo " GRADSX: GrADS executable to use for processing (Default: GRADSX = gradsnc4)" echo " CMPEXP_ONLY: Logical for producing ONLY CMPEXP plots (Default: CMPEXP_ONLY = FALSE)" echo " CMPOPS_ONLY: Logical for producing ONLY CMPOPS plots (Default: CMPOPS_ONLY = FALSE)" echo " " exit 1 endif # Set Variables # ------------- set debug = false set type = ALL set plots = ALL set plotsdir = NULL set expid = NULL set hist = xxx set rc = HISTORY.rc set clim = true set taylor = true set analysis = false set std_dev = false set zlog = OFF set begdate = NULL set enddate = NULL set cmpexp = NULL set move = false set gradsx = gradsnc4 set noplot = "" set latbeg = -90 set latend = 90 set lonbeg = 0 set lonend = 360 set cintdiff = NULL set ddffile = NULL set seasons = NULL set cmpexp_only = FALSE set cmpops_only = FALSE # Parse command line # ------------------ @ n = 1 while( $n <= $nmax ) if( "$argv[$n]" == "-source" ) then @ n = $n + 1 set source = $argv[$n] endif if( "$argv[$n]" == "-plotsdir" ) then @ n = $n + 1 set plotsdir = $argv[$n] endif if( "$argv[$n]" == "-hist" ) then @ n = $n + 1 set hist = $argv[$n] endif if( "$argv[$n]" == "-rc" ) then @ n = $n + 1 set rc = $argv[$n] endif if( "$argv[$n]" == "-expid" ) then @ n = $n + 1 set expid = $argv[$n] endif if( "$argv[$n]" == "-latbeg" | "$argv[$n]" == "-beglat" ) then @ n = $n + 1 set latbeg = $argv[$n] endif if( "$argv[$n]" == "-latend" | "$argv[$n]" == "-endlat" ) then @ n = $n + 1 set latend = $argv[$n] endif if( "$argv[$n]" == "-lonbeg" | "$argv[$n]" == "-beglon" ) then @ n = $n + 1 set lonbeg = $argv[$n] endif if( "$argv[$n]" == "-lonend" | "$argv[$n]" == "-endlon" ) then @ n = $n + 1 set lonend = $argv[$n] endif if( "$argv[$n]" == "-begdate" | "$argv[$n]" == "-datebeg" ) then @ n = $n + 1 set begdate = $argv[$n] endif if( "$argv[$n]" == "-enddate" | "$argv[$n]" == "-dateend" ) then @ n = $n + 1 set enddate = $argv[$n] endif if( "$argv[$n]" == "-cintdiff" ) then @ n = $n + 1 set cintdiff = $argv[$n] endif if( "$argv[$n]" == "-clim" ) then @ n = $n + 1 set clim = $argv[$n] endif if( "$argv[$n]" == "-zlog" ) then @ n = $n + 1 set zlog = $argv[$n] set zlog = `echo $zlog | tr "[:lower:]" "[:upper:]"` if( $zlog != ON ) set zlog = OFF endif if( "$argv[$n]" == "-type" ) then @ n = $n + 1 set type = `echo $argv[$n] | tr "[:lower:]" "[:upper:]"` if($type == "1" ) set type = L if($type == "2" ) set type = P endif if( "$argv[$n]" == "-taylor" ) then @ n = $n + 1 set taylor = $argv[$n] endif if( "$argv[$n]" == "-ddf" ) then @ n = $n + 1 set ddffile = $argv[$n] endif if( "$argv[$n]" == "-gradsx" ) then @ n = $n + 1 set gradsx = $argv[$n] endif if( "$argv[$n]" == "-std" ) set std_dev = true if( "$argv[$n]" == "-ana" ) set analysis = true if( "$argv[$n]" == "-debug" ) set debug = true if( "$argv[$n]" == "-move" ) set move = true if( "$argv[$n]" == "-cmpexp_only" ) set cmpexp_only = TRUE if( "$argv[$n]" == "-cmpops_only" ) set cmpops_only = TRUE if( "$argv[$n]" == "-cmpexp" ) then @ n = $n + 1 set cmpexp = "" set next = $argv[$n] set bit = `echo $next | cut -c1-1` while( "$bit" != "-" ) set cmpexp = `echo $cmpexp $next` @ n = $n + 1 if( $n <= $nmax ) then set next = $argv[$n] set bit = `echo $next | cut -c1-1` else set bit = "-" endif end @ n = $n - 1 endif if( "$argv[$n]" == "-plots" ) then @ n = $n + 1 set plots = "" set next = $argv[$n] set bit = `echo $next | cut -c1-1` while( "$bit" != "-" ) set plots = `echo $plots $next` @ n = $n + 1 if( $n <= $nmax ) then set next = $argv[$n] set bit = `echo $next | cut -c1-1` else set bit = "-" endif end @ n = $n - 1 endif if( "$argv[$n]" == "-noplot" ) then @ n = $n + 1 set noplot = "" set next = $argv[$n] set bit = `echo $next | cut -c1-1` while( "$bit" != "-" ) set noplot = `echo $noplot $next` @ n = $n + 1 if( $n <= $nmax ) then set next = $argv[$n] set bit = `echo $next | cut -c1-1` else set bit = "-" endif end @ n = $n - 1 endif if( "$argv[$n]" == "-season" ) then @ n = $n + 1 set seasons = "" set next = $argv[$n] set bit = `echo $next | cut -c1-1` while( "$bit" != "-" ) set seasons = `echo $seasons $next` @ n = $n + 1 if( $n <= $nmax ) then set next = $argv[$n] set bit = `echo $next | cut -c1-1` else set bit = "-" endif end @ n = $n - 1 endif @ n = $n + 1 end # Prepare Environment # --------------------- if( $cmpops_only == TRUE ) set cmpexp_only = TRUE setenv SOURCE $source setenv CLIM $clim setenv TAYLOR $taylor setenv ANALYSIS $analysis setenv STD_DEV $std_dev setenv TBEG $begdate setenv TEND $enddate setenv GRADSX $gradsx setenv DDFFILE $ddffile setenv SEASONS "$seasons" setenv CMPEXP_ONLY $cmpexp_only setenv CMPOPS_ONLY $cmpops_only if( `echo $BASEDIR | grep -i mpt` != '') then setenv RUN_CMD "mpiexec_mpt -np 1 " else setenv RUN_CMD "" endif setenv USE_MPT "" if( $lonbeg < 0 ) then @ lonbeg = $lonbeg + 360 @ lonend = $lonend + 360 endif setenv LONSENV "$lonbeg $lonend" setenv LATSENV "$latbeg $latend" if( $lonbeg != 0 | $lonend != 360 | $latbeg != -90 | $latend != 90 | $cintdiff != NULL ) then setenv CINTDIFF ON endif if( -e $source/.HOMDIR ) then set homdir = `cat $source/.HOMDIR` else set homdir = $source endif if( $hist == xxx ) set hist = $homdir if( $rc == HISTORY.rc ) then setenv HISTORYRC ${hist}/$rc else setenv HISTORYRC $rc endif if( $TBEG != NULL ) setenv CLIM false if( $TEND != NULL ) setenv CLIM false # Break Large Plot Segments into Smaller Plot Segments (for speed) # ---------------------------------------------------------------- set plotz = "" if( $plots[1] != ALL ) then foreach plot ($plots) if( $plot == cmpexp ) set plotz = `echo $plotz cmpexpz.dyn cmpexph.dyn cmpexpz.gwd cmpexph.gwd cmpexpz.rad cmpexph.rad cmpexph.aero cmpexpz.ana cmpexph.ana cmpexpz.turb cmpexph.turb.1 cmpexph.turb.2 cmpexph.turb.3 cmpexpz.moist cmpexph.moist.1 cmpexph.moist.2 cmpexph.moist.3 cmpexph.moist.4` if( $plot == cmpexpz ) set plotz = `echo $plotz cmpexpz.dyn cmpexpz.gwd cmpexpz.rad cmpexpz.ana cmpexpz.turb cmpexpz.moist` if( $plot == cmpexph ) set plotz = `echo $plotz cmpexph.dyn cmpexph.gwd cmpexph.rad cmpexph.aero cmpexph.ana cmpexph.turb.1 cmpexph.turb.2 cmpexph.turb.3 cmpexph.moist.1 cmpexph.moist.2 cmpexph.moist.3 cmpexph.moist.4` if( $plot == moist ) set plotz = `echo $plotz moist.1 moist.2 moist.3 moist.4` if( $plot == tend ) set plotz = `echo $plotz tend.1 tend.2 tend.3 tend.4 tend.5` if( $plot == turb ) set plotz = `echo $plotz turb.1 turb.2` if( $plot == surf ) set plotz = `echo $plotz surf.1 surf2.misc surf2.cld` if( $plot == gwd ) set plotz = `echo $plotz gwd` if( $plot == rad ) set plotz = `echo $plotz rad.1 rad.sw rad.lw rad.net` if( $plot == energy ) set plotz = `echo $plotz energy` if( $plot == tseries ) set plotz = `echo $plotz tseries` if( $plot == taylor ) set plotz = `echo $plotz taylor` if( $plot == quad ) set plotz = `echo $plotz hquad zquad` if( $plot == gmichem ) set plotz = `echo $plotz gmi.1` if( $plot == gocart ) set plotz = `echo $plotz gocart.1` if( $plot == prog ) then set plotz = `echo $plotz residual` set HEXPORTS = " SLP:1000 \ U:1000 U:925 U:850 U:700 U:600 U:500 U:400 U:300 U:250 U:200 U:150 U:100 U:70 U:50 U:30 \ V:1000 V:925 V:850 V:700 V:600 V:500 V:400 V:300 V:250 V:200 V:150 V:100 V:70 V:50 V:30 \ T:1000 T:925 T:850 T:700 T:600 T:500 T:400 T:300 T:250 T:200 T:150 T:100 T:70 T:50 T:30 \ Q:1000 Q:925 Q:850 Q:700 Q:600 Q:500 Q:400 Q:300 Q:250 Q:200 Q:150 Q:100 Q:70 Q:50 Q:30 \ HE:1000 HE:925 HE:850 HE:700 HE:600 HE:500 HE:400 HE:300 HE:250 HE:200 HE:150 HE:100 HE:70 HE:50 HE:30 \ RH2:1000 RH2:925 RH2:850 RH2:700 RH2:600 RH2:500 RH2:400 RH2:300 RH2:250 RH2:200 RH2:150 RH2:100 RH2:70 RH2:50 RH2:30 \ ZLE:1000 ZLE:925 ZLE:850 ZLE:700 ZLE:600 ZLE:500 ZLE:400 ZLE:300 ZLE:250 ZLE:200 ZLE:150 ZLE:100 ZLE:70 ZLE:50 ZLE:30 \ CHI:1000 CHI:925 CHI:850 CHI:700 CHI:600 CHI:500 CHI:400 CHI:300 CHI:250 CHI:200 CHI:150 CHI:100 CHI:70 CHI:50 CHI:30 \ PSI:1000 PSI:925 PSI:850 PSI:700 PSI:600 PSI:500 PSI:400 PSI:300 PSI:250 PSI:200 PSI:150 PSI:100 PSI:70 PSI:50 PSI:30 \ OMEGA:1000 OMEGA:925 OMEGA:850 OMEGA:700 OMEGA:600 OMEGA:500 OMEGA:400 OMEGA:300 OMEGA:250 OMEGA:200 OMEGA:150 OMEGA:100 OMEGA:70 OMEGA:50 OMEGA:30 " set HEXPORTS = `echo $HEXPORTS` # To remove extra blanks foreach HEXPORT ($HEXPORTS) set plotz = `echo $plotz progh_$HEXPORT` end set VEXPORTS = "ZLE SLP U V T Q RH2" foreach VEXPORT ($VEXPORTS) set plotz = `echo $plotz linez1_$VEXPORT` end set VEXPORTS = "U V T RH2" foreach VEXPORT ($VEXPORTS) set plotz = `echo $plotz progz1_$VEXPORT` end set VEXPORTS = "U V T Q RH2 ZLE OMEGA" foreach VEXPORT ($VEXPORTS) set plotz = `echo $plotz progz2_$VEXPORT` end endif if( $plot == progh ) then set HEXPORTS = " SLP:1000 \ U:1000 U:925 U:850 U:700 U:600 U:500 U:400 U:300 U:250 U:200 U:150 U:100 U:70 U:50 U:30 \ V:1000 V:925 V:850 V:700 V:600 V:500 V:400 V:300 V:250 V:200 V:150 V:100 V:70 V:50 V:30 \ T:1000 T:925 T:850 T:700 T:600 T:500 T:400 T:300 T:250 T:200 T:150 T:100 T:70 T:50 T:30 \ Q:1000 Q:925 Q:850 Q:700 Q:600 Q:500 Q:400 Q:300 Q:250 Q:200 Q:150 Q:100 Q:70 Q:50 Q:30 \ HE:1000 HE:925 HE:850 HE:700 HE:600 HE:500 HE:400 HE:300 HE:250 HE:200 HE:150 HE:100 HE:70 HE:50 HE:30 \ RH2:1000 RH2:925 RH2:850 RH2:700 RH2:600 RH2:500 RH2:400 RH2:300 RH2:250 RH2:200 RH2:150 RH2:100 RH2:70 RH2:50 RH2:30 \ ZLE:1000 ZLE:925 ZLE:850 ZLE:700 ZLE:600 ZLE:500 ZLE:400 ZLE:300 ZLE:250 ZLE:200 ZLE:150 ZLE:100 ZLE:70 ZLE:50 ZLE:30 \ CHI:1000 CHI:925 CHI:850 CHI:700 CHI:600 CHI:500 CHI:400 CHI:300 CHI:250 CHI:200 CHI:150 CHI:100 CHI:70 CHI:50 CHI:30 \ PSI:1000 PSI:925 PSI:850 PSI:700 PSI:600 PSI:500 PSI:400 PSI:300 PSI:250 PSI:200 PSI:150 PSI:100 PSI:70 PSI:50 PSI:30 \ OMEGA:1000 OMEGA:925 OMEGA:850 OMEGA:700 OMEGA:600 OMEGA:500 OMEGA:400 OMEGA:300 OMEGA:250 OMEGA:200 OMEGA:150 OMEGA:100 OMEGA:70 OMEGA:50 OMEGA:30 " set HEXPORTS = `echo $HEXPORTS` # To remove extra blanks foreach HEXPORT ($HEXPORTS) set plotz = `echo $plotz progh_$HEXPORT` end endif if( $plot == progz ) then set VEXPORTS = "ZLE SLP U V T Q RH2" foreach VEXPORT ($VEXPORTS) set plotz = `echo $plotz linez1_$VEXPORT` end set VEXPORTS = "U V T RH2" foreach VEXPORT ($VEXPORTS) set plotz = `echo $plotz progz1_$VEXPORT` end set VEXPORTS = "U V T Q RH2 ZLE OMEGA" foreach VEXPORT ($VEXPORTS) set plotz = `echo $plotz progz2_$VEXPORT` end endif if( $plot == progz1 ) then set VEXPORTS = "U V T RH2" foreach VEXPORT ($VEXPORTS) set plotz = `echo $plotz progz1_$VEXPORT` end endif if( $plot == progz2 ) then set VEXPORTS = "U V T Q RH2 ZLE OMEGA" foreach VEXPORT ($VEXPORTS) set plotz = `echo $plotz progz2_$VEXPORT` end endif if( $plot == linez ) then set VEXPORTS = "ZLE SLP U V T Q RH2" foreach VEXPORT ($VEXPORTS) set plotz = `echo $plotz linez1_$VEXPORT` end endif if( $plot == residual ) set plotz = `echo $plotz residual` end foreach skip ( $noplot ) set plotz = `echo $plotz | sed -e "s/$skip//"` end else set plotz = "cmpexpz.dyn cmpexph.dyn \ cmpexpz.gwd cmpexph.gwd \ cmpexpz.ana cmpexph.ana \ cmpexpz.rad cmpexph.rad cmpexph.aero \ cmpexpz.turb cmpexph.turb.1 cmpexph.turb.2 cmpexph.turb.3 \ cmpexpz.moist cmpexph.moist.1 cmpexph.moist.2 cmpexph.moist.3 cmpexph.moist.4 \ moist.1 moist.2 moist.3 moist.4 \ tend.1 tend.2 tend.3 tend.4 tend.5 \ turb.1 turb.2 surf.1 surf2.misc surf2.cld \ taylor gwd rad.1 rad.sw rad.lw rad.net energy tseries hquad zquad prog.1 gocart.1" set plotz = `echo $plotz` # To remove extra blanks # Allow user to skip specific plot(s) # ----------------------------------- foreach skip ( $noplot ) set plotz = `echo $plotz | sed -e "s/$skip//"` end if ( "$plotz" =~ *prog.1* ) then set plotz = `echo $plotz residual` set HEXPORTS = " SLP:1000 \ U:1000 U:925 U:850 U:700 U:600 U:500 U:400 U:300 U:250 U:200 U:150 U:100 U:70 U:50 U:30 \ V:1000 V:925 V:850 V:700 V:600 V:500 V:400 V:300 V:250 V:200 V:150 V:100 V:70 V:50 V:30 \ T:1000 T:925 T:850 T:700 T:600 T:500 T:400 T:300 T:250 T:200 T:150 T:100 T:70 T:50 T:30 \ Q:1000 Q:925 Q:850 Q:700 Q:600 Q:500 Q:400 Q:300 Q:250 Q:200 Q:150 Q:100 Q:70 Q:50 Q:30 \ HE:1000 HE:925 HE:850 HE:700 HE:600 HE:500 HE:400 HE:300 HE:250 HE:200 HE:150 HE:100 HE:70 HE:50 HE:30 \ RH2:1000 RH2:925 RH2:850 RH2:700 RH2:600 RH2:500 RH2:400 RH2:300 RH2:250 RH2:200 RH2:150 RH2:100 RH2:70 RH2:50 RH2:30 \ ZLE:1000 ZLE:925 ZLE:850 ZLE:700 ZLE:600 ZLE:500 ZLE:400 ZLE:300 ZLE:250 ZLE:200 ZLE:150 ZLE:100 ZLE:70 ZLE:50 ZLE:30 \ CHI:1000 CHI:925 CHI:850 CHI:700 CHI:600 CHI:500 CHI:400 CHI:300 CHI:250 CHI:200 CHI:150 CHI:100 CHI:70 CHI:50 CHI:30 \ PSI:1000 PSI:925 PSI:850 PSI:700 PSI:600 PSI:500 PSI:400 PSI:300 PSI:250 PSI:200 PSI:150 PSI:100 PSI:70 PSI:50 PSI:30 \ OMEGA:1000 OMEGA:925 OMEGA:850 OMEGA:700 OMEGA:600 OMEGA:500 OMEGA:400 OMEGA:300 OMEGA:250 OMEGA:200 OMEGA:150 OMEGA:100 OMEGA:70 OMEGA:50 OMEGA:30 " set HEXPORTS = `echo $HEXPORTS` # To remove extra blanks foreach HEXPORT ($HEXPORTS) set plotz = `echo $plotz progh_$HEXPORT` end set VEXPORTS = "ZLE SLP U V T Q RH2" foreach VEXPORT ($VEXPORTS) set plotz = `echo $plotz linez1_$VEXPORT` end set VEXPORTS = "U V T RH2" foreach VEXPORT ($VEXPORTS) set plotz = `echo $plotz progz1_$VEXPORT` end set VEXPORTS = "U V T Q RH2 ZLE OMEGA" foreach VEXPORT ($VEXPORTS) set plotz = `echo $plotz progz2_$VEXPORT` end endif foreach skip ( $noplot ) set plotz = `echo $plotz | sed -e "s/$skip//"` end endif if( $plotz[1] != "" ) set plots = `echo $plotz` # Define Zonal Mean Quadratics Plots # ---------------------------------- if( $plots[1] != "" ) then foreach plot ($plots) if( $plot == zquad ) then set QUADS = "U_U V_V T_T ZLE_ZLE OMEGA_OMEGA Q_Q U_V V_T V_Q OMEGA_T OMEGA_Q KE_KE" foreach QUAD ($QUADS) set plots = `echo $plots zquad_$QUAD` end endif if( $plot == hquad ) then set HQUADS = "hquad_U_U:850 hquad_U_U:500 hquad_U_U:200 hquad_U_U:20 \ hquad_V_V:850 hquad_V_V:500 hquad_V_V:200 hquad_V_V:20 \ hquad_T_T:850 hquad_T_T:500 hquad_T_T:200 hquad_T_T:20 \ hquad_Q_Q:850 hquad_Q_Q:500 hquad_Q_Q:200 hquad_Q_Q:20 \ hquad_U_V:850 hquad_U_V:500 hquad_U_V:200 hquad_U_V:20 \ hquad_V_T:850 hquad_V_T:500 hquad_V_T:200 hquad_V_T:20 \ hquad_V_Q:850 hquad_V_Q:500 hquad_V_Q:200 hquad_V_Q:20 \ hquad_ZLE_ZLE:850 hquad_ZLE_ZLE:500 hquad_ZLE_ZLE:200 hquad_ZLE_ZLE:20 \ hquad_OMEGA_OMEGA:850 hquad_OMEGA_OMEGA:500 hquad_OMEGA_OMEGA:200 hquad_OMEGA_OMEGA:20 \ hquad_KE_KE:850 hquad_KE_KE:500 hquad_KE_KE:200 hquad_KE_KE:20 \ hquad_OMEGA_T:850 hquad_OMEGA_T:500 hquad_OMEGA_T:200 hquad_OMEGA_T:20 \ hquad_OMEGA_Q:850 hquad_OMEGA_Q:500 hquad_OMEGA_Q:200 hquad_OMEGA_Q:20 " set HQUADS = `echo $HQUADS` # To remove extra blanks set plots = `echo $plots $HQUADS` endif end endif # Echo Plotting Environment # ------------------------- echo " " echo "plots = " $plots echo "season = " $seasons echo "debug = " $debug echo " " # Extract EXPID from HISTORY # -------------------------- if( $expid == NULL ) set expid = `grep EXPID: $HISTORYRC | cut -d':' -f2` # Make Output Directory for Plots # ------------------------------- if( $plotsdir != NULL ) then set plots_dir = $plotsdir else set plots_dir = $source/plots endif setenv PLOTS_DIR ${plots_dir} if( ! -e ${plots_dir}/misc ) mkdir -p ${plots_dir}/misc if ( -e /usr/bin/lfs) then /usr/bin/lfs setstripe -c 1 ${plots_dir} endif # Run Grads-Based Quickplot Utility # --------------------------------- set tmpdirs = "" foreach plot ($plots) echo "Processing $plot of type $type" set datetime = `date +%Y%m%d_%H%M%S` if( ! -e $plots_dir/$plot.$datetime.$type ) mkdir -p $plots_dir/$plot.$datetime.$type cd $plots_dir/$plot.$datetime.$type # Configure QUICKPLOT to Computing Platform # ----------------------------------------- $GEOSUTIL/plots/configure source $plots_dir/$plot.$datetime.$type/.quickplotrc # Set Default OPS Comparison Experiments # -------------------------------------- set cmpops = "$VERIFICATION/MERRA_MEANS:A \ $VERIFICATION/MERRA2_MEANS:A" set cmpops = `echo $cmpops` # Update CMPEXP # ------------- if( $cmpexp[1] != "NULL" ) then if( $cmpexp_only == TRUE ) then setenv CMPEXP "$cmpexp NULL" else setenv CMPEXP "$cmpexp $cmpops NULL" endif else if( $cmpexp_only == TRUE & $cmpops_only == FALSE ) then setenv CMPEXP "$cmpexp" else echo setenv CMPEXP "$cmpops $cmpexp" setenv CMPEXP "$cmpops $cmpexp" endif endif # ECHO Setup # ---------- echo " GRADS = " $GRADS echo " ARCH = " `uname` echo " HOST = " `hostname` echo " GEOSUTIL = " $GEOSUTIL echo " SOURCE = " $SOURCE echo "VERIFICATION = " $VERIFICATION echo " CLIM = " $CLIM echo " TAYLOR = " $TAYLOR echo " ANALYSIS = " $ANALYSIS echo " STD_DEV = " $STD_DEV echo " PLOT = " $plot echo " " set DUMMY = `echo $CMPEXP` if( "$DUMMY[1]" != "NULL" ) then @ NDUMMY = $#DUMMY - 1 echo "Comparison Experiments: $DUMMY[1]" @ N = 2 while( $N <= $NDUMMY ) echo " $DUMMY[$N]" @ N = $N + 1 end echo " " endif # Check Format of HISTORY.rc # -------------------------- set test = `grep COLLECTIONS $HISTORYRC` if( "$test" != "" ) then /bin/cp $GEOSUTIL/plots/chckhist.new chckhist else /bin/cp $GEOSUTIL/plots/chckhist.old chckhist endif set tmpdirs = `echo $tmpdirs $plot.$datetime.$type` if( $debug == true ) then if($type != P) then $GEOSUTIL/plots/landscape.script -expid $expid \ -source $source \ -plot $plot \ -output $plots_dir \ -geosutil $GEOSUTIL \ -grads $GRADS \ -zlog $zlog \ -debug \ -season $seasons endif if($type != L) then $GEOSUTIL/plots/portrait.script -expid $expid \ -source $source \ -plot $plot \ -output $plots_dir \ -geosutil $GEOSUTIL \ -grads $GRADS \ -zlog $zlog \ -debug \ -season $seasons endif else if($type != P) then $GEOSUTIL/plots/landscape.script -expid $expid \ -source $source \ -plot $plot \ -output $plots_dir \ -geosutil $GEOSUTIL \ -grads $GRADS \ -zlog $zlog \ -batch \ -season $seasons & sleep 5 endif if($type != L) then $GEOSUTIL/plots/portrait.script -expid $expid \ -source $source \ -plot $plot \ -output $plots_dir \ -geosutil $GEOSUTIL \ -grads $GRADS \ -zlog $zlog \ -batch \ -season $seasons & sleep 5 endif endif end wait # Sleep for 3 minutes to ensure all plots are converted # ----------------------------------------------------- SLEEP: if( $debug == false ) then # sleep 3m sleep 10s else sleep 10s endif # Reset Environment # ----------------- cd $plots_dir /bin/rm -r $tmpdirs