OK, so the actual issue with getcor() and read_nc_restart() had to do
with the placement of #ifdefs and the way fortran likes to declare
variables. Previously the code had looked something like this:
subroutine netcdf_routine(filename)
#ifdef BINTRAJ
character(len=*), intent(in) :: filename
<Do some netcdf stuff.>
#else
<You don't have netcdf, stop trying to use it.>
#endif
end subroutine netcdf_routine
The problem here is that when BINTRAJ is not specified the subroutine
loses the specific definition of the filename variable and the
compiler defaults to something which may or may not match the actual
variable. Oops.
I've fixed all the #ifdefs so that if a subroutine is declared it
retains all variables that are part of the subroutine call no matter
what.
-Dan
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Jan 14 2011 - 06:00:04 PST