[Thread Prev][Thread Next][Index]

Re: How to output ascii file with serial numbers,long,lat and value.



Hi Namba,
Here is an example using climatology data, listing sequence number
along with latitude and longitude and a variable.  You might need to
work with the indexing for your data, but I hope this will get you started.

 use coads_climatology
 set region/x=90e:110e/y=10s:10n

 let nx = `sst,return=iend` - `sst,return=istart` + 1
 let ny = `sst,return=jend` - `sst,return=jstart` + 1
 let nt = `sst,return=lend` - `sst,return=lstart` + 1
 let i1 = `sst,return=istart`
 let j1 = `sst,return=jstart`
 let L1 = `sst,return=Lstart`

 let seq = 1+i[gx=sst]-`i1` + `nx`*(j[gy=sst]-`j1`) + `nx`*`ny`*(L[gt=sst]-`L1`)

 list/format=(f9.0,3x,f9.3,3x,f9.3,3x,f9,3)/file=out1.out  seq, x[gx=sst], y[gy=sst],  sst



Namba Takaya wrote:

> Dear Sir
>
> I would like to output ascii file of value with auto serial number(from 1
> to the end) and longitude and latitude for several years.
>
> use sst.mean.nc
> set region/x=90e:110e/y=10s:10n/  !!! for example,sst of this area for
> output.
>
> list/format=(I9,x3,f9.3,x3,f9.3,x3,f9.3)   ???????      !!!format is like
> this.
> Output ascii file I expect is like this.
>
> SN    Long     Lat    sst
>
> 1     90.5    -9.5    32.41
> 2     91.5    -9.5    33.27
> 3     92.5    -9.5    33.83
> 4     93.5    -9.5    32.12
> 5     94.5    -9.5    32.56
> .       .       .       .
> .       .       .       .
> .     90.5    -8.5    33.33
> .
> .
> .
> until end
>
> Could somebody tell me how to do it?
>
> Thank you in advance.
>
> Takaya Namba
>
> _________________________________________________________________
> $B%G%8%+%a$G;#$C$?<L??$b<+M3<+:_$KJT=8(B MSN $B%U%)%H(B $B%"%k%P%`(B
> http://photos.msn.co.jp/

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement