wget / netcdf subset service / expt 91.0

518 views
Skip to first unread message

fail...@gmail.com

unread,
Mar 4, 2014, 5:59:19 AM3/4/14
to fo...@hycom.org
cao...@gmail.com
05/03/13
Autres destinataires :
Traduire le message en français Traduction en cours… Traduit par Google : anglais ≫ français - Afficher le message d'origine   Toujours traduire Ne plus traduire
Hello HYCOM.org, The following tar archive seems to be corrupted. I downloaded this file twice with same results: $ wget ftp://ftp.hycom.org/datasets/GLBa0.08/expt_90.9/hindcasts/909_archv_2012_126_00.tgz $ tar xzvf 909_archv_2012_126_00.tgz 909_a
Hello HYCOM.org,

We would like to use the netCdf Subset service for GLBa0.08/expt_91.0 data with wget
Before we downloaded data via script with wget commnad line like
wget -v "http://ncss.hycom.org/thredds/ncss/grid/GLBa0.08/expt_90.9?var=u,v,ssh&north=14&south=3&west=-58&east=-46&time_start=present&time_duration=P5D&addLatLon" -O titi1.nc

and it worked.

Today we want to do the same thing and we have this answer

--2014-03-04 11:54:07--  http://ncss.hycom.org/thredds/ncss/grid/GLBa0.08/expt_90.9?var=u,v,ssh&north=14&south=3&west=-58&east=-46&time_start=present&time_duration=P5D&addLatLon
Résolution de kayak.tlse.shom.fr... 192.168.31.252
Connexion vers kayak.tlse.shom.fr|192.168.31.252|:3128...connecté.
requête Proxy transmise, en attente de la réponse...400 Bad Request
2014-03-04 11:54:07 ERREUR 400: Bad Request.


this command doesn't work also wget -v "http://ncss.hycom.org/thredds/ncss/grid/GLBa0.08/expt_91.0?var=u,v,ssh&north=14&south=3&west=-58&east=-46&time_start=present&time_duration=P5D&addLatLon" -O titi1.nc
(same answer : bad request)

if we modify the command like this (with tds) , the result file is empty.
wget -v "http://tds.hycom.org/thredds/ncss/grid/GLBa0.08/expt_91.0?var=u,v,ssh&north=14&south=3&west=-58&east=-46&time_start=present&time_duration=P5D&addLatLon" -O titi1.nc

Could you please tell us where is the problem in the request's construction ?

many thanks

Regards


Mathilde Faillot


Michael McDonald

unread,
Mar 4, 2014, 11:51:17 AM3/4/14
to fo...@hycom.org, fail...@gmail.com
You are missing the critical "&spatial=bb" between your variable selection and north.south,east,west specification. This tells NCSS your spacial input (i.e., a bounding box = bb).

Also, you cannot make NCSS queries to the server "tds.hycom.org", so do not simply swap the hostname and expect it to work. 

All NCSS queries must go through the server "ncss.hycom.org". This provides better responsiveness to clients.

TDS (thredds/opendap) queries to the server "tds.hycom.org" will only return the data your requesting application wants/needs. No intermediate file is written on the server-side before data starts flowing to the client. This equals faster downloads. 

All NCSS (Netcdf subset service) queries to the server "ncss.hycom.org" needs to *locally* read all the requested data and then write to cache/disk the requested netcdf file. Then this file is sent over HTTP to the client. i.e., all the subsetting and file creation is taking place on the server-side. The client is simply getting the output file once it has been created on the server. NCSS is convenient for users not having the tools available for client-side subsetting and netcdf file creation.

/mike

Michael McDonald

unread,
Mar 4, 2014, 12:23:57 PM3/4/14
to fo...@hycom.org, fail...@gmail.com
You are missing the critical "&spatial=bb" between your variable selection and north.south,east,west specification. This tells NCSS your spacial input (i.e., a bounding box = bb).

Correction. The "spatial=bb" option is no longer needed when you specify north,south,east,west  parameters. (see post here, https://groups.google.com/a/hycom.org/d/msg/forum/vja9JUlpQpk/RG3sWBDjOmIJ

The error in your wget line is that GLBa0.08/expt_90.9 stopped producing data back in Aug 2013. The new latest experiment is GLBa0.08/expt_91.0

There is nothing matching "present" in GLBa0.08/expt_90.9 since the last date in that experiment has already passed. 

You might also want to append the "accept=netcdf4" (equals smaller output files) or "accept=netcdf" to tell NCSS what output you want the data in (otherwise it assumes)

/mike


Michael McDonald

unread,
Mar 4, 2014, 12:37:52 PM3/4/14
to fo...@hycom.org, fail...@gmail.com

Rebecca Ross

unread,
Mar 13, 2014, 10:34:41 AM3/13/14
to fo...@hycom.org, fail...@gmail.com
Hi Mathilde and Michel,
I was just having the same problem, so thanks for your help. I had been using a wget script which michael helped with before https://groups.google.com/a/hycom.org/d/topic/forum/wqPq1hM9d58/discussion which was now failing - how strange that &addLatLon no longer makes sense to it, and thanks for the link Michael to the amendments in the "FYI:impacts of THREDDS server update!" post - that does help make sense of it.

Anyway I just wanted to add for you Mathilde and anyone else coming up against these problems - that it helps to just follow the link you are requesting of the wget because it will give you more details than the Bad request error you get in terminal/command prompt. I only just realised this myself and sure enough it has helped me identify out of range date requests like yours above, and even mentions that it is the '&addLatLon' which is causing it problems in this specific case. So do try that in the future if it helps to diagnose the issues.

All the best, and thanks for your help, both!
Bex
Reply all
Reply to author
Forward
0 new messages