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

Storing additional fields #111

Open
suhasdl opened this issue Aug 5, 2019 · 1 comment
Open

Storing additional fields #111

suhasdl opened this issue Aug 5, 2019 · 1 comment
Assignees

Comments

@suhasdl
Copy link
Contributor

suhasdl commented Aug 5, 2019

  • CliMT version: 0.16.9
  • Python version: 3.7.3
  • Operating System: Ubuntu

Description

Would it be possible to store additional fields of interest, say like geopotential or potential temperature during the run. The model uses surface geopotential in some of the modules but not the geopotential. So the model is able to save surface geopotential but not the 3D geopotential field.

Also is there a way to restart the model from certain time step. I was not able to find anything about restart files in the docs.

Thanks,
Suhas

@JoyMonteiro
Copy link
Member

I have been thinking about this a bit, and the straightforward way would be to write a DiagnosticComponent which takes in the relevant fields and produces fields like geopotential and potential temperature. This way, the code will work for any model (1D, 3D) without having to replicate code.

Let me think a bit more how this can be done.

It should be quite easy to restart the model from the output. If you read in the data as a Dataset

fields = xarray.open_dataset('time_10.nc')
state = climt.get_default_state([...])
state.update(fields)

should work (not tested) since Dataset provides a dictionary like interface. Note that
this will only work if all fields required as inputs for all components of the model are present
in the nc file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants