JiaweiZhuang / cubedsphere

Cubed-Sphere data processing with xarray
MIT License
17 stars 6 forks source link

Add area calculation capabilities with cubedsphere.calc_cs_area #5

Open sdeastham opened 4 years ago

sdeastham commented 4 years ago

This provides users with an easy function to calculate the area in each grid cell of a cubed sphere grid. Also, incremented the micro version number.

JiaweiZhuang commented 4 years ago

Thanks Seb! However I think further updates should probably go to GCPy (#6).

Also, a unit test for such function is highly desirable. Here a simple test would be

from numpy.testing import assert_almost_equal
assert_almost_equal(np.sum(area_of_unit_sphere), 4 * np.pi)
sdeastham commented 4 years ago

Got it. To be honest I’m maintaining a separate repo from gcpy (gcgridobj); I’ll put it in there instead. Thanks (and thanks for the unit test idea!)!

From: Jiawei Zhuang notifications@github.com Sent: Thursday, January 16, 2020 8:10 PM To: JiaweiZhuang/cubedsphere cubedsphere@noreply.github.com Cc: Sebastian Eastham seastham@mit.edu; Author author@noreply.github.com Subject: Re: [JiaweiZhuang/cubedsphere] Add area calculation capabilities with cubedsphere.calc_cs_area (#5)

Thanks Seb! However I think further updates should probably go to GCPy (#6https://github.com/JiaweiZhuang/cubedsphere/issues/6).

Also, a unit test for such function would be highly desirable. Here a simple test should be assert sum_of_unit_sphere == 4 * np.pi

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/JiaweiZhuang/cubedsphere/pull/5?email_source=notifications&email_token=ABSP43FKJZUDJ2CLASS37S3Q6EAOLA5CNFSM4KH3QZU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJGDLKI#issuecomment-575419817, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABSP43FESIRDNXBTYXGJOHTQ6EAOLANCNFSM4KH3QZUQ.