Opened 11 years ago

Last modified 11 years ago

#587 closed bug

Invalid use of optional argment in find_file function — at Initial Version

Reported by: m.hadfield Owned by: arango
Priority: major Milestone: Release ROMS/TOMS 3.7
Component: Nonlinear Version: 3.7
Keywords: Cc:

Description

In revision 658, ticket 584, an extra optional argument named KeyWord was added to the find_file function in ROMS/Utility/inp_par.F. However optional arguments are only valid for external functions with an explicit interface (eg. those declared inside a module) which does not apply in this case.

The interesting thing is that this violation of the Fortran standard does not cause any problems on some compilers (eg. Gfortran). However with xlf on AIX on a case I have run, the length of the file name argument inside find_file is incorrect at run-time, meaning that the file is reported to be missing when in fact it exists.

Noting that all the calls to find_file in the ROMS code do actually have the extra argument, the simplest solution is to remove the optional keyword.

(Putting all the procedures in inp_par.F inside a module would be a good idea, too, but I vaguely recall that there is a reason not to do this.)

Change History (0)

Note: See TracTickets for help on using tickets.