1 |
|
2 |
Averaging MITgcm output: |
3 |
|
4 |
The program and scripts here are a few quick hacks that efficiently |
5 |
average binary files as output by MITgcm. The following assumptions |
6 |
apply: |
7 |
|
8 |
- all files are SINGLE-precision IEEE-754 stored in BIG-endian byte |
9 |
order (which is the standard for MITgcm single-precision MDSIO |
10 |
output) |
11 |
|
12 |
- the machine running the "average_fields" program is a |
13 |
LITTLE-endian architecture such as: |
14 |
|
15 |
- IA32 (Intel or AMD x86-compatible) |
16 |
- Linux on IA64 (eg. Altixes) |
17 |
|
18 |
|
19 |
The program syntax is: |
20 |
|
21 |
$ make average_fields |
22 |
$ ./average_fields field_1 field_3 ... field_n output_field |
23 |
|
24 |
|
25 |
Two additional scripts ("do_the_averages" and "job_ave") demonstrate |
26 |
how to easily run N simultaneous average_fields programs within either |
27 |
interative (the former) or queue-driven (the latter) environments. |
28 |
|
29 |
|
30 |
NOTE: |
31 |
|
32 |
Outputs from this program can differ slightly from machine to machine |
33 |
due to rounding errors. The intermediate sums are computed internally |
34 |
at double precision and converted to single precision immediately |
35 |
before being written. Both IA32 and IA64 machines have been compared |
36 |
and the differences (when there are any!) all appear to be acceptable |
37 |
within the slightly different rounding inherent with these two |
38 |
architectures. |
39 |
|