The model blows up in the first step

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
zhaolv
Posts: 39
Joined: Thu Nov 11, 2021 3:56 pm
Location: Changsha University of Science and Technology

The model blows up in the first step

#1 Unread post by zhaolv »

I am using coawst to study recently, but I got an error when I tried to run the roms model alone. I think there should be no problem with my initial file data. Maybe my ocean.in file parameters are wrong?

Code: Select all

    
    GET_3DFLD   - salinity climatology,                            2018-09-16 00:00:00.00
                   (Grid=02, Rec=2, Index=2, File: Mangkhut_clm_ref3.nc)
                   (Tmin=      58376.0000 Tmax=      58378.0000)      t =      58377.0000
                   (Min =  2.54292011E+01 Max =  3.57938309E+01)
         0 2018-09-15 00:00:00.00           NaN           NaN           NaN           NaN  02
                     (191,101,16)  4.151879E-03  3.534937E-03  0.000000E+00  1.287490E+00
 Found Error: 01   Line: 341      Source: ROMS/Nonlinear/main3d.F
 Found Error: 01   Line: 331      Source: ROMS/Drivers/nl_ocean.h, ROMS_run

 Blowing-up: Saving latest model state into  RESTART file
     REASON: KEchar =      NaN, PEchar =      NaN

      WRT_RST     - wrote re-start    fields (Index=1,1) in record = 1                     01
      
I checked the main3d.F and nl_ocean.h files. The corresponding part of the code is as follows:

main3d.F Line: 341

Code: Select all

!-----------------------------------------------------------------------
!  Compute horizontal mass fluxes (Hz*u/n and Hz*v/m), density related
!  quatities and report global diagnostics.
!-----------------------------------------------------------------------
!
            DO ig=1,GridsInLayer(nl)
              ng=GridNumber(ig,nl)
              DO tile=first_tile(ng),last_tile(ng),+1
                CALL set_massflux (ng, tile, iNLM)
# ifndef TS_FIXED
                CALL rho_eos (ng, tile, iNLM)
# endif
                CALL diag (ng, tile)
# ifdef TLM_CHECK
                CALL nl_dotproduct (ng, tile, Lnew(ng))
# endif
              END DO
!$OMP BARRIER
            END DO
            IF (FoundError(exit_flag, NoError, __LINE__, MyFile)) RETURN

# if defined ROMS_COUPLING && defined MCT_LIB
nl_ocean.h Line: 331

Code: Select all

!-----------------------------------------------------------------------
!  Time-step nonlinear model over nested grids, if applicable.
#if defined MODEL_COUPLING && !defined MCT_LIB
!  Since the ROMS kernel has a delayed output and line diagnostics by
!  one timestep, subtact an extra value to the report of starting and
!  ending timestep for clarity. Usually, the model coupling interval
!  is of the same size as ROMS timestep.
#endif
!-----------------------------------------------------------------------
!
      MyRunInterval=RunInterval
      IF (Master) WRITE (stdout,'(1x)')
      DO ng=1,Ngrids
#if defined MODEL_COUPLING && !defined MCT_LIB
        NEXTtime=time(ng)+RunInterval
        ENDtime=INItime(ng)+(ntimes(ng)-1)*dt(ng)
        IF ((NEXTtime.eq.ENDtime).and.(ng.eq.1)) THEN
          extra=0                                   ! last time interval
        ELSE
          extra=1
        END IF
        step_counter(ng)=0
        NstrStep=iic(ng)
        NendStep=NstrStep+INT((MyRunInterval)/dt(ng))-extra
        IF (Master) WRITE (stdout,10) 'NL', ng, NstrStep, NendStep
#else
        IF (Master) WRITE (stdout,10) 'NL', ng, ntstart(ng), ntend(ng)
#endif
      END DO
      IF (Master) WRITE (stdout,'(1x)')
!
!$OMP PARALLEL
#ifdef SOLVE3D
      CALL main3d (MyRunInterval)
#else
      CALL main2d (MyRunInterval)
#endif
#ifdef INWAVE_MODEL
!     CALL inwave_run
#endif
!$OMP END PARALLEL

      IF (FoundError(exit_flag, NoError, __LINE__, MyFile)) RETURN
      
I initially thought that there was a problem with my .bdy and forcing files, but after checking it, I found that the data was normal. Only the ocean_time and other parameters in the bdy and clm files are different from those in the ini file. I unified them to 58376 (otherwise other errors will occur).
But I still get the error.I have attached the log file in the end.
I do have no idea about this, Can anyone give me some suggestions or ideas?
thank you very much.
Attachments
roms_mangkhut.in
(153.22 KiB) Downloaded 122 times
roms.log
(85.6 KiB) Downloaded 139 times

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

Re: The model blows up in the first step

#2 Unread post by kate »

It is bad before taking the first timestep. I would look carefully at your initial conditions.

User avatar
susonic
Posts: 167
Joined: Tue Aug 21, 2007 5:44 pm
Location: UST21 / Korea
Contact:

Re: The model blows up in the first step

#3 Unread post by susonic »

1. I see your nothern zeta,vbar and ubar value are 0.

2. Your rx0 value of the nesting model is too high.

3. It is not possible reason for blowing up, but I was wondering setting the boundary condition of the northern area as gradient for tracers?
Also western is set as a gradient instead of close.

-JH
Joonho Lee

zhaolv
Posts: 39
Joined: Thu Nov 11, 2021 3:56 pm
Location: Changsha University of Science and Technology

Re: The model blows up in the first step

#4 Unread post by zhaolv »

susonic wrote: Fri Nov 19, 2021 9:16 am 1. I see your nothern zeta,vbar and ubar value are 0.

2. Your rx0 value of the nesting model is too high.

3. It is not possible reason for blowing up, but I was wondering setting the boundary condition of the northern area as gradient for tracers?
Also western is set as a gradient instead of close.

-JH
Thanks for your guidance, I did find that rx0 is too large, and the TotVolume value of grid 2 is NaN. I want to know how this problem arises and whether I need to modify my initial grid.

Regarding the boundary issue, I used the in file of the Sandy case that comes with coawst, and the boundary part has not been modified. In addition, I set the northern and western borders to Gra, which seems to have no effect on the results.

Below I provide the in file of Sandy's case. I can run this case.
Attachments
ocean_sandy.in
(152.84 KiB) Downloaded 123 times

zhaolv
Posts: 39
Joined: Thu Nov 11, 2021 3:56 pm
Location: Changsha University of Science and Technology

Re: The model blows up in the first step

#5 Unread post by zhaolv »

kate wrote: Thu Nov 18, 2021 7:01 pm It is bad before taking the first timestep. I would look carefully at your initial conditions.
Thank you for your attention.

This is my bdy, clm and ini files, you can view them if you need them.
I have been studying this problem for a long time, please help me
Attachments
roms_mangkhut.rar
(15.55 MiB) Downloaded 126 times

Post Reply