Search by property
From CSDMS
This page provides a simple browsing interface for finding entities described by a property and a named value. Other available search interfaces include the page property search, and the ask query builder.
List of results
- Model:ModelParameterDictionary + (The Model Parameter Dictionary is a tool f … The Model Parameter Dictionary is a tool for numerical modelers to</br>easily read and access model parameters from a simple formatted </br>input (text) file. Each parameter has a KEY, which identifies the</br>parameter, and a VALUE, which can be a number or a string. A</br>ModelParameterDictionary object reads model parameters from an input </br>file to a Dictionary, and provides functions for the user to look up </br>particular parameters by key name.</br></br>The format of the input file looks like:</br></br>PI: the text "PI" is an example of a KEY</br>3.1416</br>AVOGADROS_NUMBER: this is another</br>6.022e23</br>FAVORITE_FRUIT: yet another</br>mangoes</br>NUMBER_OF_MANGO_WALKS: this one is an integer</br>4</br>ALSO_LIKES_APPLES: this is a boolean</br>true</br></br>Example code that reads these parameters from a file called</br>"myinputs.txt":</br></br> my_param_dict = ModelParameterDictionary()</br> my_param_dict.read_from_file( 'myinputs.txt' )</br> pi = my_param_dict.read_float( 'PI' )</br> avogado = my_param_dict.read_float( 'AVOGADROS_NUMBER' )</br> fruit = my_param_dict.read_string( 'FAVORITE_FRUIT' )</br> nmang = my_param_dict.read_int( 'NUMBER_OF_MANGO_WALKS' )</br> apples_ok = my_param_dict.read_bool( 'ALSO_LIKES_APPLES' )</br></br>As in Python, hash marks (#) denote comments. The rules are that each</br>key must have one and only one parameter value, and each value must</br>appear on a separate line immediately below the key line.</br></br>Also available are functions to read input parameters from the </br>command line (e.g., read_float_cmdline( 'PI' ) )d line (e.g., read_float_cmdline( 'PI' ) ))