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

Introduce z_sampling_method, remove disable_vertical_interpolation #47

Merged
merged 1 commit into from
May 21, 2024

Conversation

Sbozzolo
Copy link
Member

@Sbozzolo Sbozzolo commented May 19, 2024

The NetCDF writer was originally designed for ClimaAtmos. As such, it uses some fake pressure levels for vertical sampling as default. This is generally not applicable/useful. This commit generalized the method to sample points on the vertical direction introducing a new type AbstractZSamplingMethod.

AbstractZSamplingMethod has to concrete subtypes:

  • LevelsMethod (equivalent to disable_vertical_interpolation)
  • FakePressureLevelsMethod (equivalent to previously default behavior)

This opens up the possibility to also define LinearMethod, for linear sampling, and LogMethod, for log sampling.

The default was changed to LevelsMethod and disable_vertical_interpolation was deprecated.

Closes #6

Sbozzolo added a commit to CliMA/ClimaAtmos.jl that referenced this pull request May 19, 2024
Sbozzolo added a commit to CliMA/ClimaAtmos.jl that referenced this pull request May 19, 2024
Copy link
Member

@AlexisRenchon AlexisRenchon left a comment

Choose a reason for hiding this comment

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

Just a small comment, there is a typo in the commit message of this PR (and same typo in the description of the PR in Conversation),

"AbstractZSamplingMethod has to concrete subtypes:"

not to, but two (2)

NEWS.md Show resolved Hide resolved
@Sbozzolo
Copy link
Member Author

Just a small comment, there is a typo in the commit message of this PR (and same typo in the description of the PR in Conversation),

"AbstractZSamplingMethod has to concrete subtypes:"

not to, but two (2)

Thank you!

The NetCDF writer was originally designed for ClimaAtmos. As such, it uses some
fake pressure levels for vertical sampling as default. This is generally not
applicable/useful. This commit generalized the method two sample points on the
vertical direction introducing a new type `AbstractZSamplingMethod`.

`AbstractZSamplingMethod` has to concrete subtypes:
- `LevelsMethod` (equivalent to `disable_vertical_interpolation`)
- `FakePressureLevelsMethod` (equivalent to previously default behavior)

This opens up the possibility to also define `LinearMethod`, for linear
sampling, and `LogMethod`, for log sampling.

The default was changed to `LevelsMethod` and `disable_vertical_interpolation`
was deprecated.
@Sbozzolo Sbozzolo merged commit cb9e169 into main May 21, 2024
7 checks passed
Sbozzolo added a commit to CliMA/ClimaAtmos.jl that referenced this pull request May 21, 2024
Sbozzolo added a commit to CliMA/ClimaAtmos.jl that referenced this pull request May 22, 2024
Sbozzolo added a commit to CliMA/ClimaAtmos.jl that referenced this pull request May 22, 2024
Sbozzolo added a commit to CliMA/ClimaAtmos.jl that referenced this pull request May 22, 2024
Sbozzolo added a commit to CliMA/ClimaAtmos.jl that referenced this pull request May 22, 2024
Sbozzolo added a commit to CliMA/ClimaAtmos.jl that referenced this pull request May 22, 2024
Sbozzolo added a commit to CliMA/ClimaAtmos.jl that referenced this pull request May 22, 2024
Sbozzolo added a commit to CliMA/ClimaAtmos.jl that referenced this pull request May 22, 2024
Sbozzolo added a commit to CliMA/ClimaAtmos.jl that referenced this pull request May 22, 2024
Sbozzolo added a commit to CliMA/ClimaAtmos.jl that referenced this pull request May 23, 2024
oalcabes pushed a commit to CliMA/ClimaAtmos.jl that referenced this pull request Aug 30, 2024
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.

Remove hardcoded pressure levels in NetCDFWriter
2 participants