MHKiT-Software / MHKiT-Python

MHKiT-Python provides the marine renewable energy (MRE) community tools for data processing, visualization, quality control, resource assessment, and device performance.
https://mhkit-software.github.io/MHKiT/
BSD 3-Clause "New" or "Revised" License
50 stars 45 forks source link

Delft3D z calculation #172

Closed browniea closed 1 year ago

browniea commented 2 years ago

Describe the bug:

Add a clear description of what the refence of z is.

The issue:

In the code d3d.py two function output the z location of data points ( get_layer_data and get_all_data_points ). The refence for this output needs to be clarified whether its the free surface or the zero water level.

ssolson commented 2 years ago

Did we switch this to a standard output?

Do we still want to add a new/ custom output?

browniea commented 2 years ago

Z is still calculated as "the depth from the zero-water level at the surface"

d3d.py lines 218-227

   if dimensions== 2:
        if layer_dim == 'FlowLink_xu FlowLink_yu': 
            z = [bottom_depth_wdim]-water_level_wdim
        else:
            z = [bottom_depth]-water_level
    else:
        if layer_dim == 'FlowLink_xu FlowLink_yu': 
            z = [bottom_depth_wdim*layer_percentages[layer_index]]-water_level_wdim 
        else:
            z = [bottom_depth*layer_percentages[layer_index]]-water_level

yes, I think instead of outputting z we want to output depth and move this to it's own function depth_zero_water_level

ssolson commented 2 years ago

From our discussion

ssolson commented 1 year ago

Addresses in #190