.. index:: single: ebas_set_project; program .. _EBASprogram_ebas_set_project: .. program:: ebas_set_project ebas_set_project ================ .. versionadded:: 3.00.06 The program *ebas_set_project* is used to manage the :term:`project` associations of :term:`datasets`. A dataset can be associated to a project for a certain time interval. Different projects are allowed during the same or different intervals. E.g. a dataset may be assigned to project EMEP and ACTIS in the years 2010 to 2013, and to EMEP_preliminary in for 2014. The program *ebas_set_project* is used to modify or delete those associations. Synopsis -------- :: ebas_set_project.py [-h] [--version] [--cfgfile CFGFILE] [--loglevconsole LOGLEVCONSOLE] [--loglevfile LOGLEVFILE] [--logfile LOGFILE] [--profile] [--nodb] [--dbHost DBHOST] [--db DB] [--dbUser DBUSER] [--dbPasswd DBPASSWD] [--transcomment COMMENT] [--nowrite] [--nocommit] [--do_id DO_ID] [--setkey SETKEY] [--station STATION] [--project PROJECT] [--instrument INSTRUMENT] [--component COMPONENT] [--matrix MATRIX] [--group GROUP] [--fi_ref FI_REF] [--me_ref ME_REF] [--resolution RESOLUTION] [--statistics STATISTICS] [--time TIME] [--non-interactive] {delete,add,change,clean} ... Commandline arguments --------------------- .. include:: ./include/commandline_arguments/intro.include General arguments ^^^^^^^^^^^^^^^^^ .. include:: ./include/commandline_arguments/general.include Configuration arguments ^^^^^^^^^^^^^^^^^^^^^^^ .. include:: include/commandline_arguments/config.include Logging arguments ^^^^^^^^^^^^^^^^^ .. include:: include/commandline_arguments/logging.include Database arguments ^^^^^^^^^^^^^^^^^^ .. include:: include/commandline_arguments/db.include .. include:: include/commandline_arguments/db_transcomment.include .. include:: include/commandline_arguments/db_nowrite.include .. include:: include/commandline_arguments/db_nocommit.include Commandline arguments for dataset selection criteria ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Dataset selection criteria are used to define a set of datasets to be managed by *ebas_set_project*. .. include:: include/commandline_arguments/ds_criteria.include Time interval criteria ^^^^^^^^^^^^^^^^^^^^^^ .. include:: include/commandline_arguments/time.include .. note:: The :option:`--time` argument is a special case for *ebas_set_project*. It is used to select the set of datasets to work on as in all other *EBAS Commandline* programs. Additionally it is used to specify the interval of the action to be performed (e.g. the interval for adding a project associaoin or deleting one). ebas_set_project does not always use exactly the specified time interval for adding or deleting project associations. Instead it adopts the interval slightly according to data coverage and the data submission intervals of each dataset. The rules are as follows: * Only intervals with data coverage are used * The start time of an association interval will always be changed to the specific sample start time of the first overlapping sample. * The end time of an association interval will always be changed to the specific sample end time of the last overlapping sample. * The first and last sample in a submission are only included if * it is fully within the time interval or * it is not the only only sample in the submission which is included This way, EBAS makes sure that each measurement sample is either associated to a project or not (no partly overlaps). Addittionally, by considering the data submissions when changing associations, fragmentation on export will be avoided (files with only one sample, because it's associated to a different project), .. versionchanged:: 3.0.0.7 The time interval is modified for each individual association. Sample times and data submission intervals are taken into account. Arguments specific to *ebas_set_projects* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. option:: --non-interactive Starts the program in non-interactive mode. See `User Interaction`_ for more information on the default interactive mode. If the *--non-interactive* option is given and the threshold for confirmation is reached, the program will automatically cancel the operation instead of entering user interaction. This option is handy for usage in scripts, but the caller needs to make sure to only change limited datasets. Default: False (i.e. interactive behaviour) .. _ebas_set_project_subcommands: The arguments **delete**, **add**, **change** and **clean** are implemented as subcommands. That means those arguments are *mutually exclusive* and some of them require additional arguments. It is important to understand the nature of subcommands. Unlike other arguments, the order of arguments is important when using subcommands. After specifying a subcommand name, only sub-arguments for this subcommand are valid. All other arguments must be specified before the subcommand. .. option:: delete PROJ_DELETE Removes project associations from the set of datasets. This argument requires an argument value PROJ_DELETE (the project associations to be removed). This can be either a single project acronym, or a comma separated list of project acronyms. .. include:: include/commandline_arguments/note_argument_values_blank_list.include Examples:: $ ebas_set_project --setkey 123 delete EMEP $ ebas_set_project --setkey 123 delete EMEP,ACTRIS .. option:: add PROJ_ADD Adds project associations to the set of datasets. This option requires an argument value PROJ_ADD (the project associations to set). This can be either a single project acronym, or a comma separated list of project acronyms. .. include:: include/commandline_arguments/note_argument_values_blank_list.include Examples:: $ ebas_set_project --setkey 123 add EMEP $ ebas_set_project --setkey 123 add EMEP,ACTRIS .. option:: change PROJ_CHANGE Changes a specific project association to another one. Only intervals that were associated to the specific project before will be changed to the new project association. This option requires an argument value PROJ_CHANGE (the project acronyms to be changed and the respective new project acronyms). A single project assoziation change is specified by a pair of project associations separated by a colon (``:``) in the form: ``OLD_ProjectAcronym:NEW_ProjectAcronym``. Multiple changes can be sepatated by comma. .. include:: include/commandline_arguments/note_argument_values_blank_list_colon.include Example:: $ ebas_set_project --project EMEP_preliminary --time 2012 change EBAS_preliminary:EMEP In the example, all EMEP_preliminary data from 2012 will be changed to EMEP, and thus released to public availibility. You may specify multiple changes at once, in this case the single changes are separated by commas. Example:: $ ebas_set_project --project NILU --time 2013 change EBAS_preliminary:EMEP,NILU_preliminary:NILU In the example, all NILU_preliminary data from 2012 will be changed to NILU, and thus released to public availibility. At the same time will those datasets which are **additionally** related to EMEP_preliminary in 2013 be changed to EMEP. .. option:: clean Clean project associations (delete association intervals without data) .. include:: include/user_interaction.include