Closed RobertoMantas closed 2 years ago
@RobertoMantas This is indeed strange-- give me a few days to investigate.
@RobertoMantas just so we're on the same page, we're seeing an issue with specifying the user indices after we have already executed IRI without the user indices-- correct?
That is, in file1.py
:
from datetime import datetime
from pyglow import Point
lat = 30.
lon = -10.
alt = 250.
dn = datetime(2000, 1, 1)
print("------------------------------------")
print(" file1.py ")
print("------------------------------------")
pt = Point(dn, lat, lon, alt, user_ind=True)
pt.f107 = 125.6
pt.f107a = 160.55
pt.run_iri()
print("Using user defined F10.7:")
print("f10.7 = {:3.2f}".format(pt.f107))
print("f10.7a = {:3.2f}".format(pt.f107a))
print("ne = {:3.2f}".format(pt.ne))
print("")
And in file2.py
:
from datetime import datetime
from pyglow import Point
lat = 30.
lon = -10.
alt = 250.
dn = datetime(2000, 1, 1)
print("------------------------------------")
print(" file2.py ")
print("------------------------------------")
pt = Point(dn, lat, lon, alt)
pt.run_iri()
print("Using default F10.7:")
print("f10.7 = {:3.2f}".format(pt.f107))
print("f10.7a = {:3.2f}".format(pt.f107a))
print("ne = {:3.2f}".format(pt.ne))
print("")
pt = Point(dn, lat, lon, alt, user_ind=True)
pt.f107 = 125.6
pt.f107a = 160.55
pt.run_iri()
print("Using user defined F10.7:")
print("f10.7 = {:3.2f}".format(pt.f107))
print("f10.7a = {:3.2f}".format(pt.f107a))
print("ne = {:3.2f}".format(pt.ne))
print("")
We expect similar results, but the two files yield different results:
~/Desktop/pyglow_issue $ python file1.py
------------------------------------
file1.py
------------------------------------
Using user defined F10.7:
f10.7 = 125.60
f10.7a = 160.55
ne = 328667.37
~/Desktop/pyglow_issue $ python file2.py
------------------------------------
file2.py
------------------------------------
Using default F10.7:
f10.7 = 125.60
f10.7a = 160.55
ne = 361218.21
Using user defined F10.7:
f10.7 = 125.60
f10.7a = 160.55
ne = 360263.09
This looks to be some odd initialization with IRI. Perhaps @butala has some insight? (Have we run into a similar issue previously?). It'd be interesting to see if we can reproduce this problem in Fortran, but I'm not sure if I can garner the volunteers...
Yes, @timduly4 that is exactly the problem. Let's see if @butala could help. If there is anything I could do to help let me know. I have seen the Fortran code in the irimodel.org, but haven't tried to run it. Thank you!
Dear @timduly4 any news on this?? thank you in advance!
@RobertoMantas I haven't had time to deeply investigate this issue, yet. I'll keep you updated once I am able.
Hello @timduly4 :) do you know if anyone else is facing the same problem? Did you have time to have a look into it? Thank you very much for your time.
@RobertoMantas This looks like some sort of memory issue within Fortran. Unfortunately I'm short on time these days, so I might have to stash this issue in the icebox for a bit.
Can you reproduce this issue in Fortran? Let me know, and we can work from there.
Closing (stale issue) but feel free to reopen
Dear @timduly4 I have been doing some tests with the option
user_ind
and saw some weird output going on. After that, I tested the file test_user_indices.py in which it runs the same value for indices as default and defined by the user. But the output is different.For example using the following code:
The given output is:
Testing user defined indices in IRI:
Using default F10.7: f10.7 = 125.60 f10.7a = 160.55 ne = 361218.21
Using user defined F10.7: f10.7 = 125.60 f10.7a = 160.55 ne = 360263.09
We can see that having the same indices the ne variable it has a different value, but at least is quite similar so let's say there is no problem with that. The problem comes when I run the second part of the code with the user_ind only without running first the default code. In this case, the output is very different from the previous values.
Running only this part of the code:
With this code alone without running the default before the output is the following:
Testing user defined indices in IRI:
Using user defined F10.7: f10.7 = 125.60 f10.7a = 160.55 ne = 328667.37
The variable ne is 328667.37 instead of 361218.21 from default or 360263.09 from the user_ind from before. What do you think is happening here? Any help would be appreciated. I saw there is an issue talking about this variable in #34. But thought this was a new issue that came up.
Thank you very much @timduly4 again for your support.