area_global_rectilinear_grid

From: Soumik Basu <sbasu_at_nyahnyahspammersnyahnyah>
Date: Wed Oct 02 2013 - 19:37:00 MDT

Hi,

I am trying to calculate the sea ice extent from sea ice fraction data
for CAM3.1 in T85 grid.
I used the area_global_rectilinear_grid function to calculate the area
of each of the grid box. But I am trying to estimate the area over the
pole as the latitudes ends at 88.92773. For doing that I tried
calculating in the following way. But what confused me is that why the
sum of the grid areas calculated using the function is greater than the
surface area of the earth. Is there any better way to estimate the area
of the small circle over the pole?

;****************************************************
; Calculate area at each grid point
;****************************************************
; T85

nlat = 128
lat = latGau(nlat, "lat", "latitude", "degrees_north")
mlon = 256
lon = lonGlobeF(mlon, "lon", "longitude", "degrees_east")
print(lat)
area = area_global_rectilinear_grid (lat, lon, False)

areaa = dble2flt(area)

printVarSummary(areaa)
printMinMax(areaa, True)

R = 6371.220 ; in km

pi = 4d0*atan(1d0)

S_Area = 4d0*pi*R^2 ;Total surface area of the earth

print(S_Area)

Area_total = sum(areaa) ; Total area from the grid boxes

print(Area_total)

Pole_area = (S_Area - Area_total)/(10^6)*2 ; Area over the pole in 10^6
sq km

print(Pole_area)

Here are the printVarSummary results:

Variable: areaa
Type: float
Total Size: 131072 bytes
32768 values
Number of Dimensions: 2
Dimensions and sizes: [lat | 128] x [lon | 256]
Coordinates:
lat: [-88.92773..88.92773]
lon: [ 0..358.5938]
Number Of Attributes: 8
long_name : area of each grid cell
units : km^2
area_total : 5.101007e+08
area_lat : <ARRAY of 128 elements>
rearth : 6371.22
area_sphere : 5.100997e+08
area_ratio : 1.000002
typeConversion_op_ncl : double converted to float
(0)
(0) area of each grid cell: min=451.99 max=24355.4

Variable: S_Area
Type: double
Total Size: 8 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) 510099745.7121028

Variable: Area_total
Type: float
Total Size: 4 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) 5.101245e+08

Variable: Pole_area
Type: double
Total Size: 8 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) -0.04953257579445839

Thanks,
Soumik

-- 
"Numbing the pain for a while will make it worse when you finally feel 
it.
~J.K. Rowling"
*****************************************
Soumik Basu
Graduate Student, Research Assistant
International Arctic Research Center
University of Alaska Fairbanks
Fairbanks,Alaska,USA
*****************************************
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Oct 2 19:37:11 2013

This archive was generated by hypermail 2.1.8 : Tue Oct 22 2013 - 10:35:27 MDT