[MITgcm-devel] change ctrl_swapffields
Daniel Goldberg
dngoldberg at gmail.com
Sat Feb 14 11:30:29 EST 2015
ok, will check it in...
On Sat, Feb 14, 2015 at 4:24 PM, Patrick Heimbach <heimbach at mit.edu> wrote:
> Hi Dan,
>
> very good catch!
> Shouldn’t be an issue, but to be sure,
> I can run testreport -ad once you’ve checked in the change.
>
> p.
>
> On Feb 14, 2015, at 11:19 AM, Daniel Goldberg <dngoldberg at gmail.com>
> wrote:
>
> > Hello Patrick, Gael,
> >
> > I would like to make the following change to ctrl_swapffields. As of now
> lines 58-67 read
> >
> > DO bj=myByLo(myThid),myByHi(myThid)
> > DO bi=myBxLo(myThid),myBxHi(myThid)
> > DO j = 1,sNy
> > DO i = 1,sNx
> > ffld0(i,j,bi,bj) = ffld1(i,j,bi,bj)
> > ffld1(i,j,bi,bj) = 0. _d 0
> > ENDDO
> > ENDDO
> > ENDDO
> > ENDDO
> >
> > but i would like to change it to
> >
> > DO bj=myByLo(myThid),myByHi(myThid)
> > DO bi=myBxLo(myThid),myBxHi(myThid)
> > DO j = 1,sNy
> > DO i = 1,sNx
> > ffld0(i,j,bi,bj) = ffld1(i,j,bi,bj)
> > ENDDO
> > ENDDO
> > ENDDO
> > ENDDO
> > DO bj=myByLo(myThid),myByHi(myThid)
> > DO bi=myBxLo(myThid),myBxHi(myThid)
> > DO j = 1,sNy
> > DO i = 1,sNx
> > ffld1(i,j,bi,bj) = 0. _d 0
> > ENDDO
> > ENDDO
> > ENDDO
> > ENDDO
> >
> > the reason is that when openad generates the adjoint of these lines, the
> result is that ffld1%d is set to zero, which should not be the case. the
> above seems to fix this. Is there any issue with this change?
> >
> > Thanks
> > Dan
> >
> > --
> >
> > Daniel Goldberg, PhD
> > Lecturer in Glaciology
> > School of Geosciences, University of Edinburgh
> > Geography Building, Drummond Street, Edinburgh EH8 9XP
> >
> >
> > em: Dan.Goldberg at ed.ac.uk
> > web: http://ocean.mit.edu/~dgoldberg
> > _______________________________________________
> > MITgcm-devel mailing list
> > MITgcm-devel at mitgcm.org
> > http://mitgcm.org/mailman/listinfo/mitgcm-devel
>
>
> ---
> Patrick Heimbach | heimbach at mit.edu | http://www.mit.edu/~heimbach
> MIT | EAPS 54-1420 | 77 Massachusetts Ave | Cambridge MA 02139 USA
> FON +1-617-253-5259 | FAX +1-617-253-4464 | SKYPE patrick.heimbach
>
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
>
>
--
Daniel Goldberg, PhD
Lecturer in Glaciology
School of Geosciences, University of Edinburgh
Geography Building, Drummond Street, Edinburgh EH8 9XP
em: D <dgoldber at mit.edu>an.Goldberg at ed.ac.uk
web: http://ocean.mit.edu/~dgoldberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20150214/bccd496f/attachment-0001.htm>
More information about the MITgcm-devel
mailing list