[ncl-talk] Can anyone help me on how to read multiple files from OPeNDAP server
Najib Yusuf
najibgal at yahoo.com
Thu Oct 15 11:05:31 MDT 2020
Hello Rick,
Thank you Rick. I did print the variables and they return as you pointed out, so i corrected the urls to NASA_URL1 = "https://opendap.larc.nasa.gov/opendap/MOPITT/MOP03JM.008/2013.01.01/". But still i got this error:
syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR.The specific error message associated with your request was:</p> <blockquote> <p><strong>Failed to locate resource: /MOPITT/MOP03JM.008/2013.04.01/MOP03JM-201304-L3V95.6.3.he5.dds </strong></p> </blockquote> <p align="left"> If you think that the server is broken (that the URL you submitted should have worked), then please contact the OPeNDAP user support coordinator at: <a href="mailto:support at ......
Could it be permission issue?
Thank you
Najib
On Thursday, October 15, 2020, 05:15:57 PM GMT+1, Rick Brownrigg <brownrig at ucar.edu> wrote:
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 ifend
Thank you for you help.
Najib Yusuf GaladanciCAR-NASRDA. Nigeria234 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/2c0c8a3c/attachment.html>
More information about the ncl-talk
mailing list