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

Implementing space and time interpolation for HIGHTUNE-based forcing #27

Open
leifdenby opened this issue Oct 28, 2020 · 3 comments
Open
Assignees

Comments

@leifdenby
Copy link
Collaborator

Question from @stevenleeds on Teams (27/10/2020):

There are 3 strategies here:
1) Read the forcings from NetCDF every time step, this seems inefficient though.
2) Keep the forcings for the entire run in memory, at their original height levels. Interpolate in vertical every time-step.
3) Interpolate to the right vertical levels on initialisation.
Do you have a preference in this regard. I am tempted to go with 2 or 3, this only becomes an issue for long (supersite) cases in terms of reducing memory usage (the full forcings are stored in memory on every node). However, we can deal with this later if it should ever become a limitation, and is the easiest way to get something working quickly.

Related to #26

@leifdenby
Copy link
Collaborator Author

I would go with 2) or 3) as well. You're planning on doing piece-wise linear interpolation in space and time, right? In that case it might be simplest to do 3) that way you only need the 1D piecewise linear interpolation which MONC already has an implementation of: http://homepages.see.leeds.ac.uk/~earlcd/MONC/doc/releases/vn0.8/namespaceinterpolation__mod.html, then you could first interpolation onto height levels on initiation and then interpolate in time during runtime.

Also, MONC doesn't have any form of dynamic grid functionality (I don't think?) so there's no risk of the grid-levels changing over time, so it seems sensible to have the call that requests forcing information only provide the time, e.g. something like

pure function get_forcing(state_variable, time)

Maybe we should hash out together what the functions/subroutines will be called? Could make it easier to work out how to structure this.

@sjboeing
Copy link
Contributor

Sounds good. I will continue working on this simply using arrays for now. We can do the linear interpolation to get something working now, though ideally we would again use Steffen interpolation in hte longer run (although if the forcing files are high resolution it is not so important).

@sjboeing
Copy link
Contributor

sjboeing commented Feb 3, 2021

First work on this, using strategy #3, is under #34.

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

3 participants