[ncl-talk] downloading partial netcdf file

Cathy Smith cathy.smith at noaa.gov
Mon Jun 10 12:18:32 MDT 2019


You could use ncks for a single line extraction (see PSD page below that 
Dennis helpfully supplied). e.g.

  ncks -v lat 
https://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/interp_OLR/olr.mon.mean.nc 
a.nc

or

ncks -v olr 
https://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/interp_OLR/olr.mon.mean.nc 
a.nc

(ncks keeps coordinate variables too)

NCL will read and write a netCDF file with a single variable usinfg the 
OPEnDAP URL though you have to write a few lines of code. You could even 
make that work as command line routine and read in variable/file to save.

I'm sure there are other ways, too.

Cathy


On 6/10/19 11:35 AM, Dennis Shea wrote:
>
> re: " ... *only downloading specific variables of a NetCDF file"*
>
> The question is unclear. In what context?
> Are you talking about accessing a variable from a remote site [ eg: a 
> NOAA server ] from within a NCL script?
>      See: *https://www.ncl.ucar.edu/Applications/opendap.shtml*
>
> ----
>
> The ESRL: PSD site provides
> *https://www.esrl.noaa.gov/psd/data/gridded/using_dods.html#software*
>
> links to a number of tools to do what you want
>
> Good luck
>
> On Mon, Jun 10, 2019 at 10:01 AM Micah Sklut <micahs2005 at gmail.com 
> <mailto:micahs2005 at gmail.com>> wrote:
>
>     I haven't found any info regarding only downloading specific
>     variables of a NetCDF file, but I just wanted to check with the
>     NCL community in case I am missing something.
>
>     Thank you.
>
>     _______________________________________________
>     ncl-talk mailing list
>     ncl-talk at ucar.edu <mailto: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

-- 
----------------------------------------------
NOAA/ESRL PSD and CU CIRES
303-497-6263
https://www.esrl.noaa.gov/psd/people/cathy.smith/

Emails about data/webpages may get quicker responses from emailing
esrl.psd.data at noaa.gov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190610/7bb26b9d/attachment.html>


More information about the ncl-talk mailing list