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

automatic spatial dimensional names #1

Open
senclimate opened this issue Nov 3, 2023 · 0 comments
Open

automatic spatial dimensional names #1

senclimate opened this issue Nov 3, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@senclimate
Copy link
Owner

Description

Current version: v0.1.1 has default spatial dims [lat, lon]. It is nice to have improvement to include spatial dims' name automatically (for instance, latitude and longitude).

self.nlat = len(grid_ds["lat"])
self.nlon = len(grid_ds["lon"])
self.fvor = 2.0 * omega * np.sin(np.deg2rad(grid_ds["lat"]))

spatial_dims = ["lat", "lon"]

xspharm/xspharm/xspharm.py

Lines 317 to 319 in c36983f

return input_data.transpose("lat", "lon", other_dims[0])
elif len(other_dims) >= 2:
return input_data.stack(nt=other_dims).transpose("lat", "lon", "nt")

xspharm/xspharm/xspharm.py

Lines 331 to 333 in c36983f

return sp_data.transpose(other_dims[0], "lat", "lon")
elif len(other_dims) >= 2:
return sp_data.unstack("nt").transpose(*other_dims, "lat", "lon")

@senclimate senclimate added the enhancement New feature or request label Nov 3, 2023
@senclimate senclimate self-assigned this Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant