[MITgcm-support] help for regional diagnostic
Martin Losch
Martin.Losch at awi.de
Mon Mar 4 05:22:19 EST 2013
Hi Hong,
I am sending this to mitgcm-support, because the email you send your question from did not accept my message (host mail-incoming.caltech.edu[131.215.239.181] said: 550 5.1.1 <hong.zhang at caltech.edu>: Recipient address rejected: User unknown in local recipient table (in reply to RCPT TO command)user unknown)
My general experience with this is, that everything becomes very slow when I use too many output points. But for just 3 points, it appears to be a reasonable approach.
I think for 3 regions that are far away from each other (ie. that do not overlap, in your case: individual points will never overlap) you only need one mask level:
# the following 3 lines are only for setting up the mask(s)
nSetRegMskFile = 1,
# the same mask level for all 3 points
set_regMask = 1,1,1,
# now the values that identify the points (corresponding to your "regMask.bin")
val_regMask = 1., 2., 3.,
# now the masks are set up and then you give the fields, you want to save:
stat_fields(1,1) = 'THETA ', 'SALT ', etc.
stat_fname(1) = 'yourNameOfTheFile',
stat_freq(1) =
stat_phase(1) =
# now you specify which masks you want to us (0=global fields, ie. no mask)
stat_regions(1,1) = 0, 1, 2, 3,
# that's it. You already had 90% of it.
There's another example in global_ocean.cs32x15 for using these masks.
As another general remark: I would probably average at least 5 or 9 points around your target mooring and maybe not use snapshots.
Martin
On Mar 1, 2013, at 8:54 PM, Hong Zhang <hong.zhang at caltech.edu> wrote:
> Hi Martin,
> I want to simulate a mooring in the output diagnostics,
> i.e. high temporal (hourly) output at three particular points
> (i1,j1), (i2,j2), and (i3,j3).
> I want to do it in data.diagnostics without modifying code
>
> I did find such capability in MITgcm (so-called reional mask)
> to diagnose fields on sub-region (or even single point).
> I email to you because I think you have some experience on this application
> (see the thread http://mitgcm.org/pipermail/mitgcm-support/2008-August/005644.html)
> Following are the steps I want to take, please correct/add as necessary
> (especially for those =??? for my three points case)
>
> 1. enable DIAGSTATS_REGION_MASK in DIAGSTATS_REGIONS.h
> modify
> C nRegions :: maximum number of regions (statistics-diagnostics)
> C sizRegMsk :: maximum size of the regional-mask (statistics-diagnostics)
> in DIAGNOSTICS_SIZE.h
> nRegions=1 ???
> sizRegMsk= ???
>
> 2. fill namelist DIAG_STATIS_PARMS in data.diagnostics
> with
> stat_fields(1,1)='THETA',
> stat_fname(1)= 'Diag',
> stat_freq(1)= -3600.,
> stat_phase(1)= 0.,
> BUT MORE, need to specify
> # diagSt_regMaskFile : file containing the region-mask to read-in
> # nSetRegMskFile : number of region-mask sets within the region-mask file
> # set_regMask(i) : region-mask set-index that identifies the region "i"
> # val_regMask(i) : region "i" identifier value in the region mask
> # stat_region(:,n) : list of "regions" (default: 1 region only=global)
>
> {making diagSt_regMaskFile in matlab:
> regMask=zeros(nx,ny,nz);
> regMask(i1,j1,:)=1
> regMask(i2,j2,:)=2
> regMask(i3,j3,:)=3
> namf='regMask.bin';
> fid=fopen(namf,'w','b'); fwrite(fid,regMask,'real*8'); fclose(fid);}
>
> then continue DIAG_STATIS_PARMS
> diagSt_regMaskFile='regMask.bin',
> nSetRegMskFile=4, ???
> set_regMask(1)= 1, 1, ???
> val_regMask(1)= 0.,1., ???
> stat_region(1,1)= 1, ???
> #
> stat_fields(1,1)='THETA',
> stat_fname(1)= 'Diag',
> stat_freq(1)= -3600.,
> stat_phase(1)= 0.,
>
>
> thanks for taking a look,
> Hong
More information about the MITgcm-support
mailing list