opendrift
opendrift copied to clipboard
z-levels interpolation in ROMS
Hi,
I am having a look to reader_roms_native and there is the following code:
# z-levels to which sigma-layers may be interpolated self.zlevels = np.array([ 0, -.5, -1, -3, -5, -10, -25, -50, -75, -100, -150, -200, -250, -300, -400, -500, -600, -700, -800, -900, -1000, -1500, -2000, -2500, -3000, -3500, -4000, -4500, -5000, -5500, -6000, -6500, -7000, -7500, -8000])
I am wondering if, for a shallow-water application, it would make sense to edit the z-levels. For instance, the maximum depth in my application is about 30 meters. Would it be beneficial to adapt this part of the code to my application? I am afraid that, if vertical layers are interpolated to the z-levels in the code above, vertical resolution is greatly reduced towards the bottom and currents would be misrepresented.
Many thanks, Diego
Yes, it is possible to adjust these output z-levels after the reader is created, e.g.:
>>> r.zlevels = np.array([0, -.25, -.5, -.75, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -15, -20, -25, -30])
But for many particles and large area, interpolation might be a bottleneck, so it might be advicable to not have more depths than necessary.