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

Mary Haley haley at ucar.edu
Wed Mar 29 08:58:05 MDT 2017


Hi Adam,

I don't have a ready answer for this one. It could be that NCL is running
into a memory issue, since this seems to behave inconsistently.  The error
message seems to imply that the NetCDF file itself is the issue, and that
it has a non-monotonic coordinate variable.  It might be worth putting a
printVarSummary call right before the variable is read off the file to see
what the "Coordinate:" output looks like:

printVarSummary(a->apcpsfc)

Would it be possible for you to provide me with the part of the script that
sets the various lat/lonMin/Max variables, and the do loop that pulls off
the variables so I can see if I can reproduce this?

Also, what version of NCL are you using?  (ncl -V)

Thanks,

--Mary


On Tue, Mar 28, 2017 at 4:37 AM, Adam Turchioe <Adam_Turchioe at cargill.com>
wrote:

> 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
>
> _______________________________________________
> ncl-talk mailing list
> 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/20170329/952ee8b4/attachment.html 


More information about the ncl-talk mailing list