Re: [netcdfgroup] Using nccopy and THREDDS to download a netCDF file

Ashwin,

You must also have to specify time, latitude, longitude and level coordinated variables associated to the tas variable itself

*nccopy -4 "http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2/pressure/air.2014.nc?air[480:603][2][20:34][26:40],time[480:603],level[2],lat[20:34],lon[26:40]"; foo.nc*

*regards
*

*Antonio*

*P.S: The air variable is a Grid or ARRAY MAP in DAP terminology and it would be possible to do what you want without specifying coordinated variables.... but the DAP service implemented by THREDDS is simpler in constraint expression than others DAP service implementations (i.e. hyrax)
*

El 22/06/2016 a las 15:20, ashwinD12 . escribiÃ:
Hello,
I am using nccopy to download NCEP reanalysis files from a THREDDS server using constraint expressions.

*nccopy -4 "http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2/pressure/air.2014.nc?air[480:603][2][20:34][26:40]â; foo.nc <http://foo.nc>

*
However it does not do what I want it to do. When I check the contents of foo.nc <http://foo.nc> it does not download the latitude, longitude, time and level information.

The same file downloaded by FTP from ESRL PSD site contains the information of time, latitude , longitude and and level.

Is there some other option I need to include in the nccopy command so that the other information is also downloaded ? Do I need to the include the "-v" option ?


Following is my sample data from using nccopy -

time[0] level[0] lat[0] lon[0] hgt[0]=5758 m
time[0] level[0] lat[0] lon[1] hgt[1]=5715 m
time[0] level[0] lat[0] lon[2] hgt[2]=5679 m
time[0] level[0] lat[0] lon[3] hgt[3]=5658 m
time[0] level[0] lat[0] lon[4] hgt[4]=5651 m
time[0] level[0] lat[0] lon[5] hgt[5]=5656 m
time[0] level[0] lat[0] lon[6] hgt[6]=5666 m
time[0] level[0] lat[0] lon[7] hgt[7]=5675 m
time[0] level[0] lat[0] lon[8] hgt[8]=5680 m
time[0] level[0] lat[0] lon[9] hgt[9]=5680 m
time[0] level[0] lat[0] lon[10] hgt[10]=5678

The same data from FTP -
time[0]=1879032 level[0]=500 lat[0]=40 lon[0]=65 hgt[0]=5758 m
time[0]=1879032 level[0]=500 lat[0]=40 lon[1]=67.5 hgt[1]=5715 m
time[0]=1879032 level[0]=500 lat[0]=40 lon[2]=70 hgt[2]=5679 m
time[0]=1879032 level[0]=500 lat[0]=40 lon[3]=72.5 hgt[3]=5658 m
time[0]=1879032 level[0]=500 lat[0]=40 lon[4]=75 hgt[4]=5651 m
time[0]=1879032 level[0]=500 lat[0]=40 lon[5]=77.5 hgt[5]=5656 m
time[0]=1879032 level[0]=500 lat[0]=40 lon[6]=80 hgt[6]=5666 m
time[0]=1879032 level[0]=500 lat[0]=40 lon[7]=82.5 hgt[7]=5675 m
time[0]=1879032 level[0]=500 lat[0]=40 lon[8]=85 hgt[8]=5680 m


Regards,
Ashwin.



_______________________________________________
NOTE: All exchanges posted to Unidata maintained email lists are
recorded in the Unidata inquiry tracking system and made publicly
available through the web.  Users who post to any of the lists we
maintain are reminded to remove any personal information that they
do not want to be made public.


netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe,  visit: 
http://www.unidata.ucar.edu/mailing_lists/