RECEIPT-H2020 / TerriaMap

Receipt H2020 Platform
https://www.climateimpactstories.eu/
Apache License 2.0
2 stars 0 forks source link

Reduce some map data #125

Closed goord closed 1 year ago

goord commented 1 year ago

For the Xynthia flood and the locust stories we should try to reduce the wms map data as much as we can. Try to use short ints for the flood maps (cm) and floats for the global crop yield maps.

sjvrijn commented 1 year ago

I've started with the biggest file I could find: /data/receipt/thredds-docker/data/story_006/west_france_depth.nc (>1GB).

Because it uses NaN to keep land transparant, using int loses that information. (it would also only reduce the size by half to 520 MB). However, using a 4x4 coarsen the size reduces to 65 MB, and could probably be reduced further if needed. In general, is there a target size we're aiming for?

Files and python scripts used for size reductions have been added on the server.

west_france_depth_i16.nc :

xynthia_west_france_i16

west_france_depth_coarse4x4.nc:

xynthia_west_france_4x4
goord commented 1 year ago

Hi @sjvrijn reducing spatial resolution is bit of a last resort option imo, but if all else fails that's what we should do. We can also take out some time steps.

If we convert to cm or mm, then cast to ints and finally apply aggressive compression, we could avoid coarsening.

It's difficult to gauge the desired size, but let's go for <100mb first and see how the server handles it.

sjvrijn commented 1 year ago

All other remaining files are smaller than 10 MB

goord commented 1 year ago

Impressive achievements. I will test coming days whether we see better performance of the visualizer too.

sjvrijn commented 1 year ago

Performance is good, issue closed.