[ncl-talk] OPeNDAP retrieval of MODIS as .nc?

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Tue Jul 9 16:15:54 MDT 2019


Elizabeth,

I get a similar error using ncdump, which is independent from NCL.  So this
is not really an NCL question.

If you want to continue to try Opendap, then please see this NSIDC help
page for Opendap access.  You will probably need to provide your Earthdata
account credentials using one of the mechanisms shown on that page.  If
this does not work expediently, then I suggest that you contact NSIDC User
Services through the e-mail link at the bottom of that page.

    https://nsidc.org/api/opendap/


On Tue, Jul 9, 2019 at 4:02 PM Burakowski, Elizabeth via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Hi Rick,
>
> thanks for the ncl_convert2nc tip, will use it once I can get this OPeNDAP
> running properly.  For what it's worth, I had an older ncl script that
> worked fine with the following address for MOD10A1 v005:
>
> http://nsidc.org:80/opendap/MOST/MOD10A1.005/
>
> But that no longer works.
>
> I had created my account at https://search.earthdata.nasa.gov
> <https://search.earthdata.nasa.gov/search>, if that helps.
>
> Here is the full error message:
>
> syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or
> SCAN_ERROR
> context: <!DOCTYPE^ html><!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8
> lt-ie7"> <![endif]--><!--[if IE 7]><html class="no-js lt-ie9 lt-ie8">
> <![endif]--><!--[if IE 8]><html class="no-js lt-ie9"> <![endif]--><!--[if
> gt IE 8]><!--><html lang="en" class="no-js"><!--<![endif]--> <head> <meta
> charset="utf-8"> <meta
>

<snip>

toUTCString()+';path=/;';setTimeout(f5_cspm.wait_perf_data,100);}}}}f5_cspm.go();}());</script>
> ncopen: filename "
> https://n5eil02u.ecs.nsidc.org/opendap/MOST/MOD10A1.006/2019.06.30/MOD10A1.A2019181.h12v04.006.2019183024309.hdf":
> NetCDF: Malformed or inaccessible DAP DDS
>
>
> *From:* Rick Brownrigg <brownrig at ucar.edu>
> *Sent:* Tuesday, July 9, 2019 5:53 PM
>
> Hi Elizabeth,
>
> I unfortunately can not test this directly, as one must have an account on
> that OpenDAP site. However, if you can download the HDF version, you could
> use "ncl_convert2nc" to NetCDF.
>
> Otherwise, seeing all the error messages might yield some insights.
>
> Hope that helps...
> Rick
>
>
> On Tue, Jul 9, 2019 at 3:15 PM Burakowski, Elizabeth via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
> Hello,
>
> I am writing an NCL script to pull a subset of MOD10A1 Daily Snow Cover
> files for analysis. I'd like to pull the files as netCDF instead of hdf.
>
> The UI page seems to suggest I can request as .nc:
>
>
> https://n5eil02u.ecs.nsidc.org/opendap/MOST/MOD10A1.006/2000.03.10/MOD10A1.A2000070.h12v04.006.2016061222432.hdf.html
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__n5eil02u.ecs.nsidc.org_opendap_MOST_MOD10A1.006_2000.03.10_MOD10A1.A2000070.h12v04.006.2016061222432.hdf.html&d=DwMFaQ&c=c6MrceVCY5m5A_KAUkrdoA&r=JW2rHHzYnVYi6ZDBI-2JFMNSreDPLZO-wwOrczEnOlg&m=Mro58-h7ajrO1nUBMp5gNIPzvaLfG99-mvbM6anW2mE&s=Ahorg8HVDvw9p0wAfDWVHds6fBChcRfwQWHIqO_1rV4&e=>
>
> But it's not clear how I would do this in NCL.  For hdf, I tried to use:
>
> filename = "MOD10A1.A2019181.h12v04.006.2019183024309.hdf"
> subdir = "2019.06.30"
> url = "https://n5eil02u.ecs.nsidc.org/opendap/MOST/MOD10A1.006/
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__n5eil02u.ecs.nsidc.org_opendap_MOST_MOD10A1.006_&d=DwMFaQ&c=c6MrceVCY5m5A_KAUkrdoA&r=JW2rHHzYnVYi6ZDBI-2JFMNSreDPLZO-wwOrczEnOlg&m=Mro58-h7ajrO1nUBMp5gNIPzvaLfG99-mvbM6anW2mE&s=RVUJnW6bUsZvHlJtDUaEZ-yfLZkVtiW2gfQGLbVui60&e=>
> "
> exists = isfilepresent(url+sudir+"/"+filename)
>
> However, I receive an error that starts with:
>
> "syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET
> or SCAN_ERROR"
>
> and ends with:
>
> "ncopen: filename "
> https://n5eil02u.ecs.nsidc.org/opendap/MOST/MOD10A1.006/2019.06.30/MOD10A1.A2019181.h12v04.006.2019183024309.hdf
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__n5eil02u.ecs.nsidc.org_opendap_MOST_MOD10A1.006_2019.06.30_MOD10A1.A2019181.h12v04.006.2019183024309.hdf&d=DwMFaQ&c=c6MrceVCY5m5A_KAUkrdoA&r=JW2rHHzYnVYi6ZDBI-2JFMNSreDPLZO-wwOrczEnOlg&m=Mro58-h7ajrO1nUBMp5gNIPzvaLfG99-mvbM6anW2mE&s=HRC_y02lVRpB5bHAZ1AY5QzBOIg41Hn3bHQx11jaOGs&e=>":
> NetCDF: Malformed or inaccessible DAP DDS"
>
> I suspect there is something wrong with the url, but this is the one
> provided by nsidc.
>
> Any suggestions?
>
> Thank you,
>
> Liz.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190709/cde16aab/attachment.html>


More information about the ncl-talk mailing list