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

Perform calculations on subset of levels #301

Open
jdossgollin opened this issue Nov 8, 2018 · 2 comments
Open

Perform calculations on subset of levels #301

jdossgollin opened this issue Nov 8, 2018 · 2 comments

Comments

@jdossgollin
Copy link
Contributor

Since aospy is helpful as an abstraction of variables, calculations, etc, it would be helpful to have a single place to specify the levels (I'm thinking pressure levels but might be possible on sigma levels) at which to perform calculations. For example, one might be interested in calculating 500hPa geopotential height but not 700hPa or 200hPa. If the data are stored on the same file, the only way to do this (that I can figure out?) at present is to do so as part of a preprocessing function

@spencerahill
Copy link
Owner

We actually had this in a very hack-ish form at one point; in fact Calc still accepts a level kwarg in its constructor, which then gets assigned to the Calc's level attribute. But the logic to do anything with it subsequently got removed as part of our efforts to clean-up Calc and re-add things in a cleaner way as the need arises.

So it seems that the need has arisen! Which means we should think through how to go about implementing this. The logic of selecting particular levels from the data would belong in data_loader rather than Calc. Within Calc, we have to decide what to do regarding vertical reductions and how the results get outputted. All of that is doable.

@jdossgollin
Copy link
Contributor Author

Got it -- that's helpful, because I did in fact see the level attribute in the Calc, which was a bit confusing.

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

No branches or pull requests

2 participants