[Thread Prev][Thread Next][Index]

Re: [ferret_users] cumulative distribution curve



 I guess you created the nc file from a text file else you may list it to a file .  Add zeros to years which are not having occurrences  and actual values for years where there is data.  Then define a time axis with unit as year and define  grid with the time axis first and read data in to grid.. 
Later you can use set var/bad=0 to mask the missing data.. 
Sincerely, 
Sudheer 

On Mon, Dec 2, 2019, 21:38 gopika suresh <gopikasurvay@xxxxxxxxx> wrote:
Dear sudheer, 
Thanks for the clarification. But how it is possible to put date stamp against each occurrences? 

Thanks
Gopika 

On Mon, 2 Dec 2019 at 9:26 PM, Sudheer Joseph <sjo.india@xxxxxxxxx> wrote:
Hi Gopika,
                    Basic issue here is that you have just 36( in file and reading 33 as per your code)  points in your data file and you are defining a grid with length of 201 and trying to read data in to it  your data is not 2d but 1d only. Ferret will not be able to understand which years among the 201 years you have occurrences unless you tell it. In other words, you should have date stamp against each occurrences and then you will be able to go further.

Sincerely,

Sudheer

**********************************************************************************
Dr. Sudheer Joseph                                                                
Scientist -F & Head CSG.                                                                   
INCOIS, MoES, Govt. of India.
"OCEAN VALLEY" , Pragathi Nagar (BO), Nizampet SO,  Telangana, India. PIN- 500 090.
Tel:+91-9440832534(Mobile) Tel:+91-40-23886047(O),Fax:+91-40-23892910(O)
E-mail: sjo.India@xxxxxxxxxsjo@xxxxxxxxxxxxx.
-------------------* --------------------
"The ultimate measure of a man is not where he stands in moments of
comfort and convenience, but where he stands at times of challenge and controversy."
                        Martin Luther King, Jr.
***********************************************************************************


On Mon, Dec 2, 2019 at 11:53 AM gopika suresh <gopikasurvay@xxxxxxxxx> wrote:
Dear Ryan

thank you for the reply, but I think I will explain the problem little more specifically

here i am having 36 points in my x-axis (attached as hval)
and I have tried to find out the frequency per year (1900-2100 which means 201yrs) by running the below command. But I am getting values for the years which don't have any occurrence just the same as the previous year frequency (attachment frequency.txt).  I want those years with zero frequency as the number zero only not the value from previous year.  
code:
DEFINE AXIS/X occurences = hval[x=1:33]
LET pdf = I[gx=occurences]
DEFINE AXIS/X=1900:2100:1 my_intervals
let frequency=pdf[gx=my_intervals@sum]

thanks
gopika


On Mon, Dec 2, 2019 at 11:35 AM Ryo Furue <furue@xxxxxxxxxx> wrote:
Dear Gopika,

On Sun, Dec 1, 2019 at 11:32 AM gopika suresh <gopikasurvay@xxxxxxxxx> wrote:
If some value is there in any year then it will be increasing otherwise straight line.

Basically, the @RSUM does that, if I understand your requirements correctly:

yes? let events = {1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1}
yes? plot/symbols/lines events, events[i=@RSUM]

The problem is that Ferret defines RSUM on the "wrong" gridpoints.  You want to shift it to the left by half gridspacing.  To do so would require a bit of complicated manipulation . . .  and you also want the initial value of the cumulative sum to be zero. . . .  (Personally, I would write the values to a text file, read it by a program and compute the cumulative sum, and plot the result with gnuplot.)

Cheers,
Ryo


--
Gopz
--
Gopz

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

Privacy Policy | Disclaimer | Accessibility Statement