nais package

nais.checker module

nais.checker.startNaisChecker(dataset_path, bounding_boxes_path)

Manually check a NAIS dataset and draw bounding boxes around bad data

Parameters:
data_filestr

Name of NAIS netcdf data file including path

boundary_filestr

Name of file where to save the coordinates of bad data bounding boxes.

nais.processor module

nais.processor.make_config_template(file_name)

Make a configuration file template

Parameters:
file_namestr

full path to configuration file

For example /home/user/config.yml

nais.processor.nais_processor(config_file)

Processes NAIS data

Parameters:
config_filestr

full path to configuration file

nais.utils module

nais.utils.combine_data(source_dir, date_range, time_reso, flag_sensitivity=0.5)
Parameters:
source_dirstr

Directory for NAIS datafiles

date_rangepandas.DatetimeIndex

Range of dates for combining data

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)

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_flagged_rows(ds, flag)
Parameters:
dsxarray.Dataset

NAIS dataset

flagstr

Flag to be removed

Returns:
xarray.Dataset

NAIS dataset with flag rows set to NaN