-
Notifications
You must be signed in to change notification settings - Fork 12
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
Workaround for loading old .jld2 files #262
Comments
thanks for reporting. Perhaps its worthwhile to add an |
Note that this happens only if one tries to open a JLD2 file saved on GeoParams <= 0.6.8 using GeoParams >=0.7.0. The reasons is that chemical diffusion was added to |
I see that; yet it cannot be excluded that we have further additions in the future, which would be handled in that case by upgrading the function |
function upgrade_GeoUnits(a)
return GEO_units(length=a.length, temperature=a.temperature, stress=a.stress, viscosity=a.viscosity)
end This would do the trick currently |
I would slightly modify it: function upgrade_GeoUnits(a::GEO_units)
return GEO_units(length=a.length, temperature=a.temperature, stress=a.stress, viscosity=a.viscosity)
end can you make a PR? |
I don't think this one works because
|
Would have to be this: function upgrade_GeoUnits(a::JLD2.ReconstructedMutable)
return GEO_units(length=a.length, temperature=a.temperature, stress=a.stress, viscosity=a.viscosity)
end for a PR, where would I put it? |
I guess it should go into |
This will fail as |
If you are loading an old .jld2 file that contains a
GeoUnits
object, you will encounter this warningIf you then want to use
dimensionalize
with thisGeoUnits
object, you will get an error message becauseJLD2
was not able to properly load it. I discussed this with @albert-de-montserrat and we did not find a way to fix this, so I am showing a workaround for people that run into the same problem. This assumes that theGeoUnits
object in your old file is calledCD
You can now use
CD2
to insidedimensionalize
andnondimensionalize
againThe text was updated successfully, but these errors were encountered: