[ncl-talk] Opendap retrieve only a subset of data

Ugo Merlini umerlini at enet.it
Sat Jul 2 03:50:33 MDT 2016


Hi

Sorry I forgot to say I have the opendap version installed also forgot 
to say that this string only retrieve the variables list after the 
question mark for example this line retrive lon, lat and tmp2m variables

  http://nomads.ncep.noaa.gov:9090/dods/gfs_0p25/gfs20160701/gfs_0p25_00z?lon[9],lat[40],tmp2m

but it grab all tmp2m all over the world when I'm interestest to tmp2m 
at logitude 9 and latitude 40

I have many variables to download at the same position so a subregion 
limitation will save time

Ugo

Il 01/07/2016 23:37, Rick Brownrigg ha scritto:
> Hi,
>
> Are you getting the "Either file doesn't exist, or NCL does not have 
> OPeNDAP capabilities on this system"  message, or some other error -- 
> I'm getting a SEGV out of the isfilepresent() function call.   Ncl is 
> optionally built with OpenDAP, and it may be that your version was 
> built without it?
>
> Rick
>
>
> On Fri, Jul 1, 2016 at 1:03 PM, Ugo Merlini <umerlini at enet.it 
> <mailto:umerlini at enet.it>> wrote:
>
>     I'm trying to to retrieve form ncep opendap server asubset of data
>     limiting the usage of the internet band speed up all the script.  In
>     Grads and in NCO is possibile (but this last give me many reading
>     error)
>     is there a way to it in NCL?
>
>     Regards
>     Ugo
>
>     here my script
>
>     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"
>     load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
>     load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/calendar_decode2.ncl"
>     load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/ut_string.ncl"
>
>     begin
>        data_sistema =systemfunc("date -d '-1 day' +'%Y%m%d'")
>
>        http1 = "http://nomads.ncep.noaa.gov:9090/dods/gfs_0p25/gfs"
>        http2 = systemfunc("date -d '-1 day' +'%Y%m%d'")
>        http3 = "gfs_0p25"
>
>
>            filename = http1 + http2 + "/" + http3 + "_00z"
>            data_run_temp = data_sistema + " 0000"
>            data_run = systemfunc( "date -u -d '"+ data_run_temp +"'
>     '+%s'" )
>            run = "gfs_0p25_00"
>            print(filename)
>
>
>
>          exists = isfilepresent(filename)
>          if(.not.exists) then
>            print("OPeNDAP isfilepresent test unsuccessful.")
>            print("Either file doesn't exist, or NCL does not have OPeNDAP
>     capabilities on this system")
>          else
>            print("OPeNDAP isfilepresent test successful.")
>            gfs = addfile(filename,"r")
>            vars = getfilevarnames(gfs)
>          end if
>
>     end
>     _______________________________________________
>     ncl-talk mailing list
>     ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
>     List instructions, subscriber options, unsubscribe:
>     http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160702/f2f5f889/attachment.html 


More information about the ncl-talk mailing list