if I can set hc=Tcline>hmin?

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
hpd14thu
Posts: 55
Joined: Tue May 01, 2018 3:56 pm
Location: Tsinghua University

if I can set hc=Tcline>hmin?

#1 Post by hpd14thu » Mon Sep 09, 2019 4:05 pm

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

User avatar
kate
Posts: 3704
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

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

#2 Post by kate » Mon Sep 09, 2019 4:44 pm

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.

User avatar
hpd14thu
Posts: 55
Joined: Tue May 01, 2018 3:56 pm
Location: Tsinghua University

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

#3 Post by hpd14thu » Tue Sep 10, 2019 1:55 am

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.
Thank you for your help!

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

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

#4 Post by pmaccc » Tue Sep 10, 2019 11:11 pm

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

User avatar
kate
Posts: 3704
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

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

#5 Post by kate » Tue Sep 10, 2019 11:23 pm

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?

#6 Post by pmaccc » Wed Sep 11, 2019 4:01 pm

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

User avatar
kate
Posts: 3704
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

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

#7 Post by kate » Wed Sep 11, 2019 4:56 pm

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?

#8 Post by pmaccc » Wed Sep 11, 2019 6:16 pm

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

Post Reply