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

Extract Features that would be nice with RDRS #180

Closed
1 task done
juliettelavoie opened this issue Mar 31, 2023 · 0 comments · Fixed by #182
Closed
1 task done

Extract Features that would be nice with RDRS #180

juliettelavoie opened this issue Mar 31, 2023 · 0 comments · Fixed by #182
Labels
enhancement New feature or request

Comments

@juliettelavoie
Copy link
Contributor

juliettelavoie commented Mar 31, 2023

Addressing a Problem?

In the extract step of my ESPO-G workflow, I add a few steps to handle RDRS.

  1. I want to cut my region on rlat and rlon. From what I understand, clisops only cuts on lat and lon.
  2. I want to add nans from my mask.

Potential Solution

  1. Add a method sel to region that would not be a call to clisops, just
arg_sel = {dim:slice(*map(float, bounds)) for dim, bounds in region['sel'].items()}
ds= ds.sel(**arg_sel )
  1. Add a mask arg to add NaNs. Ideally, I would want to be able to ask for the mask in search_data_catalogs with {mask:fx} in variables_and_freq. Then, if mask is True. Apply mask on the other variables. mask could also be a dataarray if the mask is not in a catalogue.
ds= ds.where(mask == True)

Additional context

Let me know you thoughts on the best way to implement the mask.

Right now, this is all in my ESPO-G workflow, but it is not very clean... It would be better in extract.

Contribution

  • I would be willing/able to open a Pull Request to contribute this feature.
@juliettelavoie juliettelavoie added the enhancement New feature or request label Mar 31, 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

Successfully merging a pull request may close this issue.

1 participant