Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tseries:technical [2014-01-22 06:32:53] juergens |
tseries:technical [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Tseries Technical Documentation ====== | ====== Tseries Technical Documentation ====== | ||
- | |||
===== Description: | ===== Description: | ||
- | Tseries is an open-source time-series viewer for meteorological purposes. Tseries is developed and implemented at the Norwegian Meteorological Institute met.no, as a part of the operational meteorological workstation. Tseries can be used standalone, or in interaction with the DIANA meteorological workstation. | + | //Tseries// is an open-source time-series viewer for meteorological purposes. |
- | The tseries | + | The // |
- tseries.bin is the timeseries viewer with a Graphical user interface | - tseries.bin is the timeseries viewer with a Graphical user interface | ||
- | - btseries is a batch version of tseries, using the same graphical engine | + | - btseries is a batch version of //Tseries//, using the same graphical engine |
- | The Goal of this Document is to explain the basic structure of tseries | + | The Goal of this Document is to explain the basic structure of // |
+ | Styles and control are located in a separate package - The source code is downloadable at [[https:// | ||
===== Command line parameters: ===== | ===== Command line parameters: ===== | ||
- | Most of the input in tseries | + | Most of the input in // |
- | + | | | |
- | | **-s [ setupfile ]** | if the setup file is not directly defined or invalid, | + | | **-s [ setupfile ]** | if the setup file is not directly defined or invalid, |
| **-S [site]** | site is just a short string. The user can define elements in the setup-file that are only used by certain groups. By this, several groups of users can share one setup-file to simplify maintenance. | | **-S [site]** | site is just a short string. The user can define elements in the setup-file that are only used by certain groups. By this, several groups of users can share one setup-file to simplify maintenance. | ||
| **-l [lang]** | The language for the GUI. Can be configured in the GUI itself. Available languages are English(default), | | **-l [lang]** | The language for the GUI. Can be configured in the GUI itself. Available languages are English(default), | ||
- | | **-T [title]** | Changes the window title, useful if you are running several instances of tseries | + | | **-T [title]** | Changes the window title, useful if you are running several instances of // |
- | | **-H [wdbhost]** | Host for the WDB connection | | + | | **-H [wdbhost]** | Host for the [[https:// |
- | | **-u [wdbuser]** | User for the WDB connection | | + | | **-u [wdbuser]** | User for the [[https:// |
| **-d [section1: | | **-d [section1: | ||
Line 34: | Line 33: | ||
===== Datastreams: | ===== Datastreams: | ||
- | There are several possibilities to add a Datastream to a tseries | + | There are several possibilities to add a Datastream to a // |
- **HDF** is the most common used datasource. In HDF all positions are predefined and named, Hdf input is defined in the base control file tseries.ctl. All HDF streams mentioned in tseries.ctl are indexed at startup. Streams from different HDF files can be combined in a single Diagram. | - **HDF** is the most common used datasource. In HDF all positions are predefined and named, Hdf input is defined in the base control file tseries.ctl. All HDF streams mentioned in tseries.ctl are indexed at startup. Streams from different HDF files can be combined in a single Diagram. | ||
- **ASCII** is implemented. But in an operational environment ASCII streams are space-consuming and ineffective. An example of usage of ASCII streams is presented in the appendix of this Document. | - **ASCII** is implemented. But in an operational environment ASCII streams are space-consuming and ineffective. An example of usage of ASCII streams is presented in the appendix of this Document. | ||
- | - **WDB** the Weather and Water Database WDB is an open-source database system based on postgres. The system is developed at MET Norway. WDB is holding data as fields. Tseries retrieves interpolated timeseries | + | - **WDB** the Weather and Water Database |
- **KDVH** is a MET Norway proprietary interface, based on URL. KDVH reads observations from the Norwegian climatic database. The Data are defined as Diagram entries in the control file (tseries.ctl) and can be implemented in any diagram. | - **KDVH** is a MET Norway proprietary interface, based on URL. KDVH reads observations from the Norwegian climatic database. The Data are defined as Diagram entries in the control file (tseries.ctl) and can be implemented in any diagram. | ||
+ | |||
+ | - **Fimex** | ||
===== Diagrams: ===== | ===== Diagrams: ===== | ||
- | A Diagram in tseries | + | A Diagram in // |
To generate a new diagram, one have to proceed the following workflow: | To generate a new diagram, one have to proceed the following workflow: | ||
Line 56: | Line 57: | ||
- Repeat 6. and 7. until you are happy with the result. | - Repeat 6. and 7. until you are happy with the result. | ||
- | The Main Control file – tseries.ctl | + | ===== The Main Control file – tseries.ctl |
The control file is split into several sections. All parameters given in the start of the file can be used as substitutes by $(parameter) anywhere later in the file. Unix Environment variables can be substituted by ${parameter}. | The control file is split into several sections. All parameters given in the start of the file can be used as substitutes by $(parameter) anywhere later in the file. Unix Environment variables can be substituted by ${parameter}. | ||
+ | |||
Single lines can be commented out by “#” | Single lines can be commented out by “#” | ||
+ | |||
Keys, Sites and sections are “case-independent” | Keys, Sites and sections are “case-independent” | ||
- | Sites: | ||
- | Tseries.ctl is a multi-user setup-file. To avoid the administration of several setup-files within your company, you can write several different configurations in the same file. The file is processed top-down. When a variable is defined several times, the last definition is valid. | ||
- | Elements within sites in tseries are usually inactive, the parser will ignore them, unless the user starts tseries with the flag that defines the specific site ( the -S flag). A site is defined by a colon separated list of strings in square brackets. A site section ends by another site or a set of empty brackets. | ||
+ | ==== Sites: ==== | ||
+ | | ||
+ | |||
+ | Elements within sites in //Tseries// are usually inactive, the parser will ignore them, unless the user starts //Tseries// with the flag that defines the specific site ( the -S flag). A site is defined by a colon separated list of strings in square brackets. A site section ends by another site or a set of empty brackets. | ||
+ | |||
+ | < | ||
Example: | Example: | ||
Line 74: | Line 81: | ||
server=potato.com | server=potato.com | ||
[] | [] | ||
+ | </ | ||
- | Basically the server is defined as “meat.com”, | + | Basically the server is defined as “meat.com”, |
| | ||
- | If you want to use potato.com, | + | To use potato.com |
- | Sections | + | ==== Sections |
- | Sections are defined by chevrons like “< | + | |
- | < | + | Sections are defined by chevrons like '' |
- | Etc: | + | ^ Token ^ Description ^ |
- | Path to find basic configurations | + | | nowTime | this special token can be used to generate a formatted string from the clock like '' |
- | Images: | + | |
- | Path to find images used in diagrams, like weather symbols | + | |
- | Doc: | + | |
- | Path to the Documentation | + | |
- | Lang: | + | |
- | Path to find language files, | + | |
+ | === SECTION: < | ||
+ | ^ Token ^ Description ^ | ||
+ | | **Etc** | ||
+ | | **Images** | Path to find images used in diagrams, like weather symbols | | ||
+ | | **Lang** | ||
+ | | **Styles** | Path to find stylefiles in tsDiagrams.def | | ||
- | < | + | === SECTION: |
- | Defs: | + | |
- | The diagram definition file | + | |
- | Configure: | + | |
- | Autogenerated File to store configuration (like window size, language etc) from the GUI. | + | |
- | WeatherSymbols: | + | |
- | The weather symbol definition file | + | |
- | stdImage: | + | |
- | Image to send to diana to show stations on the map | + | |
- | finImage: | + | |
- | Image to display in diana when the “find” button is triggered | + | |
- | iconImage: | + | |
- | The tseries icon | + | |
- | baseFilter: | + | |
- | A filter file. If you use the filter, tseries will only display stations defined in the filter. The filter can be altered and saved locally by the user. | + | |
- | Bookmarks: | + | |
- | In WDB mode you can add your own bookmarks (stations). They will be saved in this file | + | |
- | commonBookmarks: | + | |
- | A file with bookmarks given by your company, valid for all users | + | |
+ | ^ Token ^ Description ^ | ||
+ | | **Defs** | ||
+ | | **Configure** | Autogenerated File to store configuration (like window size, language etc) from the GUI. | | ||
+ | | **WeatherSymbols** | The weather symbol definition file | | ||
+ | | **stdImage** | ||
+ | | **finImage** | ||
+ | | **iconImage** | ||
+ | | **baseFilter** | ||
+ | | **wdbBookmarks** | ||
+ | | **fimexBookmarks** | ||
+ | | **commonBookmarks** | A file with common bookmarks, valid for all users | | ||
+ | === SECTION: < | ||
+ | ^ Token ^ Description ^ | ||
+ | | **FimexStreamTypes** | List of streamtypes that will be read by [[fimex: | ||
- | < | ||
- | The server section is used to define the connection to diana via coserver | ||
- | Client: | + | === SECTION: <WDB> === |
- | What application is the target (Diana) | + | ^ Token ^ Description ^ |
- | Name: | + | | **Host** |
- | What name is sendt to the Client | + | | **User** |
- | Command: | + | | **busymovie** | Animated gif to display that the server is busy - caching | |
- | What command is coserver using | + | | **readtime** |
+ | | **maxRecord **| Cutoff for records in bookmarks | | ||
- | < | ||
- | The streams section is parsed by an older system, the pets graphical engine, on which | ||
- | tseries is build. | ||
- | All data input from HDF files is defined here, always the same way. | ||
- | A new model starts with a collection name, this is more for backwards-compatibility, | ||
- | these values are not used by tseries | ||
+ | === SECTION: < | ||
+ | ^ Token ^ Description ^ | ||
+ | | **url** | base URL for the klima requequest | | ||
+ | | **maxDistance** | max distance to an observation in km (default=50) | | ||
+ | | **maxObservationLength** | how many hours to look into the past (default=300) | | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | === SECTION: < | ||
+ | The server section is used to define the connection to [[https:// | ||
+ | |||
+ | ^ Token ^ Description ^ | ||
+ | | **Client** | ||
+ | | **Name** | ||
+ | | **Command** | Command to start coserver | | ||
+ | |||
+ | === SECTION: < | ||
+ | |||
+ | The streams section is parsed by an older system, the pets graphical engine, on which | ||
+ | //Tseries// is build. | ||
+ | All data input from HDF files and [[fimex: | ||
+ | |||
+ | A new model starts with a collection name, this is kept for backwards-compatibility, | ||
+ | these values are not used by //Tseries// | ||
+ | < | ||
CollectionName=ECMeteogrammer | CollectionName=ECMeteogrammer | ||
PreferredDiagram=Meteogram | PreferredDiagram=Meteogram | ||
InitialOpen=0 | InitialOpen=0 | ||
+ | </ | ||
- | In a collection, any datafile | + | In a collection, any hdf/fimex file has to be registered the following way |
- | DataFile: | + | == A HDF/ASCII Stream == |
- | The hdf file | + | ^ Token ^ Description ^ |
- | DataDescription: | + | | **DataFile** |
- | The data description. A hdf file can contain several streams. You have to find the exact stream name in the file (when in doubt use vshow). The data description is used to define values in the diagram definition. | + | | **DataDescription** | The data description. A hdf file can contain several streams. You have to find the exact stream name in the file (when in doubt use vshow). The data description is used to define values in the diagram definition. |
- | DataType: | + | | **DataType** | HDF or ASCII | |
- | HDF or ASCII | + | | **Contents** | What parameter are defined in the file, x means any. The string is separated into four sections: Parameter, |
- | Contents: | + | |
- | What parameter are defined in the file, x means any. The string is separated into four sections: Parameter, | + | |
- | x, | + | |
- | x,x,ECMWF,x -All parameters from ECMWF, all times | + | |
+ | == A FIMEX Stream == | ||
+ | ^ Token ^ Description ^ | ||
+ | | **DataFile** | ||
+ | | **DataDescription** | The data description. Just a string to connect this stream to the diagram definition. (tsDiagrams.def) | ||
+ | | **DataType** | [ type : tag ] type has to be defined in fimexStreamTypes, | ||
+ | | **Contents** | Not really used in Fimexstreams | ||
+ | | **DataConfig** | Connect a [[fimex: | ||
+ | |||
+ | |||
+ | === SECTION: < | ||
+ | |||
+ | This section maps wdb parameters to tseries parameters | ||
+ | |||
+ | < | ||
+ | |||
+ | # tseries parameter | ||
+ | MSLP, | ||
+ | RR, | ||
+ | TT, | ||
+ | UU, | ||
+ | </ | ||
+ | |||
+ | |||
+ | === SECTION:< | ||
+ | connect two parameters to a vector( to rotate them into a greografic grid) | ||
+ | < | ||
+ | UU,0,x,x,x :VV,0,x,x,x | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | === SECTION: < | ||
+ | |||
+ | < | ||
+ | # tseries parameter = klimaparameter | ||
+ | TT_O, | ||
+ | MSLP_O, | ||
+ | QNH_O, | ||
+ | |||
+ | </ | ||
+ | |||
+ | === SECTION: < | ||
+ | < | ||
+ | # tseries parameter = klimaparameter | ||
+ | # for these parameters, tseries has to build a timeline | ||
+ | TAM, | ||
+ | TANM, | ||
+ | TAXM, | ||
+ | </ | ||
+ | |||
+ | === SECTION: < | ||
+ | |||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | tag = Given at the fimexstream definition | ||
+ | fimexname = Request parametername | ||
+ | Unit = Udunits string | ||
+ | extradim | ||
+ | be defined her for this particular parameter | ||
+ | |||
+ | # tseries parameter | ||
+ | # | ||
+ | # | ||
+ | |||
+ | |||
+ | MSLP,x,x,x = netcdf | air_pressure_at_sea_level | ||
+ | TT, | ||
+ | UU, | ||
+ | |||
+ | # with a defined RRAC, tseries knows automatically how to extract RR from it | ||
+ | RRAC,x,x,x = netcdf | precipitation_amount_acc | ||
+ | # Postprocessed temperature - alias... | ||
+ | TTPP,x,x,x = netcdf | air_temperature_2m | ||
+ | |||
+ | ## Wrf data | ||
+ | |||
+ | MSLP,x,x,x = wrf | air_pressure_at_sea_level | ||
+ | TT, | ||
+ | UU, | ||
+ | VV, | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ===== The Diagram definition file – tsDiagrams.def===== | ||
- | The Diagram definition file – tsDiagrams.def | ||
The Diagram definition file ties the streams to the actual diagram styles. One model input can appear in several diagrams, as well as several different models can use the same diagram type (like a meteogram). It is also possible to use one parameter from a defined stream into a certain diagram that is used by another stream. An example is the use of wind speed from an atmospheric model into a wave-diagram. | The Diagram definition file ties the streams to the actual diagram styles. One model input can appear in several diagrams, as well as several different models can use the same diagram type (like a meteogram). It is also possible to use one parameter from a defined stream into a certain diagram that is used by another stream. An example is the use of wind speed from an atmospheric model into a wave-diagram. | ||
- | Tseries builds its User interface based on this file. A stream appears first in the menus when it is defined here. If you want to remove a streams from tseries, you have to remove it from this file as well. Otherwise it will appear as an empty entry in the menus. | + | //Tseries// builds its User interface based on this file. A stream appears first in the menus when it is defined here. If you want to remove a streams from //Tseries//, you have to remove it from this file as well. Otherwise it will appear as an empty entry in the menus. |
- | The [models] section | + | ===The [models] section=== |
- | Any model have to be defined in the models section, | + | All Models |
+ | Example: | ||
+ | < | ||
| | ||
- | + | </ | |
- | ECMWF is the name from tseries.ctl, | + | |
+ | ECMWF equals | ||
- | The Diagrams | + | === The Diagrams |
Each diagram definition connects some parameters from some models to a style. A style can be used several times in different contexts. For instance is the S-meteogram (symbol meteogram) a diagram that uses the meteogram style, but it has also the weather parameter (WW) as input. | Each diagram definition connects some parameters from some models to a style. A style can be used several times in different contexts. For instance is the S-meteogram (symbol meteogram) a diagram that uses the meteogram style, but it has also the weather parameter (WW) as input. | ||
Each diagram defintion starts with the [DIAGRAM] keyword and ends with the [ADD] keyword. | Each diagram defintion starts with the [DIAGRAM] keyword and ends with the [ADD] keyword. | ||
+ | < | ||
Examples: | Examples: | ||
Line 178: | Line 289: | ||
NAME=Meteogram | NAME=Meteogram | ||
# The connected style file | # The connected style file | ||
- | STYLEFILE=/ | + | STYLEFILE=meteogram.style |
# The streams connected to this diagram | # The streams connected to this diagram | ||
[LEGALMODELS] | [LEGALMODELS] | ||
Line 184: | Line 295: | ||
MODEL=HARMONIE_2.5km | MODEL=HARMONIE_2.5km | ||
- | # modelindependent means, that these parameters will be taken from # all models, if available | + | # Modelindependent = These parameters will be taken from |
+ | # all models, if available | ||
[MODELINDEPENDENT] | [MODELINDEPENDENT] | ||
PARAM=UU, | PARAM=UU, | ||
Line 192: | Line 305: | ||
[END] | [END] | ||
- | # modelspecific means that these parameters are only used if they # come from the specified model. | + | # Modelspecific = These parameters are only used if they come from the specified model. |
- | # modflspecifi | + | # Modelspecific |
# If they are not defined there, they will not occur in the menu | # If they are not defined there, they will not occur in the menu | ||
Line 207: | Line 320: | ||
[ADD] | [ADD] | ||
+ | </ | ||
- | + | ====Styles==== | |
- | Styles | + | |
Styles are defined in stylefiles. These are connected to data by tsDiagrams.def. | Styles are defined in stylefiles. These are connected to data by tsDiagrams.def. | ||
By altering the stylesfiles you can control colors, line and object types in the diagram. | By altering the stylesfiles you can control colors, line and object types in the diagram. | ||
There are hundreds of different types in a stylefile. | There are hundreds of different types in a stylefile. | ||
+ | |||
+ | < | ||
# | # | ||
# | # | ||
Line 272: | Line 387: | ||
[DEFAULT] | [DEFAULT] | ||
+ | </ | ||
Then you have to define axes | Then you have to define axes | ||
+ | < | ||
first at least one x-axis | first at least one x-axis | ||
# -------------------------------- | # -------------------------------- | ||
Line 287: | Line 404: | ||
minSkipX= 15 | minSkipX= 15 | ||
[ADD] | [ADD] | ||
+ | |||
+ | </ | ||
And then several y-axes. A curve in the diagram is connected to an axis. If you want to display, for instance several temperatures, | And then several y-axes. A curve in the diagram is connected to an axis. If you want to display, for instance several temperatures, | ||
+ | |||
+ | < | ||
# ---------------------------- | # ---------------------------- | ||
# Yaxis (T2m) | # Yaxis (T2m) | ||
Line 310: | Line 431: | ||
patternInColour=TRUE | patternInColour=TRUE | ||
[ADD] | [ADD] | ||
+ | </ | ||
With axis in place, you have to define a parameter and connect it to it. In this case, the curve is presented in 2 different colors, one for -100 to 0 degrees and one for 0-100 degrees. | With axis in place, you have to define a parameter and connect it to it. In this case, the curve is presented in 2 different colors, one for -100 to 0 degrees and one for 0-100 degrees. | ||
+ | < | ||
[NEW] | [NEW] | ||
type= LINE | type= LINE | ||
Line 327: | Line 449: | ||
patternInColour= FALSE | patternInColour= FALSE | ||
[ADD] | [ADD] | ||
+ | </ | ||
+ | |||
+ | ===Valid Types:=== | ||
+ | There are several types in //Tseries// that can be used by the different elements. | ||
+ | |||
+ | ====Colors==== | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | |||
+ | ^ Fillpatterns | ||
+ | | DIAGRIGHT | ||
+ | | DIAGLEFT | ||
+ | | DIAGCROSS | ||
+ | | HORIZONTAL | ||
+ | | VERTICAL | ||
+ | | SHORIZONTAL | ||
+ | | SVERTICAL | ||
+ | | SQUARE | ||
+ | | SOLID | ||
+ | |||
+ | ^ Linestyle | ||
+ | | DASHED | ||
+ | | DASHDOTTED | ||
+ | | DASHDASHDOTTED | ||
+ | | DOTTED | ||
- | Valid types: | ||
- | There are several types in tseries that can be used by the different elements. | ||
- | Colors: | ||
- | BLACK | ||
- | BLUE | ||
- | GREEN | ||
- | CYAN | ||
- | RED | ||
- | MAGENTA | ||
- | YELLOW | ||
- | WHITE | ||
- | GREY25 | ||
- | GREY40 | ||
- | GREY45 | ||
- | GREY50 | ||
- | GREY55 | ||
- | GREY60 | ||
- | GREY65 | ||
- | GREY70 | ||
- | GREY75 | ||
- | GREY80 | ||
- | GREY85 | ||
- | GREY90 | ||
- | GREY95 | ||
- | MIST_RED | ||
- | MIST_GREEN | ||
- | MIST_BLUE | ||
- | DARK_GREEN | ||
- | BROWN | ||
- | ORANGE | ||
- | PURPLE | ||
- | LIGHT_BLUE | ||
- | DARK_YELLOW | ||
- | DARK_RED | ||
- | DARK_BLUE | ||
- | DARK_CYAN | ||
- | DARK_MAGENTA | ||
- | MIDNIGHT_BLUE | ||
- | DNMI_GREEN | ||
- | DNMI_BLUE | ||
- | RUST_RED | ||
- | DAWN_RED | ||
- | SUN_YELLOW | ||
- | SPRING_GREEN | ||
- | IRR_GREEN | ||
- | MOSS_GREEN | ||
- | GRASS_GREEN | ||
- | THUNDER_GREY | ||
- | SEA_BLUE | ||
- | SKY_BLUE | ||
- | ICE_BLUE | ||
- | GLACIER_WHITE | ||
- | RAIN_GREY | ||
- | IVORY | ||
- | DARK_IVORY | ||
- | BLUEGREY | ||
- | GREYBROWN | ||
- | OLIVE | ||
- | MUDDYGREEN | ||
- | GREYBLUE | ||
- | DARK_BLUEGREY | ||
- | DARKOLIVE | ||
- | RED_YELLOW | ||
- | YELLOW_RED | ||
- | Fillpatterns | ||
- | DIAGRIGHT | ||
- | DIAGLEFT | ||
- | DIAGCROSS | ||
- | HORIZONTAL | ||
- | VERTICAL | ||
- | SHORIZONTAL | ||
- | SVERTICAL | ||
- | SQUARE | ||
- | SOLID | ||
- | Linestyle | ||
- | DASHED | ||
- | DASHDOTTED | ||
- | DASHDASHDOTTED | ||
- | DOTTED | ||