[Thread Prev][Thread Next][Index]

Re: [ferret_users] segmentation fault while overlying symbols



Hi Saurabh,

One thing I notice is that you have this  sequence:

fill/nokey/set/...
plot/vs/over/...

You should finish the FILL/SET command before issuing a PLOT/OVER.   /SET is telling Ferret you are going to customize settings for the FILL command, and until you have done a PPL FILL to finish the command, Ferret doesn't necessarily have all the information it would need to do an overlay.

I also have a general suggestion, when you run into a problem when using several definitions. Draw plots or run a STAT command on the variables separately to make sure the data and definitions are what you expected.  For instance,

Does this work correctly without the /SET?

   fill/nokey/hlimits=0E:0W:20/vlimits=62.5S:62.5N:10/lev=(-inf)(-.8,.8,.2)(inf)/nolab/palette=blue_orange correl

How about this, without the /OVER?

   plot/nolab/nokey/vs/sym=dot ppt*lon, ppt*lat

And so forth, maybe do a "stat ppt", and so forth.

-Ansley

On 2/14/2017 10:22 PM, Russ Fiedler wrote:
Hi,

I don't understand what you are trying to overlay.

let ppt = if abs(t2t[i=1:`nx`:1,j=1:`ny`:1]) ge 1.9 then t2t
...
plot/nolab/nokey/vs/ov/sym=dot ppt*lon, ppt*lat

is trying to put points at the locations t2t*location_of_original_point if t2t is greater than  1.9.
Let's say at 185E,60N you have t2t=2. This means you're trying to plot a point at (370E,120N) which is 30N of the North Pole!

I think you want

let ppt = if abs(t2t[i=1:`nx`:1,j=1:`ny`:1]) ge 1.9 then 1

which should just return the locations if t2t is greater than 1.9.

See example 2 here

http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/commands-reference/PATTERN


Russ


On 15/02/17 16:30, saurabh rathore wrote:
Hi, This is my ferret script and all the details please have a look.

use all_sln.nc
use all_pp.nc


sh da

currently SET data sets:
    1>  /media/work/sln/all_sln.nc
 name     title                                                  I         J              K         L           M         N
 SLN_ALL
          SLN-SLN_CLI[GT=SLN@ASN]     1:360     1:126      1:27      1:142      ...       ...

 
    2> /media/ppr/all_pp.nc  (default)
 name     title                                                   I         J         K         L           M         N
 PP_ALL
          PP-PP_CLI[GT=PP@ASN]             1:144     1:50      ...       1:139     ...       ...



sh gr pp_all[d=2], sln_all[d=1]
    GRID GAN3
 name       axis                          # pts         start                                    end                 subset
 LON1      LONGITUDE             144mr      1.25E                                  1.25W               full
 LAT11_622_51 LATITUDE         50 r      61.25S                                 61.25N              full
 normal    Z
 TIME1     TIME                          139 i   01-JAN-2005 00:00    01-JUL-2016 00:00       full
 normal    E
 normal    F
    GRID GAN1
 name       axis                          # pts          start                               end                               subset
 LON       LONGITUDE             360mr        0.5E                            0.5W                                 full
 LAT28_153 LATITUDE           126 r         62.5S                           62.5N                               full
 LEV       DEPTH (m)                27 i-            0                                  2000                                full
 TIME      TIME                          142 i   15-JAN-2005 00:00    15-OCT-2016 00:00                full
 normal    E
 normal    F



let s2=sln_all[d=1,k=1,l=1:139]
let r1=pp_all[d=2,gx=s2,gy=s2]

let p=r1
let q=s2

go variance

... Variance and Covariance: Instructions:
Use the LET/QUIET command to define the variable(s) P (and Q) as
your variable(s) of interest (e.g. yes? LET/QUIET P = u[x=180,y=0])
The variance of P will be variable P_VAR  (Q --> Q_VAR)
The covariance will be COVAR The correlation will be CORREL.
Type GO VAR_N to obtain n/n+1 statistical correction factor
...

let pcr=correl
let n=139
let a=(1-(pcr^2))/n
let b=a^0.5
let t2t=pcr/b

let nx = `t2t,return=isize`
let ny = `t2t,return=jsize`
let lon = x[gx=correl,i=1:`nx`:1] + 0*y[gy=correl,j=1:`ny`:1]
let lat = 0*x[gx=correl,i=1:`nx`:1] + y[gy=correl,j=1:`ny`:1]
let ppt = if abs(t2t[i=1:`nx`:1,j=1:`ny`:1]) ge 1.9 then t2t

let nx = `t2t,return=isize`
 !-> DEFINE VARIABLE nx = 360
let ny = `t2t,return=jsize`
 !-> DEFINE VARIABLE ny = 126
let lon = x[gx=correl,i=1:`nx`:1] + 0*y[gy=correl,j=1:`ny`:1]
 !-> DEFINE VARIABLE lon = x[gx=correl,i=1:360:1] + 0*y[gy=correl,j=1:126:1]
let lat = 0*x[gx=correl,i=1:`nx`:1] + y[gy=correl,j=1:`ny`:1]
 !-> DEFINE VARIABLE lat = 0*x[gx=correl,i=1:360:1] + y[gy=correl,j=1:126:1]
let ppt = if abs(t2t[i=1:`nx`:1,j=1:`ny`:1]) ge 1.9 then t2t
 !-> DEFINE VARIABLE ppt = if abs(t2t[i=1:360:1,j=1:126:1]) ge 1.9 then t2t

set viewport a11
fill/nokey/set/hlimits=0E:0W:20/vlimits=62.5S:62.5N:10/lev=(-inf)(-.8,.8,.2)(inf)/nolab/palette=blue_orange correl
plot/nolab/nokey/vs/ov/sym=dot ppt*lon, ppt*lat
Segmentation fault (core dumped)

exit


so my query is how to overlay the dots of the variable "ppt" on the fill plot as it is showing this error in the end.

regards, saurabh

On Wed, Feb 15, 2017 at 3:37 PM, Ryo Furue <furue@xxxxxxxxxx> wrote:
Hi Saurabh,

. . . but just made typing error while writing mail. 

I recommend copying the text from your screen and pasting it into your email message. In that way, the Ferret developers would be able to see exactly what code produced what error.

Regards,

Ryo



--


REGARDS

Saurabh Rathore
Research Scholar (PhD.)
Centre For Oceans, Rivers, Atmosphere & Land Science Technology
Indian Institute Of Technology, Kharagpur
contact :- 91- 8345984434




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

Privacy Policy | Disclaimer | Accessibility Statement