Opened 16 years ago
Closed 16 years ago
#313 closed bug (Fixed)
WET_DRY problem for Vstretching=2,3 in set_scoord.F
Reported by: | rsignell | Owned by: | arango |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.3 |
Component: | Nonlinear | Version: | 3.3 |
Keywords: | Cc: |
Description (last modified by )
If WET_DRY is defined and Vstretching 2 or 3 is used, ROMS will quit with an error message if there it topography above the level of the free-surface (which is generally the case in WET_DRY applications).
There are two problems:
- Looking at set_scoord.F, I see that the following lines only occur
in the Vstreching == 1 case:
# if defined WET_DRY hc(ng)=MIN(MAX(hmin(ng),0.0_r8),Tcline(ng)) # else hc(ng)=MIN(hmin(ng),Tcline(ng)) # endif
This code should be executed before the check of which stretching function was used so that it applies to all stretching functions.
- In the Vstretching=2,3 sections of the code, these lines:
hc(ng)=Tcline(ng) IF (hc(ng).le.hmin(ng)) THEN ELSE
and
WRITE (stdout,10) hc(ng), hmin(ng) exit_flag=5 END IF
should be removed, as in the Vstretching = 1 case.
My modified set_scoord.F is attached.
Attachments (1)
Change History (2)
by , 16 years ago
Attachment: | set_scoord.F added |
---|
comment:1 by , 16 years ago
Description: | modified (diff) |
---|---|
Resolution: | → Fixed |
Status: | new → closed |
No, really. I actually screw-up! There is not a limitation on hc when using Vtransform=2. This is the advantage of the new transformation, it works for both hc < hmin and hc > hmin This was an issue in the old transformation (Vtransform=1) since we cannot have [h(x,y)-hc] to be negative because dz/ds is also negative!
The check here actually needs to be done in term of Vtransform:
IF (Vtransform(ng).eq.1) THEN # if defined WET_DRY hc(ng)=MIN(MAX(hmin(ng),0.0_r8),Tcline(ng)) # else hc(ng)=MIN(hmin(ng),Tcline(ng)) # endif ELSE IF (Vtransform(ng).eq.2) THEN hc(ng)=Tcline(ng) END IF
and it is independent of the vertical stretching function (Vstretching). Then, the following constraint:
IF (hc(ng).le.hmin(ng)) THEN
needs to be removed for Vstretching=2,3.
I also corrected a bug associated with hc in ad_set_depth.F, tl_set_depth.F, and rp_set_depth.F. Many thanks to Andy Moore for discovering this bug which was introduced recently.
set_scoord.F that works with WET_DRY and Vstretching==2 or 3