Open-MSS / MSS

A QT application, a OGC web map server, a collaboration server to plan atmospheric research flights.
https://open-mss.github.io
Apache License 2.0
54 stars 68 forks source link

Linear view: interpolation to flight track altitude? #2409

Closed gisi90 closed 1 hour ago

gisi90 commented 1 week ago

Does linear view interpolate to the flight altitude of the flight track? I just realized this is not the case for our WMS. grafik

ReimarBauer commented 1 week ago

it behaves on the campaigns2019 server on a first few better. Needs be detailed checked.

image

ReimarBauer commented 1 week ago

lets look on temperature on the demodata, example.ftml

<?xml version="1.0" encoding="utf-8"?>
  <FlightTrack version="9.0.0">
    <ListOfWaypoints>
      <Waypoint flightlevel="233.0" lat="41.601070573320186" location="" lon="41.355120439498535">
        <Comments></Comments>
      </Waypoint>
      <Waypoint flightlevel="374.0" lat="48.19354838709677" location="" lon="33.74841526975632">
        <Comments></Comments>
      </Waypoint>
      <Waypoint flightlevel="372.0" lat="51.23623045499366" location="" lon="-34.20481757994082">
        <Comments></Comments>
      </Waypoint>
      <Waypoint flightlevel="20.0" lat="37.037047471474835" location="" lon="-40.797295393717434">
        <Comments></Comments>
      </Waypoint>
    </ListOfWaypoints>
  </FlightTrack>

point 3 is wrong

image

joernu76 commented 6 days ago

The interpolation done in mslib/mswms/mss_plot_driver.py looks a bit fishy on how different vertical coordinate axis types are handled.

Could you dump the header of the file containing the interpolated data and the configuration of the employed linear view layer?

ReimarBauer commented 6 days ago

for the demodata it is: 20121017_12_ecmwf_forecast.T.EUR_LL015.036.ml.nc

netcdf \20121017_12_ecmwf_forecast.T.EUR_LL015.036.ml {
dimensions:
        time = 7 ;
        hybrid = 18 ;
        lat = 40 ;
        lon = 100 ;
variables:
        float time(time) ;
                time:units = "hours since 2012-10-17T12:00:00.000Z" ;
                time:standard_name = "time" ;
        float hybrid(hybrid) ;
                hybrid:standard_name = "atmosphere_hybrid_sigma_pressure_coordinate" ;
                hybrid:units = "sigma" ;
                hybrid:positive = "down" ;
                hybrid:formula = "p(time,level,lat,lon) = ap(level) + b(level) * ps(time,lat,lon)" ;
                hybrid:formula_terms = "ap: hyam b: hybm ps: Surface_pressure_surface" ;
        float hyam(hybrid) ;
                hyam:units = "Pa" ;
                hyam:standard_name = "atmosphere_hybrid_pressure_coordinate" ;
        float hybm(hybrid) ;
                hybm:units = "1" ;
                hybm:standard_name = "atmosphere_hybrid_height_coordinate" ;
        float lat(lat) ;
                lat:units = "degrees_north" ;
                lat:standard_name = "latitude" ;
        float lon(lon) ;
                lon:units = "degrees_north" ;
                lon:standard_name = "longitude" ;
        float air_temperature(time, hybrid, lat, lon) ;
                air_temperature:standard_name = "air_temperature" ;
                air_temperature:units = "K" ;
                air_temperature:grid_mapping = "LatLon_Projection" ;
                air_temperature:missing_value = NaNf ;

it is the default demodata setup

(mpl_lsec_styles.LS_DefaultStyle, "air_potential_temperature", ["ecmwf_EUR_LL015"]),

joernu76 commented 3 hours ago

The current code had a lot of issues. I can see some of them could relate to your problem. There is an PR to stable that fixes these issues.

gisi90 commented 2 hours ago

fix #2425 did the trick. Before: grafik After including the changes: grafik