[MITgcm-support] Advice on RBCS

Stephanie Dutkiewicz stephd at ocean.mit.edu
Thu Jul 12 10:48:18 EDT 2007


Christopher -
Your setup seems to make sense. Do both tracers have
this problem - or just the second one?

There is a parameters maskLen in RBCS.h that needs
to be set to 4 rather than its default of 3 for
you setup - if this is 3 then the second tracer
won't work properly but the first one should
be okay. Also (though I suspect you've done
this) "rbcs" needs to be set in your packages.conf.

Let me know if these aren't the problem, and I'll
think some more.

stephanie

On Wed, 11 Jul 2007, Christopher L. Wolfe wrote:

>
> Hi modelers,
>
> I'm trying to do some Lagrangian diagnostics to determine what fraction of 
> the water at point (x,y,z) was last exposed to the surface in the certain 
> geographical region. I'd like to do this by using a ptracer which is 
> (rapidly) relaxed relaxed to 1 in a certain surface patch, 0 over the rest of 
> the surface, and not relaxed in the interior. The initial condition for the 
> ptracer is the same as the relaxation pattern. I think I've got the ptracers 
> package configured correctly, but I don't think the rbcs package is working 
> correctly, as the total amount of ptracer remains quite close to the initial 
> value, while the surface concentration rapidly decays toward zero. I'm not 
> entirely sure what I'm doing with the rbcs package, so any advice would be 
> appreciated.
>
> The configuration files follow.
>
> Thanks for your help,
> Christopher
>
> My data.ptracers file is
>
> &PTRACERS_PARM01
> PTRACERS_numInUse=2,
> % model is started from pickup. 0014850000.data
> PTRACERS_Iter0=0014850000,
> # tracer 1 -
> PTRACERS_names(1)='tracer01',
> PTRACERS_long_names(1)='tracer01',
> PTRACERS_units(1)='mol/m3',
> PTRACERS_advScheme(1)=33,
> PTRACERS_diffKh(1)=8.e-5,
> PTRACERS_diffKr(1)=8.E-5,
> PTRACERS_useGMRedi(1)=.FALSE. ,
> PTRACERS_useKPP(1)=.FALSE. ,
> PTRACERS_initialFile(1)='tracer01_init.bin',
> # tracer 2 -
> PTRACERS_names(2)='tracer02',
> PTRACERS_long_names(2)='tracer02',
> PTRACERS_units(2)='mol/m3',
> PTRACERS_advScheme(2)=33,
> PTRACERS_diffKh(2)=8.e-5,
> PTRACERS_diffKr(2)=8.E-5,
> PTRACERS_useGMRedi(2)=.FALSE. ,
> PTRACERS_useKPP(2)=.FALSE. ,
> PTRACERS_initialFile(2)='tracer02_init.bin',
> /
>
> My data.rbcs is
> &RBCS_PARM01
> tauRelaxT = 0.,
> tauRelaxS = 0.,
> relaxMaskFile(1) = ' ',
> relaxMaskFile(2) = ' ',
> relaxMaskFile(3) = 'tracer01_mask.bin',
> relaxMaskFile(4) = 'tracer02_mask.bin',
> relaxTFile = ' ',
> relaxSFile = ' ',
> rbcsIniter = 0,
> rbcsForcingPeriod = 15552000.,
> rbcsForcingCycle = 0.,
> useRBCtemp = .FALSE.,
> useRBCsalt = .FALSE.,
> useRBCptracers = .TRUE.,
> /
>
> &RBCS_PARM02
> useRBCptrnum(1)=.TRUE.,
> tauRelaxPTR(1) = 1200.,
> relaxPtracerFile(1) = 'tracer01_init.bin',
> useRBCptrnum(2)=.TRUE.,
> tauRelaxPTR(2) = 1200.,
> relaxPtracerFile(2) = 'tracer02_init.bin',
> /
>
> The init and mask files are generated by the following matlab script:
>
> % Dimensions of grid
> NX=448;
> NY=1792;
> NZ=20;
>
> ieee='b';
> accuracy='real*8';
>
> ixS = 1:round(NY/8);
> ixN = NY-round(NY/8):NY;
>
> % the topography
> mask = ones(NX,NY);
> mask(:,NY) = 0;
> mask(NX,round(NY/8)+1:NY) = 0;
>
> tracer01_init = zeros(NX,NY,NZ);
> tracer02_init = zeros(NX,NY,NZ);
> tracer01_mask = zeros(NX,NY,NZ);
> tracer02_mask = zeros(NX,NY,NZ);
>
> tracer01_init(:,ixN,1) = 1;
> tracer02_init(:,ixS,1) = 1;
> tracer01_mask(:,:,1) = 1;
> tracer02_mask(:,:,1) = 1;
>
> % don't relax inside the walls
> for nz = 1:NZ
>  tracer01_init(:,:,nz) = mask.*tracer01_init(:,:,nz);
>  tracer02_init(:,:,nz) = mask.*tracer02_init(:,:,nz);
>  tracer01_mask(:,:,nz) = mask.*tracer01_mask(:,:,nz);
>  tracer02_mask(:,:,nz) = mask.*tracer02_mask(:,:,nz);
> end
>
> fid = fopen('tracer01_init.bin','w',ieee);
> fwrite(fid,tracer01_init,accuracy);
> fclose(fid);
>
> fid = fopen('tracer02_init.bin','w',ieee);
> fwrite(fid,tracer02_init,accuracy);
> fclose(fid);
>
> fid = fopen('tracer01_mask.bin','w',ieee);
> fwrite(fid,tracer01_mask,accuracy);
> fclose(fid);
>
> fid = fopen('tracer02_mask.bin','w',ieee);
> fwrite(fid,tracer02_mask,accuracy);
> fclose(fid);
>
>
> -----------------------------------------------------------
> Dr. Christopher L. Wolfe                   858-534-4560
> Physical Oceanography Research Division    OAR 357
> Scripps Institution of Oceanography, UCSD  clwolfe at ucsd.edu
> -----------------------------------------------------------
>
>
>
>



More information about the MITgcm-support mailing list