[MITgcm-devel] seaice_lsr bug

Patrick Heimbach heimbach at MIT.EDU
Mon May 8 08:12:18 EDT 2006


Martin,

that's correct, but to be precise
(which seems necessary in other contexts),
you probably refer to "the automatically generated adjoint".
I've indeed added this example to the list of
"Why not adjointing by hand"...
;o)

Cheers
-Patrick



On Mon, 2006-05-08 at 02:32, Martin Losch wrote:
> Patrick,
> 
> good catch! These bugs are the ultimate justification for having the  
> adjoint (o:
> Thanks,
> Martin
> 
> On May 6, 2006, at 8:12 PM, Patrick Heimbach wrote:
> 
> >
> > Hi Martin,
> >
> > there seemed to be a sublte, but important bug in seaice_lsr.
> > Could you confirm that the following fix is ok:
> > http://mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm/pkg/seaice/
> > seaice_lsr.F.diff?r1=1.10&r2=1.11
> >
> > What happened is that there were two '*'
> > separated by a linebreak, which, when put together,
> > will give you a valid alternative expression for SQRT
> >       &         - etaPlusZeta(I-1,J,bi,bj) *
> >       &         * 0.5 _d 0 * (vIceC(I-1,J,bi,bj)+vIceC(I-1,J+1,bi,bj)
> >
> > instead of
> >       &         - etaPlusZeta(I-1,J,bi,bj)
> >       &         * 0.5 _d 0 * (vIceC(I-1,J,bi,bj)+vIceC(I-1,J+1,bi,bj)
> >
> > With this fix, I can now do OK gradient checks using
> > #define SEAICE_CGRID
> > (at least for 24 timesteps, whatever it's worth).
> >
> > -Patrick
> >
> > -- 
> > --------------------------------------------------------
> > Patrick Heimbach   Massachusetts Institute of Technology
> > FON: +1/617/253-5259                  EAPS, Room 54-1518
> > FAX: +1/617/253-4464             77 Massachusetts Avenue
> > mailto:heimbach at mit.edu               Cambridge MA 02139
> > http://www.mit.edu/~heimbach/                        USA
> >
> > _______________________________________________
> > MITgcm-devel mailing list
> > MITgcm-devel at mitgcm.org
> > http://mitgcm.org/mailman/listinfo/mitgcm-devel
> 
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
-- 
--------------------------------------------------------
Patrick Heimbach   Massachusetts Institute of Technology
FON: +1/617/253-5259                  EAPS, Room 54-1518
FAX: +1/617/253-4464             77 Massachusetts Avenue
mailto:heimbach at mit.edu               Cambridge MA 02139
http://www.mit.edu/~heimbach/                        USA




More information about the MITgcm-devel mailing list