Bug in step_floats.F

Bug reports, work arounds and fixes

Moderators: arango, robertson

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

Bug in step_floats.F

#1 Unread post by m.hadfield »

Compilation of ROMS 2.1 with FLOAT_VWALK defined fails with an error

step_floats.f90(126) : Error: The shape matching rules of actual arguments and dummy arguments have been violated. [NUDG]
CALL nrng (iseed, nudg(Lstr), Lend-Lstr+1, ierr)
------------------------^

The cure is to replace the above line with

CALL nrng (iseed, nudg(Lstr:Lend), Lend-Lstr+1, ierr)

With this change the model compiles and runs and seems to give credible results.

The original line of code worked in ROMS 1.x but fails in 2.x, because function nrng has been moved to a module (utility_mod, defined in utility.F), which causes Fortran to apply stricter argument-matching rules.

Post Reply