Hello everyone,
I found that in init.matlab pre-processing file, people set hc=min(hmin,Tcline), but my hmin is very small(2m), so I want to set a bigger hc=Tcline(50m)(change the code hc=min(hmin,Tcline) to hc=Tcline). I wonder that if it's OK?
Thank you!!
if I can set hc=Tcline>hmin?
Re: if I can set hc=Tcline>hmin?
It depends on which vertical "transform" function you use. The old one needed Tcline <= hmin, but the new one does not. I'm sure there's plenty of code still around from the bad old days. I use:
with hmin of 2 or 5 or something.
Code: Select all
Vtransform == 2 ! transformation equation
Vstretching == 4 ! stretching function
THETA_S == 7.0d0 ! surface stretching parameter
THETA_B == 2.0d0 ! bottom stretching parameter
TCLINE == 250.0d0 ! critical depth (m)
Re: if I can set hc=Tcline>hmin?
Thank you for your help!kate wrote:It depends on which vertical "transform" function you use. The old one needed Tcline <= hmin, but the new one does not. I'm sure there's plenty of code still around from the bad old days. I use:with hmin of 2 or 5 or something.Code: Select all
Vtransform == 2 ! transformation equation Vstretching == 4 ! stretching function THETA_S == 7.0d0 ! surface stretching parameter THETA_B == 2.0d0 ! bottom stretching parameter TCLINE == 250.0d0 ! critical depth (m)
Re: if I can set hc=Tcline>hmin?
I have a related question. I have a grid where the min value of h is 4 m, and I specify Tcline = 10 m in the .in file. So if I am understanding things right ROMS should use hc = 4 m when calculating the z coordinates (I use Transform function 2 and Stretching function 4). Yet in my history files the variable hc has value 10. What is going on here? Where is hmin actually calculated in the code and why do my history files have hc = 10 when it should be 4?
Thanks, Parker
Thanks, Parker
Re: if I can set hc=Tcline>hmin?
Actually, no, you want hc = Tcline = 10 m. It was only with the bad old stretching that the code enforced hc = Tcline = hmin.
The stretching is meant to be "z-like" above Tcline (hc). Having the old way meant that the z-like part of your domain could only be above hmin. Meanwhile, I was getting away with shallower and shallower values of hmin, especially with wetting and drying, but I still want "z-like" coordinates down to the same depth.
The stretching is meant to be "z-like" above Tcline (hc). Having the old way meant that the z-like part of your domain could only be above hmin. Meanwhile, I was getting away with shallower and shallower values of hmin, especially with wetting and drying, but I still want "z-like" coordinates down to the same depth.
Re: if I can set hc=Tcline>hmin?
Kate, thanks for your helpful response. I agree that what I want to use for hc is the Tcline I specify in the .in file. What is still unclear to me is if "hmin" is used anywhere in the calculation of z.
From the "warning" paragraph here: https://www.myroms.org/wiki/Vertical_S-coordinate one way of reading the description is that hc = min(hmin, Tcline) is a strict rule. Am I wrong about this? Is it instead the case that newer versions of ROMS use hc = Tcline?
Thanks,
Parker
From the "warning" paragraph here: https://www.myroms.org/wiki/Vertical_S-coordinate one way of reading the description is that hc = min(hmin, Tcline) is a strict rule. Am I wrong about this? Is it instead the case that newer versions of ROMS use hc = Tcline?
Thanks,
Parker
Re: if I can set hc=Tcline>hmin?
hmin is no longer used in computing z. If you keep reading in the Warning, it says the restriction was removed.
Re: if I can set hc=Tcline>hmin?
Thanks very much for the clarification, Kate. It was unclear to me in the wiki which restriction was removed. And now I see in ROMS/Utility/set_scoord.F where this is implemented (lines 176-178 in the version I have):
ELSE IF (Vtransform(ng).eq.2) THEN
hc(ng)=Tcline(ng)
END IF
ELSE IF (Vtransform(ng).eq.2) THEN
hc(ng)=Tcline(ng)
END IF