Distgrid 1.61 KB
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
2
3
4
5
6
@BeginModule
@NewPage
@Name      = Distgrid
@Title     = Distribute horizontal grid
@Section   = File operations
@Class     = File operation
Uwe Schulzweida's avatar
Uwe Schulzweida committed
7
@Arguments = infile obase
Uwe Schulzweida's avatar
Uwe Schulzweida committed
8
9
10
11
12
13
14
15
16
@Operators = distgrid
@EndModule


@BeginOperator_distgrid
@Title     = Distribute horizontal grid
@Parameter = nx [ny]

@BeginDescription
17
18
19
This operator distributes a dataset into smaller pieces. Each output file contains a different region of the
horizontal source grid. A target grid region contains a structured longitude/latitude box of the source grid.
Only rectilinear and curvilinear source grids are supported by this operator.
20
21
22
The number of different regions can be specified with the parameter @var{nx} and @var{ny}. The output files will be named 
<obase><xxx><suffix> where suffix is the filename extension derived from the file format. xxx will have five digits with 
the number of the target region.
Uwe Schulzweida's avatar
Uwe Schulzweida committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@EndDescription
@EndOperator

@BeginParameter nx
@Item = nx
INTEGER  Number of regions in x direction
@Item = ny
INTEGER  Number of regions in y direction [default: 1]
@EndParameter


@BeginNote
This operator needs to open all output files simultaneously.
The maximum number of open files depends on the operating system!
@EndNote


@BeginExample
Distribute a file into 6 smaller files, each output file receives one half of x and a third of y of the source grid:
@BeginVerbatim
Uwe Schulzweida's avatar
Uwe Schulzweida committed
43
   cdo distgrid,2,3 infile.nc obase
Uwe Schulzweida's avatar
Uwe Schulzweida committed
44
45
46
47
48
49
50
51
52
@EndVerbatim
@IfDoc
Below is a schematic illustration of this example:

\includegraphics[width=\textwidth]{distgrid.pdf}

On the left side is the data of the input file and on the right side is the data of the six output files.
@EndifDoc
@EndExample