...
Appending the binary image files (each having the same format and dimensions) to create a time series can be done using (for example) a DOS copy command in binary append mode, as follows:
Code Block | ||
---|---|---|
| ||
copy /b step1.bil+step2.bil+step2.bil+step4.bil 4steps.bil |
Configuration
...
A header file for the resulting time series can be made by copying and renaming any of the input header files (*.hdr) and adding an extra line to define the number of file blocks:
Code Block | ||
---|---|---|
| ||
NBLOCKS 4
|
If the header contains a definition of NBLOCKS larger than 1, an extra file (*.tim) is required to define a timestamp per block in the format YYYYMMDDHHMM:
Code Block | ||
---|---|---|
| ||
200001011200
200001011300
200001011400
200001011500
|
Configuration
The following configuration example shows what is required to import BIL/BIP/BSQ format satellite data into FEWS. The following files need to be adjusted:
- Locations.xml: to add the satellite location ID
- Grids.xml: for the grid characteristics
- Import_BIL.xml: module instance that imports the data (for example)
- IDMapping file if a special parameter ID needs to be specified
- ModuleInstanceDescriptors.xml: For reference of the import module instance
- ImportUnitConversions.xml: If the units need to be converted on importing
For some of these files examples are provided below. Locations, ModuleInstanceDescriptors and ImportUnitConversions are standard FEWS configuration files.
Example of the locations.xml file element:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<location id="SATH_AFRICA" name="SATH_AFRICA"> <shortName>SATH_AFRICA</shortName> <x>0</x> <y>0</y> </location> |
Example of the Grids.xml file element:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<regular locationId="SATH_AFRICA"> <description>SATH Rainfall files</description> <rows>702</rows> <columns>1002</columns> <geoDatum>WGS 1984</geoDatum> <firstCellCenter> <x>-13</x> <y>25</y> <z>0</z> </firstCellCenter> <xCellSize>.03</xCellSize> <yCellSize>.03</yCellSize> </regular> |
Example of the ID mapping to map band numbers to FEWS parameters:
Code Block | ||||
---|---|---|---|---|
| ||||
<idMap > <parameter internal="P.obs" external = "0"/> <parameter internal="T.obs" external = "1"/> </idMap> |
An example import Module instance configuration file that maps the BSQ band nuymbers (0,1) to FEWS parameters (P.obs, T.obs):
Code Block | ||||
---|---|---|---|---|
| ||||
<timeSeriesImportRun> <import> <general> <importType>BILBIPBSQ</importType> <folder>$IMPORT_FOLDER$\BSQ</folder> <fileNameObservationDateTimePattern>'NI_'yyyyMMdd'.BSQ'</fileNameObservationDateTimePattern> <idMapId>IdImportBSQ</idMapId> <unitConversionsId>ImportUnitConversions</unitConversionsId> <importTimeZone> <timeZoneOffset>+00:00</timeZoneOffset> </importTimeZone> <geoDatum>WGS 1984</geoDatum> <dataFeedId>SATH_AFRICA</dataFeedId> </general> <timeSeriesSet> <moduleInstanceId>ImportBSQ</moduleInstanceId> <valueType>grid</valueType> <parameterId>P.obs</parameterId> <locationId>SATH_AFRICA</locationId> <timeSeriesType>external historical</timeSeriesType> <timeStep unit="day"/> <readWriteMode>add originals</readWriteMode> <expiryTime unit="day" multiplier="30"/> </timeSeriesSet> <timeSeriesSet> <moduleInstanceId>ImportBSQ</moduleInstanceId> <valueType>grid</valueType> <parameterId>T.obs</parameterId> <locationId>SATH_AFRICA</locationId> <timeSeriesType>external historical</timeSeriesType> <timeStep unit="day"/> <readWriteMode>add originals</readWriteMode> <expiryTime unit="day" multiplier="30"/> </timeSeriesSet> </import> </timeSeriesImportRun> |