-
Notifications
You must be signed in to change notification settings - Fork 8
Apply the minimum to nn_i in GMesh.py #5
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
Open
nikizadehgfdl
wants to merge
32
commits into
adcroft:dev
Choose a base branch
from
nikizadehgfdl:dev
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
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 hidden or 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
merge in corrections and new developments by adcroft to GMesh
…into adcroft-dev
- I think the minimum limiting of nn_i was missing. The need for it showed up in South Pole Cap refine-sample notebook.
- Works fine for Mercator and Southern Ocean grids - Not so good for the Bipolar north cap grid (there are missing source hits) - Not tested for the displaced south pole yet - Removed the "assert"s from GMesh.py since I didn't understand them!!!!
e2eae4f to
551d433
Compare
- Imported the ice9.py tool from MOM6-examples/ice_ocean_SIS2/OM4_025/preprocessing/ice9.py - Changed ice9.py to work with python3 ( print --> print()) - Added a topog merge tool to concatenate the sub-topog files - Fixes for the create_topog_refinedSampling.py
- This tool could be generalized to be work for all resolutions
- The tool sometimes crashes by finding j=-1 for the source index i index was fixed before by limiting it to imin. Why not j? Why does this happen at all?
- ice9 was finishing producing no ocean mask since the seed was not wet. This update tries to change the seed to find a wet spot and exist if it cannot.
Limit index of hit by j=0
- In mapping topography from supergrid to grid we should average the 4 nearest neighbors instead of picking every other point. Picking every other point loses information, partcularly on land boundaries leading to losing narrow water channels to land (e.g., the Bosphorus). See the notebook refineSampleCoarsenTopography-BlackSeaDemo-p125.ipynb for details.
- The notebook zoomzoom_topo_drag.ipynb takes the source data for topography and drag elements and regrid them to the cubed-sphere model grid (C48 in this notebook). zoomzoom is based on a refine-sample-coarsen sequence of operations.
- Now we can pass the source datafile via arguments - Fix guessing the origin shift of the target grid - Fix the restriction to use every other source point
- Using ice9 algoritm
- Why not adding lon-lat to the topog.nc to facilitate inspection.
- The least square fitted plane passes through the mean data point.
This reduces the system of equations for plane slope and intercept
from 3x3 to 2x2 which has expliicit fomulas for the solution.
- Things to keep in mind and improve:
1. The height here is the mean of z for data points within a grid cell
whereas in the RSC approach it was the mean of z for data points
with the first point closest to the grid cell corner.
These two sets are different, hence different mean, prove it!
2. Can we implement the roughness calc in the RSC approach which avoids
ij looping over grid cells?
H2 after fit plane
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.
I think this line was missing in GMesh.py. It fixed a problem with refined-sampling of the Southern Cap grid.
I also deleted the old notebooks.