-
Notifications
You must be signed in to change notification settings - Fork 416
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
Problems with profile calculations and NUCAPS data #973
Comments
And data. |
So, I've found two issues here. First, the NUCAPS data comes out in pressure-order, meaning low pressure to high pressure. MetPy's profile calculation functions, like CAPE and temp_K = nc.variables[u'Temperature'][index][::-1] * units.kelvin
mixing = nc.variables[u'H2O_MR'][index][::-1]
press = nc.variables[u'Pressure'][index][::-1] * units.hPa Ideally, we could handle some of this automatically, but it starts making calculations convoluted. We could definitely document this more clearly. We may also consider a helper function that checks the data once and adjusts as necessary. Second, netCDF4-python is returning masked arrays for the data (even though there are no masked points). For some reason, that needs investigating, the masked arrays are breaking the CAPE/CIN calculation. As a workaround, you can adjust your code to open the file as follows: nc = Dataset(path)
nc.set_always_mask(False) |
Thanks, saves me hours of frustration…
I guess what I need to do next is to interrogate these NUCAPS data files, each
version seems to have significant nuances.
|
Ryan: In your comments above: Additionally, the cin values after executing: |
What version of netcdf4 do you have? (Try: Regarding the cape, cin = mpcalc.cape_cin(press, temp_C, dewp_C, prof) the function calculates both CAPE and CIN and returns them both. So the result you're seeing is a |
I am using NUCAPS sounding datasets to plot SkewTs. Although I can plot the temperature and dewpt temp profiles, I am having trouble with the advanced sounding aspects as provided within the MetPy examples
The text was updated successfully, but these errors were encountered: