BLOWING UP IN THE BOUNDARY

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
dnavidad

BLOWING UP IN THE BOUNDARY

#1 Unread post by dnavidad »

Hello ROMSusers,

After work in the bathymetry, doing some improving and smoothing i got the model start to run in my area, (but not without blowing-up after several steps). I think that bathymetry is quite smooth and unrealistic points in deep water have disappeared. The bathymetry has no any min_depth added (to avoid zero values) and keep negatives values for land. i am using the option wet_dry in such case.

Code: Select all

#define WET_DRY                 /* use to activate wetting and drying*/
Regarding the grid, working with easygrid seems to work better in my case. The resolution of the grid is dx, dy = 100m approx. and Lx and Ly values are 54Km and 67km approx. respectively and h_max ~ 200m. Let me enclosed a picture with some parameter (ncview_snapshot.png) of the bathymetry.


I tried with different values for dt, say 30,10,5,1. The model finally blow-up after several time steps, farther as dt is smaller of course. For instance, with 30s the model performs only 30 time step, with 10s around 82,...and 1194 steps with 1s for dt.

The initial conditions is the rest for momentum and free-surface. The boundary conditions for free-surface are imposed analytical by ana_fsobc.h as follow (linear wave with 12h period and 3m of amplitude in the open boundaries)

Code: Select all

# ifdef WEST_FSOBC
   IF (WESTERN_EDGE) THEN
   cff=3.0_r8*SIN(2.0_r8*pi*time(ng)/(12.0_r8*3600.0_r8))
    DO j=JstrR,JendR
      BOUNDARY(ng)%zeta_west(j)=cff
    END DO
   END IF
#endif   

# ifdef NORTH_FSOBC
   IF (NORTHERN_EDGE) THEN
    cff=3.0_r8*sin(2.0_r8*pi*time(ng)/(12.0_r8*3600.0_r8))
    DO i=IstrR,IendR
     BOUNDARY(ng)%zeta_north(i)=cff
    END DO
   END IF
# endif      

# ifdef SOUTH_FSOBC
  IF (SOUTHERN_EDGE) THEN
   cff=3.0_r8*sin(2.0_r8*pi*time(ng)/(12.0_r8*3600.0_r8))
   DO i=IstrR,IendR
    BOUNDARY(ng)%zeta_south(i)=cff
   END DO
  END IF
# endif



and for momentum given by default in ana_m2fobc.h and ana_m3fobc.h so they should be zero quantities.


The problem came from the west boundary (left in the picture) a fast and high growth rate for variables is observed in the middle lower part of this boundary. find enclosed a picture (results.png). Also i attach a snapshot of bathymetric profiles (profiles.png) where can be noticed that bathymetry has not any shoal (the green one contains the river.)



I wonder what is the cause of the problem. If it is a bathymetry effect in the boundary, i would make another grid which west boundary start around 100m depth where would leave parallel to this boundary. Also seem to be a boundary problem so maybe the boundary conditions are no appropiated. In this hand i would ask some advise on how to treat the boundary conditions properly and if mines are correct.

many thanks in advance.
Attachments
profiles.png
profiles.png (126.62 KiB) Viewed 5713 times
results.png
ncview_snapshot.png

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: BLOWING UP IN THE BOUNDARY

#2 Unread post by kate »

I don't know what boundary options you've picked, but having zero flow through the boundaries is inconsistent with a zeta that's oscillating up and down. Setting the flow through the boundary is going to help a lot, I expect. Figure out the volume change between low tide and high tide and get that water in and out.

dnavidad

Re: BLOWING UP IN THE BOUNDARY

#3 Unread post by dnavidad »

Many thanks kate (very gratefull).

Of course, these boundary conditions are not suitable but seemed the easiest way to start. i think they just come from the corresponding ana_***.h files (leave it untouched). Please, let me post a couple of comments.

1. i've rotated my grid a little bit more from 45 to 52 degrees (counterclockwise) and decreasing the X lenght of the grid, getting to match (better) the west boundary grid with an almost-constant bathymetric line (~150m). Running the model again, i don't see this blowing up at the beginning of the computation and close to the west boundary, but it finally does at 5176 step (reflections are observed with coast line and also in the boundary resulting in extremely high free surface and velocities; better bc will improve that, i expect ). So, maybe with a best bc will be imposed, to take that into account(grid rotating and matching with constant depth line) could be better in my case.

2. anyway, i am focusing in the boundary conditions. i've heard and read about Chapman and Flather boundary conditions and seems to be the suitable for a good tidal forcing (Fjord Tidal Test Case).

some advises or comments will be always welcome.

many thanks in advanced.

dnavidad

Re: BLOWING UP IN THE BOUNDARY

#4 Unread post by dnavidad »

i reduced the depth in the west boundary making to match this side with a constant depth around 100m.

i've imposed chapman and flather conditions and also i am imposing the same tidal forcing, sinusoidal wave with constant amplitude and period. Seem to be better i don't have any blowing up and the values for free-surface and velocities have "normal" range.

i still have the boundary condition for velocity from ana_m2obc.h and ana_m3obc.h by default.


is there anyway to avoid use that analytical files and activate some commands in .h file that add the suitable current in the boundary given the free (analytical)surface?

i have seen this commands:

ADD_FSOBC /*use to add tidal elevation to processed open boundary conditions data*/
ADD_M2OBC /*use to add tidal currents to processed open boundary conditions data */

seem to be commands used when a data file for tide is provide, isn't it? i am not clear if they can be useful when you imposed an analytical tide in the boundary like my case. should they work in that case?

thanks.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: BLOWING UP IN THE BOUNDARY

#5 Unread post by kate »

The ADD_FSOBC is for when you have tides from a tide file and you want to add on a zeta with lower frequency variability.

I think ROMS has what you are looking for in the M2REDUCED boundary conditions.

dnavidad

Re: BLOWING UP IN THE BOUNDARY

#6 Unread post by dnavidad »

thanks for you reply, very grateful.

yes, i think these commands (also ssh_tide, ramp, uv_tide i guess) are suitable when forcing with realistic-tide files and will be the next step. btw what is pointed nudging for? also for gauge data?

For my purposes now, be sure that grid is ok, wet_dry is working well and boundary are not doing strange things, i will (i am doing) try that kind of command.

really thanks for your replies and unselfish help and apologizes for so many questions.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: BLOWING UP IN THE BOUNDARY

#7 Unread post by kate »

I'm glad things are better and making sense.
dnavidad wrote:btw what is pointed nudging for? also for gauge data?
I'm afraid I don't understand the questions.

dnavidad

Re: BLOWING UP IN THE BOUNDARY

#8 Unread post by dnavidad »

just referring to EAST_TNUDGING, EAST_M3NUDGING. i have seen them there around some posts, .h templates. i think they are for tracers, aren't they. Are they important for boundary conditions?

BTW, i am doing some test with open boundary condition:

1)i am keeping #define ANA_FSOBC to imposed analytical tide and i do undef ANA_M2OBC to don't impose any value for momentum.

2) For free surface i impose the chapman condition.

3) For momentum trying M2REDUCED or FLATHER condition

when i have FLATHER conditions (with not ANA_M2OBC defined) i did get an error message about ocean_bry.nc file

"ocean_bry.nc doesn't find"

does make that any sense?

thanks.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: BLOWING UP IN THE BOUNDARY

#9 Unread post by kate »

Yes, it makes sense. The Flather condition is looking for values of the depth-integrated velocity. You are no longer providing it via the ana_ file, so now it will look for an external file.

My default boundary conditions are tides from a model (including both zeta and ubar/vbar) plus 3-D fields from a different model. The 3-D fields are using this.

dnavidad

Re: BLOWING UP IN THE BOUNDARY

#10 Unread post by dnavidad »

thanks, kate.

i think the boundary condition issue it is ok. with your comment and some views at roms tests i finally set FSBOC_REDUCED and ***_M2REDUCED,***_FSCHAPMAN and ***_M3RADIATION where ***=N',W',S' boundary. all three wave front are observed from this boundary as is expected. i've also activated WET_DRY and deactivated MASKING. My dx=dy=100m the model only run several steps (1260) until, finally, it blow up.

Blowing-up: Saving latest model state into RESTART file


External mode or dt = dx/sqtr(gh_max)=3.5s; for 3D computations dt=1s (i tried first 20s,10s) and ndtfast=30s, so for 2D computations dt=0.03s (very small?)

let me enclosed some results. Profiles are defined in panel B.

1. The values for zeta in the boundary are reasonable: 0.1m and 2.3m at 360s and 6120s respectively. See contour in panel A y E. Also no highly extreme values (like hundred or so are obtained but the model blow up), the last saved step is panel E.

2. if masking is not activated why i don't see any wet_dry effect?. Although my h is 2m everywhere beyond the coastline (wouldn't be -2m) and zeta is -1.9m (why this value?). please, see zeta and h profiles in panel C and D.

3. which value i should imposed for this variable in input file DCRIT? ( Minimum depth for wetting and drying.)

seeming that bc, time step (maybe so small) are working well could be the wet_dry or land issue the problem? maybe reflection in the coastline? how to solve or figure out that?

thousand thanks in advance.
Attachments
Picture1.png
Picture2.png
Picture3.png

dnavidad

Re: BLOWING UP IN THE BOUNDARY

#11 Unread post by dnavidad »

i am testing with WET_DRY and MASKING

regarding i read about previous post on wet_dry:

nganju in viewtopic.php?f=17&t=2317&p=8467&hilit=wet_dry#p8467
Yes, even with masking the minimum depth must be greater than zero, even in masked cells.
With wetting and drying, you activate "WET_DRY", and specify your mask as cells which should never become wet. You then have the option of making any wet cell a negative depth. When zeta exceeds that depth+dcrit (critical water depth specified in input file) the cell will become wet and active for computations. You can search the forum for wet_dry and you will find advice on using those options.
kate
h is the depth in meters and should be nonzero everywhere - unless you have WET_DRY defined.
i am not clear at all, about if with WET_DRY i can keep negatives values in the my grid file and if i have to add some minimum depth, or if MASKING and WET_DRY should be activated the same time.

thanks in advance.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: BLOWING UP IN THE BOUNDARY

#12 Unread post by kate »

If you have MASKING and WET_DRY, then the masked points can never get wet.

Since your model is blowing up at roughly 900 seconds no matter the timestep, you can back off to the longer end for quicker debugging.

dnavidad

Re: BLOWING UP IN THE BOUNDARY

#13 Unread post by dnavidad »

thanks,

first i am trying activating masking.

dnavidad

Re: BLOWING UP IN THE BOUNDARY

#14 Unread post by dnavidad »

kate, i 've some .h file of real case where wet_dry and masking is used to avoid have negatives values. i think can be an option but i guess that, not being interested in WET_DRY, the best way to do that is to set the land positive everywhere, do land/sea mask, activate MASKING and do not activate WET_DRY, right?

i would like to make a question about the wet_dry masks. i make the masks when making the grid via easygrid. i have got the mask_rho, mask_psi, mask_u and mask_v being all the same (mask.png). Having the WET_DRY option activated three more mask can be obtained (assume are made by ROMS this masks when the option is activated) and can be plotted with ncview (ncview_mask.png), for instance.

The point is that wetdry_mask_rho is the same than before, but wetdry_mask_u=wetdry_mask_v=0 everywhere,is that correct? in the results seem that velocities are doing the wet_dry but not for zeta, does that make any sense?

thanks.
Attachments
ncview.png
ncview.png (1.2 KiB) Viewed 5446 times
ncview_wetdry.png
ncview_wetdry.png (2.15 KiB) Viewed 5446 times
mask.png
mask.png (7.15 KiB) Viewed 5446 times

Post Reply