Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xarray example point width #13

Open
NickMortimer opened this issue May 21, 2021 · 0 comments
Open

Xarray example point width #13

NickMortimer opened this issue May 21, 2021 · 0 comments

Comments

@NickMortimer
Copy link

NickMortimer commented May 21, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant