You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Typically you can just cosine-weight for a rectilinear grid, but you need grid cell areas if you're doing some sort of integration.
I've used code borrowed from my advisor in the past to create a cellarea variable for a 1x1deg rectilinear grid. It would be nice to just have a function here to pass in an arbitrary grid.
This is taken from a notebook made by @hdrake. I'd like to compare the results with the other method I used and implement the below method.
Rearth=6.378E6# radius of Earth in meters# a DataArray that gives grid cell areas on the lat/lon grid (in units of m^2)area= (np.deg2rad(dlat)*Rearth) * (np.deg2rad(dlon)*Rearth*np.cos(np.deg2rad(ds_out.lat))) *xr.ones_like(ds_out.lon)
The text was updated successfully, but these errors were encountered:
Typically you can just cosine-weight for a rectilinear grid, but you need grid cell areas if you're doing some sort of integration.
I've used code borrowed from my advisor in the past to create a
cellarea
variable for a 1x1deg rectilinear grid. It would be nice to just have a function here to pass in an arbitrary grid.This is taken from a notebook made by @hdrake. I'd like to compare the results with the other method I used and implement the below method.
The text was updated successfully, but these errors were encountered: