Ask Your Question

Idealized simulation keeps blowing up

asked 2021-03-16 01:13:16 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >5 is welcome to improve it.

Dear all,

I am having trouble running my idealized simulation with CROCO v1.1 as it keeps blowing up having large values of ssh (10+ m), u, v (10+ m/s)). I would like some input from you. Just to be clear, I have been using ROMS for years, but my experience is based on Rutgers ROMS, not ROMS-AGRIF or CROCO.

The model has a simple shelf and deepwater bathymetry for x-direction and it does not change along the y-direction (see figure below).

image description

I started with no-force simulation and the model blew up after hours (i.e. simulation hours). Maximum rx0 and rx1 are <0.01 and ~1.5, respectively. OBCs are all closed and forcing and initial conditions (constant: ssh=u=v=0 and t=25, s=35) are all analytical.

image description

image description

Then I tried to run with Rutgers ROMS (COAWST) using a similar configuration and the grid file and it ran fine. No blow-up. So I must have done something wrong for CROCO, but I don't know what's wrong with my setting.

The following is my cppdefs.h.

# define MPI
# define SOLVE3D
# define UV_COR
# define UV_ADV
# define ANA_INITIAL
# define SALINITY
# define MASKING
# define NONLIN_EOS
# define ANA_SSFLUX
# define ANA_SRFLUX
# define ANA_STFLUX
# define ANA_BSFLUX
# define ANA_BTFLUX
# define ANA_SMFLUX
# define ANA_VMIX
# undef OBC_NORTH
# undef OBC_SOUTH
# undef OBC_WEST
# undef OBC_EAST
# define SPONG
# define NO_FRCFILE

# include "cppdefs_dev.h"
# indlude "set_global_definitions.h"

I wonder if anyone can identify the source of the problem. You can download the grid file from the following link.

link text

Any comments/suggestions would be appreciated. Thanks in advance.

Best regards,


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2021-03-16 07:30:48 +0200

There are two test cases for internal tides over a shelf in CROCO: INTERNAL (with INTERNALSHELF defined) and IGW. Did you look at them (and try them)? You could compare you configuration and see what are the differences. The blow up appears in shallow water. What is you minimum depth?

Also what is MMm0 in param.h? In our test cases, Mm0=3 and NS_PERIODIC is defined, but alternatively you can have Mm0=1 and closed BCs (no longsore currents in this case).

edit flag offensive delete link more


My model has 994 x 14 grids (on rho grids) and 50 vertical layers. I put MMm0=12 and LLm0=992 and N=50. The minimum depth is 10 meters.

DJ gravatar imageDJ ( 2021-03-16 17:10:29 +0200 )edit

Also, I tried two internal tide cases and both ran without any errors. Then I checked the grid file of the IGW test case, Everything looks similar to mine except dmde and dndx. Since IGW uses uniform resolution, both dmde and dndx should be zeros everywhere, but dmde has -0.16. Why?

DJ gravatar imageDJ ( 2021-03-16 17:12:14 +0200 )edit

mine has dmde and dndx all zeros, by the way. Other than that, there are no red-flags. Oh, I made dummy values for lon and lat as I use Cartesian coordinate, but that should not be a problem.

DJ gravatar imageDJ ( 2021-03-16 17:14:39 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2021-03-16 01:13:16 +0200

Seen: 18 times

Last updated: Mar 16