[MITgcm-devel] Re: seaice_evp
Martin Losch
Martin.Losch at awi.de
Thu Jun 7 11:55:12 EDT 2007
Hi Patrick,
the plan was to have pressC = press0*DeltaC/MAX(DeltaC,SEAICE_EPS),
effectively.
You suggestion gives
pressC = press0 if DeltaC > 0 and
pressC = 0 if deltaC = 0, which is not the same.
I am not sure if that's OK, but why not do it as you suggest for
ALLOW_AUTODIFF?
Sorry about the multiple updates. I consider all of this bug fixes ...
Martin
On 7 Jun 2007, at 17:39, Patrick Heimbach wrote:
>
> Hi Martin,
>
> your change of yesterday in seaice_evp.F messed up the adjoint again.
> I had thought that you'd implement changes such as to leave
> computation
> unchanged in case of ALLOW_AUTODIFF.
> Changing to
> IF ( deltaC .GT. 0. _d 0 ) deltaC = SQRT(deltaC)
> makes gradient rise by 10 orders of magn.
>
> I understand using the former lines
> deltaC = SQRT(MAX(deltaC,SEAICE_EPS_SQ))
> will cause deltaC to be non-zero where it wasn't before.
> That's reasonable, but the above should be treated differently then:
> IF ( deltaC .GT. 0. _d 0 )
> & deltaC = SQRT(MAX(deltaC,SEAICE_EPS_SQ))
>
> In this case your argument (Delta = 0 gets replaced by SEAICE_EPS)
> doesn't hold anymore since it Delta remains zero where it was before,
> and unless SEAICE_EPS is chosen badly, it should work.
>
> What speaks against implementing it this way?
>
> -Patrick
>
> PS:
> Could we reduce the code and reference output update turnaround
> from maybe daily to weekly...?
More information about the MITgcm-devel
mailing list