[MITgcm-devel] problem with maskInC and obcs-balancing in adjoint

Martin Losch Martin.Losch at awi.de
Mon Mar 14 11:13:06 EDT 2011


Hi Holly,

please try putting the flow directives into obcs_ad.flow and a call obcs_init_fixed(myThid) into initialised_varia.F. With these fixes I now get reasonable solutions (no gradient check yet). I can check these changes in, but I wanted the hear Patrick's (who seems to be "auf Tauchstation" (o:) or Jean-Michel's opinion first.

M.


On Mar 14, 2011, at 3:49 PM, Holly Dail wrote:

> Hello -
> 
> I don't have ideas on the right fix, but I can confirm that I have the same problem in my setup.  The ALLOW_OBCS_BALANCE option works fine in a straight forward run, but doesn't work at all with the adjoint.  The net volume transport through my open boundary is always zero with the adjoint on, while the net volume transport has a non-zero value in the forward run.
> 
> Holly
> 
> 
> On Mar 14, 2011, at Mar 14 , 9:28 AM, Martin Losch wrote:
> 
>> Hi Jean-Michel, Patrick,
>> 
>> I have the impression that something goes wrong with the balancing code in the adjoint.:
>> The field maskInC has 1 on the open boundary, whereas they should have zeros (as set in obcs_init_fixed). The reason is that there is a ifdef ALLOW_AUTODIFF_TAMC block in initialise_varia, where ini_depth and ini_masks_etc are called, where maskInC is reset to its original value (1 on the boundary). I need to force TAF to call obcs_init_fixed again within this block. What is the preferred option?
>> 1. show obcs_init_fixed to TAF (edit obcs_ad_diff.list)
>> 2. use directives:
>> CADJ SUBROUTINE OBCS_INIT_FIXED INPUT  = 1
>> CADJ SUBROUTINE OBCS_INIT_FIXED OUTPUT =
>> CADJ SUBROUTINE OBCS_INIT_FIXED REQUIRED
>> (edit obcs_ad.flow)
>> 3. As an alternative, one could re-introduce the "obcs-masks" that you have just removed a few versions ago.
>> 
>> 1 and 2 work, haven't tried 3 (because I do not like that option).
>> 
>> Martin
>> 
>> _______________________________________________
>> 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




More information about the MITgcm-devel mailing list