Select to view content in your preferred language

Tif-file processing in the Python environment

41
0
Saturday
Labels (2)
MarcoAlbertÖttl
New Contributor

Good evening everyone,

I have several tif layers that contain the following data:
Wave height, wave period, grain diameter and bathymetry (water depth). I would like to load this data into the Python environment and then calculate the bedload transport using various formulas and output the result on a raster basis. Unfortunately, I am not getting the right results. I'm not sure whether the data processing really works correctly and whether the Python environment accesses the correct cells of the Tif files so that they fit into the formula. Do you have any tips on how I can get this right?

Best regards,

Marco

PS: My code:

import arcpy
from arcpy import env
from arcpy.sa import *
import math

def lmbda(H, T):
return SquareRoot(9.81 * H) * T

def U_susp(d):
return 14.4 * SquareRoot(d / 10)

def h_susp(H, T, d):
return ASinH((H * math.pi) / (T * U_susp(d))) * lmbda(H, T) / (2 * math.pi)

# Set the workspace
env.workspace = "N:/oettl/Layer"

# Load raster layers
H = Raster("2015_100m_max_significant_wave_height.tif")
T = Raster("2015_100m_mean_wave_period_at_max_significant_wave_height.tif")
d = Raster("2016_100m_DB_d50.tif")
H_Bathymetrie = Raster("EasyGSH_Download_Bathymetrie_geotiff_2016\GeoTiff\easygsh-db_2016.tif")

Schwebstofftransport = H_Bathymetrie - h_susp(H, T, d)

# Save the resulting raster
Schwebstofftransport.save("N:/oettl/Layer/Schwebstofftransport_neu.tif")

0 Kudos
0 Replies