[MITgcm-devel] naming for inAdMode switches
Patrick Heimbach
heimbach at MIT.EDU
Sat Oct 27 15:21:41 EDT 2012
Hi Jean-Michel,
I just saw you added following comment, and it fits the discussion thread I started yesterday:
#ifdef ALLOW_SEAICE
104 C- Note: should re-visit how to turn on/off pkg internal-params in adjoint mode
105 C This will not work for PKGs which load their params AFTER this S/R is called
106 C (currently, it is OK for SEAICE but not for all PKGs !)
107 SEAICEuseDYNAMICSinFwdMode = SEAICEuseDYNAMICS
108 #endif
I'm aware of this problem, but it doesn't change the fact that we will need to have this capability (e.g., change viscosity values, potentially change advection schemes - if that works, etc). I've been trying to point out this issue back when the first discussions started on changing autodiff_inadmode_set..., addind data.autodiff, etc.
Perhaps we can try to include some checks to ensure that indeed those data.<pkg> values have been read previously.
On Oct 26, 2012, at 8:50 PM, Patrick Heimbach <heimbach at mit.edu> wrote:
>
> Hi All,
>
> in order to allow more switches in autodiff_inadmode_set_ad
> I would like to change the naming and assigning of current seaice parameter
> turnFreeDriftInAdMode somewhat:
> Naming should be SEAICEuseFREEDRIFTinAdMode
> and should be assigned like the newly introduced parameter SEAICEuseDYNAMICSinAdMode
> One reason is to be more easily searchable/grep-able in conjunction with its regular parameter.
>
> I realize that the current logic for turnFreeDriftInAdMode has the advantage of not requiring
> including SEAICE_PARAMS.h in autodiff_readparams.F, but:
> 1. it's a special case;
> 2. it's not clear what "turn" means (switch?);
> 3. sooner or later we'll need to add parameter headers anyways, e.g. when we want to temporarily change values of parameters during adjoint leg (which we already do in certain applications).
> So we might as well start early to bring some consistency into parameter naming
> (clean identification between regular parameter name and its inAdMode inFwdMode counterpart).
>
> Any objection?
>
> Cheers
> p.
>
> Begin forwarded message:
>
>> From: Patrick Heimbach <heimbach at forge.csail.mit.edu>
>> Subject: [MITgcm-cvs] MITgcm/pkg/autodiff CVS Commit
>> Date: October 26, 2012 8:38:21 PM EDT
>> To: mitgcm-cvs at mitgcm.org
>> Reply-To: MITgcm-cvs at mitgcm.org
>>
>> Update of /u/gcmpack/MITgcm/pkg/autodiff
>> In directory forge:/tmp/cvs-serv21710
>>
>> Modified Files:
>> AUTODIFF_PARAMS.h autodiff_inadmode_set_ad.F
>> autodiff_inadmode_unset_ad.F autodiff_readparms.F
>> Log Message:
>> Add inAdMode switch for SEAICEuseDYNAMICS
>> (extend logic in ADAUTODIFF_INADMODE_SET)
>>
>>
>> _______________________________________________
>> MITgcm-cvs mailing list
>> MITgcm-cvs at mitgcm.org
>> http://mitgcm.org/mailman/listinfo/mitgcm-cvs
>
>
> ---
> 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
---
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/20121027/5c601e16/attachment.p7s>
More information about the MITgcm-devel
mailing list