﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
632	Corrected bug in ini_hmixcoef.F and improved check_multifile.F	arango	arango	" * Corrected a bug in '''ini_hmixcoef.F''' when computing '''visc2_p'''.  I guess that I got distracted when I was coding this one.  It usually happens when my phone rings and some enters my office.  We need to have instead:
{{{
      cff=0.25_r8*cff
      DO j=JstrP,JendT
        DO i=IstrP,IendT
          visc2_p(i,j)=cff*(grdscl(i-1,j-1)+grdscl(i,j-1)+              &
     &                      grdscl(i-1,j  )+grdscl(i,j  ))
        END DO
      END DO
}}}
 Many thanks to Pan Feng for [https://www.myroms.org/forum/viewtopic.php?f=19&t=3292 bringing] this to my attention.

 * Improved the checking of the units attribute in function '''check_file''', which is called by '''check_multifile.F'''.  I use instead:
{{{
      Nrec=var_Dsize(1)              ! time is a 1D array
      DO i=1,nvatt
        IF (TRIM(var_Aname(i)).eq.'units') THEN
          Tunits=TRIM(var_Achar(i))
          IF (INDEX(TRIM(var_Achar(i)),'day').ne.0) THEN
            Tscale=86400.0_r8
          ELSE IF (INDEX(TRIM(var_Achar(i)),'hour').ne.0) THEN
            Tscale=3600.0_r8
          ELSE IF (INDEX(TRIM(var_Achar(i)),'second').ne.0) THEN
            Tscale=1.0_r8
          END IF
        ELSE IF (TRIM(var_Aname(i)).eq.'calendar') THEN
          IF ((Nrec.eq.1).or.                                           &
     &        (INDEX(TRIM(var_Achar(i)),'none').ne.0)) THEN
            Lperpetual=.TRUE.
          END IF
        ELSE IF (TRIM(var_Aname(i)).eq.'cycle_length') THEN
          Lcycle=.TRUE.
        END IF
      END DO
}}}
 The intrinsic '''INDEX''' function is more appropriate here to search the time '''units''' in a string with additional words at the beginning or end of the string. Many thanks to John Luick for [https://www.myroms.org/forum/viewtopic.php?f=19&t=3237 reporting] this problem and giving more information."	bug	closed	major	Release ROMS/TOMS 3.7	Nonlinear	3.7	Fixed		
