[MITgcm-devel] JFNK
Martin Losch
Martin.Losch at awi.de
Thu Oct 18 05:30:43 EDT 2012
Hi Jean-Michel,
thanks for fixing this, although I was just 5min short of identifying the culprit routine when you checked in the fix, I think I wouldn't have found this error.
About your questions:
> 1) cpp option in seaice_dynsolver.F:
> a) starting line 303:
> #if (!defined ALLOW_AUTODIFF_TAMC && defined SEAICE_ALLOW_JFNK)
> IF ( SEAICEuseJFNK ) THEN
> CALL SEAICE_JFNK( myTime, myIter, myThid )
> ENDIF
> #endif /* SEAICE_ALLOW_JFNK */
>
> I would prefer just #ifdef SEAICE_ALLOW_JFNK , to avoid the problem of
> missing piece of code when building the adjoint (it happens more often than
> one would imagine); or if you want to make it very safe, can add a STOP like this:
> #ifdef SEAICE_ALLOW_JFNK
> IF ( SEAICEuseJFNK ) THEN
> #ifdef ALLOW_AUTODIFF
> STOP
> #else
> CALL ...
> #endif
> ENDIF
> #endif
We can do that. It's just important that TAF does not see the JFNK solver.
>
> b) I don't understand the duplicated "defined(SEAICE_ALLOW_EVP)"
> in line 309 and line 316:
> #if defined(SEAICE_ALLOW_EVP) || defined(SEAICE_ALLOW_EVP)
that's an mistake of course, thanks for catching it. I'll fix it.
>
> 2) the printed message you changed in seaice_lsr.F :
> do we expect ilcall to go beyond 9999 ? (in this case the other
> print of ilcall would need to be changed)
> Or is I4 large enough ? (and in this case we could use I4 also
> in the 1rst printed msg).
I10 is not necessary for everyday use, I'll put 1X,I4 instead. In my tests I wanted to make sure that there is always a space before the value of ilcall for easier grepping, and I was going up to ilcall = 1e6, but that really shouldn't have gone into the repository.
Thanks again for cleaning up after me.
Martin
More information about the MITgcm-devel
mailing list