Wet/dry stiffness
Wet/dry stiffness
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]
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
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
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.
Re: Wet/dry stiffness
In the module stiffness.F values of rx0 and rx1 are computed through
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
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).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
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
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_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
Thank youDO 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