nais package¶
nais.checker module¶
- nais.checker.startNaisChecker(dataset_path, bounding_boxes_path)[source]¶
Manually check a NAIS dataset, draw bounding boxes around bad data and save the boundaries into a netcdf file for later use.
- Parameters:
- data_filestr
Absolute path to NAIS netcdf data file
- boundary_filestr
Absolyte path to file where to save the coordinates of bad data bounding boxes.
nais.processor module¶
- nais.processor.check_config_file(config_file)[source]¶
Check goodness of configuration file
- Parameters:
- config_filestr
full path to configuration file
nais.utils module¶
- nais.utils.combine_data(files, start, end, time_reso, flag_sensitivity=0.5)[source]¶
Combine netcdf datafiles and resample to new resolution on continuous time index
- Parameters:
- fileslist
List of NAIS data file paths
- startstr
start time
- endstr
end time
- time_resostr
A pandas date frequency string. See for all options here: https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases
- flag_sensitivityfloat
fraction of time flag needs to be present in resampling
- Returns:
- xarray.Dataset or None
Combined dataset, None if no data in the date range
- nais.utils.combine_databases(database_list, combined_database)[source]¶
Combine JSON databases
- Parameters:
- database_listlist of str
List of full paths to databases that should be combined. First database should have the earliest data, second database the second earliest and so on
- combined_databasestr
full path to combined database
- nais.utils.remove_bad_data(ds, bad_data)[source]¶
Set bad data to NaNs
- Parameters:
- dsxarray.Dataset
NAIS datafile
- bad_dataxarray.Dataset
user-determined bad data boundaries using the NaisChecker()
- Returns:
- xarray.Dataset
Dataset with possible bad data set to NaN