jpython method calculate area for mercator grid

How do I...?
Post Reply
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

jpython method calculate area for mercator grid

Post by ghansham »

Hi all
I have my satellite data projected on mercator
grid and I using scatter analysis and I am seeing
the calculate area in jpython method takes lot
of time in execution when I draw a box.
Does anybody has idea?
regards
Ghansham
User avatar
Rick
Posts: 404
Joined: Fri Jan 16, 2009 8:20 pm

Re: jpython method calculate area for mercator grid

Post by Rick »

Hi Ghansham,

It is taking longer than expected to investigate the problem, so I created Inquiry 1868 to address the question.

Rick
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: jpython method calculate area for mercator grid

Post by ghansham »

Hi rick sir
I am really caught up with som e high
priority work. But its good to know
that you could reproduce it.
Regards
Ghansham
User avatar
beckys
Posts: 172
Joined: Wed Jan 07, 2009 7:50 pm

Re: jpython method calculate area for mercator grid

Post by beckys »

Hi Ghansham,

Can you please post an example of your code that uses the jython method to calculate the area?

Thanks,
Becky
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: jpython method calculate area for mercator grid

Post by joleenf »

Ghansham,

Are you using createAreaField and computeSum?

Joleen
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: jpython method calculate area for mercator grid

Post by ghansham »

Hi all
if you are receiving insat3d data,
Just try with files whose name ends with
L1C_SGP.h5. Do a scatter plot of any two
bands in mcidasv.When you do compute
statistics, you will notice the delay.
I think Rick Sir also noticed similar behaviour in
some dataset.
regards
Ghansham
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: jpython method calculate area for mercator grid

Post by joleenf »

Ghansham,

I apologize, I was confused and off-topic. I was not thinking of the scatter plot analysis.

Joleen
User avatar
ghansham
Posts: 175
Joined: Thu Nov 11, 2010 5:40 pm

Re: jpython method calculate area for mercator grid

Post by ghansham »

Hi Joleen
Crux is that the area calculation
method is bottleneck is described
cases. How much does it matter if
I found it via scatter plot route?
:-)
Regards
Ghansham
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: jpython method calculate area for mercator grid

Post by joleenf »

Ghansham,

I am not sure how the Area is being calculated in the scatter analysis, so my experience with calculating an area and getting the size is based on NPP data and GOES-R data via a jython script, without using the hydra statistics. When I used them via the jython shell, createAreaField and computeSum have been quick. I had been using the method with a data field and a mask field (created with 1 and nan). So this is a different than what you are trying to achieve.

Code: Select all

areaField=createAreaField(dataField)   #calculate the area of each pixel
inputMask=mask(dataField,'>',252,1)           #filter the data desired
indices=find(inputMask,'==',1)                     #find where data exists in array
theSum=computeSum(areaField,indicies)  #calculate the sum


Joleen
Post Reply