[gradsusr] Data download help

Jennifer Adams jma at cola.iges.org
Tue Jul 9 14:00:01 EDT 2013


You can skip the ncrcat step by using a GrADS descriptor file to aggregate the files together. Put the following three lines in a text file called air.sig995.xtl in the same directory with the data files:

DSET ^air.sig995.%y4.nc
OPTIONS template
TDEF time 24107 linear 1jan1948 1dy


Then open this data set with GrADS using the 'xdfopen' command:

ga-> xdfopen air.sig995.xtl

Now all the files appear as a single data set -- there is no need to concatenate them together. You can begin doing whatever data analysis you want with the data. If you want to create a subset of the data in a new file, have a look at the 'sdfwrite' command. 

--Jennifer



On Jul 9, 2013, at 1:49 PM, James T. Potemra wrote:

> Emily:
> 
> The files in the URL below are served via ftp, so this is not really a GrADS issue.  Instead, you can use "wget" to retrieve all the files, then "ncrcat" to concatenate them all together.  For example,
> 
> wget -r -A.nc ftp://ftp.cdc.noaa.gov/Datasets/ncep.reanalysis.dailyavgs/surface/
> 
> will retrieve all the files on that page that end with ".nc".  Next,
> 
> ncrcat -h air.sig995.*.nc one_big_file.nc
> 
> will cat all the individual files into one big file.  "ncrcat" is part of the netCDF Operator (NCO) toolkit; more info at http://nco.sourceforge.net/
> 
> Jim
> 
> On 7/9/13 7:09 AM, Emily Wilson wrote:
>> Hello All,
>> 
>> I am wanting to write a GrADS script in emacs that downloads a bunch of NetCDF files from a website and compresses them into one large file.  The website is
>>  http://www.esrl.noaa.gov/psd/cgi-bin/db_search/DBListFiles.pl?did=33&tid=38147&vid=668 and I want to download all of the NetCDF files on this page.  What commands can I use to do this task?  If this is not possible would it be possible to format a script so that from the webpage, each file is read individually and specific data is pulled in each file, wrote or saved to a master file then the same thing is done for the next file and so on?
>> Thanks for the help in advance,
>> 
>> Emily P. Wilson, Intern
>> Research and Conservation Department
>> Denver Botanic Gardens
>> 1007 York St.
>> Denver, CO 80206
>> 720-865-3593
>> 
>> 
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130709/e2b4a769/attachment-0003.html 


More information about the gradsusr mailing list