The SRD-3 file format is a simple UNIX ASCII file format for remote sensing raster data. Instead of a general description we shall use examples for maximum reflectivity product (labeled as "ZM").
A single SRD-3 file consists of a human readable, self-descripting header and a raster matrix. Each pixel in the raster matrix is coded in 8-bit ASCII coding.
A sample header for ZM files looks like:
SRD-3 domain SI0 nrc 2 rc SI1 SI2 time 2016 11 06 10 30 fdim 2 ncell 401 301 cellsize 1.0 1.0 proj LCC ellipse 6371.0 6371.0 par 46.120 46.120 origin 14.815 46.120 shift -4.0 -6.0 nquant 1 encode BYTE quant ZM unit DBZ scale INC nlevel 16 offset 64 start 12.0 slope 3.0 value nodata 126 quality COMMENT # composite: yes # # proj4str: --- # creator: comprad 1.5.4 2014/05/08 14:24:48 # # date: 2016-11-06 10:36:02 GMT # # input files: # # /net/arsbase/rad/actual/num/si1/si1-20161106-1030-zm-si0.srd # # /net/arsbase/rad/actual/num/si2/si2-20161106-1030-zm-si0.srd # # # # # # # # # # # DATA
The '#'
sign denotes a comment, i.e. anything after that and until the end-of-line can be ignored when parsing the contents.
Any floating point numbers are written in the standard "C" locale, like 12.5 or -123.23.
End-of-line is denoted with ASCII 'LF', the so called UNIX ASCII end-of-line.
The "DATA" string in a single line which denotes the end-of-header and ths start of the raster matrix.
The parameters domain, nrc and rc describe the radar sources. domain is usually described with 3 letters.
domain SI0
It designates a specific predesigned geographical domain, i.e.
The rc parameter (radar centers (=radar sites)) lists the radar(s) used in the file. If it is a single-radar product, then there is only one radar ID listed and the corresponding nrc parameter (number of radar sites) is 1. If it is a composite like in our case, there are more sites listed and nrc is greater or equal than 1 accordingly.
nrc 2 rc SI1 SI2
Slovenian radar network consisted of one radar until January 2014 and of two since then. If for any reason only one radar has been used in the particular rrdar file (radar failure, network failure...), nrc is set to 1 and only tthe used radar ID is listed in rc.
The time parameter denotes the starting time of a radar product in UTC time zone.
time 2016 11 06 10 30
The default precision is in minutes which is satisfacotry for the vast majority of radar products.
The starting time simply means that the starting time of the correspoding volume scan, applied for creation of the ZM product, is taken.
The fdim (field dimension) parameter with value 2
fdim 2
specifies that the raster matrix is a 2D matrix. The ncell (number of cells) parameter specifies the number of columns (nx = horiz. direction, west-east) and rows (ny = vert. direction, south-north). We shall use examples from the SI0 radar domain most often used:
ncell 401 301
The cell (cell size) parameter specifies the size of a single raster pixel in kilometers:
cellsize 1.0 1.0
The raster matrix dimensions are required to be odd numbers. The central pixel is therefore at
i=201 j=151 ,
where i and j go from
i=1..401 (east-west) j=1..301 (south-north)
The parameters proj (projection ID), ellipse (Earth ellipsoid radii), par (additional projection parameters), origin (projection reference point) and shift (false easting/northing with reverse sign) specify the geographical projection for the raster matrix. For the SI0 domain, the following vaules are applied:
proj LCC ellipse 6371.0 6371.0 par 46.120 46.120 origin 14.815 46.120 shift -4.0 -6.0
LCC stands for the Lambert Conical Conform projection. 3 letter acronyms shoud be used for radar projection names. The other frequent radar projection is AED (Azimuthal Equidistant).
ellipse specifies both equatorial radii of the Earth ellipsoid. In this case for the SI0 domain, the Gauss sphere approximation is used.
The LCC projection takes more parameters which are listed under par. In this case the additional parameters are the two paralells. In our case they are equal which means that this is the tangent LCC projection. The AED projection doesn't take any additional parameters.
The origin denotes the reference point of the projection, usually written as
lon0, lat0
At the reference point, the projection coordinates are zero:
x = 0.0, y = 0.0
If we want to shift the reference point, we do it by false easting and false northing, which is specified in shift with reverse sign compared to usual meaning of false eastining/northing:
shift -4.0 -6.0
In our case the shift means that the new reference point is -4.0 km eastwards and -6.0 km northwards from the projection reference points, therefore towards southwest in this case. In projection software like PROJ this meaning is exactly reversed, so +4.0 and +6.0 should be specified for false easting and northing, respectively.
The corresponding PROJ4 set of parameters for this particular projection is as follows:
+units=km +proj= +lon_0=14d48'55E" +lat_0=46d07'12N +R= +lat_1=46d07'12N \ +x_0=+4000 +y_0=+6000
These projection parameters were designed before EUMETNET/OPERA phase 2 realized in 2005-2006 that geodetic datums should be considered as well. Datums affect both ellipsoid and latitudes and longitudes. We actively participated in this effort. Take a look at
These aforementioned parameters assume the Slovenian geodetic datum SI-D48 with simplified spherical Earth curvature. The reference point is actually the GEOSS (Slovenian Geographical center).
In nearly all cases the datums problems can be solved with the projection reference point in the correct datum, unless the false easting/northing is several 10 kilometers or more. Errors not solved with this are of magnitude of order smaller except at large distances from radars or projection reference points.
Radar data contain systematic errors in locations which increase with distance from single radar. Typical weather radar has antenna beam of 1° width. Such beam is roughly 1 km wide at 50 km distance and 2 km wide at 100 km distance, so positional errors below 1 km can be neglected.
For SRD-3 SI0 domain to be georeferenced in the global WGS84 datum, apply GEOSS coordinates in WGS84 datum instead of SI-D48 datum:
The raster pixels are registered centrally (the so called pixel registration), i.e. pixel coordinates refer to the center of a pixel. Coordinates of the center and corner pixels in the LCC projection are
-200.0 -150.0 # SW +200.0 -150.0 # SE +200.0 +150.0 # NE -200.0 +150.0 # NW 0.0 0.0 # center
Geographical coordinates on the Slovenian SI-D48 datum are
+12.234504 +44.687529 # SW +17.294911 +44.689797 # SE +17.417967 +47.386194 # NE +12.106436 +47.383814 # NW +14.763430 +46.066029 # center
and geographical coordinates on the global WGS84 datum are
12.230101 44.687306 # SW 17.289933 44.689702 # SE 17.412818 47.385828 # NE 12.101924 47.383315 # NW 14.758668 46.065727 # center
Radar data contain systematic errors in locations which increase with distance from single radar. Typical weather radar has antenna beam of 1° width. Such beam is roughly 1 km wide at 50 km distance and 2 km wide at 100 km distance. The above listed geographical coordinates are therefore with exaggerated precision. 4 decimal places are succifient for location precision of ±3 meters and 3 decimal places are succifient for location precision of ± 100 meters. In order to apply the correct geodetic datum, the most important parameter is the projection reference point: longitude and latitude should be of the appropriate geodetic datum. If not so, errors of several 100 meters may arise.
The following nquant, encode, quant and unit describe the quantity contained in the raster matrix.
The nquant specifies whether the quantity is scalar (1 dimension) or vectorial (up to 3 dimensions)
nquant 1
The encoding specifies the way how the vales are encoded
encode BYTE
The "BYTE" means thay vales are encoded, quantized into 7-bit ASCII level numbers.
The quant represents the quantity (or product) name. If possible, 2-letter acronyms should be used:
The unit represents the quantity's unit. For the above quantities, the followiung units are prescribed:
The scale woth value INC speficies whether the quantity is a number.
If encoding is set to
encode BYTE ,
values are quantized to 8-bit ASCII levels. Parameters for linear quantization are taken from the following lines:
nlevel 16 offset 64 start 12.0 slope 3.0 nodata 126
The offset with value more than 32 is usually used (unless the number of levels is too big) in order to have 8-bit values representable with ASCII editor/viewer. See teh example in ch. 2.7.
The formula for quantization is
level(value) = (value-start)/slope + offset
and for dequantization
value(level) = start + slope*(level-offset).
Levels start at
nmin = offset
and end at
nmax = offset+nlevels-1 .
Each level encompasses values between
value(level) +/- slope/2 .
The arithmetic mean is taken in further applications.
If quantity doesn't have lower limit, the first level represents the interval between
value(nmin) = [-infinity, value(offset) + slope/2]
If the quantity doesn't have upper limit, the last level represents the interval between
value(nmax) = [value(nmax) - slope/2, +infinity]
Levels with value of nodata are considered as NODATA pixels. This means that
are labeled as NODATA pixels.
Pixels of the first level nmin are considered as
Maximum reflectivities are quantized as follows:
quant= zm unit= dBZ start= 12.0 slope= 3.0 offset= 64 nlevels=16 pure level ASCII middle lower upper level dBZ dBZ dBZ 00 64 @ undef -inf 13.50 # clear-sky 01 65 A 15.00 13.50 16.50 02 66 B 18.00 16.50 19.50 03 67 C 21.00 19.50 22.50 04 68 D 24.00 22.50 25.50 05 69 E 27.00 25.50 28.50 06 70 F 30.00 28.50 31.50 07 71 G 33.00 31.50 34.50 08 72 H 36.00 34.50 37.50 09 73 I 39.00 37.50 40.50 10 74 J 42.00 40.50 43.50 11 75 K 45.00 43.50 46.50 12 76 L 48.00 46.50 49.50 13 77 M 51.00 49.50 52.50 14 78 N 54.00 52.50 55.50 15 79 O undef 55.50 +inf
Thus, if such SRD3 file is opened with an ASCII viewer, raster matrix is alread visualized:
... quality COMMENT # composite: yes # # proj4str: --- # creator: comprad 1.5.4 2014/05/08 14:24:48 # # date: 2016-11-06 10:36:02 GMT # # input files: # # /net/arsbase/rad/actual/num/si1/si1-20161106-1030-zm-si0.srd # # /net/arsbase/rad/actual/num/si2/si2-20161106-1030-zm-si0.srd # # # # # # # # # # # DATA ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@@@@@@@@@@@@@@@@... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@@@@@@@@@@@@@@@@@... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@@@@@@@@@@@@@@@@AA... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@@@@@@@@@@@@@@A@AAA... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@@@@@@@@@@@@AAABBBB... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@@@@@@@@@@@@AAAAABCC... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@@@@@@@@@@@@@@@AAAAB... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@@@@@@@@@@@@@@@@@AAA... . . .
RR stands for rain rate. It is measured in dBR/h
instead of mm/h
. It is typical rain unit in radar meteorology. dBR is defined as
dBR = 10 log (R[1 mm]/1 mm) quant= rr unit= dBR start= -8.0 slope= 2.0 offset= 64 nlevels=16 level +offset ASCII middle lower upper dBR dBR dBR 00 64 @ undef -inf -7.00 # clear-sky 01 65 A -6.00 -7.00 -5.00 02 66 B -4.00 -5.00 -3.00 03 67 C -2.00 -3.00 -1.00 04 68 D 0.00 -1.00 1.00 05 69 E 2.00 1.00 3.00 06 70 F 4.00 3.00 5.00 07 71 G 6.00 5.00 7.00 08 72 H 8.00 7.00 9.00 09 73 I 10.00 9.00 11.00 10 74 J 12.00 11.00 13.00 11 75 K 14.00 13.00 15.00 12 76 L 16.00 15.00 17.00 13 77 M 18.00 17.00 19.00 14 78 N 20.00 19.00 21.00 15 79 O undef 21.00 +inf
The same values in mm are:
level +offset ASCII middle lower upper mm mm mm 00 64 @ undef -inf 0.20 # clear-sky 01 65 A 0.25 0.20 0.32 02 66 B 0.40 0.32 0.50 03 67 C 0.63 0.50 0.79 04 68 D 1.00 0.79 1.26 05 69 E 1.58 1.26 2.00 06 70 F 2.51 2.00 3.16 07 71 G 3.98 3.16 5.01 08 72 H 6.31 5.01 7.94 09 73 I 10.00 7.94 12.59 10 74 J 15.85 12.59 19.95 11 75 K 25.12 19.95 31.62 12 76 L 39.81 31.62 50.12 13 77 M 63.10 50.12 79.43 14 78 N 100.00 79.43 125.89 15 79 O undef 125.89 +inf