seareport / seareport_models

0 stars 1 forks source link

Bathymetry in `gr3` files needs to be positive #5

Closed pmav99 closed 5 months ago

pmav99 commented 6 months ago

The bathymetry in the gr3 files need to be positive numbers. This means that:

  1. the v0.1 needs to be multiplied by -1.
  2. the check in v0.2 needs to be updated to z[z < 20] = 20 instead of: https://github.com/seareport/seareport_meshes/blob/b5708949fad3d8f9e7e25c01f3c03f1a9a6e05c6/scripts/mesh_v0.2.py#L48C1-L48C21

v0 does not have this issue.

tomsail commented 6 months ago

found why: here

The bathymetry in the gr3 files need to be positive numbers.

this implies that self.mesh.Dataset.depth.values are always positive too, correct?

Ideally, I would be in favour (in the future) to follow the topographic conventions (positive upwards and negative downwards) for the depths.

pmav99 commented 6 months ago

I think that this is a schism requirement

pmav99 commented 6 months ago

Regardless of that, even for negative depths convention, the check here needs to be updated: https://github.com/seareport/seareport_meshes/blob/b5708949fad3d8f9e7e25c01f3c03f1a9a6e05c6/scripts/mesh_v0.2.py#L48C1-L48C21

As it is, all the depths below 20 are set to 20. Instead it should be

-z[z < -20] = -20
+z[z > -20] = -20