[Thread Prev][Thread Next][Index]

Re: [ferret_users] Retrive online data from ftp servers and zipped datasets;



Hi Karnan,

You can do that kind of thing with OPeNDAP datasets, but FTP does not work that way. The netCDF library, which Ferret uses to open netCDF and remote urls does not open FTP datasets.

A search for "OSCAR data sets opendap jpl" turns up, for instance, this link: https://podaac.jpl.nasa.gov/dataset/OSCAR_L4_OC_third-deg. Near the top of that page is a blue tab called "Data Access", which shows the different modes of access with some explanations.

I chose the second link there, "OPeNDAP". Exploring the different links from there for available data, I found this page which shows a big dataset listing. Click on one of those files, or on the 'html' link over to the right for a file you want to access. The next you'll see next gives the "Data URL" and that's what you can put into a Ferret command:

yes? use "https://opendap.jpl.nasa.gov:443/opendap/OceanCirculation/oscar/preview/L4/resource/LAS/oscar_third_deg_180/oscar_vel1992_180.nc"
*** NOTE: Axis coordinates are decreasing-ordered. Reversing ordering for axis latitude
yes? show data
currently SET data sets:
1> https://opendap.jpl.nasa.gov:443/opendap/OceanCirculation/oscar/preview/L4/resource/LAS/oscar_third_deg_180/oscar_vel1992_180.nc (default)
name title I J K L
U Ocean Surface Zonal Currents 1:1081 1:481 1:1 1:14
V Ocean Surface Meridional Curren 1:1081 1:481 1:1 1:14
UM Ocean Surface Zonal Currents Ma 1:1081 1:481 1:1 1:14
VM Ocean Surface Meridional Curren 1:1081 1:481 1:1 1:14

yes? shade/l=3 u ! quick look at the data

yes? show grid u
GRID GAS1
name axis # pts start end subset
LONGITUDE LONGITUDE 1081 r 180E(-180) 180E full
LATITUDE LATITUDE 481 r 80S 80N full
DEPTH DEPTH (m) 1 r- 15 15 full
TIME TIME 14 r 21-OCT-1992 20:00 26-DEC-1992 21:59 full


Just one more hint here. Note that the longitude is not a modulo access (if it were the SHOW GRID would show 1081mr with an "m" under # pts). If you wanted to save, say a set that spans the Pacific Ocean, you could tell Ferret to treat that axis as a modulo axis

yes? set axis/modulo `u,return=xaxis`
!-> set axis/modulo LONGITUDE
yes? show grid u
GRID GAS1
name axis # pts start end subset
LONGITUDE LONGITUDE 1081mr 180E(-180) 180E full
LATITUDE LATITUDE 481 r 80S 80N full
DEPTH DEPTH (m) 1 r- 15 15 full
TIME TIME 14 r 21-OCT-1992 20:00 26-DEC-1992 21:59 full


yes? save/x=150:190/y=-2:12/file=mysubset.nc u,v




On 12/21/2017 11:16 PM, Karnan C wrote:
Dear ferret users,
 
I would like to download the OSCAR data sets directly from the web
servers through ferret. If I do that, I can set my area of interest
and store a small size data in my computer, rather than downloading
 
 
I can't succeed do obtain the data.
 
1). It was FTP server and when I tried, I got error.
Data: oscar_vel1992_180.nc
Server: ftp://podaac-ftp.jpl.nasa.gov/allData/oscar/preview/L4/resource/LAS/oscar_third_deg_180/
 
use "ftp://podaac-ftp.jpl.nasa.gov/allData/oscar/preview/L4/resource/LAS/oscar_third_deg_180/oscar_vel1992_180.nc"
 
**netCDF error
No such file or directory (OPeNDAP/netCDF Error code 2)
Data set:
ftp://podaac-ftp.jpl.nasa.gov/allData/oscar/preview/L4/resource/LAS/oscar_third_deg_180/oscar_vel1992_180.nc
 
2). Some of the online data sets were zipped in the FTP server.
Data: oscar_vel1992.nc.gz
Server: ftp://podaac-ftp.jpl.nasa.gov/allData/oscar/preview/L4/oscar_third_deg/
 
Please share some ideas to do it successfully.
Thank you.


[Thread Prev][Thread Next][Index]