Hi Susan,
If you want to output data for one point:
one point with coords of LAT, LON
output = yyyymm +" "+ x(:,{LAT},{LON})
*asciiwrite* ("data_LAT_LON" , output}
or if you want more format control over the values:
output = yyyymm +" "+ sprinti( "%4.2i" , x(:,{LAT},{LON})
The output format could be changed as needed.
---------------------------------------------------
If you have several values:
output = yyyymm +" "+ sprinti( "%4.2i" , x(:,{LAT1},{LON1}) \
+" "+ sprinti( "%4.2i" , x(:,{LAT2},{LON2}) \
+" "+ sprinti( "%4.2i" , x(:,{LAT3},{LON3}) \
asciiwrite* ("data" , output}
Good luck,
Adam
Susan Kaspari wrote:
> Hello,
> I have an nc file with dimensions:
> time = 336
> lat = 180
> lon = 288
> and variable ozone(time, lat, lon).
>
> I want to create an ascii file similar to Example 3 at:
> http://www.ncl.ucar.edu/Document/Functions/Built-in/asciiwrite.shtml
> However, rather than outputting the time for every lat and long, I would
> like to just output the file for certain areas of the grid (i.e., I want
> to identify either a certain grid cell from which to output the ozone
> data over time, or specify a region consisting of a number of grid cells
> to get the data through time).
>
> Does anyone have suggestions as to how I should do this?
> Many thanks,
> Susan
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-- -------------------------------------------------------------- Adam Phillips asphilli_at_ucar.edu National Center for Atmospheric Research tel: (303) 497-1726 ESSL/CGD/CAS fax: (303) 497-1333 P.O. Box 3000 Boulder, CO 80307-3000 http://www.cgd.ucar.edu/cas/asphilli _______________________________________________ ncl-talk mailing list ncl-talk_at_ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Thu Jul 26 2007 - 16:40:19 MDT
This archive was generated by hypermail 2.2.0 : Thu Jul 26 2007 - 16:42:27 MDT