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

Suggest target latitudes so that stretched grid would have both NS poles #159

Merged
merged 3 commits into from
May 19, 2022

Conversation

nikizadehgfdl
Copy link
Contributor

In general for a given stretch factor and target latitude the resulting stretch grid will not have the poles as grid points.
This may cause issues later with other tools such as exchange grid generator manifested as tiling errors and cells with a wrong land mask.

- This commit adds a helper function to suggest target latitudes
  for which the generated stretched grid would include the North pole
  or the South pole (but not both) as grid points.
- The value of suggested latitude is the closest to the input one
  that the user asks.
- Having the poles as grid points have benefits of a more accurate
  exchange grid. Otherwise tiling errors creep out in the generated
  exchange grid.
- Implement the condition for the stretched grid to have both poles as grid
  points for a give stretch factor.
- This subroutine lists possible target latitudes for a given stretch factor
  close to the requested target latitude such that the final grid has both
  poles as grid points.
- Having a grid that includes both poles potentially avoids later issues with
  exchange grids.
- Implement the condition for the stretched grid to have both poles as grid
  points for a give stretch factor.
- This subroutine lists possible target latitudes for a given stretch factor
  close to the requested target latitude such that the final grid has both
  poles as grid points.
- Having a grid that includes both poles potentially avoids later issues with
  exchange grids.
Copy link
Contributor

@ngs333 ngs333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikizadehgfdl
Is the functionality in suggest_target_lats() being used by someone now or expected to
be used as is ? If so, should it be an option (and also user documentation in make_hgrid?
If not, should it just be commented out or possibly only use if compile-time flag is set?

@nikizadehgfdl
Copy link
Contributor Author

The functionality is not being used right now. There is potential benefits for the users to see the message.
We could add an option to use a suggested value, but this is not the intent of this PR as there are multiple "good" values for target the latitude above and below the requested one. The intent is to provide the information in the output.

@ngs333
Copy link
Contributor

ngs333 commented May 23, 2022

Hi @nikizadehgfdl
The merge was reverted in #167.
The problem is described there.

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

Successfully merging this pull request may close these issues.

2 participants