[MITgcm-devel] seaice adjoint and EVP
Patrick Heimbach
heimbach at MIT.EDU
Tue May 15 07:34:00 EDT 2007
Hi Martin,
I'm happy whichever way you change, as long as it is ensured
that expression under sqrt() strictly > 0.
Simplest seems to be just SQRT(deltaC+SEAICE_EPS_SQ)
Re the (e11c-e22C) term, it might indeed be unwise
to substract 2 large numbers if it can be avoided.
Cheers
-Patrick
On May 15, 2007, at 3:40 AM, Martin Losch wrote:
> Hi Patrick,
>
> the lines in question are:
> deltaC = (e11C+e22C)**2 + (e11C-e22C)**2 *recip_ecc2
> & + 4. _d 0*recip_ecc2*e12C**2
> deltaC = MAX(SQRT(deltaC),SEAICE_EPS)
> deltaZ = (e11Z+e22Z)**2 + (e11Z-e22Z)**2 *recip_ecc2
> & + 4. _d 0*recip_ecc2*e12Z**2
> deltaZ = MAX(SQRT(deltaZ),SEAICE_EPS)
>
> Previously it was deltaC = SQRT(MAX(deltaC,SEAICE_EPS_SQ)), which
> as far as I remember made the code very sensitive (O
> (SEAICE_EPS_SQ)) I was hoping to reduce this sensitivity to O
> (SEAICE_EPS), and made sure that in the expression for deltaC it is
> clear that it cannot become negative, obviously I forgot zero). I
> am equally happy with the former and/or your suggestion deltaC =
> SQRT(deltaC+SEAICE_EPS_SQ).
>
> If fact, I am no longer sure that this expressioin (e11C-e22C) is
> clever at all, as I am substracting potentially large numbers from
> each other (du/dx-dv/dy)?
>
> Let's change it back to the "original", but since it changes the
> results, why not do it together with the bug-fix in
> seaice_ocean_stress.F, which changes the results even more?
>
> Martin
>
> On 15 May 2007, at 04:19, Patrick Heimbach wrote:
>
>>
>> Hi again,
>>
>> an update.
>> The exf_check_range problem was a different issue.
>>
>> So, I suggest for seaice_evp to either revert to previous
>> SQRT(MAX(deltaC,SEAICE_EPS))
>> or to simply
>> SQRT(deltaC+SEAICE_EPS)
>>
>> (same for deltaZ)
>>
>> -Patrick
>>
>>
>>
>> On May 14, 2007, at 7:53 PM, Patrick Heimbach wrote:
>>
>>>
>>> Hi Martin,
>>>
>>> it's not clear why in seaice_evp.F (revision 1.8)
>>> you changed a sqrt expression that could never become zero
>>> to one that can. Your comment in CVS log:
>>>
>>> - replace SQRT(MAX(deltaC,SEAICE_EPS)) by MAX(SQRT
>>> (deltaC),SEAICE_EPS)
>>> help the adjoint (this also changes the results slightly)
>>>
>>> actually does the opposite (produces NAN's).
>>>
>>> Problem is that when I revert to old expression I get a stop in
>>> exf_check_range.F
>>>
>>> So at least two things seem wrong in recent seaice_evp.F
>>>
>>> -Patrick
>>>
>>> ---
>>> Dr Patrick Heimbach | heimbach at mit.edu | http://www.mit.edu/
>>> ~heimbach
>>> MIT | EAPS, 54-1518 | 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
>>
>> ---
>> Dr Patrick Heimbach | heimbach at mit.edu | http://www.mit.edu/~heimbach
>> MIT | EAPS, 54-1518 | 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
>
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-devel
---
Dr Patrick Heimbach | heimbach at mit.edu | http://www.mit.edu/~heimbach
MIT | EAPS, 54-1518 | 77 Massachusetts Ave | Cambridge, MA 02139, USA
FON: +1-617-253-5259 | FAX: +1-617-253-4464 | SKYPE: patrick.heimbach
More information about the MITgcm-devel
mailing list