Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Dan Adriaansen
@DanielAdriaansen

Boy we really need to make a release. :sob: In the meanwhile, if you have git available, you could do: python -m pip install git+https://github.com/Unidata/siphon.git

Thank you so much for this suggestion!

Ryan May
@dopplershift
No problem!
agktogether
@agktogether

Hi sirs ,
I am always here to ask some questions.
but this time the problem is how can i access data of the future time that gfs forecast model predicts..
i know this data is there but i can not find it ,i need geoheight, temp, press , u-wind.v-wind properties in isobaric layers...
i am here https://thredds.ucar.edu/thredds/catalog/catalog.html
but i can not find future data 3 hourly ...
for example i need forecast of 3h or 6h after 00:00 in october 30 2020.last night

thanks

Ryan May
@dopplershift
Apologies on the delayed response. I think what you're looking for should be here: https://thredds.ucar.edu/thredds/catalog/grib/NCEP/GFS/Global_0p25deg/catalog.html
winash12
@winash12
i am not able to get anything out of the IGRA soundings site
i keep getting no dates matching selection
kedoneyes
@kedoneyes
When I downloaded the data of 03005 from the University of Wyoming sounding station at 12:00 on January 5, 2019, I found that the data below was wrong
Ryan May
@dopplershift
@winash12 which site and date/time?
@kedoneyes How was it wrong?
kedoneyes
@kedoneyes
@dopplershift The elevation data of the station is not consistent with the data on the network.
winash12
@winash12
from siphon.simplewebservice.igra2 import IGRAUpperAir
date = datetime(2021, 1, 22, 0) station = 'INM00042369'
winash12
@winash12
df, header = IGRAUpperAir.request_data(date, station)
kedoneyes
@kedoneyes
Do you have a mistake in downloading the data?
winash12
@winash12
I do not get any data at all
kedoneyes
@kedoneyes
I can get data from the Wyoming station, but the elevation data is wrong, so I can't use it.
winash12
@winash12
Hello. Please read my question again. My question is specific to IGRA soundings. There is no issue with Wyoming whatsoever
kedoneyes
@kedoneyes
I'm sorry, I was just talking about my problem, not answering yours.
Ryan May
@dopplershift
@kedoneyes If I look on the Wyoming website, for 12Z on 2021-1-5 for 03005, I see:
 Station latitude: 60.13
 Station longitude: -1.18
 Station elevation: 82.0

When I run:

WyomingUpperAir.request_data(datetime(2021, 1, 5, 12), '03005')

the data also have elevation of 82. If 82 isn't correct, that's outside our control.

kedoneyes
@kedoneyes
If you can, I would like you to download the file and compare it with the data provided on the University of Wyoming website, and look at the height values of each floor, and I'm sure you can see the problem.
Ryan May
@dopplershift
I did that with WyomingUpperAir.request_data(datetime(2021, 1, 5, 12), '03005'). I see exactly what Wyoming shows. Can you share what code you're running?
Oh, wait you mean the height column?
Ryan May
@dopplershift
@kedoneyes Unidata/siphon#315
Ryan May
@dopplershift
@winash12 If you download the data file from https://www1.ncdc.noaa.gov/pub/data/igra/data/data-por/ you can see that the most recent data available for INM00042369 is from 6 January 2021--that's why you don't get any data.
winash12
@winash12
@dopplershift I tried downloading data for another station 42675
and current data is available but full of NaNs
Index(['lvltyp1', 'lvltyp2', 'etime', 'pressure', 'pflag', 'height', 'zflag', 'temperature', 'tflag', 'relative_humidity', 'direction', 'speed', 'date', 'u_wind', 'v_wind', 'dewpoint'], dtype='object') 0 925.0 1 850.0 2 700.0 3 NaN 4 NaN 5 NaN 6 NaN 7 NaN 8 NaN 9 NaN 10 NaN 11 NaN 12 NaN 13 NaN 14 NaN Name: pressure, dtype: float64 {'etime': 'second', 'pressure': 'hPa', 'height': 'meter', 'temperature': 'degC', 'dewpoint': 'degC', 'direction': 'degrees', 'speed': 'meter / second', 'u_wind': 'meter / second', 'v_wind': 'meter / second'} hPa [nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan] degree_Celsius [nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan] degree_Celsius [0.4 2.4 4.1 -0.0 0.4 0.7 3.4 3.3 3.5 1.7 6.2 8.7 4.7 5.4 9.5] meter / second [344.05460409907715 294.6235647861636 335.2656974709475 0.0 349.2157021324374 315.0 305.2175929681927 324.9262455066517 340.15930191603167 350.059426966887 329.91031376122334 315.0 315.0 315.0 315.0] degree Traceback (most recent call last): File "igra_sounds.py", line 102, in <module> lcl_pressure, lcl_temperature = mpcalc.lcl(p[0], T[0], Td[0]) File "/usr/local/lib/python3.8/dist-packages/metpy/xarray.py", line 677, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/metpy/units.py", line 320, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/metpy/calc/thermo.py", line 357, in lcl lcl_p = so.fixed_point(_lcl_iter, pressure.m, args=(pressure.m, w, temperature), File "/usr/local/lib/python3.8/dist-packages/scipy-1.5.2-py3.8-linux-x86_64.egg/scipy/optimize/minpack.py", line 937, in fixed_point return _fixed_point_helper(func, x0, args, xtol, maxiter, use_accel) File "/usr/local/lib/python3.8/dist-packages/scipy-1.5.2-py3.8-linux-x86_64.egg/scipy/optimize/minpack.py", line 891, in _fixed_point_helper raise RuntimeError(msg) RuntimeError: Failed to converge after 50 iterations, value is nan
kedoneyes
@kedoneyes
图片.png
kedoneyes
@kedoneyes
图片.png
The first picture is the downloaded data, focusing on the elevation of 256 pressure. The second image, from the University of Wyoming Web site, shows the altitude at 10210 when the air pressure is 256
kedoneyes
@kedoneyes
I think I found the problem. Df.read _ fwf uses the first 100 rows by default to deduce the width of each column of data. If the 100 th elevation is less than the 10000 meter,The program infers four characters.
Ryan May
@dopplershift
@kedoneyes Yes, that's what I mentioned in #315
Ryan May
@dopplershift
@winash12 Again, If I go to https://www1.ncdc.noaa.gov/pub/data/igra/data/data-por/ and download the data for 42675, I see a whole bunch of missing values (-9999), which get translated to nans. Siphon's not doing anything wrong in this case, that's an issue with the underlying data, nothing we can do about. If you encounter any additional data oddities in the future, my recommendation would be to first try to download the data manually and see if what Siphon is giving you matches up with what's in the raw data file.
Ray Bell
@raybellwaves
Hi thought I would ask here.
Look to open a OpenDAP url with xarray but to handle auth not and not sure if there is syntax with the backend_kwargs?
something like
url = "https://rda.ucar.edu/thredds/dodsC/files/g/ds084.1/2020/20200101/gfs.0p25.2020010100.f000.grib2"
ds = xr.open_dataset(url, backend_kwargs={"auth": ("USER@DOMAIN.COM", "PWD")})
Screen Shot 2021-02-12 at 3.29.17 PM.png
it's cool to a jupyter notebook link
but it fails at dataset = ds.remote_access()
Screen Shot 2021-02-12 at 3.30.23 PM.png
it's not great (you have to edit some dot files) but that seems to be the way with opendap?
@raybellwaves You might also be able to use the authentication as in this example: https://unidata.github.io/siphon/latest/examples/Basic_Usage.html#sphx-glr-examples-basic-usage-py
and then try to access using CDMRemote (which siphon supports using with xarray)
Ray Bell
@raybellwaves
Thanks @dopplershift i'll take a look. Just moved a Q to SO https://stackoverflow.com/questions/66178846/read-in-authorized-opendap-url-using-xarray
but i'm happy to try /understand siphon a bit more
Ray Bell
@raybellwaves
Screen Shot 2021-02-12 at 4.20.34 PM.png
The .file worked
*dot files