[MITgcm-devel] changing cg2d

Patrick Heimbach heimbach at MIT.EDU
Fri Dec 1 10:15:40 EST 2006


Hi Martin,

the optimal would actually be the other way around
(i.e. getting rid of _nsa in long term).
I'll hopefully work with Ralf on the iteraion loop
problem in Feb.

-p.



On Dec 1, 2006, at 2:38 AM, Martin Losch wrote:

> Hi Jean-Michel, the cg2d_nsa (not self adjoint) is only for bottom  
> topography as a control parameter. It's based on a version of cg2d  
> around ckpt40 or so. So I am not surprised that modifications from  
> 3yrs ago did make it into this version. Likewise the  
> ALLOW_CONST_RHSMAX is necessary as long as there isn't a working  
> adjoint to global_max (which I have been to stupid to generate so  
> far). Maybe we can merge the new features of cg2d into cg2d_nsa in  
> the future?
>
> M.
> On 1 Dec 2006, at 01:16, Jean-Michel Campin wrote:
>
>> Hi,
>>
>> I will make the changes in cg2d.F
>>
>> Patrick:
>> We also have a 2nd version, cg2d_nsa.F, that I don't feel like  
>> changing:
>> I noticed that when it was checked-in (~6.month ago), did not have
>> the latest changes from cg2d.F (from about the last 3.yrs), and it
>> will continue.
>> Just one thing, when using cg2dTargetResWunit (instead of
>> cg2dTargetResidual), the RHS is not normalised, which is pretty
>> much what the "#ifdef ALLOW_CONST_RHSMAX" is doing.
>>
>> Jean-Michel
>>
>> On Wed, Nov 29, 2006 at 08:44:23PM -0500, Jean-Michel Campin wrote:
>>> Hi Chris,
>>>
>>> I was wondering if pre-computing the diagnonal term of the
>>> 2.D solver in ini_cg2d (like I did for cg3d.F, version 1.17  
>>> versus 1.16)
>>> could speed up the solver (or at least, not make it slower) ?
>>>
>>> Here it will be only one additional 2-D array (aC2d) to store,
>>> will reduce the memory acces in cg2d (no acces to rA, recip_Bo)
>>> and reduce the number of floating point operations
>>> since lines 175 to 180:
>>>      &    -aW2d(I  ,J  ,bi,bj)*cg2d_x(I  ,J  ,bi,bj)
>>>      &    -aW2d(I+1,J  ,bi,bj)*cg2d_x(I  ,J  ,bi,bj)
>>>      &    -aS2d(I  ,J  ,bi,bj)*cg2d_x(I  ,J  ,bi,bj)
>>>      &    -aS2d(I  ,J+1,bi,bj)*cg2d_x(I  ,J  ,bi,bj)
>>>      &    -freeSurfFac*_rA(i,j,bi,bj)*recip_Bo(i,j,bi,bj)*
>>>      &     cg2d_x(I  ,J  ,bi,bj)/deltaTMom/deltaTfreesurf*cg2dNorm
>>> will be replaced by just:
>>>      &    +aC2d(I  ,J  ,bi,bj)*cg2d_x(I  ,J  ,bi,bj)
>>>
>>> and same thing for lines 302-307
>>>
>>> The reason I am asking this, is that for the deep atmosphere,
>>> to make it "right" in p-coordinate with topography,
>>> the area "rA" has to be scaled at the surface level kSurfC 
>>> (i,j,bi,bj)
>>> -> indirect indexing -> might not be efficient.
>>> If we decide to change cg2d.F and store the diagnonal term,
>>> now will be a good time.
>>>
>>> Jean-Michel
>>>
>>> _______________________________________________
>>> 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
>
> _______________________________________________
> 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