[Thread Prev][Thread Next][Index]

Re: [ferret_users] using REPEAT with dods URLs



Hi Stephanie,
Billy's comment about using a descriptor file is one that you will want look into, if you want to treat this data as a single dataset containing all the times (or use a DODS aggregation on the server itself, if you have control over the server.)

But, just putting the `m` should work fine.  Make sure you get the semicolon between commands.
repeat/range=1:2/name=m (use "http://dodsserver/sst_`m`.nc"; show dat
Here is a working example. I hunted around and found two datasets with the same name except that one has a 3 and the other a 6.
repeat/range=3:6:3/name=m (\
use "http://ferret.pmel.noaa.gov/thredds/dodsC/NVODS/DODS_LDEO_ENSOFORECAST_LDEO1/data_ingrid.ldeo.columbia.edu_SOURCES_.ENSOFORECAST_.LDEO1_.0`m`MON_dods.jnl";\
show data; cancel data/all)
--The idea in a previous answer about defining a symbol is also often a good idea for repeat loops.

Ansley

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.
http://dodsserver/sst_1.nc
http://dodsserver/sst_2.nc
etc.

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!
Stephanie


[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement