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.

Search by property

A list of all pages that have property "Extended model description" with value "The Model Parameter Dictionary is a tool for numerical modelers to easily read and access model parameters from a simple formatted input (text) file. Each parameter has a KEY, which identifies the parameter, and a VALUE, which can be a number or a string. A ModelParameterDictionary object reads model parameters from an input file to a Dictionary, and provides functions for the user to look up particular parameters by key name. The format of the input file looks like: PI: the text "PI" is an example of a KEY 3.1416 AVOGADROS_NUMBER: this is another 6.022e23 FAVORITE_FRUIT: yet another mangoes NUMBER_OF_MANGO_WALKS: this one is an integer 4 ALSO_LIKES_APPLES: this is a boolean true Example code that reads these parameters from a file called "myinputs.txt": my_param_dict = ModelParameterDictionary() my_param_dict.read_from_file( 'myinputs.txt' ) pi = my_param_dict.read_float( 'PI' ) avogado = my_param_dict.read_float( 'AVOGADROS_NUMBER' ) fruit = my_param_dict.read_string( 'FAVORITE_FRUIT' ) nmang = my_param_dict.read_int( 'NUMBER_OF_MANGO_WALKS' ) apples_ok = my_param_dict.read_bool( 'ALSO_LIKES_APPLES' ) As in Python, hash marks (#) denote comments. The rules are that each key must have one and only one parameter value, and each value must appear on a separate line immediately below the key line. Also available are functions to read input parameters from the command line (e.g., read_float_cmdline( 'PI' ) )". Since there have been only a few results, also nearby values are displayed.

Showing below up to 2 results starting with #1.

View (previous 50 | next 50) (20 | 50 | 100 | 250 | 500)


    

List of results

    • Model:ModelParameterDictionary  + (The Model Parameter Dictionary is a tool fThe 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' ) ))