hybrid sigma coordinate whould work with float values
I have a nc file with a atmosphere_hybrid_sigma_pressure_coordinate
,
double lev(lev) ;
lev:standard_name = "atmosphere_hybrid_sigma_pressure_coordinate" ;
lev:long_name = "hybrid level at layer midpoints (A/P0+B)" ;
lev:positive = "down" ;
lev:formula_terms = "ap: hyam b: hybm ps: PS p0: P0" ;
lev = 0.116718480138169, 0.152770787071305, 0.188823094004441,
0.227128670120898, 0.274447322970639, 0.336186898593634,
0.411446089316556, 0.492113126079447, 0.568724278312361,
0.638575622995312, 0.702117813964964, 0.759350851221318,
0.810274734764372, 0.854889464594128, 0.893195040710585,
0.925191463113743, 0.950878731803602, 0.970256846780163,
0.983776461880089, 0.99459215396003 ;
when trying to display this with MSS, the MSS GUI only shows me one single model level. I think I traced this down to https://bitbucket.org/wxmetvis/mss/src/3e9bebfb363906d43cc77f23dfe8f804ad394e81/mslib/mswms/mss_2D_sections.py?at=develop&fileviewer=file-view-default#mss_2D_sections.py-186, where the vert_data
values are being cast to int
, leading to the list [0]
being returned from get_elevations
.
Is this expected behaviour? I mean, does the rest of the code rely on the elevations being cast to integer? Of course I can preprocess the nc file before feeding it into MSS, so this is not a dealbreaker, but it would be nice to know if this is really necessary.
Comments (8)
-
-
reporter Great, thanks a lot!
I agree about not including this in stable for the next release without being confident about there being no implications ;)
We're currently working around this issue by changing the
lev
variable to values1..20
, as EMeRGe is starting now and we don't want to risk our running system. After EMeRGe-EU, we'll be able to try it out.BTW, for EMeRGe-EU, we're using MSS 1.4.1; the first forecasting meeting should have been this morning. The ball is rolling :-)
-
- changed milestone to 1.6.0
-
I would change the status from bug to feature request. And assign it to me, I will prepare the test and add some demodata for it.
-
- marked as enhancement
-
assigned issue to
-
Fixed by c7da9526
-
- changed status to closed
-
- changed title to hybrid sigma coordinate whould work with float values
- Log in to comment
I stumbled upon this some time ago, but worked around it (levels were km originally and were changed to be in m). Removing this limitation would be nice, but I also do not know what relies on this. This patch:
seems to allow non-integer levels. That might look very ugly for those hybrid levels, though...
I am hesitant though to enable this in the stable branch for 1.5.2 release... I'll dig into the OWS specification if there are some limitations posed on the "level" field.