[ncl-talk] Can anyone help me on how to read multiple files from OPeNDAP server

Rick Brownrigg brownrig at ucar.edu
Thu Oct 15 10:15:41 MDT 2020


Hi,

I don't know for certain the issue, but in building up your list of files
to be read, you use variables constructed like this:

f_1 = NASA_URL1 + NASA_FILP1

both the URL part and the FILP part contain the filename, so that F_1 would
appear to be incorrectly constructed.  Try printing these variables to see
what's happening.

Hope that helps...
Rick


On Thu, Oct 15, 2020 at 7:40 AM Najib Yusuf via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear NCL experts,
>
> Using an example in ncl web page (see below) I was able to read a file
> from the OPeNDAP server, i tried to read multiple files (12) using similar
> approach by separating the files with comma like (/"
> https://opendap.larc.nasa.gov/opendap/MOPITT/MOP03JM.008/2013.01.01/MOP03JM-201301-L3V95.6.3.he5
> ","
> https://opendap.larc.nasa.gov/opendap/MOPITT/MOP03JM.008/2013.01.02/MOP03JM-201302-L3V95.6.3.he5
> ","
> https://opendap.larc.nasa.gov/opendap/MOPITT/MOP03JM.008/2013.01.03/MOP03JM-201303-L3V95.6.3.he5"/)
> but it didnt work for me though when i test run the files one after the
> other it reads well. Also, I tried "systemfunc" and "wildcards * but is
> like both doesn't work for OPeNDAP. Kindly guide me how to read multiple
> files from OPeNDAP server. I also tried another approach (see attach file)
> but still didnt work. Thank you
>
>
>  load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>  load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>  load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" ; BRH
>
>  begin
>
> ;--- Using the data files from url
>  NASA_URL  = "
> https://opendap.larc.nasa.gov/opendap/MOPITT/MOP03JM.008/2013.12.01/MOP03JM-201312-L3V95.6.3.he5
> "
>
> ;    f = addfile(NASA_URL,"r")
>   exists = isfilepresent(NASA_URL)
>   if(.not.exists) then
>     print("OPeNDAP test unsuccessful.")
>     print("Either the file doesn't exist, or NCL does")
>     print("not have OPeNDAP cabilities on this system.")
>   else
>     f = addfile(NASA_URL,"r")
>     vnames = getfilevarnames(f)
>     print(vnames)
>   end if
> end
>
> Thank you for you help.
>
> Najib Yusuf Galadanci
> CAR-NASRDA. Nigeria
> 234 80 3871 4158
> ________________________
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201015/a85b6af9/attachment.html>


More information about the ncl-talk mailing list