[ncl-talk] (Hopefully easy) random_uniform question

Bassill, Nicholas nbassill at albany.edu
Mon Dec 18 09:00:32 MST 2017


Hi All,
    I have a variable with a list of values (they're correlations) in it. I'm creating a new variable with an equally sized list of synthetic values spanning the "range" of values in the original variable, like so:

randomcorrs = random_uniform(min(pastregimecorrs),max(pastregimecorrs),num(pastregimecorrs))

a printVarSummary on "pastregimecorrs" yields:


Variable: pastregimecorrs

Type: float

Total Size: 308 bytes

            77 values

Number of Dimensions: 1

Dimensions and sizes: [77]

Coordinates:

Number Of Attributes: 1

  _FillValue : 9.96921e+36

Although this always seems to work as expected, I get the following warning:


warning:Argument 0 of the current function or procedure was coerced to the appropriate type and thus will not change if the function or procedure modifies its value


This isn't the biggest deal, other than I loop through this 1000x20x11 times, so it creates a lot of warning text which is making it difficult to debug other portions of my code. "randomcorrs" has not been previously defined.


My question is, am I doing something wrong here? It's not clear to me that I'm doing anything other than what random_uniform (or min, max, or num) expect. I've spent an inordinate amount of time trying to figure this out, so either I'm missing something exceptionally obvious (very possible) or this is a gratuitous warning. I'm using NCL 6.3.


Nick Bassill, PhD

Modeler & Meteorologist, New York State Mesonet

LC SB-28, 1400 Washington Ave.,

SUNY, University at Albany, NY 12222

(518) 442-6375

http://nysmesonet.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171218/ef6a8adc/attachment.html>


More information about the ncl-talk mailing list