-
Notifications
You must be signed in to change notification settings - Fork 1
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
Simplify and standardize dimensions and coordinates #151
Merged
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
Simplify and align with Common Data Model Overall design: - dimensions now just have a name and a size - coordinates can optionally be attached to a dimension (currently this are separate Dicts etc) - coordinates are specified by (coordinate) variable name which is a "standard" PALEO variable. Coordinate values then are looked up as needed Changes: - NamedDimension now just contains name, size. Remove FixedCoord (simpler version now in PALEOmodel) - add functions get_dimensions get_dimension set_coordinates! get_coordinates - simplify grids - remove coordinates, which can now be defined as "standard" PALEO variables - remove get_region (similar functionality now in PALEOmodel) - Experimental implementation of Julia CommonDataModel interface in CommonDataModelExt extension.
sjdaines
added a commit
to PALEOtoolkit/PALEOmodel.jl
that referenced
this pull request
Dec 29, 2024
Simplify and align with Common Data Model See corresponding PALEOboxes PR PALEOtoolkit/PALEOboxes.jl#151 TODO: this commit still includes old and now unused code Changes: - Add FixedCoord from PALEOboxes - generalized to handle 'bounds' ie Array size(2, ncells) as a simpler way of specifying cell edges (cf CF conventions) - OutputMemory now based on FieldRecord, not DataFrame - save / load to jld2 removed - updates to netcdf output format - Simpler and more generic get_array -> FieldArray from FieldRecord - replaces old approach using get_region
sjdaines
added a commit
to PALEOtoolkit/PALEOsediment.jl
that referenced
this pull request
Dec 30, 2024
…s updates See PRs: PALEOtoolkit/PALEOboxes.jl#151 PALEOtoolkit/PALEOmodel.jl#107 Example of change needed from ReactionSedimentGridn1D do_sediment_setup_grid: # attach coordinates to grid for output visualisation etc if isdefined(PB, :set_coordinates!) # PALEOboxes >= 0.22 PB.set_coordinates!(rj.domain.grid, "cells", ["zmid", "zlower", "zupper"]) else empty!(rj.domain.grid.z_coords) push!(rj.domain.grid.z_coords, PB.FixedCoord("zmid", grid_vars.zmid, PB.get_variable(m, "zmid").attributes)) push!(rj.domain.grid.z_coords, PB.FixedCoord("zlower", grid_vars.zlower, PB.get_variable(m, "zlower").attributes)) push!(rj.domain.grid.z_coords, PB.FixedCoord("zupper", grid_vars.zupper, PB.get_variable(m, "zupper").attributes)) end
Move CommonDataModel extension changes to a separate PR
sjdaines
changed the title
Work-in-progress updating dimensions and coordinates
Simplify and standardize dimensions and coordinates
Dec 30, 2024
sjdaines
referenced
this pull request
in PALEOtoolkit/PALEOmodel.jl
Dec 31, 2024
Simplify and tidy up FieldRecord and netcdf output
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.
Simplify and align with Common Data Model
Overall design:
Changes: