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

OutputMemory add user_data Dict #95

Merged
merged 1 commit into from
May 21, 2024
Merged

OutputMemory add user_data Dict #95

merged 1 commit into from
May 21, 2024

Conversation

sjdaines
Copy link
Member

PALEOmodel.OutputWriters.OutputMemory can now store key-value pairs in a 'user_dict' field, which is written and read from netcdf output.

This is a Julia Dict, and can be used to store arbitrary metadata, eg to label file output to reconstruct a model grid. It can either be supplied when the OutputMemory is created, or modified later.

NB: available types are restricted to those that are compatible with NetCDF attribute types,
ie Float64, Int64, String, Vector{Float64}, Vector{Int64}, Vector{String}

See OutputMemory docstring for details.

PALEOmodel.OutputWriters.OutputMemory can now store key-value pairs in a 'user_dict'
field, which is written and read from netcdf output.

This is a Julia Dict, and can be used to store arbitrary metadata, eg to label file output to reconstruct a model grid.
It can either be supplied when the OutputMemory is created, or modified later.

NB: available types are restricted to those that are compatible with NetCDF attribute types,
    ie Float64, Int64, String, Vector{Float64}, Vector{Int64}, Vector{String}

See OutputMemory docstring for details.
@sjdaines sjdaines merged commit 9109f57 into main May 21, 2024
3 checks passed
@sjdaines sjdaines deleted the user_data branch May 21, 2024 16:17
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.

1 participant