﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
383	Miscelaneous bugs	arango	arango	"I corrected few bugs:

 * Added to '''get_state.F''' and '''checkvars.F''' logic to process additional fields for perfect restart. Many thanks to Greg Gerbi for reporting this problem. We need the following conditional instead:
{{{
      IF (((model.eq.0).or.(model.eq.iNLM)).and.(nrrec(ng).ne.0)) THEN
}}}
 * Modified '''step2d_LF_AM3.h''' and its TLM, RPM, and ADM versions to include a different logic for point mass sources. Eliminated the need for using local array '''Dnew''' and used '''zeta+h''' instead. There is still an adjoint bug in this routine when '''UV_PSOURCE''' is activated.  We are still looking for it.
{{{
      DO is=1,Nsrc
        i=Isrc(is)
        j=Jsrc(is)
        IF (((IstrR.le.i).and.(i.le.IendR)).and.                        &
     &      ((JstrR.le.j).and.(j.le.JendR))) THEN
          IF (INT(Dsrc(is)).eq.0) THEN
            cff=1.0_r8/(on_u(i,j)*                                      &
     &                  0.5_r8*(zeta(i-1,j,knew)+h(i-1,j)+              &
     &                          zeta(i  ,j,knew)+h(i  ,j)))
            ubar(i,j,knew)=Qbar(is)*cff
#  ifdef SOLVE3D
            DU_avg1(i,j)=Qbar(is)
#  endif
          ELSE
            cff=1.0_r8/(om_v(i,j)*                                      &
     &                  0.5_r8*(zeta(i,j-1,knew)+h(i,j-1)+              &
     &                          zeta(i,j  ,knew)+h(i,j  )))
            vbar(i,j,knew)=Qbar(is)*cff
#  ifdef SOLVE3D
            DV_avg1(i,j)=Qbar(is)
#  endif
          END IF
        END IF
      END DO
}}}
 * Corrected a parallel bug in '''ana_grid.h''' when computing bathymetry '''h'''. Many thanks to Aurelien Ponte for [https://www.myroms.org/forum/viewtopic.php?f=31&t=1632 reporting] this problem. This was a clear shared- and distribute-memory bug.
{{{
      DO j=JstrR,JendR
        DO i=IstrR,IendR
          val1=(xr(i,j)-0.5_r8*Xsize)/40000.0_r8
          val2=(yr(i,j)-0.5_r8*Ysize)/40000.0_r8
          h(i,j)=depth-4500.0_r8*EXP(-(val1*val1+val2*val2))
        END DO
      END DO
}}}
 * Added additional argument to routine '''netcdf_close''' to specify if we want to update the '''bio_file''' global attribute. This attribute can only be updated in those NetCDF opened for writting."	bug	new	major	Release ROMS/TOMS 3.3	Nonlinear	3.3			
