[ncl-talk] Point to 3-D data

Dennis Shea shea at ucar.edu
Thu Nov 21 21:09:09 MST 2019


You must do a better job of describing your file and intended usage.
ncl-talk should not have to 'guess' about the data.
--
[1] Rick's suggested approach

%> cat data_*  DATA.txt

is appropriate if all the data are to be as one file as ?time? series.
---
[2]
However, I think these are not randomly located data.
Rather, I speculate teach file represents time series grid point values on
a *0.25* grid.

data_30.625_*73.125 *
data_30.625_*73.375 *
data_30.625_73.625
data_31.125_73.125
data_31.625_73.375

EX: *73.125+0.25 => 73.375*
---
[3]
Attached is a script that places the variables onto a 0.25 degree grid.
Please study the script




On Thu, Nov 21, 2019 at 2:01 PM Rick Brownrigg via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Since these are simple datasets, without headers/footers, etc., I would
> use the bash command "cat" to make one big file out of all of the
> individual files, and then process that. It's a simple matter to read ascii
> files with NCL and extract individual columns into array variables:
>
>     http://ncl.ucar.edu/Applications/read_ascii.shtml
>
> From there, you can find the total number of observations by calling
> "dimsizes()" on one of the column variables, and then do something like:
>
> len = dimsizes(rar)  ;;where var is the extracted column 1
> my3DVar = new((/len, 3), float)
> my3DVar(:,0) = Var
> my3DVar(:,1) = lon
> my3DVar(:,2) = lat
>
> If you want to save that to a file, see the various examples at:
>
>     http://ncl.ucar.edu/Applications/list_io.shtml
>
> Rick
>
>
> On Thu, Nov 21, 2019 at 1:37 PM Soma Roy via ncl-talk <ncl-talk at ucar.edu>
> wrote:
>
>> Hello,
>> I have multiple datasets for individual lat lon positions. I want to make
>> a 3-D dataset (lon,lat,Var1) from all the list of files. Var1=Col.1 dataset
>>
>> Please give me a hints for the above.
>>
>> Sample datasets is attached as zip file.
>>
>> Thanks and regards,
>> Soma
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> 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/20191121/e647a219/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: soma2grid.ncl
Type: application/octet-stream
Size: 3086 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20191121/e647a219/attachment.obj>


More information about the ncl-talk mailing list