[MITgcm-devel] smoothing package for dimensional controls

Matthew Mazloff mmazloff at ucsd.edu
Sun May 15 14:32:28 EDT 2011


Hi Gael,

I would like to make the smoothing package compatible with dimensional  
controls.  This would require passing a variable to
smooth_correl2dw.F, smooth_correl3dw.F
to tell the routine whether it should be dimensionalizing or non- 
dimensionalizing.  As of now it always dimensionalizes.

So, for example, we would do something of the nature:

bash-3.1$ diff ../../../pkg/smooth/smooth_correl2dw.F .
<      U     fld_in,mask_in,xx_gen_file,mythid)
 >      U     fld_in,mask_in,xx_gen_file,MMF,mythid)

 >       integer MMF

<       fld_in(i,j,bi,bj)=fld_in(i,j,bi,bj)/sqrt(tmpW)
 >         if (MMF.EQ.1) then
 >          fld_in(i,j,bi,bj)=fld_in(i,j,bi,bj)*sqrt(tmpW)
 >         elseif (MMF.EQ.2) then
 >          fld_in(i,j,bi,bj)=fld_in(i,j,bi,bj)/sqrt(tmpW)
 >         endif


and then in ctrl_get_gen.F we do
#ifdef ALLOW_DIMENSIONAL_CONTROL
CMM( Non-dimensionalize
       call smooth_correl2dw(xx_gen1,genmask,xx_gen_file,1,mythid)
#endif

CMM(  smooth
       call smooth_correl2d(xx_gen1,genmask,1,mythid)

CMM(  now dimensionalize
       call smooth_correl2dw(xx_gen1,genmask,xx_gen_file,2,mythid)


A CPP option (in example above I use ALLOW_DIMENSIONAL_CONTROL) would  
need to be added to say whether using dimensional or non-dimensional  
controls (outside of packing....as ALLOW_NONDIMENSIONAL_CONTROL_IO is  
different)

For 3D dimensional controls would need to do similar for  
ctrl_map_ini_gen.F and smooth_correl3dw.F

Does this sound OK to you -- I know the code works as I am using it --  
would need to be cleaned though.  No hurry to get to this, but if your  
OK with it I would like to implement this to the main code?

Thanks
-Matt












More information about the MITgcm-devel mailing list