[MITgcm-devel] change ctrl_swapffields

Patrick Heimbach heimbach at mit.edu
Sat Feb 14 11:50:55 EST 2015


No.
It turns out that when active_write is not actually active, compilation crashes
(similar issue that you encounter for cg2d stub when it is not active).
Instead, the prior flag ALLOW_ACTIVE_FILE could/should be - for the time being - renamed to ALLOW_ACTIVE_READ

p.

On Feb 14, 2015, at 11:45 AM, Daniel Goldberg <dngoldberg at gmail.com> wrote:

> Also, one minor thing -- the new stub for active_write in externalDummies.F uses the CPP flag ALLOW_ACTIVE_WRITE -- suggest to change it to ALLOW_ACTIVE_FILE?
> 
> dan
> 
> On Sat, Feb 14, 2015 at 4:30 PM, Daniel Goldberg <dngoldberg at gmail.com> wrote:
> 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: Dan.Goldberg at ed.ac.uk
> web: http://ocean.mit.edu/~dgoldberg
> 
> 
> 
> -- 
> 
> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1588 bytes
Desc: not available
URL: <http://mitgcm.org/pipermail/mitgcm-devel/attachments/20150214/a050f888/attachment.p7s>


More information about the MITgcm-devel mailing list