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

Simplify and tidy up FieldRecord and netcdf output #109

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

sjdaines
Copy link
Member

Add methods to disentangle FieldRecord data format conversions from netcdf input/output:

Add:

get_array_full(fr::FieldRecord) -> Array, (dimnames...)

to convert a FieldRecord into an array suitable for writing to netcdf, with corresponding FieldRecord constructor for the inverse operation.

variable_is_constant(fr::FieldRecord)

to test whether a FieldRecord is actually time-independent, and hence record dimension can be omitted when saving to netcdf. TODO PALEO still stores a record at each timestep.

Add methods to disentangle FieldRecord data format conversions
from netcdf input/output:

Add
    get_array_full(fr::FieldRecord) -> Array, (dimnames...)
to convert a FieldRecord into an array suitable for writing to netcdf,
with corresponding FieldRecord constructor for the inverse operation.

Add
    variable_is_constant(fr::FieldRecord)
to test whether a FieldRecord is actually time-independent,
and hence record dimension can be omitted when saving to netcdf
TODO PALEO still stores a record at each timestep.
@sjdaines sjdaines merged commit cf16397 into main Dec 31, 2024
3 checks passed
@sjdaines sjdaines deleted the simplify_fieldrecord branch December 31, 2024 18:09
@sjdaines sjdaines restored the simplify_fieldrecord branch December 31, 2024 18:54
@sjdaines sjdaines deleted the simplify_fieldrecord branch December 31, 2024 18:55
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