kylejgillett / sounderpy

A python package that helps you to access and plot vertical profile data for meteorological analysis
https://kylejgillett.github.io/sounderpy/
MIT License
49 stars 13 forks source link

Issue with incomplete soundings #16

Closed Alan-Birnbaum closed 9 months ago

Alan-Birnbaum commented 11 months ago

Please Describe the bug I tried to run the spy.metpy_sounding() function for two soundings from Hilo, Hawaii that were missing data and got the same error for both. The first sounding was incomplete(data was only available up to a certain level(~325 hPa)) The second sounding was missing dewpoint temperatures above a certain level(~305 hPa)

To Reproduce Steps to reproduce the behavior:

The code ran was as follows:

import sounderpy as spy data = spy.get_obs_data('PHTO', '2012', '03', '03, '12') spy.metpy_sounding(data)

and

import sounderpy as spy data = spy.get_obs_data('PHTO', '2012', '03', '04, '12') spy.metpy_sounding(data)

  1. What is the error message For both soundings the error I recieved was:

    ValueError: zero-size array to reduction operation minimum which has no identity

Expected behavior A clear and concise description of what you expected to happen/what you wanted to happen.

All that was expected was a complete sounding from the University of Wyoming sounding archive

Screenshots If applicable, add screenshots to help explain your problem.

Below I've attached what the Metpy soundings for these times look like PHTO2012-03-03 12 UTC_skewt

PHTO2012-03-04 12 UTC_skewt

What are you running?

Additional context Add any other context about the problem here.

ktyle commented 11 months ago

@Alan-Birnbaum Although you're accessing our Jupyterhub on a Windows 10 laptop, the actual OS on which we have the SounderPy environment is Linux x86_64 . The version of SounderPy is 2.0.5.

kylejgillett commented 11 months ago

Hi @Alan-Birnbaum, thanks for opening this issue!

As far as I can tell, it appears that these two profiles are just missing part of their dewpoint and/or temperature profiles. This is not ideal of course, but sometimes the case with some profiles -- data was just not recorded or perhaps removed via post-processing quality control. Unfortunately, there is no fix for this -- particularly as far as SounderPy is concerned.

Now because of this, there are some issues with the plot -- those issues being related to MetPy calculations being used to calculate CAPE/CIN -- particularly in this case an error is raised while the MetPy cape_cin() function is attempting to find the EL.

Right now I don't have an instant fix for this, other than creating your own sounding plot of this data (see this example I created here)

The next release of SounderPy is loosely planned for mid-December which will hopefully address the issues related to MetPy calculations.

@ktyle: Thanks for using SounderPy at SUNY Albany! Version 2.0.6 of SounderPy (latest release) has several improvements to a few other bugs that existed in v2.0.5. If possible, an update is recommended to ensure the best possible output from SounderPy.

ktyle commented 11 months ago

Thanks @kylejgillett ; I have updated to 2.0.6 per your advice! Yes, I'm looking forward to exploring SounderPy along with our students going forward! Great work!