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

Meaning of variables in ''gridded_posterior.nc" and "inversion_result.nc" datasets. #298

Open
elenagjyli opened this issue Dec 16, 2024 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@elenagjyli
Copy link

elenagjyli commented Dec 16, 2024

Name: Elena Gjyli
Institution: University of Aarhus
Hi everyone :),
After running the inversion with IMI version 2.0, I get these files: ''gridded_posterior.nc and "inversion_result.nc".
When opening them with xarray in Python I can see that those datasets contain the next variables:
'ScaleFactor','S_post' and 'A' in the first nc file and 'KTinvSoK','KTinvSoyKxA','ratio','xhat','S_post' and 'A' in the second nc file.
Is there any documentation of what those variables represent?
We need to know what exactly those variables mean so we can be able to create the right graphs.
Thank you!

@msulprizio msulprizio self-assigned this Dec 16, 2024
@msulprizio
Copy link
Collaborator

The output file gridded_posterior.nc contains the following variables projected onto the 2D inversion grid:

  • ScaleFactor: posterior emission scale factors
  • S_post: diagonal elements of the posterior error covariance matrix
  • A: diagonal elements of the averaging kernel matrix

The output file gridded_posterior.nc contains the following variables projected onto the 2D inversion grid:

  • xhat: Posterior scaling factors
  • KTinvSoK : K^T*inv(S_o)*K (part of inversion equation, see code snippet below)
  • KTinvSoyKxA: K^Tinv(S_o)(y-K*xA) (part of inversion equation, see code snippet below)
  • ratio: Change from prior (aka delta_optimized where xhat = 1 + delta_optimized])
  • S_post: Posterior error covariance matrix
  • A: Averaging kernel matrix

# = xA + inv(gamma * K^T*inv(S_o)*K + inv(S_a)) * gamma * K^T*inv(S_o) * (y-K*xA)
# (--------------) (-----------------------)
# Expression 1 Expression 2

These variables are documented in the code but I will work on adding some text to our documentation and possibly to the netCDF files for clarity.

@msulprizio msulprizio added the question Further information is requested label Dec 16, 2024
@msulprizio
Copy link
Collaborator

See also the visualizatrion_notebook.ipyb (also included in the inversion output directory) for sample python code for plotting those output and the existing documentation at https://imi.readthedocs.io/en/latest/other/listing-directory-contents.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants