asascience / ott-coops

Project Tracking for OTT Co-Ops
1 stars 0 forks source link

Misc layer issues #343

Closed nguyandy closed 2 years ago

nguyandy commented 2 years ago
ndellicarpini commented 2 years ago
  • ChesROMS Chlorophyll 3D returning blank tiles

This is a unit issue

  • traffic lights don't work with climatology layers

This is fixed in an open pyxms pr

This is a unit issue

ndellicarpini commented 2 years ago

For chlorophyll units, should we just override them to mg/m^3 rather than mg chl/m^3, or should we take some other sort of approach (maybe using some sort of supportsUnitConversion)? I'm unsure how to handle this.

jamesdoyle21 commented 2 years ago

mg/m^3 makes more sense to me. That should be plenty of information for the user

ndellicarpini commented 2 years ago

mg/m^3 makes more sense to me. That should be plenty of information for the user

@nguyandy do you think we should handle this in OM, or should we try to get the units to change on the data side (sorry if that doesn't make sense, I'm not entirely sure how units are added to the data).

jamesdoyle21 commented 2 years ago

I'm still not getting anything for ChesROMS Chlorophyll 3D

ndellicarpini commented 2 years ago

I'm still not getting anything for ChesROMS Chlorophyll 3D

Both of the chesroms layers are broken (alkalinity doesn't support changing the style) because they use units we don't/won't support. We still need to figure out how to handle layers with oddball units.

nguyandy commented 2 years ago

@nguyandy do you think we should handle this in OM, or should we try to get the units to change on the data side (sorry if that doesn't make sense, I'm not entirely sure how units are added to the data).

Sorry Nick I never saw this comment. Changing the units in the data is probably the "right" way to do this. Changing the units in OM3 would be the fastest and easiest way.

@mpiannucci thoughts?

mpiannucci commented 2 years ago

Is this as simple as adding the oddball units to OM3 unit system? It is extendable right?

nguyandy commented 2 years ago

Should be, I'll give it swing in a bit

nguyandy commented 2 years ago

Ahhh it's all coming back to me now.

So the units we get from ncwms/pyxms is mg_chl/m3 The unit being passed in the OM3 requests is mg chl/m³

To which we get the error Cannot convert units mg chl/m³ to mg_chl/m3

When we make the changes to OM3 to use the original unit mg_chl/m3, we still get an error from pyxms Cannot convert units mg_chl/m3 to mg_chl/m3

https://wms.oceansmap.com/wms?service=WMS&request=GetMap&version=1.1.1&layers=CHESROMS_ECB/chlorophyll&styles=raster/algae&colorscalerange=0,30&units=mg_chl/m3&width=256&height=256&format=image/png&transparent=true&time=2021-07-10T00:00:00.000Z&srs=EPSG:3857&bbox=-8766409.899970295,3757032.814272985,-8140237.7642581295,4383204.9499851465

But when we take out the unit parameter, the request works https://wms.oceansmap.com/wms?service=WMS&request=GetMap&version=1.1.1&layers=CHESROMS_ECB/chlorophyll&styles=raster/algae&colorscalerange=0,30&width=256&height=256&format=image/png&transparent=true&time=2021-07-10T00:00:00.000Z&srs=EPSG:3857&bbox=-8766409.899970295,3757032.814272985,-8140237.7642581295,4383204.9499851465

@ndellicarpini suggested last week that we add a field into the data-catalog, supportsUnitConversion for layers where this might be problematic. Where OM3 will check supportsUnitConversion before tackling on the units param in the request + can notify users if unit conversions don't work for certain layers.

This would fix our issue. Another option would be to update pyxms to bypass/handle these failures - but that means users won't know if unit conversions are working or not.

mpiannucci commented 2 years ago

That sounds like a pyxms error to me, I don't think that should error out. I can take a look

mpiannucci commented 2 years ago

So I just pushed a pyxms fix that will not try and convert units when the users requested units are the same as the source units. This means that for certain weird unit layers we will just not have them toggle to other systems for now and the layers should then work out of the box, just with no conversions