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

Expected and actual DOFS #296

Open
alvv1986 opened this issue Dec 13, 2024 · 2 comments
Open

Expected and actual DOFS #296

alvv1986 opened this issue Dec 13, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@alvv1986
Copy link

Name and Institution (Required)

Name: Angel Vela
Institution: Aarhus University

New IMI feature or discussion

Hi IMI community,
Running the preview mode for a small domain over northern Europe provides a expected DOFS of ~12, but then when I run the inversion, it is calculated an actual DOFS of ~2. Can anyone please explain what might be causing this significant difference?
Thank you

@elenagjyli
Copy link

Here is another example of this issue as I have faced it a lo t during my work.
The preview gives expDOFs=41.82352 and from the notebook visualisation from the inversion the real DOFs=6.7951803
In most of my runs I notice that the difference between the expected and the real DOFs is more than 15.
But this is cancelling the value of the preview run, as it always gives a very big number.

imi_output.log
Neth_May_June_2019_g1_p1.pdf

@msulprizio
Copy link
Collaborator

msulprizio commented Jan 28, 2025

Hi @alvv1986 and @elenagjyli. Thanks for writing. We were able to confirm this is happening for other regions as well. @laestrada tells me it is because of the updates in pull request #269. The calculation of DOFs in the IMI preview was updated there because the expected DOFs were previously too low. In particular, the mask around observations was expanded to account for transportation (see code below). Two concentric rings are currently used which was found to work well for the Permian case but now we see it might not work for other regions. It may be that we need to reconsider this code to better estimate DOFs across all regions in the IMI preview.

# Following eqn. 11 of Nesser et al., 2021 we increase the mask
# size by adding concentric rings to mimic transport/diffusion
# when counting observations. We use 2 concentric rings based on
# empirical evidence -- Nesser et al used 3.
structure = np.ones((5, 5))
buffered_mask = binary_dilation(mask, structure=structure)
buffered_mask = xr.DataArray(
buffered_mask,
dims=state_vector_labels.dims,
coords=state_vector_labels.coords,
)

@msulprizio msulprizio self-assigned this Jan 28, 2025
@msulprizio msulprizio added the bug Something isn't working label Jan 28, 2025
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

3 participants