Wet/dry stiffness

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
drewa
Posts: 35
Joined: Mon Dec 17, 2007 5:34 pm
Location: SCCWRP, Costa Mesa, CA

Wet/dry stiffness

#1 Unread post by drewa »

I have noticed that the stiffness numbers I get for a grid that has dry cells are quite high but if I only use the portion of the grid that is wet, things are generally fine. Is this an artifact of simply having dry cells or are my grids really messed up?[/img]

jcwarner
Posts: 1182
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

#2 Unread post by jcwarner »

not sure if the wet_dry formulations was fully realized by the grid stiffness calcs. If you do not have problems, then maybe it is genreally a reporting of info issue and not a computational issue.
-j

drewa
Posts: 35
Joined: Mon Dec 17, 2007 5:34 pm
Location: SCCWRP, Costa Mesa, CA

#3 Unread post by drewa »

John,
Thanks for that. I'm glad to know that I can (maybe) stop banging my head trying to get those numbers down.

What has creeped up now that I have freshwater coming in (thanks for that), I get unrealistic high salinities and temperature (salt goes negative as well). I've looked around the discussions and found a couple mentions of this but no good resolution to the cause.

I've played with grid size, N and some of the tracer equations. I can affect the range of bad results but can't get completely realistic results. Thanks again for thoughts on what's going on.

drew

jcwarner
Posts: 1182
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

#4 Unread post by jcwarner »

people have mentioned this before. The reasons can be due to the individual user model configurations (ie creation of sharp gradients). Try to see what the model is telling you - are you putting a river too close to the ocean without enough leading cells? Maybe make a small 1D channel with 5 or 6 cells that leads to the ocean. I don't know your setup, but maybe you are trying to do something unrealistic. Also, you can try to use mpdata as the advection scheme for tracers to see if that helps the issue.

Pysh
Posts: 30
Joined: Tue Nov 29, 2011 3:51 pm
Location: Hydrometcenter of Russia

Re: Wet/dry stiffness

#5 Unread post by Pysh »

In the module stiffness.F values of rx0 and rx1 are computed through
DO j=Jstr,Jend
DO i=IstrU,Iend
IF (umask(i,j).gt.0.0_r8) THEN
my_rx0=MAX(my_rx0,ABS((z_w(i,j,0)-z_w(i-1,j,0))/ &
& (z_w(i,j,0)+z_w(i-1,j,0))))
DO k=1,N(ng)
my_rx1=MAX(my_rx1,ABS((z_w(i,j,k )-z_w(i-1,j,k )+ &
& z_w(i,j,k-1)-z_w(i-1,j,k-1))/ &
& (z_w(i,j,k )+z_w(i-1,j,k )- &
& z_w(i,j,k-1)-z_w(i-1,j,k-1))))
END DO
END IF
END DO
END DO
If I understand correctly the principle of determining the masks and bathymetry in the nearshore points of land, where it is possible watering values should be rmask = 1, umask = 1, vmask = 1, h < 0 but rmask_wet = 0, umask_wet = 0, vmask_wet = 0 (if there is no watering at the moment).

Then, if zeta = 0 (for example, at the initial moment) the z_w(:,:,0) = -h(:,:) and in these points can be z_w(i,j,0) > 0, and z_w(i-1,j,0) < 0, (umask(i,j) = 1 and umask(i-1,j) = 1, h(i,j) < 0, h(i-1,j) > 0). But then the sum z_w(i,j,0)+z_w(i-1,j,0) can be very small or equal to zero, i.e. the value my_rx0 can be very large or equal to infinity with a sufficiently smooth relief and h <> 0.

Is it true to limit the scope of this algorithm only for the points with umask_wet = 1
DO j=Jstr,Jend
DO i=IstrU,Iend
IF (umask_wet(i,j).gt.0.0_r8) THEN
my_rx0=MAX(my_rx0,ABS((z_w(i,j,0)-z_w(i-1,j,0))/ &
& (z_w(i,j,0)+z_w(i-1,j,0))))
DO k=1,N(ng)
my_rx1=MAX(my_rx1,ABS((z_w(i,j,k )-z_w(i-1,j,k )+ &
& z_w(i,j,k-1)-z_w(i-1,j,k-1))/ &
& (z_w(i,j,k )+z_w(i-1,j,k )- &
& z_w(i,j,k-1)-z_w(i-1,j,k-1))))
END DO
END IF
END DO
END DO
and is it correct in the bathymetry smoothing process to use modules of z_w (== -h) in denominator ?
DO j=Jstr,Jend
DO i=IstrU,Iend
IF (umask(i,j).gt.0.0_r8) THEN
my_rx0=MAX(my_rx0,ABS((z_w(i,j,0)-z_w(i-1,j,0))/ &
& (ABS(z_w(i,j,0))+ ABS(z_w(i-1,j,0)))))
DO k=1,N(ng)
my_rx1=MAX(my_rx1,ABS((z_w(i,j,k )-z_w(i-1,j,k )+ &
& z_w(i,j,k-1)-z_w(i-1,j,k-1))/ &
& (ABS(z_w(i,j,k ))+ ABS(z_w(i-1,j,k )) )- &
& ABS(z_w(i,j,k-1))- ABS(z_w(i-1,j,k-1)))))
END DO
END IF
END DO
END DO
Thank you

Post Reply