[ncl-talk] data extraction into ASII file by distinct lat/long

Saurabh Singh saurabhsingh123op at gmail.com
Fri Sep 4 09:31:30 MDT 2015


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*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150904/fe1b85a9/attachment.html 


More information about the ncl-talk mailing list