## if I can set hc=Tcline>hmin?

General scientific issues regarding ROMS

Moderators: arango, robertson

Message
Author
hpd14thu
Posts: 64
Joined: Tue May 01, 2018 3:56 pm
Location: Tsinghua University

### if I can set hc=Tcline>hmin?

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!!

kate
Posts: 3780
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

### 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:

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)``````
with hmin of 2 or 5 or something.

hpd14thu
Posts: 64
Joined: Tue May 01, 2018 3:56 pm
Location: Tsinghua University

### Re: if I can set hc=Tcline>hmin?

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:

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)``````
with hmin of 2 or 5 or something.

pmaccc
Posts: 39
Joined: Wed Oct 22, 2003 6:59 pm
Location: U. Wash., USA

### 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

kate
Posts: 3780
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

### 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.

pmaccc
Posts: 39
Joined: Wed Oct 22, 2003 6:59 pm
Location: U. Wash., USA

### 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

kate
Posts: 3780
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

### 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.

pmaccc
Posts: 39
Joined: Wed Oct 22, 2003 6:59 pm
Location: U. Wash., USA

### 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