[Thread Prev][Thread Next][Index]

Re: [ferret_users] Number of cells



Ferret's default value for "undefined" or "bad" is -1.0E34, but if you are listing the value in Ferret '....' should be printed instead of the values.  If you are looking at them in something written to file, then you might see the -1.0E34 (or a numeric value very close to that value - due to machine representation limits).

Karl


On Wed, Mar 20, 2019 at 12:00 AM JoshAB1995@xxxxxxxxxxx <joshab1995@xxxxxxxxxxx> wrote:
I know that there is an issue of some of my data being negative halfway through the simulation... Would negative values be found in the above described mask? 

On 20 Mar 2019 04:14, Ryo Furue <furue@xxxxxxxxxx> wrote:


On Wed, Mar 20, 2019 at 3:28 AM JoshAB1995@xxxxxxxxxxx <JoshAB1995@xxxxxxxxxxx> wrote:

Dear Ferreters,

 

I’ve been stuck for a considerable length of time trying to calculate the number of grid cells that contain a desired value, which I could then multiply by some value to gain a volume.

 

For the values I’m after I’ve created the following mask:

 

Let X = if x LT x then 1 else 0 !This sets all of the values that are within the range I’m after as ‘1’

Set var/bad = 0 X !To remove the values from my dataset that fall outside of the desired range

Plot X[x=@ngd,y=@ngd,k=@ngd] !Hoping that this plots the total number of grid cells that are not ‘missing’ against time

 

From this plot I get an unexpected result (a decrease when it should be increasing!!!)


But you are plotting "the number of missing cells at each time step".  That doesn't have to increase.  Perhaps what you want is

let cumulative_sum = X[x=@ngd, . . . , L=@rsum]

I guess.  @rsum is short of "running sum":  rsum(L) = sum from L' = 1 to L' = L of X(L').

Cheers,
Ryo




--
Karl M. Smith, Ph.D.
JISAO Univ. Wash. and PMEL NOAA
"The contents of this message are mine personally and do
not necessarily reflect any position of the Government
or the National Oceanic and Atmospheric Administration."

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement