New S-coordinate transformation; question about hc

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
PasaricZoran
Posts: 1
Joined: Tue Jul 13, 2004 5:36 pm
Location: Geophysical Institute, Fac. Sci. Uni. Zagreb

New S-coordinate transformation; question about hc

#1 Unread post by PasaricZoran »

This is my first post, so hello to everybody. Regarding ROMS I am a
novice.

I am trying to understand and get feeling for the S-coordinate
transformation, both the old and the new one, and found myself
somewhat confused with parameter h_c (or hc).

In Modules/mod_scalars.F it is called S-coordinate critical depth, and
defined as hc=MIN(hmin,Tcline).

In Utility/set_scoord.F, (the old and the new one, version 322) and
only there, it is calculated as stated above: hc(ng) =
MIN(hmin(ng),Tcline(ng))

It follows that hs can't be smaller then the minimal depth. Yet, in
Utility/set_scoord.F, and also at
https://www.myroms.org/wiki/index.php?t ... transform1
the case h(x,y) << hc is discussed.


On the other side, looking at both transformations, it is
straightforward to write both of them in the analogous way. With the
notation as in the above mentioned web page, the old transformation
reads (without reference to free surface):

zhat = S'*h, S' = (hc/h)*s + (1-hc/h)*C (T1).

Here, the S' is mine, S'=S/h. The new transformation reads

zhat = S*h, S = (hc/(hc+h))*s + (1-hc/(hc+h))*C (T2).

(S' in (T1) corresponds to S in (T2)).


It follows that in the old transformation the hc being bigger then
hmin
does not make sense, but in the new one, it does. This is
supposed in the comments listed above, yet it is not allowed in the
(new) code.

I would appreciate if somebody could clarify this. Maybe with (T2), the
hc should be defined as hc = Tcline?

User avatar
arango
Site Admin
Posts: 1368
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: New S-coordinate transformation; question about hc

#2 Unread post by arango »

PasaricZoran wrote:In Utility/set_scoord.F, (the old and the new one, version 322) and only there, it is calculated as stated above: hc(ng)=MIN(hmin(ng),Tcline(ng))
Actually, the assignment of hc was missing and corrected in :arrow: src:ticket:298. Please update.

Code: Select all

        hc(ng)=Tcline(ng)
It is now desired for both hc(ng) and Tcline(ng) to be the same. The value of hc needs to be less or equal to the minimum allowed depth. The following assignment, in the old transformation,

Code: Select all

        hc(ng)=MIN(hmin(ng),Tcline(ng))
is kept for backward compatibility. This equality is modified a little when WET_DRY is activated.

rgeyer

Re: New S-coordinate transformation; question about hc

#3 Unread post by rgeyer »

For the algorithm i was working on, i think hc can be roughly translated to be the thickness of the increased resolution zone. hc=1 m seems like a good choice for fine-resolution bls. If you're using my version, then theta_s=1 and theta_b=1.5 provides good resolution in the bbl across a wide range of depths and also increased surface res. (note you need a fair number of vertical grid cells, maybe 20)

johnluick

Re: New S-coordinate transformation; question about hc

#4 Unread post by johnluick »

I believe there is a minor error in scoord.F. It only affects writing to stdout.
(Version 348 2009-04-17).

The line near the end that reads
cff1=hc(ng) *(SCALARS(ng)%sc_w(k)*hc(ng)+ &
& SCALARS(ng)%Cs_w(k)*hc(ng))/(hc(ng)+hc(ng))

should read

cff1=hmin(ng) *(SCALARS(ng)%sc_w(k)*hmin(ng)+ &
& SCALARS(ng)%Cs_w(k)*hc(ng))/(hc(ng)+hmin(ng))

John

User avatar
arango
Site Admin
Posts: 1368
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: New S-coordinate transformation; question about hc

#5 Unread post by arango »

Yes, good catch. I corrected the writing to standard output in set_scoord.F. Check the following track :arrow: ticket. Actually, all the values for hmin, hmax+hmin/2, and hmax were incorrect.

Thank you for reporting this typo :wink:

Post Reply