Bug in inp_decode.F with STATIONS and BIO_FENNEL

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
m.hadfield
Posts: 518
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Bug in inp_decode.F with STATIONS and BIO_FENNEL

#1 Post by m.hadfield » Thu Feb 07, 2019 3:54 am

The UPWELLING test case works OK when either STATIONS or BIO_FENNEL is defined, but fails when both are defined. It gives the message below . I haven't found a solution yet, so I'm just reporting what I've found. It may well make more sense to Hernan.

This is the message (Linux-gfortran in serial mode with USE_DEBUG set):

Code: Select all

Fortran runtime error: Incorrect extent in return value of RESHAPE intrinsic in dimension 1: is 14, should be 2

Error termination. Backtrace:
#0  0x48bdcc in __inp_decode_mod_MOD_load_2d_l
	at /nesi/nobackup/niwa00020/hadfield/scratch/roms_bld_4d86d26b2ce29c5d790ed68627036e07/Build-Linux-x86_64-gfortran-debug/inp_decode.f90:848
#1  0x4540d2 in read_stapar_
	at /nesi/nobackup/niwa00020/hadfield/scratch/roms_bld_4d86d26b2ce29c5d790ed68627036e07/Build-Linux-x86_64-gfortran-debug/read_stapar.f90:193
#2  0x42a356 in inp_par_
	at /nesi/nobackup/niwa00020/hadfield/scratch/roms_bld_4d86d26b2ce29c5d790ed68627036e07/Build-Linux-x86_64-gfortran-debug/inp_par.f90:459
#3  0x403fb9 in __ocean_control_mod_MOD_roms_initialize
	at /nesi/nobackup/niwa00020/hadfield/scratch/roms_bld_4d86d26b2ce29c5d790ed68627036e07/Build-Linux-x86_64-gfortran-debug/ocean_control.f90:73
#4  0x4032bd in ocean
	at /nesi/nobackup/niwa00020/hadfield/scratch/roms_bld_4d86d26b2ce29c5d790ed68627036e07/Build-Linux-x86_64-gfortran-debug/master.f90:73
#5  0x4034a7 in main
	at /nesi/nobackup/niwa00020/hadfield/scratch/roms_bld_4d86d26b2ce29c5d790ed68627036e07/Build-Linux-x86_64-gfortran-debug/master.f90:50
Line 848 of inp_decode.f90 is this, at the end of the load_2d_l function:

Code: Select all

      Vout=RESHAPE(Vwrk,(/Iout,Jout/))
and line 193 of read_stapar.f90 is the call to load_l in this block

Code: Select all

            CASE ('Sout(idTsur)')
              Npts=load_l(Nval, Cval, NAT, Ngrids, Ltracer)
              DO ng=1,Ngrids
                DO itrc=1,NAT
                  Sout(idTsur(itrc),ng)=Ltracer(itrc,ng)
                END DO
              END DO
In this simulation NAT is 2 and NBT is 12 (I think) so this presumably has something to do with the reported mismatch between 2 and 14.

Post Reply