At line 1030 of file mod_ncparam.f90
Fortran runtime error: Index '1' of dimension 1 of array 'istvar' above upper bound of 0
Error termination. Backtrace:
#0 0x7f0dff3c7640 in ???
#1 0x7f0dff3c8185 in ???
#2 0x7f0dff3c852a in ???
#3 0x97da1a in __mod_ncparam_MOD_initialize_ncparam
at /home/moein/myROMS/my_cases/mozambique_channel/mozambique2D/Build_romsG/mod_ncparam.f90:1030
#4 0x105f016 in read_phypar_
at /home/moein/myROMS/my_cases/mozambique_channel/mozambique2D/Build_romsG/read_phypar.f90:224
#5 0x67a8db in __inp_par_mod_MOD_inp_par
at /home/moein/myROMS/my_cases/mozambique_channel/mozambique2D/Build_romsG/inp_par.f90:84
#6 0x40722e in __roms_kernel_mod_MOD_roms_initialize
at /home/moein/myROMS/my_cases/mozambique_channel/mozambique2D/Build_romsG/roms_kernel.f90:86
#7 0x408770 in myroms
at /home/moein/myROMS/my_cases/mozambique_channel/mozambique2D/Build_romsG/master.f90:75
#8 0x408dac in main
at /home/moein/myROMS/my_cases/mozambique_channel/mozambique2D/Build_romsG/master.f90:50
!
isBp2d=isFsur ! 2D PSI-variables
isBr2d=isFsur ! 2D RHO-variables
isBu2d=isUbar ! 2D U-variables
isBv2d=isVbar ! 2D V-variables
isBp3d=isTvar(1) ! 3D PSI-variables
isBr3d=isTvar(1) ! 3D RHO-variables
isBu3d=isUvel ! 3D U-variables
isBv3d=isVvel ! 3D V-variables
isBw3d=isTvar(1) ! 3D W-variables
!
However, by defining SOLVE3D and putting vertical levels, I can run it in 3D. Moreover, I have the same issue with my own set-up for my study area that I cannot run it in 2D.
I would truly appreciate it if you could help me in this regard.
!
! Set generic lateral boundary indices for LBC structure. Use the same
! values of the state variables at the same C-grid location. Generic
! indices are used for testing periodicity. The PSI-variables and
! W-variables are assigned the same value as the RHO-variables.
!
isBp2d=isFsur ! 2D PSI-variables
isBr2d=isFsur ! 2D RHO-variables
isBu2d=isUbar ! 2D U-variables
isBv2d=isVbar ! 2D V-variables
#if defined SOLVE3D
isBp3d=isTvar(1) ! 3D PSI-variables
isBr3d=isTvar(1) ! 3D RHO-variables
isBu3d=isUvel ! 3D U-variables
isBv3d=isVvel ! 3D V-variables
isBw3d=isTvar(1) ! 3D W-variables
# if defined GLS_MIXING || defined MY25_MIXING
isMtke=isTvar(MT)+1 ! turbulent variables
# endif
#endif
!
! Set generic lateral boundary indices for LBC structure. Use the same
! values of the state variables at the same C-grid location. Generic
! indices are used for testing periodicity. The PSI-variables and
! W-variables are assigned the same value as the RHO-variables.
!
isBp2d=isFsur ! 2D PSI-variables
isBr2d=isFsur ! 2D RHO-variables
isBu2d=isUbar ! 2D U-variables
isBv2d=isVbar ! 2D V-variables
#if defined SOLVE3D
isBp3d=isTvar(1) ! 3D PSI-variables
isBr3d=isTvar(1) ! 3D RHO-variables
isBu3d=isUvel ! 3D U-variables
isBv3d=isVvel ! 3D V-variables
isBw3d=isTvar(1) ! 3D W-variables
# if defined GLS_MIXING || defined MY25_MIXING
isMtke=isTvar(MT)+1 ! turbulent variables
# endif
#endif
I would really appreciate it. In all configurations, this part is always like this in my mod_ncparam.f90 under Build_roms(G) directory, and of course without the #if defined part. if I use GLS_MIXING, the last part (isMtke) also appears. Otherwise if I use ana_vmix for instance, it's same as mentioned above.
Nope, if SOLVE3D is undefined, you are solving the vertically integrated shallow-water equations. There are no vertical levels in such an application. Neither vertical mixing parameterization like GLS_MIXING or others. The state variables are only zeta, ubar, and vbar.
I updated the repositories. See the following trac ticket.
arango wrote: ↑Mon Apr 03, 2023 9:24 pm
Nope, if SOLVE3D is undefined, you are solving the vertically integrated shallow-water equations. There are no vertical levels in such an application. Neither vertical mixing parameterization like GLS_MIXING or others. The state variables are only zeta, ubar, and vbar.
I updated the repositories. See the following trac ticket.
Thanks for your time and consideration. However, there is still a problem with the mod_ncparam.f90. After updating the source, now there is the problem with idTvar being out of bound 0 :
At line 1192 of file mod_ncparam.f90
Fortran runtime error: Index '1' of dimension 1 of array 'idtvar' above upper bound of 0
Error termination. Backtrace:
#0 0x7f756e746640 in ???
#1 0x7f756e747185 in ???
#2 0x7f756e74752a in ???
#3 0x964fc1 in __mod_ncparam_MOD_initialize_ncparam
at /my_cases/CANYON/Build_romsG/mod_ncparam.f90:1192
#4 0xec73ba in read_phypar_
at /my_cases/CANYON/Build_romsG/read_phypar.f90:224
#5 0x693264 in __inp_par_mod_MOD_inp_par
at /my_cases/CANYON/Build_romsG/inp_par.f90:84
#6 0x4072de in __roms_kernel_mod_MOD_roms_initialize
at /my_cases/CANYON/Build_romsG/roms_kernel.f90:86
#7 0x408820 in myroms
at /my_cases/CANYON/Build_romsG/master.f90:75
#8 0x408e5c in main
at /my_cases/CANYON/Build_romsG/master.f90:50