Hello everyone,
I am new to using ROMS. These days, I simulate the ocean in China's Hangzhou Bay region. I have a problem. After several days or even months of running, it will blow up, the error is MaxDensity. The blow up occurred at a constant location, in an area of sudden decrease in depth from estuaries to the ocean.
When the error occurs, it is usually at rising tide. There are outliers in salinity and large negative values in U velocity (westward). At the same time, zeta will become so low that it will be almost at the bottom of the sea.
This error can be mitigated by increasing the RDRG (3e-4 -> 5e-4) to reduce the current speed, but it can make the current speed lower than it actually is. Besides, I could use a smaller minimum depth(2m, 5m -> 10m), or use a flatter terrain by raising rX0 / RX1 to prevent errors, but that would change the actual terrain.
The following is my model configuration: 1km * 1km, rectangular grid, tidal forcing (Hangzhou Bay has a strong tidal effect), atmospheric forcing, boundary forcing, river forcing. The dt is 60 seconds. Using a shorter step will also cause errors. Detailed parameters are in the attachment.
MaxDensity error where the h changes rapidly
MaxDensity error where the h changes rapidly
- Attachments
-
- hzw.in
- (156.3 KiB) Downloaded 326 times
-
- hzw.h
- (5.23 KiB) Downloaded 345 times
-
- ocean_rst.tar.gz
- (17.03 MiB) Downloaded 366 times
-
- p4.png (20.42 KiB) Viewed 10648 times
-
- p1.png (21.57 KiB) Viewed 10648 times
Re: MaxDensity error where the h changes rapidly
where are the locations for the : LwSrc == T
Re: MaxDensity error where the h changes rapidly
locations are:
0,57
31,47
52,76
13,65
91,61
129,19
I'm uploading river file and locations image.
I'm not sure if rivers are the cause of the error. I tried to disable rivers, and it still blow up at almost the same time. (with rivers: 1-2 3:29; without rivers:1-2 3:28)
- Attachments
-
- snipaste_20220725_212654.png (15.54 KiB) Viewed 10582 times
-
- roms_rivers.nc
- (4.71 KiB) Downloaded 365 times
- arango
- Site Admin
- Posts: 1367
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: MaxDensity error where the h changes rapidly
The temperature or salinity is getting very high in those places. That is, the model is blowing up. You must check the bathymetry, minimum depth allowed (cannot be zero), and r-factors. Recall that ROMS has terrain-following coordinates and needs to stack N-levels between bathymetry and the free surface. If h is very small, the vertical level thicknesses are even smaller and subject to vertical CFL conditions for stability. Also, we divide by h into some terms of the governing equations. For any ROMS application, you need to consider all those grid issues before preparing initial and boundary fields and running.
Re: MaxDensity error where the h changes rapidly
Thank you for your patient reply.arango wrote: ↑Mon Jul 25, 2022 2:32 pm The temperature or salinity is getting very high in those places. That is, the model is blowing up. You must check the bathymetry, minimum depth allowed (cannot be zero), and r-factors. Recall that ROMS has terrain-following coordinates and needs to stack N-levels between bathymetry and the free surface. If h is very small, the vertical level thicknesses are even smaller and subject to vertical CFL conditions for stability. Also, we divide by h into some terms of the governing equations. For any ROMS application, you need to consider all those grid issues before preparing initial and boundary fields and running.
My figure (p4) may have caused some misunderstanding. When the blue part is 0, it represents land, instead of the part of the ocean where h=0.
In my simulation area, the water is shallow. In order to make the simulation realistic, I need to set a relatively small Hmin. I have tried to increase the Hmin to 5m and only used 5 vertical layers to avoid error. The r-factor of the grid is 0.1.
I uploaded the output down below.
Thanks again.
- Attachments
-
- output.txt
- (379.29 KiB) Downloaded 351 times