pangeo-data / pangeo-tutorial-gallery

Repo to house pangeo-tutorial notebooks for pangeo-gallery
MIT License
10 stars 13 forks source link

Xarray example point width #13

Open NickMortimer opened 3 years ago

NickMortimer commented 3 years ago

I would like to suggest that the code for area calculation be changed from:

R = 6.37e6
# we know already that the spacing of the points is one degree latitude
dϕ = np.deg2rad(1.)
dλ = np.deg2rad(1.)
dA = R**2 * dϕ * dλ * np.cos(np.deg2rad(ds.lat))
dA.plot()

to

dϕ = np.deg2rad(ds.lon.pointwidth)
dλ = np.deg2rad(ds.lat.pointwidth)

as the data seems to suggest that it 2 degree grid

image