[ncl-talk] Variable read error within GFS OPeNDAP do loop

Adam Turchioe Adam_Turchioe at cargill.com
Tue Mar 28 04:37:48 MDT 2017


Hello NCL Talk,

First time poster, long time user!

I have a script that reads in GFS files via OPeNDAP within a do loop that reads in variables and plots PNGs for each 6-hour forecast period. Here are some critical lines:

fhr = (/0,6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,96,102,108,114,120,126,132,138,144,150,156,162,168,174,180,186,192,198,204,210,216,222,228,234,240,252,264,276,288,300,312,324,336,348,360,372,384/)
                nfhr = dimsizes(fhr)

                do fhri=1,40

    if fhr(fhri) .le. 240 then
filename = "http://nomads.ncep.noaa.gov:9090/dods/gfs_0p50/gfs20"+filey+filem+filed+"/gfs_0p50_"+fileh+"z"
                a = addfile(filename,"r")
                end if


The loop will run no problem sometimes for hundreds of iterations in various regions but eventually will get tripped up when reading in data:

                precip = a->apcpsfc ({curdate},{latMin:latMax},{lonMin:lonMax})

fatal:NclOneDValGetClosestIndex: Non-monotonic coordinate value being used, can't complete coordinate subscript
fatal:Could not obtain coordinate indexes, unable to perform subscript
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 574 in file 12hPrecipDiff_Total_GFS.ncl


I will re-run the same exact script and it will process that same exact iteration before getting tripped up at another seemingly random timestep within the loop. I've tried sleeping for 2 seconds between loops and deleting as many variables as possible but still get random breakdowns.

Any ideas much appreciated!

Cheers,
Adam Turchioe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170328/a2d132db/attachment.html 


More information about the ncl-talk mailing list