@@ -541,7 +541,7 @@ def compute_grid_cell_area(
541541 res: float
542542 Grid resolution in degrees
543543 bounds: tuple, dafault: None
544- (lat_min,lat_max, lon_min,lon_max) latitude and longitude bounds to compute grid cell area
544+ (lon_min, lat_min, lon_max, lat_max ) latitude and longitude bounds to compute grid cell area
545545 projection: str
546546 Ellipsoid or spherical projection to approximate Earth. To get the complete list of
547547 projections call :py:meth:`pyproj.get_ellps_map()`. Widely used projections:
@@ -560,17 +560,17 @@ def compute_grid_cell_area(
560560 --------
561561 >>> area = compute_grid_areas(res = 1, projection ="sphere", units = "m^2")
562562 """
563- geod = Geod (ellps = projection ) # Use specified ellipsoid model
563+ geod = Geod (ellps = projection )
564564
565565 if not bounds :
566- lat_min , lat_max , lon_min , lon_max = - 90 , 90 , - 180 , 180
566+ lon_min , lat_min , lon_max , lat_max = - 180 , - 90 , 180 , 90
567567 else :
568- lat_min , lat_max , lon_min , lon_max = bounds [0 ], bounds [1 ], bounds [2 ], bounds [3 ]
568+ lon_min , lat_min , lon_max , lat_max = bounds [0 ], bounds [1 ], bounds [2 ], bounds [3 ]
569569
570570 lat_edges : np .ndarray = np .linspace (lat_min , lat_max , int (180 / res ))
571571 lon_edges : np .ndarray = np .linspace (lon_min , lon_max , int (360 / res ))
572572
573- area = np .zeros ((len (lat_edges ) - 1 , len (lon_edges ) - 1 )) # Create an empty grid
573+ area = np .zeros ((len (lat_edges ) - 1 , len (lon_edges ) - 1 ))
574574
575575 # Iterate over consecutive latitude and longitude edges
576576 for i , (lat1 , lat2 ) in enumerate (zip (lat_edges [:- 1 ], lat_edges [1 :])):
0 commit comments