|
Version 3 MM5 Modeling System At A Glance
The Version 1 header has been in use since 1994. During the
period since, several ways to improve on it became apparent, and
these are put into effect with Version 3. Firstly, Version 1 files
are unnecessarily long because before every time period there
are about 3.5 Mbytes of header record, only a small fraction of
which is used. Version 1 had a first effort at a format that was
self-describing, in that the header contains information about
all the fields in the file. However it was made a little awkward
to use because this information on each field is buried in the
header. When adding a new field, the location and order in the
header had to be consistent, as well as updating the total number
of fields, so the files were difficult to manipulate.
Version 3 improves in both respects: the files are shorter,
and it becomes easier to add or retrieve selected fields. The
length of the header is reduced. The header still has 20 sections
(second index which indicates program name), but now only 50 integers,
and 20 reals, together with their 80-character descriptions, are
in each section. This makes the header size a little over 100
kbytes. Moreover, there is only one header which is at the beginning
of the file, but there is enough generality in the format to allow
more headers at other times such as at the beginning of a restart
run or when a nest moves. The header still contains information
about the preprocessor options, and domain characteristics and
location. However it no longer contains 1-dimensional fields,
such as sigma or pressure levels, nor information about what is
in the rest of the file. Version 3 introduces the concept of a
sub-header, a 1-record description directly ahead of each field.
This description includes information on the name, dimensionality,
index order, index range, size and time of the following field.
Flags in the file indicate whether to read a "big header'',
or sub-header and field, or whether it is the end of a time period.
It can be seen that it is easy to insert a field as long as it
is accompanied by a relevant flag and sub-header. It is also easy
to search for a given field by reading sub-headers until a match
is found then reading the following field.
An MM5 Version 3 modeling system output file contains the following
records:
(first time period)
big header flag (integer value of 0)
big header
sub-header flag (integer value of 1)
sub-header
field
sub-header flag (integer value of 1)
sub-header
field
sub-header flag (integer value of 1)
sub-header
field
....
....
end-of-time-period flag (integer value of 2)
(second time period)
sub-header flag (integer value of 1)
sub-header
field
sub-header flag (integer value of 1)
sub-header
field
sub-header flag (integer value of 1)
sub-header
field
....
....
end-of-time-period flag (integer value of 2)
(and so on ....)
No particular order of fields is assumed, other than that they
are chronologically grouped. When reading files in the modeling
system, each field has to be read and matched to an expected 8-character
name before being assigned to a variable in the program. Note
that 1D, 2D, and 3D fields could be mixed, but that the sub-header
gives enough information to assign an appropriate array to the
read statement.
Thus, a simple read program would look like:
10 continue
read (input_unit, end=900) flag
if (flag.eq.0) the
read (input_unit) big header
go to 10
else if (flag.eq.1) then
read (input_unit) sub header
read (input_unit) field
go to 10
else if (flag.eq.2) then
print *, `end of time period'
go to 10
end if
900 continue
In addition, the boundary condition file in V1/V2 system is
separated into two files with one containing only the lateral
boundary arrays, and the other the substrate temperature array
(lower boundary condition file). Both files are brought to the
same file structure as the rest of modeling system output files.
Sigma-level data in V3 are no longer coupled (e.g. multiplied
by p*).
The units in V3 header are mostly MKS, e.g. pressure unit is
Pascal, grid distance is in m, etc.
2.1 Big header
The big header has four 2-D arrays similar to that in the
V1/V2 system, which we refer to in the V3 modeling system programs
as
BHI,BHR,BHIC,BHRC
and the dimensions of these arrays are
BHI(50,20),BHR(20,20),BHIC(50,20),BHRC(20,20)
where BHI is an integer array, and BHIC is the companion array
that contains the description of what is in BHI. Similarly BHR
is a real array, and BHRC contains the description of what is
in BHR.
The first value in the header, BHI(1,1), still represents
data types. But there are some changes as shown below:
BHI(1,1)
|
|
Data Types
|
|
|
|
1
|
|
Terrain
|
2
|
|
Regrid
|
3
|
|
Rawins or little_r
|
4
|
|
Rawins' surface analysis
|
5
|
|
Model initial condition file
|
6
|
|
Model lower boundary condition file (substrate temp array)
|
7
|
|
Model lateral boundary condition file
|
8
|
|
Interpolated model output on pressure levels
|
11
|
|
Model output
|
MM5 model output actually occupies header locations 11 through
16.
2.2 Sub header
A sub-header contains the following information:
ndim, start_index(4), end_index(4), xtime, staggering,
ordering, current_date, name, units, description
where
ndim:
|
integer
|
dimension of the field (integer)
|
start_index:
|
integer(4)
|
starting indices of the field array (generally 1's)
|
end_index:
|
integer(4)
|
ending indices of the field array (generally IX, JX,
KX, and 1) (the fourth dimension is not yet used)
|
xtime:
|
real
|
the integration or forecast time for this field
|
staggering:
|
char*4
|
whether the field is at dot or cross point (character
C or D)
|
ordering:
|
char*4
|
the order of the field array dimension (4-character
string with the following values)
|
YXP:
|
3-D field, pressure data dimensioned by (IX,JX,KXP)
|
YXS:
|
3-D field, sigma data dimensioned by (IX,JX,KXS)
|
YXW:
|
3-D field, sigma data dimensioned by (IX,JX,KXS+1)
(e.g. vertical motion in MM5)
|
YX:
|
2-D field, with array dimensioned by (IX,JX)
with IX in Y direction)
|
CA:
|
2-D field, with array dimensioned by (landuse-categories,2).
Arrays to store land property values, such as
albedo, roughness length, etc.
|
XSB:
|
3-D field, containing north and south boundary
arrays, dimensioned by (JX,KXS,5)
|
YSB:
|
3-D field, containing west and east boundary
arrays, dimensioned by (IX,KXS,5)
|
XWB:
|
3-D field, containing north and south boundary
arrays for vertical motion, dimensioned by (JX,KXS+1,5)
|
YWB:
|
3-D field, containing west and east boundary
arrays for vertical motion, dimensioned by (IX,KXS+1,5)
|
P:
|
1-D field, pressure level array
|
S
|
: 1-D field, sigma level array
|
|
current_date:
|
char*24
|
24-character representation of date valid for this
field
|
name:
|
char*9
|
8-character field name (kept the same as in Version
1/2 system)
|
unit:
|
char*25
|
25-character unit description
|
description:
|
char*46
|
field description (kept mostly the same as in Version
1/2 system)
|
|
|