Closed BahramKhazaei-NOAA closed 1 year ago
@BahramKhazaei-NOAA I was wrong. This capability is already in pyschism. The script to generate SZ vgrid is:
import numpy as np
from pyschism.mesh.vgrid import SZ
nvrt = 20
gd = SZ(h_s=1.e6, ztot=[-1.e6], h_c=30, theta_b=0.7, theta_f=5., sigma=np.linspace(-1, 0, nvrt))
gd.write('vgrid.in.S', overwrite=True)
@cuill Thank you for following up. I tested and it worked. This is very helpful.
Hi all, @BahramKhazaei-NOAA @cuill
My name is Jihun who started learning the SCHISM model.
I have a question about following vgrid.py code lines:
180 class SZ(Vgrid):
...
264 @property
265 def nvrt(self):
266 return self.sigma.shape[0]
In this case, the nvrt
is always the number of sigma layer regardless of the number of z layer (kz
).
Could you tell me if this is right?
nvrt is the sum of S and Z. In any case, try to use LSC^2 instead.
Thanks @josephzhang8 ! I will try to use LSC^2 instead of SZ.
I think it would be very useful if the capability for writing SZ-type vgrid.in files with more than 1 layer (for 3D modeling) is considered in future developments.
https://github.com/schism-dev/pyschism/blob/main/pyschism/mesh/vgrid.py