We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Reading this sounding file: https://github.com/wx4stg/LRC/blob/main/data/240713.ua with GempakSounding and attempting to call snxarray() on it gives an error
GempakSounding
snxarray()
Linux
1.6.2
3.12
from metpy.io import GempakSounding gs = GempakSounding('240713.ua') gs.snxarray()
Cell In[21], line 1 ----> 1 gs.snxarray() File ~/micromamba/envs/LRC/lib/python3.12/site-packages/metpy/io/gempak.py:2196, in GempakSounding.snxarray(self, station_id, station_number, date_time, state, country) 2192 raise KeyError('No stations were matched with given parameters.') 2194 sndno = [(s.DTNO, s.SNDNO) for s in matched] -> 2196 data = self._unpack_merged(sndno) if self.merged else self._unpack_unmerged(sndno) 2198 soundings = [] 2199 for snd in data: File ~/micromamba/envs/LRC/lib/python3.12/site-packages/metpy/io/gempak.py:1554, in GempakSounding._unpack_unmerged(self, sndno) 1549 for iprm, param in enumerate(parameters['name']): 1550 sounding[part.name][param] = ( 1551 np.array(packed_buffer[iprm::nparms], dtype=np.float32) 1552 ) -> 1554 soundings.append(self._merge_sounding(sounding)) 1555 return soundings File ~/micromamba/envs/LRC/lib/python3.12/site-packages/metpy/io/gempak.py:2066, in GempakSounding._merge_sounding(self, parts) 2063 _interp_logp_pressure(merged, self.prod_desc.missing_float) 2065 # Interpolate missing data -> 2066 _interp_logp_data(merged, self.prod_desc.missing_float) 2068 # Add below ground MAN data 2069 if merged['PRES'][0] != self.prod_desc.missing_float and bgl > 0: File ~/micromamba/envs/LRC/lib/python3.12/site-packages/metpy/io/gempak.py:241, in _interp_logp_data(sounding, missing) 239 bdata[param] = val[iabove] 240 vlev = sounding['PRES'][i] --> 241 outdata = _interp_parameters(vlev, adata, bdata, missing) 242 sounding[var1][i] = outdata[var1] 243 if var2 is not None: File ~/micromamba/envs/LRC/lib/python3.12/site-packages/metpy/io/gempak.py:458, in _interp_parameters(vlev, adata, bdata, missing) 452 between = (((pres1 < pres2) and (pres1 < vlev) 453 and (vlev < pres2)) 454 or ((pres2 < pres1) and (pres2 < vlev) 455 and (vlev < pres1))) 457 if not between: --> 458 raise ValueError('Current pressure does not fall between levels.') 459 elif pres1 <= 0 or pres2 <= 0: 460 raise ValueError('Pressure cannot be negative.') ValueError: Current pressure does not fall between levels.
The text was updated successfully, but these errors were encountered:
I'll debug this later...
Sorry, something went wrong.
No branches or pull requests
What went wrong?
Reading this sounding file: https://github.com/wx4stg/LRC/blob/main/data/240713.ua
with
GempakSounding
and attempting to callsnxarray()
on it gives an errorOperating System
Linux
Version
1.6.2
Python Version
3.12
Code to Reproduce
Errors, Traceback, and Logs
The text was updated successfully, but these errors were encountered: