[MITgcm-devel] changing cg2d
Jean-Michel Campin
jmc at ocean.mit.edu
Wed Nov 29 20:44:23 EST 2006
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
More information about the MITgcm-devel
mailing list