-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathdownsample.doc
73 lines (45 loc) · 2.15 KB
/
downsample.doc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Instructions for downsampling highres data.
Example Input file: Ia00000.0000.[uvh] 512^2 data file.
First compile the "convert" code:
% ./gridsetup.py 1 1 1 512 512 1
edit dns/src/convert.F90 and set the variables "tstart" and "tstop" to 0.0000
which tells the code we to convert the data files from time 0000.0000
Then look for this block of code, around line 108:
if (convert_opt==0) then ! -cout uvw
call input_uvw(time,Q,vor,work1,work2,1) ! default headers
endif
And make sure we are using the "default headers" input_uvw() subroutine call.
Sometimes I change this to read headerless input files, and you will
have to change it back if you do a "cvs update"
% make convert
% ./convert -b -cout uvw -so -smax 128 -d /ccs/wingate/period/Ia0 Ia0 < sh2.inp
-b: byteswap the input file
-cout uvw: reoutput u,v and h
-so output spectral coefficients (instead of default grid point data)
-smax output spectral coefficients suitable for a 128^2 grid
-d path directory for data files
Ia0 run name
This will create .us, .vs and .hs data files which contain spectral
coefficients. Now we want to convert these to grid point values.
First rename the spectral files (otherwise, when we convert back
to grid point data, it will overright the original data files)
Rename the files to: Ia0-128-0000.0000.[uvh]s
Recompile convert with a lower resolution:
./gridsetup.py 1 1 1 128 128 1
make convert
% ./convert -cout uvw -si -d /ccs/wingate/period/Ia0 Ia0-128- < sh2.inp
-cout uvw: reoutput u,v and h
-si input spectral coefficients (instead of default grid point data)
-d path directory for data files
Ia0 run name
===============================================================================
Another example: 512^3 -> 256^2
# spectral output uvw:
./gridsetup.py 1 1 16 512 512 512
make convert
mpirun -np 16 ./convert -so -smax 256 -cout uvw -i test.inp -b -d /home/scratch/taylorm/dns iso12_512
# read spectral in, output vorm:
./gridsetup.py 1 1 16 256 256 256
make convert
mpirun -np 16 ./convert -si -cout vorm -i test.inp \
-d /home/scratch/taylorm/dns iso12_512-new.