Vertical segmentation issue

Information about ongoing ROMS/TOMS applications

Moderators: arango, robertson

Post Reply
Message
Author
MoeinDst
Posts: 7
Joined: Tue Nov 22, 2022 5:31 pm
Location: University of Genoa
Contact:

Vertical segmentation issue

#1 Unread post by MoeinDst »

Hi all.
I'm trying to set-up my apllication in ROMS for different cases.I'm interested in setting-up a test-case in 2D but I receive the error mentioned below. I closed all the lateral boundaries, with constant temperature and salinity all over the domain without any forcing (everything to zero).
Resolution, Grid 01: 572x1198x1, Parallel Threads: 1, Tiling: 1x1
4400 ntimes Number of timesteps for 3-D equations.

30.000 dt Timestep size (s) for 3-D equations.

1 ndtfast Number of timesteps for 2-D equations between

<pre>At line 258 of file wvelocity.f90

Fortran runtime error: Index &apos;2&apos; of dimension 3 of array &apos;z_r&apos; above upper bound of 1

Error termination. Backtrace:

#0 0x7f946c982640 in ???

#1 0x7f946c983185 in ???

#2 0x7f946c98352a in ???

#3 0xf70767 in wvelocity_tile

at /home/moein/myROMS/my_cases/mozambique_channel/mozambique2D/Build_romsG/wvelocity.f90:258

#4 0xf813fc in __wvelocity_mod_MOD_wvelocity

at /home/moein/myROMS/my_cases/mozambique_channel/mozambique2D/Build_romsG/wvelocity.f90:74

#5 0x40f14f in main3d_

at /home/moein/myROMS/my_cases/mozambique_channel/mozambique2D/Build_romsG/main3d.f90:199

#6 0x407132 in __roms_kernel_mod_MOD_roms_run

at /home/moein/myROMS/my_cases/mozambique_channel/mozambique2D/Build_romsG/roms_kernel.f90:178

#7 0x408e54 in myroms

at /home/moein/myROMS/my_cases/mozambique_channel/mozambique2D/Build_romsG/master.f90:88

#8 0x408f8c in main

at /home/moein/myROMS/my_cases/mozambique_channel/mozambique2D/Build_romsG/master.f90:50

=================================================================

<font color="#C01C28"><b>==1650==ERROR: LeakSanitizer: detected memory leaks</b></font></pre>
I know it has something to do with the way I'm defining my vertical levels. However I could not figure it out. I ran the same conditions for my 3D case -started from upwelling case definitions and conditions, changing step by step to get closer to my application- but I fail to do it in 2D. I would appreciate it if you could help me in this regard. I'm also putting here some of the (maybe) useful info:
Tile partition information for Grid 01: 572x1198x1 tiling: 1x1



tile Istr Iend Jstr Jend Npts



0 1 572 1 1198 685256



Tile minimum and maximum fractional coordinates for Grid 01:

(interior points only)



tile Xmin Xmax Ymin Ymax grid



0 0.50 573.50 0.50 1199.50 RHO-points



0 0.00 573.00 0.50 1199.50 U-points



0 0.50 573.50 0.00 1199.00 V-points

Tracer Advection Scheme: NLM

========================



Variable Grid Horizontal Vertical

--------- ---- ------------ ------------

temp 1 Upstream3 Centered4

salt 1 Upstream3 Centered4

Activated C-preprocessing Options:


MOZAMBIQUE2D Mozambique 2D case with constant temperature/salinity

ANA_BSFLUX Analytical kinematic bottom salinity flux

ANA_BTFLUX Analytical kinematic bottom temperature flux

ANA_INITIAL Analytical initial conditions

ANA_SMFLUX Analytical kinematic surface momentum flux

ANA_SSFLUX Analytical kinematic surface salinity flux

ANA_STFLUX Analytical kinematic surface temperature flux

ANA_VMIX Analytical vertical mixing coefficients

ASSUMED_SHAPE Using assumed-shape arrays

AVERAGES Writing out time-averaged nonlinear model fields

DIAGNOSTICS_TS Computing and writing tracer diagnostic terms

DIAGNOSTICS_UV Computing and writing momentum diagnostic terms

DOUBLE_PRECISION Double precision arithmetic numerical kernel.

MASKING Land/Sea masking

MIX_S_TS Mixing of tracers along constant S-surfaces

MIX_S_UV Mixing of momentum along constant S-surfaces

NONLINEAR Nonlinear Model

!NONLIN_EOS Linear Equation of State for seawater

POWER_LAW Power-law shape time-averaging barotropic filter

PRSGRD31 Standard density Jacobian formulation (Song, 1998)

PROFILE Time profiling activated

RHO_SURF Include difference between rho0 and surface density

!RST_SINGLE Double precision fields in restart NetCDF file

SALINITY Using salinity

SOLVE3D Solving 3D Primitive Equations

TS_DIF2 Harmonic mixing of tracers

UV_ADV Advection of momentum

UV_COR Coriolis term

UV_U3HADVECTION Third-order upstream horizontal advection of 3D momentum

UV_C4VADVECTION Fourth-order centered vertical advection of momentum

UV_QDRAG Quadratic bottom stress

UV_VIS2 Harmonic mixing of momentum

VAR_RHO_2D Variable density barotropic mode
==================================================
rx0 = 9.895012E-01 (Beckmann and Haidvogel)
rx1 = 9.895012E-01 (Haney)
Attachments
roms_mozambique2d.in
(154.56 KiB) Downloaded 114 times

MoeinDst
Posts: 7
Joined: Tue Nov 22, 2022 5:31 pm
Location: University of Genoa
Contact:

Re: Vertical segmentation issue

#2 Unread post by MoeinDst »

error:
At line 258 of file wvelocity.f90

Fortran runtime error: Index 2 of dimension 3 of array z_r above upper bound of 1

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

Re: Vertical segmentation issue

#3 Unread post by wilkin »

You have ...

Code: Select all

SOLVE3D Solving 3D Primitive Equations
so you need enough vertical layers for ROMS to be able to compute vertical gradients for such things as vertical mixing and hence to impose surface and bottom stresses, etc.,

If you want a strictly 2-D solution where you are solving the shallow water equations, #undef SOLVE3D.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

MoeinDst
Posts: 7
Joined: Tue Nov 22, 2022 5:31 pm
Location: University of Genoa
Contact:

Re: Vertical segmentation issue

#4 Unread post by MoeinDst »

wilkin wrote: Wed Mar 29, 2023 2:26 pm You have ...

Code: Select all

SOLVE3D Solving 3D Primitive Equations
so you need enough vertical layers for ROMS to be able to compute vertical gradients for such things as vertical mixing and hence to impose surface and bottom stresses, etc.,

If you want a strictly 2-D solution where you are solving the shallow water equations, #undef SOLVE3D.
maybe I misunderstood the concept, but it was written that if I have temperature in my model, I have to introduce SOLVE3D in the header file! It made sense to not have it in 2D configuration, but I kept facing an error with istvar out of bound 0.
The main issue is that I face the same problem with the roms_canyon test-case. I cannot run it in 2D but if I set some vertical levels and #define SOLVE3D, I'm able to run it. Undefining SOLVE3D to run 2D yields:

Code: Select all

At line 1030 of file mod_ncparam.f90

Fortran runtime error: Index '1' of dimension 1 of array 'istvar' above upper bound of 0
This is the part that I don't really get. Even if I run my test without temperature, I receive same error with istvar being out of bound 0. However, if I #define SOLVE3D and set vertical levels, I can run the model.

Post Reply