-
Notifications
You must be signed in to change notification settings - Fork 40
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
Flexible interpolation ("regridding") using YAC #546
Draft
ckhroulev
wants to merge
61
commits into
dev
Choose a base branch
from
ckhrulev/interpolation-with-yac
base: dev
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It reads valid range information from a file, which is then used to check if data in this same file falls within this valid range. I don't know why I wrote this code: right now I think we should warn about valid ranges *we* know about, e.g. minimum of 0 for ice thickness -- and not others.
This will make it possible to allocate InputInterpolationXXX from within Grid without messing with shared pointers and worrying about ownership.
…as to be a CRS See https://stackoverflow.com/questions/71823105/migrating-to-proj-api-6-without-forcing-crs-input A better option might be to try to avoid using proj_create_crs_to_crs().
This is needed so that PISM's C++ code does not have include YAXT's header files, which are C-only.
We cannot create more than one grid called "internal".
…f a global attribute
Also: better error messages.
Amazing! 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains changes needed to implement flexible interpolation. The goal is to reduce the amount of pre-processing needed to run PISM with some publicly available datasets, e.g. bed topography and RCM outputs.
Once this work is finished, users will be able to
-regrid_file XXX.nc -regrid_vars YYY,ZZZ
) from a file that uses a fine grid (e.g. a BedMachine topography dataset) to a coarser grid used by a simulation. Here conservative interpolation is needed to avoid grid aliasing issues.The interpolation part of this PR is more-or-less complete. I may need to take care of some corner cases, though.
Most of the remaining work is related to getting projection information from an input file, including the input file used as a basis for PISM's internal 2D grid.
I decided to support input files containing CF-style "grid mapping" variables and added code processing these.
Checklist
CHANGES.rst