Some terrains use tides, which cause the water level to change with time. Thus, some scripts relying on the ASL value of 0 being almost the same as water surface (ignoring waves ofc) will be broken.
There's no command to know what the water level offset is.
The only command that might help in this situation is getPosASLW/ASLtoAGL, but the value includes waves, and it only works if the position is on water.
Such a position might be impossible to find randomly, so for a reliable solution, you need to do a full terrain heightmap scan to find the minimum terrain height and use that as the reference point, which is extremely slow to do.
As you can see, there's no good way to get this offset. Thus having a command that returns this value for the given time will be extremely helpful:
returns the water depth offset from ASL value 0 at the current time.
Edit: Instead of a new command you can add it to this other command request instead (getTerrainInfo): T151907