[Thread Prev][Thread Next][Index]

Re: [ferret_users] using REPEAT with dods URLs

There are two ways to do this, but I'm not sure either of these will work in a DODS situation! (Because of the possible interaction of the double-quotes around the URL with other quotes needed).

1) In general the best way to handle multiple cdf files is via a descriptor file (see manual). That would allow you to see the whole collection at once as a 4-d slab, and do any kind of calculation or slicing on it. Now, I've never tried this on DODS files, and I'm not sure how the double-quoting used in DODS URL filenames will interact with the single-quotes used in descriptor file filenames. Anybody done this?

2) I suspect the problem with your repeat loop is that you need an intermediate symbol definition:

repeat/range=1:2/name=m (def sym mm `m`; set dat "http://dodserver/ sst_($mm).nc"; sho dat)

Here, I have a similar doubt as above. Does the symbol ($mm) need immediate evaluation quotes: `($mm)` , and if so, will those work inside the URL's double-quotes?

(In your message you imply two mistakes:
a) a symbol definition must include parens: ($mm), not simply $mm
b) immediate evaluation mode uses back-quotes on both sides of the definition: `m`)

Billy K

On 18 Nov 09, at 8:15 AM, Henson S.A. wrote:

Hello everyone,

I'm trying to access multiple files held on a DODS server. The file names are all the same, except for a number at the end, e.g.

I am trying to use the REPEAT function to read them in one at a time and perform an operation on them. So far I have,
repeat/RANGE=1:2/NAME=m (use "http://dodsserver/sst_X.nc"; show d)
What do I put where the X is to make ferret open the files in sequence? I’ve tried replacing X with $m, ‘m’ etc. to no avail.

Thank you!

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement