wrfhydropy.Model¶
-
class
wrfhydropy.Model(source_dir: str, model_config: str, hydro_namelist_config_file: str = None, hrldas_namelist_config_file: str = None, compile_options_config_file: str = None, compiler: str = 'gfort', pre_compile_cmd: str = None, compile_options: dict = None)[source]¶ Class for a WRF-Hydro model, which consitutes the model source code and compiled binary.
Methods
compile(self, compile_dir)Compiles WRF-Hydro using specified compiler and compile options. copy_files(self, dest_dir, symlink)Copy domain files to new directory :Parameters: * dest_dir – The destination directory for files * symlink – Symlink files instead of copy -
__init__(self, source_dir:str, model_config:str, hydro_namelist_config_file:str=None, hrldas_namelist_config_file:str=None, compile_options_config_file:str=None, compiler:str='gfort', pre_compile_cmd:str=None, compile_options:dict=None)[source]¶ Instantiate a Model object. :Parameters: * source_dir – Directory containing the source code, e.g.
‘wrf_hydro_nwm/trunk/NDHMS’.- model_config – The configuration of the model. Used to match a model to a domain configuration. Must be a key in both the *_namelists.json of in the source directory and the *_namelist_patches.json in the domain directory.
- machine_spec – Optional dictionary of machine specification or string containing the name of a known machine. Known machine names include ‘cheyenne’. For an example of a machine specification see the ‘cheyenne’ machine specification using wrfhydropy.get_machine_spec(‘cheyenne’).
- hydro_namelist_config_file – Path to a hydro namelist config file external to the model repository. Default(None) implies using the model trunk/NDHMS/hydro_namelists.json.
- hrldas_namelist_config_file – As for hydro_namelist_config_file, but for hrldas namelist.
- compile_options_config_file – As for hydro_namelist_config_file, but for compile options.
- compiler – The compiler to use, must be one of ‘pgi’,’gfort’, ‘ifort’, or ‘luna’.
- compile_options – Changes to default compile-time options.
Methods
__init__(self, source_dir, model_config, …)Instantiate a Model object. compile(self, compile_dir)Compiles WRF-Hydro using specified compiler and compile options. copy_files(self, dest_dir, symlink)Copy domain files to new directory :Parameters: * dest_dir – The destination directory for files * symlink – Symlink files instead of copy -