North America landmass extractiong using Land_mask function in idl [message #91477] |
Fri, 17 July 2015 17:27 |
siumtesfai
Messages: 62 Registered: April 2013
|
Member |
|
|
Hello All,
I have Climate model data with the following dimension
data = [144,73] ; longitude X latitude
I am interested in analyzing the landmass only. I would exclude ocean data.
I learned that there is idl function that does what I am interest to do.
That is land_mask.pro
However, here is my problem
land = land_mask (resolution=[2.5,2.5], lat=lat,lon=lon)
This would provide a dimension of
land = [ 144,72] :
0 represent ocean
1 represent land
I would do the following to get the landmass data which I know it has a dimension of 144 longitude by 73 latitude with 2.5 by 2.5 resolution
landmass= fltarr(144,73)
FOR i=0,143 do begin
FOR j=0,72 do begin
x=reform(land(i,j))
y=where(x GT 0 )
if y(0) GE 0 then begin
landmass(i,j)=data(i,j)
endif else begin
landmass(i,j)= !F.values_NAN
endelse
ENDFOR
ENDFOR
Problem is out of range latitude range that is the j loop
Additional example is below
land = LAND_MASK( lat=lat,lon=lon,Limit=[-170,30,-50,75],resolution=[2.5,2.5])
Land_mask function provide the following dimension for north america domain
land = [48,18]
It should have given the following dimension
land =[49,17]
What am i missing ?
Thank you very much for you help
Best regards
|
|
|