On Sat, Nov 15, 2008 at 4:17 PM, Advait Godbole <span dir="ltr"><<a href="mailto:agodbole@purdue.edu">agodbole@purdue.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Arlindo,<br><br>I
am working on visualizing the CO2 concentrations over the US, using the
Visualization Toolkit. I have a gridded binary output file which came
from a RAMS model run, in the form of a " .gra " file. I can read it in
through GrADS and also obtain plots, but to use VTK, </blockquote><div><br>
Have you considered using VTK through Python? In this case, use PyGrADS.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I
need to convert it into the netcdf format, parse it to a more
manageable size ( the current file is 4 GB) and then convert it to a
format that VTK can read in.<br>
<br>I tried to use lats4d but it gives some errors:<br><br>**** Error when opening the .ctl file ****<br><br>ga-> lats4d -i j:\VulcanWork\mjja-co2-proj-1.ctl </blockquote><div><br>
Try using lats4d from the command line. Are you doing this on
Windows? You may want to start one of the included shells (sh or tcsh)
and issue lats4d.sh from the command line (using the shell script). Before actually
writing any files, try<br>
<br>
C:\> sh lats4d.sh -i yourfile.ctl -format stats<br>
<br>
to see whether the whole file can be read fine. I am attaching the latest lats4d.sh and <a href="http://lats4d.gs">lats4d.gs</a>, lats4d.sh just in case.<br>
<br>
Arlindo<br>
<br>
<br>
</div> <br>No hardcopy metafile open<br>All files closed; all defined objects released<br>
All GrADS attributes have been reinitialized<br>LATS warning (lats_parmtab): Closing the previously opened Parameter Table: .grads.lats.table<br>LATS error (lats_grid): LATS (latsint.c) --> Duplicate grid name: grid-1<br>
lats4d: error creating coards file <a href="http://grads.lats.nc/" target="_blank">grads.lats.nc</a><br><br><br>*** metadate of the file that I want to read in and convert (the binary file is a ".gra" file) ********<br>
<br>ga-> open j:\VulcanWork\mjja-co2-proj-1.<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">ctl<br>
<br>Scanning description file: j:\VulcanWork\mjja-co2-proj-1.ctl<br><br>Data file j:\VulcanWork\mjja-co2-proj-1.gra is open as file 1<br><br>LON set to -142.874 -52.826 <br>LAT set to 23.494 60.214 <br>LEV set to 34.7 34.7 <br>
Time values set: 2004:5:1:0 2004:5:1:0 <br><br>ga-> query file<br>File 1 : RAMS 5.04 Output<br> Descriptor: j:\VulcanWork\mjja-co2-proj-1.ctl<br> Binary: j:\VulcanWork\mjja-co2-proj-1.gra<br> Type = Gridded<br> Xsize = 193 Ysize = 109 Zsize = 45 Tsize = 990<br>
Number of Variables = 1<br> co2 45 99 - RAMS : CO2 Concentration [ppm ]<br><br><br>Note: Even though gradsnc gave me errors, it did output a <a href="http://grads.lats.nc/" target="_blank">grads.lats.nc</a>
file, but it contains stuff like " missing coordinates" and is only
988KB, which I am not sure should be the case, considering the extent
of the data.<br>
<br>I am attaching the file hele if thats going to help.<br><br>I
searched for forums but could not find any where I could sign up - and
that is why the mail. I hope that is not a bother! I would appreciate
any help that you can provide. <br>
<br>Thanks,<br><br>Advait Godbole, BSME<br>Doctoral Student, Earth and Atmospheric Sciences<br>Global Carbon Cycle Group<br>Purdue University<br>West Lafayette, IN <br>voice: +1 317 730 5235<br><font color="#888888"><br>
</font></blockquote><br clear="all"><br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a><br>