File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424import numpy as np
2525import pandas as pd
2626import xarray as xr
27- from PyStemmusScope import forcing_io
27+ from PyStemmusScope import forcing_io , config_io
2828from . import variable_conversion as vc
2929
3030
@@ -250,18 +250,21 @@ def _update_dataset_attrs_dims(dataset: xr.Dataset, forcing_dict: Dict) -> xr.Da
250250 return dataset
251251
252252
253- def to_netcdf (config : Dict , cf_filename : str ) -> str :
253+ def to_netcdf (config_file : str , cf_filename : str ) -> str :
254254 """Save csv files generated by Stemmus_Scope model to a netcdf file using
255255 information provided by ALMA conventions.
256256
257257 Args:
258- config(Dict ): PyStemmusScope configuration dictionary .
258+ config_file(str ): Path to the config file .
259259 cf_filename(str): Path to a csv file for ALMA conventions.
260260
261261 Returns:
262262 str: path to a csv file under the output directory.
263263 """
264264
265+ # read config file
266+ config = config_io .read_config (config_file )
267+
265268 # list of required forcing variables, Alma_short_name: forcing_io_name, # model_name
266269 var_names = {
267270 "RH" : "rh" , # RH
You can’t perform that action at this time.
0 commit comments