[gradsusr] Error when running script on Lambert Conformal projection

Justin Traiteur jtraite2 at atmos.uiuc.edu
Wed Jun 23 16:22:26 EDT 2010


I have a script for pulling a vertical sounding of the atmosphere for a location and ingesting the sounding into WRF.  When I run the script on a control file that uses the xdef and ydef options it works.  When I use the script on the same data with the pdef lcc option it does not.  Below is the display output for the 1st option and then the second option.  Below that the script can be found.  Thank you so much for your time.

Justin




[jtraite2 at manabe47 ~/Analysis]$ grads

Grid Analysis and Display System (GrADS) Version 2.0.a7.1
Copyright (c) 1988-2008 by Brian Doty and the
Institute for Global Environment and Society (IGES)
GrADS comes with ABSOLUTELY NO WARRANTY
See file COPYRIGHT for more information

Config: v2.0.a7.1 little-endian readline printim grib2 netcdf hdf4-sds hdf5 geotiff
Issue 'q config' command for more information.
Landscape mode? ('n' for portrait):  n
GX Package Initialization: Size = 8.5 11
ga-> open grib4.ctl
Scanning description file:  grib4.ctl
Data file sgpallruc20isobX1.00.%y4%m2%d2.%h20000.raw.grib2 is open as file 1
LON set to 0 30
LAT set to 0 22.4
LEV set to 1000 1000
Time values set: 2008:6:1:0 2008:6:1:0
E set to 1 1
ga-> vertout.gs
       38      1.3      0.9    291.4 0.012671    98470
      255      1.0      3.3    292.3 0.012181    98470
      478      2.5      7.7    295.3 0.012413    98470
      707      6.5      6.9    299.0 0.011699    98470
      942      8.9      5.2    299.6 0.010961    98470
     1183     10.2      2.8    299.9 0.010407    98470
     1429     11.3      0.1    300.7 0.010329    98470
     1680     11.6     -1.5    301.5 0.010022    98470
     1938     12.9     -2.6    302.4 0.009270    98470
     2202     14.1     -3.0    303.1 0.008613    98470
     2473     15.0     -2.6    303.9 0.007603    98470
     2751     16.5     -2.4    304.7 0.006110    98470
     3037     16.8     -2.8    305.6 0.004603    98470
     3330     16.9     -2.9    306.8 0.003477    98470
     3633     17.3     -2.5    307.9 0.002545    98470
     3944     18.3     -1.2    309.1 0.001904    98470
     4266     19.6      0.0    310.0 0.001465    98470
     4599     21.4      1.3    311.4 0.001302    98470
     4943     23.1      2.6    312.9 0.001107    98470
     5301     25.2      4.3    314.8 0.000828    98470
     5674     27.3      6.4    316.8 0.000651    98470
     6063     28.8      8.8    318.7 0.000730    98470
     6469     30.2     11.8    320.3 0.000778    98470
     6893     31.1     15.2    322.0 0.000677    98470
     7339     31.2     18.4    323.9 0.000571    98470
     7806     31.2     21.4    325.8 0.000481    98470
     8300     31.1     24.6    327.7 0.000404    98470
     8823     31.2     28.4    329.6 0.000294    98470
     9378     31.3     31.9    331.5 0.000194    98470
     9970     30.9     33.4    333.0 0.000138    98470
    10606     30.9     35.1    334.8 0.000084    98470
Files written to output1.rft
       45      0.7      1.4    291.4 0.012671    98540
      262      1.4      2.3    292.3 0.012181    98540
      484      4.1      5.0    295.3 0.012413    98540
      713      8.7      5.0    299.0 0.011699    98540
      947     10.5      3.4    299.6 0.010961    98540
     1187     11.1      1.2    299.9 0.010407    98540
     1432     11.4     -1.3    300.7 0.010329    98540
     1682     11.4     -2.0    301.5 0.010022    98540
     1939     11.1     -2.1    302.4 0.009270    98540
     2202     11.5     -1.7    303.1 0.008613    98540
     2471     11.5     -1.1    303.9 0.007603    98540
     2748     12.7     -1.5    304.7 0.006110    98540
     3031     13.9     -1.3    305.6 0.004603    98540
     3323     13.9     -1.4    306.8 0.003477    98540
     3624     13.5     -1.3    307.9 0.002545    98540
     3936     13.4     -0.6    309.1 0.001904    98540
     4258     13.6      0.4    310.0 0.001465    98540
     4590     13.8      2.1    311.4 0.001302    98540
     4935     16.1      3.4    312.9 0.001107    98540
     5294     19.8      4.2    314.8 0.000828    98540
     5666     22.7      4.6    316.8 0.000651    98540
     6055     24.0      5.1    318.7 0.000730    98540
     6460     24.5      5.9    320.3 0.000778    98540
     6883     24.6      6.9    322.0 0.000677    98540
     7327     24.2      8.4    323.9 0.000571    98540
     7793     23.3     10.6    325.8 0.000481    98540
     8285     23.2     13.5    327.7 0.000404    98540
     8805     23.9     17.3    329.6 0.000294    98540
     9358     25.6     22.8    331.5 0.000194    98540
     9949     27.3     26.9    333.0 0.000138    98540
    10586     28.7     30.5    334.8 0.000084    98540
Files written to output2.rft
       49     -0.2      0.4    291.4 0.012671    98590
      266      1.7      0.2    292.3 0.012181    98590
      488      6.2      0.8    295.3 0.012413    98590
      716      9.0      0.0    299.0 0.011699    98590
      950      9.6     -1.2    299.6 0.010961    98590
     1190      9.5     -2.3    299.9 0.010407    98590
     1435     10.6     -2.3    300.7 0.010329    98590
     1686     12.7     -1.2    301.5 0.010022    98590
     1943     14.9      0.0    302.4 0.009270    98590
     2206     14.7     -0.1    303.1 0.008613    98590
     2476     14.8     -0.3    303.9 0.007603    98590
     2752     15.4     -0.9    304.7 0.006110    98590
     3036     16.6     -1.1    305.6 0.004603    98590
     3328     17.2     -1.2    306.8 0.003477    98590
     3629     17.4     -1.2    307.9 0.002545    98590
     3939     17.5     -1.1    309.1 0.001904    98590
     4260     17.9     -0.6    310.0 0.001465    98590
     4593     19.3      0.2    311.4 0.001302    98590
     4938     21.6      0.7    312.9 0.001107    98590
     5297     23.9      0.8    314.8 0.000828    98590
     5670     25.0      1.3    316.8 0.000651    98590
     6057     24.9      2.0    318.7 0.000730    98590
     6462     24.2      3.2    320.3 0.000778    98590
     6884     23.4      4.5    322.0 0.000677    98590
     7327     22.8      5.9    323.9 0.000571    98590
     7792     22.8      7.5    325.8 0.000481    98590
     8281     22.8      9.2    327.7 0.000404    98590
     8797     23.8     11.7    329.6 0.000294    98590
     9346     26.2     15.4    331.5 0.000194    98590
     9930     28.8     20.6    333.0 0.000138    98590
    10562     30.1     25.9    334.8 0.000084    98590
Files written to output3.rft
ga-> quit
No hardcopy metafile open
GX package terminated
[jtraite2 at manabe47 ~/Analysis]$ grads

Grid Analysis and Display System (GrADS) Version 2.0.a7.1
Copyright (c) 1988-2008 by Brian Doty and the
Institute for Global Environment and Society (IGES)
GrADS comes with ABSOLUTELY NO WARRANTY
See file COPYRIGHT for more information

Config: v2.0.a7.1 little-endian readline printim grib2 netcdf hdf4-sds hdf5 geotiff
Issue 'q config' command for more information.
Landscape mode? ('n' for portrait):  n
GX Package Initialization: Size = 8.5 11
ga-> open grib5.ctl
Scanning description file:  grib5.ctl
Data file sgpallruc20isobX1.00.%y4%m2%d2.%h20000.raw.grib2 is open as file 1
LON set to -139.857 -57.4984
LAT set to 16.281 58.21
LEV set to 1000 1000
Time values set: 2008:6:1:0 2008:6:1:0
E set to 1 1
Notice: Implied interpolation for file grib5.ctl
 Interpolation will be performed on any data displayed from this file
ga-> vertout.gs
Error in format:  2rd argument invalid.
  Error occurred on line 17
  In file vertout.gs
ga-> quit
No hardcopy metafile open
GX package terminated
[jtraite2 at manabe47 ~/Analysis]$ vi vertout.gs

#GrADS script to output "sounding" values to a text file
#SMcMillan, 6/11/2010
#Assumes variables tmpprs, ugrdprs, vgrdprs available
#
'set x 256'
'set y 132'
'set z 1'
'set t 1'
zlev=1
ts=1

while(ts<=3)

  outfile='output'%ts'.rft'

while(zlev<=31)
  'd pressfc(t='ts',z=1)';val1=subwrd(result,4);prs=math_format('%9.0f',val1)
  'd hgtprs(t='ts',z='zlev')';val2=subwrd(result,4);hgt=math_format('%9.0f',val2)
  'd ugrdprs(t='ts',z='zlev')';val3=subwrd(result,4);u=math_format('%9.1f',val3)
  'd vgrdprs(t='ts',z='zlev')';val4=subwrd(result,4);v=math_format('%9.1f',val4)
  'd lev(z='zlev')';val5=subwrd(result,4);plev=math_format('%9.0f',val5)
  'd tmpprs(t='ts',z='zlev')'; val7=subwrd(result,4);tmp=math_format('%9.1f', val7)
  'set z ' zlev
  'd tmpprs*pow((1000/lev),0.286)';val8=subwrd(result,4);theta=math_format('%9.1f',val8)
  'd rhprs/100*621.97*(6.11*pow(10,(7.5*(tmpprs-273.15))/(237.7+(tmpprs-273.15)))/(lev-(6.11*pow(10,(7.5*(tmpprs-273.15))/(237.7+(tmpprs-273.15))))))/1000';val9=subwrd(result,4);mr=math_format('%9.6f',val9)

  vals=hgt%u%v%theta%mr%prs;say vals

dummy=write(outfile,vals)

  zlev=zlev+1

endwhile
  zlev=1
dummy=close(outfile)

say 'Files written to 'outfile

  ts=ts+1

endwhile





More information about the gradsusr mailing list