ROMS model blow up in new version while work fine in older version

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
PenguinDrum
Posts: 4
Joined: Wed Jun 01, 2022 5:01 pm
Location: Ocean University of China

ROMS model blow up in new version while work fine in older version

#1 Post by PenguinDrum »

Hello everyone,

I have encontoured a problem when migrating my roms version from V4.1 to the newest develop branch on github.
The same configuration works fine on older version, but blow up in the newest version after 20-30 steps with KEchar = NaN, PEchar = NaN.
I wonder if there is significant change in the newest version? The attacthment is an example of a 0.5 deg North Pacific run, comments on the configuration are welcomed.

Current version:
GIT Revision : f8a3aaa205daaec17c52f028ba62961cc481d379

Thank you!
Zhe


%%%%%%%%%%%%%%%%%%%%%%%%
Update:

Problem solved with compiling ROMS with COARE3.0 by adding

Code: Select all

#define COARE_30
to the header file. Hope this will help someone encontour similar problem with me.
Attachments
np_coarse.h
(1.21 KiB) Downloaded 35 times
Last edited by PenguinDrum on Fri Nov 28, 2025 4:53 am, edited 1 time in total.

talebu
Posts: 4
Joined: Fri Aug 22, 2025 3:17 pm
Location: Norwegian meteorological institute

Re: ROMS model blow up in new version while work fine in older version

#2 Post by talebu »

Hi

How do you compile ROMS? I had a similar problem when trying the sea ice model, but when I compiled with -mcmodel=large, the program worked fine.

chenhj
Posts: 5
Joined: Fri Mar 29, 2024 11:56 am
Location: Sun-Yat Sen University

Re: ROMS model blow up in new version while work fine in older version

#3 Post by chenhj »

Hi, PenguinDrum

You may check if you are using COARE3.5 in your newest ROMS.

If yes, this may be the same issue I encountered several weeks ago. And I found this was relating to the COARE3.5.

Here are several options you can try and see if your problem still exist:

- recompile the ROMS with COARE3.0
- change your atmospheric forcing (for example, from ERA5 to JRA3Q)
- modify the height of atmospheric forcing to a larger number (for example, from 10 to 20)

PenguinDrum
Posts: 4
Joined: Wed Jun 01, 2022 5:01 pm
Location: Ocean University of China

Re: ROMS model blow up in new version while work fine in older version

#4 Post by PenguinDrum »

talebu wrote: Thu Nov 27, 2025 10:47 am Hi

How do you compile ROMS? I had a similar problem when trying the sea ice model, but when I compiled with -mcmodel=large, the program worked fine.
Hi talebu,
Thanks for your reply and recommdation. I compile ROMS with the default build_roms.sh with intel mpi 2023. The problem remians after I add -mcmodel=large to both FFLAGS and CPPFLAGS.
Anyway, thanks for your recommdation.

PenguinDrum
Posts: 4
Joined: Wed Jun 01, 2022 5:01 pm
Location: Ocean University of China

Re: ROMS model blow up in new version while work fine in older version

#5 Post by PenguinDrum »

chenhj wrote: Fri Nov 28, 2025 4:34 am Hi, PenguinDrum

You may check if you are using COARE3.5 in your newest ROMS.

If yes, this may be the same issue I encountered several weeks ago. And I found this was relating to the COARE3.5.

Here are several options you can try and see if your problem still exist:

- recompile the ROMS with COARE3.0
- change your atmospheric forcing (for example, from ERA5 to JRA3Q)
- modify the height of atmospheric forcing to a larger number (for example, from 10 to 20)
Hi chenhj
Thank you for the reply and recommdation. I have re-compiled the ROMS with COARE3.0 and everything works fine again. :)

chenhj
Posts: 5
Joined: Fri Mar 29, 2024 11:56 am
Location: Sun-Yat Sen University

Re: ROMS model blow up in new version while work fine in older version

#6 Post by chenhj »

Glad to hear that.

User avatar
wilkin
Posts: 943
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: ROMS model blow up in new version while work fine in older version

#7 Post by wilkin »

Did you really use the syntax

Code: Select all

!#define ...
with an exclamation mark before the #define in your CPP definitions file?

I would have expected that to throw a syntax error in the C-Preprocessor.

I am concerned that the options you think you have selected may not be what you actually got.

The way to comment out code in the CPP definitions to to encompass them in /* ... */

Code: Select all

/* commented text */
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

PenguinDrum
Posts: 4
Joined: Wed Jun 01, 2022 5:01 pm
Location: Ocean University of China

Re: ROMS model blow up in new version while work fine in older version

#8 Post by PenguinDrum »

wilkin wrote: Sun Nov 30, 2025 10:00 pm Did you really use the syntax

Code: Select all

!#define ...
with an exclamation mark before the #define in your CPP definitions file?

I would have expected that to throw a syntax error in the C-Preprocessor.

I am concerned that the options you think you have selected may not be what you actually got.

The way to comment out code in the CPP definitions to to encompass them in /* ... */

Code: Select all

/* commented text */
Hi wilkin,
Thanks for your recommdation.
Sorry for my poor konwledge on coding, the way I comment the code is used in Fortran.
It works fine so far as I check the Activated C-preprocessing Options of ROMS output everytime.
I am going with a more elegant way like #undef or /*...*/ in the future.

Post Reply