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?
New S-coordinate transformation; question about hc
-
- Posts: 1
- Joined: Tue Jul 13, 2004 5:36 pm
- Location: Geophysical Institute, Fac. Sci. Uni. Zagreb
- 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
Actually, the assignment of hc was missing and corrected in src298. Please update.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))
Code: Select all
hc(ng)=Tcline(ng)
Code: Select all
hc(ng)=MIN(hmin(ng),Tcline(ng))
Re: New S-coordinate transformation; question about hc
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)
Re: New S-coordinate transformation; question about hc
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
(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
- 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
Yes, good catch. I corrected the writing to standard output in set_scoord.F. Check the following track ticket. Actually, all the values for hmin, hmax+hmin/2, and hmax were incorrect.
Thank you for reporting this typo
Thank you for reporting this typo