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

Tests InputOutput read are not very stringent #1996

Open
Sbozzolo opened this issue Sep 18, 2024 · 0 comments
Open

Tests InputOutput read are not very stringent #1996

Sbozzolo opened this issue Sep 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Sbozzolo
Copy link
Member

I am finding in ClimaAtmos that there are some issues with reading vectors from HDF5 files. Indeed, this is not something that is carefully checked by the current tests. For example,

uₕ = map(_ -> Geometry.Covariant1Vector(0.0), coords)
w = map(_ -> Geometry.Covariant3Vector(0.0), face_coords)
Y = Fields.FieldVector(Yc = Yc, uₕ = uₕ, w = w)
# write field vector to hdf5 file
filename = tempname()
writer = InputOutput.HDF5Writer(filename, context)
InputOutput.write!(writer, "Y" => Y) # write field vector from hdf5 file
reader = InputOutput.HDF5Reader(filename, context)
restart_Y = InputOutput.read_field(reader, "Y") # read fieldvector from hdf5 file
close(reader)
@test restart_Y == Y # test if restart is exact

only checks trivial vectors of 0.

The extruded case doesn't even check for vectors.

@Sbozzolo Sbozzolo added the bug Something isn't working label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant