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

About 'K_stable.npy' and 'fullscale_rates.json' #30

Open
ChenLumen opened this issue Jul 12, 2021 · 11 comments
Open

About 'K_stable.npy' and 'fullscale_rates.json' #30

ChenLumen opened this issue Jul 12, 2021 · 11 comments

Comments

@ChenLumen
Copy link

Hi, I don't konw how the 'K_stable.npy' and 'fullscale_rates.json' files were generated. I guess the 'K_stable.npy' file were generated when ran the 'stabilization.py' file? But how did you create the another one?

@ChenLumen
Copy link
Author

Hi, a bug appears when I run this file:

Traceback (most recent call last):
File "/home/mingchenliu/workspace/Program/multi-area-model-master/figures/SchueckerSchmidt2017/stabilization.py", line 71, in
data[iteration] = utils.compute_iteration(7, fac_nu_ext_5E_list,
File "/home/mingchenliu/workspace/Program/multi-area-model-master/figures/SchueckerSchmidt2017/utils.py", line 114, in compute_iteration
results = np.vstack((results, r))
File "<array_function internals>", line 5, in vstack
File "/home/mingchenliu/anaconda3/envs/my_nest/lib/python3.8/site-packages/numpy/core/shape_base.py", line 282, in vstack
return _nx.concatenate(arrs, 0)
File "<array_function internals>", line 5, in concatenate
ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 2, the array at index 0 has size 3000 and the array at index 1 has size 3001

@jarsi
Copy link
Collaborator

jarsi commented Jul 29, 2021

Hi,
the K_stable.npy file was created, as you already pointed out, by running stabilization.py. I also run into the same error as you. I have to admit I am not really familiar with the stabilization method. I would assume that the error you posted is due to the wrong size of the results array, changing its size to

results = np.zeros((0, 254, int(theory_params['T'] / theory_params['dt'] + 1)))

looks reasonable and resolves this error for me. But after that I ran into an assertion error. This certainly will need some more in depth analysis.

Considering the fullscale_rates.json file. I don't know how it was created. My guess would be that these are just rates extracted from a stable fullscale simulation.

@ChenLumen
Copy link
Author

OK, I got it. But I got a wrong figure when I run SchueckerSchmidt2017/Fig7_stabilization_analysis.py. As my figure shown, the iteration_1 is stability before fac_nu_5E increased 1.07435, it's different from the result of your paper. Can you help me? @jarsi @AlexVanMeegen

选区_022

I didn't plot iteration_5.

@ChenLumen
Copy link
Author

I run the SchueckerSchmidt2017/stabilization.py file, no changed except @jarsi above said.

@jarsi
Copy link
Collaborator

jarsi commented Sep 30, 2021

I haven't run the script myself yet, but the figure that is included in the repo shows the same behavior you are describing. I don't know why this is the case and it certainly seems to wrong, but will look into it as soon as possible.

@ChenLumen
Copy link
Author

I haven't run the script myself yet, but the figure that is included in the repo shows the same behavior you are describing. I don't know why this is the case and it certainly seems to wrong, but will look into it as soon as possible.

OK, thanks. Please tell me what to do when you know how to solve it.

@ChenLumen
Copy link
Author

Hi, @jarsi @AlexVanMeegen. I want use the stabilitization method to my data. I found this in your paper, that looks the same as in your paper. Can you give me the code that generated this data about K_matrix? Or give me your parameters. I want to repeat your work, and then apply it to my data. Thank you very much!

@jarsi
Copy link
Collaborator

jarsi commented Oct 5, 2021

Hi, neither @AlexVanMeegen nor me were part of this publication. We are users and co-maintainers of the repo as it is related to our own work. I'll ask around whether we can get access to the original code or if someone has an idea what is missing here.

@albada
Copy link
Collaborator

albada commented Oct 7, 2021

Hi, I noticed that stabilization.py has g=-16 whereas our model uses g=-11. So perhaps that is the reason why you see stability over a larger range of values of kappa? About the error with the array dimensions, I think we'd best ask @jschuecker and @mschmidt87

@ChenLumen
Copy link
Author

Hi, I noticed that stabilization.py has g=-16 whereas our model uses g=-11. So perhaps that is the reason why you see stability over a larger range of values of kappa? About the error with the array dimensions, I think we'd best ask @jschuecker and @mschmidt87

Hi, I tried to change the value of g. But the vaules of stability was more larger when I used g=-11. When g=-13, the result is very similar to the one in the paper. However, the generated K_prime.npy matrix was somewhat different from the K_stable.npy matrix you provide.

@jarsi
Copy link
Collaborator

jarsi commented Oct 29, 2021

Hi,
we talked about this issue during our meeting and found a potential reason for the behavior you are seeing. The scripts in this repo are using NEST for the numerical integrations of Eq (3) in Schuecker, Schmidt et al.. During writing of the manuscript NEST was not capable of solving these equations, thus the original scripts used a python implementation. The main difference is that NEST uses the exponential forward Euler and the python scripts relied on fourth order Runge Kutta. This is pointed out in the README.md of the folder containing the scripts for reproducing the Schuecker, Schmidt el al paper.

From own experience we know that results can be highly sensitive to the numerical scheme as well as initial conditions.

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

No branches or pull requests

3 participants