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

Interacting through BMI can lead to odd soil_temperature behavior. #272

Open
BSchilperoort opened this issue Dec 6, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@BSchilperoort
Copy link
Contributor

I used the example dataset from zenodo, and STEMMUS_SCOPE 1.6.1 through the BMI.

I set the temperature at one time step with:

        model.set_value_at_indices(
            "soil_temperature",
            np.array([10, 11, 12]),
            np.array([50, 50, 50]),
        )

But depending on at which model time step I do this I get weird results:

ezgif-5-042fe0a8ad

There are a few time steps where the set temperature impulse disappears completely, or the temperature jumps around.

@BSchilperoort BSchilperoort added the bug Something isn't working label Dec 6, 2024
@MostafaGomaa93
Copy link
Contributor

MostafaGomaa93 commented Dec 10, 2024

I think we need to confirm if this bug is really from BMI or from the code itself. It could be from the code itself because in some of my trials (as below), I also receive extremely high-temperature values (up to 300 C) which of course there is a bug, and sometimes when I change the soil parameters, this bug is gone.

The example below runs without BMI and without groundwater coupling also

SoilTemp_bug

@BSchilperoort
Copy link
Contributor Author

I think we need to confirm if this bug is really from BMI or from the code itself

it's for sure due to the model code. the BMI is just a way to get the model to misbehave clearly.

@yijianzeng
Copy link
Contributor

I think we need to confirm if this bug is really from BMI or from the code itself

it's for sure due to the model code. the BMI is just a way to get the model to misbehave clearly.

Hi Bart, not sure how the test is done. Is it using an existing site? If you provide a site name, we can have a further look. The problem is the numerical convergence from two potential parts:

  1. 'ebal' in SCOPE cannot reach the energy balance criteria, and the coupled model does not converge. We'd observed this in quite some situations.

  2. in STEMMUS, originally, we allowed the model to have a flexible time step ranging from 1s to 30 mins. Such treatment is to address the fact that some dramatic changes in state variables (either matric potential, soil temperature, or atmospheric pressure) will lead to numerical divergence. With a flexible time step, then the changes in state variables will be reduced, and the model can come to numerical stability again.

But now, since SCOPE has a fixed 30-minute interval, we'd fixed the time step of STEMMUS-SCOPE as 30 minutes as well, which may eventually lead to numerical divergence.

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