Opened 11 years ago
Closed 11 years ago
#632 closed bug (Fixed)
Corrected bug in ini_hmixcoef.F and improved check_multifile.F
Reported by: | arango | Owned by: | arango |
---|---|---|---|
Priority: | major | Milestone: | Release ROMS/TOMS 3.7 |
Component: | Nonlinear | Version: | 3.7 |
Keywords: | Cc: |
Description
- 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 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 reporting this problem and giving more information.
Note:
See TracTickets
for help on using tickets.