[ncl-talk] Reading NOAA ISD-Lite dataset
Soumik Basu
sbasu at alaska.edu
Tue Jul 11 12:59:50 MDT 2017
Thank you for your email. And, I apologize that my question framing wasn't
right.
I can read those text files. I wanted to know about reading files for only
some particular stations which is listed in a separate text file.
There might be years in which that particular station data is not present
and if present every year dimension of the data is different. But, I wanted
to save all the data under the same variable in (hour,day,year) format.
Now, I have an idea how to handle it.
Thanks,
Soumik
On Tue, Jul 11, 2017 at 6:36 AM, Dennis Shea <shea at ucar.edu> wrote:
> Did you look at NCL IO examples:
> https://www.ncl.ucar.edu/Applications/read_ascii.shtml
> We create these pages for users to look at.
>
> ===
>
> There is nothing 'special' about these ascii/text files.
>
> After unzipping, these are simple files
>
> 2016 01 01 00 52 -36 10120 230 30 -9999 -9999 -9999
> 2016 01 01 01 45 -40 10122 90 30 -9999 -9999 -9999
> [snip]
> ncol = 12
>
> dasc = "./" ; input directory for ascii files
> fid = "*2016 <ftp://ftp.ncdc.noaa.gov/pub/data/noaa/isd-lite/2016/013470-99999-2016.gz>" ; a unique identifier for files
> fasc = systemfunc ("cd "+ dasc+" ; ls "+fid)
> pasc = dasc+fasc
>
> nfil = dimsizes(fasc)
>
> do nf=0,nfil-1
>
> ; You can now read the file via "asciiread".
> nrows = *numAsciiRow* <https://www.ncl.ucar.edu/Document/Functions/Contributed/numAsciiRow.shtml>(pasc(nf)) ; contributed.ncl
> data := *asciiread* <https://www.ncl.ucar.edu/Document/Functions/Built-in/asciiread.shtml>(pasc,(/nrows,ncols/),"float")
> data at _FillValue = -9999.0
>
> yyyy := toint( data(:,0) )
>
> etc
>
> end do
>
> ===
>
> Please read the section:
>
> *How to read multiple ASCII files into one variable in NCL*.
>
> Good luck
>
>
> On Mon, Jul 10, 2017 at 6:28 PM, Soumik Basu <sbasu at alaska.edu> wrote:
>
>> Hi,
>>
>> I am wondering if there is any example in NCL showing how to read noaa
>> isd-lite dataset and link the data to the list of stations.
>>
>> ftp://ftp.ncdc.noaa.gov/pub/data/noaa/isd-lite/
>>
>> Thank you in advance for any help.
>>
>> Thanks,
>> Soumik
>>
>> --
>> --
>> "Learn from yesterday, live for today, hope for tomorrow. The important
>> thing is not to stop questioning." - Albert Einstein
>>
>> ************************************************************
>> **************************************
>> Dr. Soumik Basu
>> Post Doctoral Fellow, International Arctic Research Center, UAF,
>> Fairbanks, AK, USA
>> Nanjing University of Information Science and Technology, Nanjing, China
>> PhD in Atmospheric Sciences
>> M.Sc. in Atmospheric Sciences
>> Email: suvro05 at gmail.com
>> website: http://soumikbasu.weebly.com/
>>
>> ************************************************************
>> ***************************************
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
--
--
"Learn from yesterday, live for today, hope for tomorrow. The important
thing is not to stop questioning." - Albert Einstein
**************************************************************************************************
Dr. Soumik Basu
Post Doctoral Fellow, International Arctic Research Center, UAF, Fairbanks,
AK, USA
Nanjing University of Information Science and Technology, Nanjing, China
PhD in Atmospheric Sciences
M.Sc. in Atmospheric Sciences
Email: suvro05 at gmail.com
website: http://soumikbasu.weebly.com/
***************************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170711/82ecf328/attachment.html
More information about the ncl-talk
mailing list