[ncl-talk] Fwd: data extraction into ASII file by distinct lat/long
Alan Brammer
abrammer at albany.edu
Sat Sep 5 08:37:06 MDT 2015
Woops, crucial typo in my last line.
Blank messages to bump threads
*aren't* necessary here. Especially within 24 hours on a weekend.
On Sat, Sep 5, 2015 at 10:36 AM, Alan Brammer <abrammer at albany.edu> wrote:
> asciiwrite is the most basic of the functions. Below are two of the more
> complex functions with more options for layout and formatting.
> ascii is probably one of the worst ways to store data however, depending
> on the number of files and dimensions this could take up a lot of space.
>
> https://www.ncl.ucar.edu/Document/Functions/Built-in/write_matrix.shtml
>
> https://www.ncl.ucar.edu/Document/Functions/Built-in/write_table.shtml
>
>
>
> Good luck.
>
>
> Keep replies to ncl-talk.
>
>
>
> On Sat, Sep 5, 2015 at 9:34 AM, Saurabh Singh <saurabhsingh123op at gmail.com
> > wrote:
>
>>
>> NCL Version- 6.3.0
>> OS: UBUNTU
>>
>> i have monthly netcdf files contaminating precipitation files are named
>> as netcdf1,netcdf2 ...and so on.
>> I need to extract rainfall rate(precipitation of all the lat/long in a
>> text file, the code extracts the rainfall values, but all lat longs are in
>> a single column, i want each lat/long time series separated by a tab or a
>> comma but i cannot do it.
>>
>> though i tried it using an example listed in "
>> https://www.ncl.ucar.edu/Document/Functions/Built-in/asciiwrite.shtml"
>> (example 4) but this takes to long to execute an i failed to get output.
>>
>> my current code is following. kindly suggest me how to modify it so that
>> i can distinct lat-long values.
>>
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>>
>> ;;----------------------------------------------------------------------
>> files = systemfunc("ls -1 /home/saurabh/Desktop/trmm/netcdf*") + ".nc"
>>
>> c = addfiles(files,"r")
>> rain=c[:]->pcp
>> asciiwrite("rain_all_lats_long.txt",rain)
>> --
>>
>>
>> With regards
>> Saurabh Kumar singh ntly netcdf diles
>>
>>
>>
>> *P** : * *Please consider the environment before printing this e-mail*
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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/20150905/d3feecc9/attachment.html
More information about the ncl-talk
mailing list