[ncl-talk] Writing Skew-T Data to csv File

Guido Cioni guidocioni at gmail.com
Tue Apr 5 00:23:14 MDT 2016


Hey Michelle,
if your goal is simply to write data from a GRIB file into a CSV file, why do you need to plot the data with skewt? I would suggest you to read and organize the data that you want from the grib file and then use the write_table function. See the attached example.  

  header=“T  Td  RH"
 alist=[/temp,dewpoint,humidity/]
 hlist=[/header/]
 write_table(“file.csv","w",hlist,"%s")
 write_table(“file.csv”,"w",alist,”%f,%f,%f,%f")

Guido Cioni
http://guidocioni.altervista.org <http://guidocioni.altervista.org/> 




> Il giorno 05 apr 2016, alle ore 05:16, Michelle Serino <mmserino at tamu.edu> ha scritto:
> 
> Hi all,
> 
> With the attached script and RUC data (https://www.dropbox.com/s/926ue7ad7vngnhc/ruc2anl_130_20090605_2100_000.grb2?dl=0 <https://www.dropbox.com/s/926ue7ad7vngnhc/ruc2anl_130_20090605_2100_000.grb2?dl=0>), I am plotting a skew-T, and I would like to save that data to a csv file.  When I run the script, I get
> 
> (0)	location=(41.147,-104.801)  grid=(41.1275,-104.777)
> (0)	====== Contents of 'test.csv' ======
> Pressure(hPa) Height(km) Temperature(C) Dew Point(C) Wind Speed(m/s) Wind Direction(deg)
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> ?
> (0)	========================================
> 
> or something similar.  I feel that I am close to getting this, but the way I am looping through the data is what is confusing me.  I appreciate the help.
> 
> Thank you,
> 
> Michelle
> 
> Michelle M. Serino
> M.S. Candidate
> Texas A&M University
> Atmospheric Sciences Dept.
> Eller O&M, Suite 1017
> College Station, TX 77843
> (484) 769-0949
> <sounding13.ncl>_______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160405/89e9bcb0/attachment.html 


More information about the ncl-talk mailing list