Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wdb:manuals:wdb_metadata [2012-04-04 19:39:20] michaeloa |
wdb:manuals:wdb_metadata [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 160: | Line 160: | ||
==== Add place Definitions ==== | ==== Add place Definitions ==== | ||
- | There are various differing functions to add a place definition to the database, depending on the type of place definition to be added. The function wci.addplacepoint is used for adding point data, while wci.addplaceregulargrid is used to define regular grids as follows. | + | There are various differing functions to add a place definition to the database, depending on the type of place definition to be added. The function wci.addplacepoint is used for adding point data, while wci.addplaceregulargrid is used to define regular grids as follows: |
- | select wci.addplacepoint( ' | + | select wci.addplacepoint(' |
- | ' | + | st_geomfromtext(' |
- | The first parameter in the function is the place name, while the second is the geographical position of the place definition in the default coordinate system of the WDB instance. | + | The first parameter in the function is the place name, while the second is the geographical position of the place definition in the default coordinate system of the WDB instance |
select wci.addplaceregulargrid( 'ecmwf 0.5 grid', | select wci.addplaceregulargrid( 'ecmwf 0.5 grid', | ||
Line 179: | Line 179: | ||
The fifth parameter is a comment field. Ideally, it contains a few brief lines of text that describe and explain the data provider entity. | The fifth parameter is a comment field. Ideally, it contains a few brief lines of text that describe and explain the data provider entity. | ||
- | |||
==== Adding a Place Definition ==== | ==== Adding a Place Definition ==== | ||
Line 188: | Line 187: | ||
==== Spatial Reference ID ==== | ==== Spatial Reference ID ==== | ||
+ | All SRIDs must be defined with " | ||
==== Setting a Place Name ==== | ==== Setting a Place Name ==== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Parameters ===== | ||
+ | |||
+ | This section defines the metadata for parameters. | ||
+ | |||
+ | ==== Definition ==== | ||
+ | |||
+ | The Parameter in WDB identifies the characteristic or measurable factor of the value being parameterized. Parameters provide a definitive description of what the data represents, including spatial and temporal properties. The parameter names are based around the NetCDF climate and forecast (CF) metadata conventions. Unfortunately, | ||
+ | |||
+ | Parameter names exist with a parameter namespace. A namespace can be defined by the WDB administrator, | ||
+ | |||
+ | ==== Browse Parameters ==== | ||
+ | |||
+ | To retrieve all of the value parameters that are currently stored in the database for the currently specified namespace, the following wci.browse function call could be used: | ||
+ | |||
+ | SELECT * FROM wci.browse( NULL:: | ||
+ | |||
+ | For the level parameters, use | ||
+ | |||
+ | SELECT * FROM wci.browse( NULL:: | ||
+ | |||
+ | To retrieve all of the ValueParameterNames and LevelParameterNames that the database currently has the capacity to store and display in the currently specified namespace, the following wci.info function call could be used: | ||
+ | |||
+ | SELECT * FROM wci.getparameter( NULL ); | ||
+ | |||
+ | ==== Add Parameters ==== | ||
+ | |||
+ | To add a parameter to the database, the wci.addvalueparameter function is used. The default parameter name structure is constructed based on the [[http:// | ||
+ | |||
+ | select wci.addparameter( ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | |||
+ | This gives a default parameter in the default namespace of: | ||
+ | |||
+ | single-word-surface component standard-name //at// multi-word-surface //in// medium //due to// process // | ||
+ | |||
+ | Standard name is one of the CF standard names. | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | select wci.addcfsurface( 'sea level', | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | select wci.addcfcomponent( ' | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | select wci.addcfmedium( ' | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | select wci.addcfprocess( 'large scale precipitation', | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | select wci.addcfcondition( 'deep snow', ' | ||
+ | |||
+ | Methods indicate the calculations used for the parameter. A new method is added to the database using the wci.addcfmethods function. Example: | ||
+ | |||
+ | select wci.addcfmethods(' | ||
+ | |||
+ | Unit of measure is the standard unit of measure used by the parameter. WDB uses SI units defined using context-sensitive [[http:// | ||
+ | |||
+ | The default (canonical) parameter name is constructed using the various components described above. | ||
+ | |||
+ | For examples of adding new parameters to WDB, see the [[https:// | ||
+ | |||
+ | ==== Set Parameter Names in Namespace ==== | ||
+ | |||
+ | The canonical parameter name is valid for the default (0) parameter name space only. To set the parameter name in other namespaces, the wci.setparametername function should be used. Example: | ||
+ | |||
+ | select wci.setparametername( 'air temperature', | ||
+ | |||
+ | This sets a parameter name ' | ||
+ | |||
+ | If you are satisfied with using CF-like parameters, then the function wci.copyParameterNameSpace( 0 ) can be used to copy all of the parameters in the default namespace into the currently defined parameter namespace. | ||
+ | |||
+ | select wci.copyParameterNameSpace( 0 ) | ||
+ | |||
+ | Parameters created using this method are similar to the CF standard name, except that the short form of the CF methods precedes the CF standard name in order to generate a more natural language parameter description. Thus 'air temperature [maximum over days]' becomes 'max air temperature' | ||
+ | |||
+ | For an example of adapting and adding parameters to a private parameter namespace, see the [[https:// |