newfluxdata.rst 2.81 KB
Newer Older
1
####################################################################################
2
How to add a new type of flux data to be processed by the CIF into a model's inputs
3
####################################################################################
4
5
6
7
8
9

.. role:: bash(code)
   :language: bash



10
11
12



13
  0. .. include:: ../newBCdata/knownplugin.rst
14

15

16
17
  1. In directory :bash:`plugins/fluxes`, copy the directory containing the template
     for a flux plugin :bash:`flux_plugin_template` in the directory for your new plugin.
18

19
     .. include:: ../newBCdata/register.rst
20

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

  2. Modify the yaml file to use the new plugin: the minimum input arguments are
     :bash:`dir`, :bash:`file`, :bash:`varname` and :bash:`unit_conversion`.
     The default space and time interpolations will be applied
     (see XXXX doc sur premiere simu directe avec exmeple yaml quand mise a jourXXXXX).

     .. code-block:: yaml

       components:
         fluxes:
           plugin:
              name: fluxes
              version: template
              type: fluxes
           dir: dir_with_original_files/
           file: file_with_new_fluxes_to_use_as_inputs
           varname: NAMEORIG
           unit_conversion:
                 scale: 1.

  3. .. include:: ../newBCdata/devplugin.rst

     XXXXXXX what about the input arguements? Ils demandent une partie dediee!?XXXXXXXXXX
44

45
4. Document the new plugin:
46
   
47
48
49
   a) .. include:: ../newBCdata/readme.rst 


Antoine Berchet's avatar
Antoine Berchet committed
50
   b) create the rst file that contains the automatic documentation in  docs/source/documentation/plugins/fluxes/. Please provide it with a self-explaining name. Example for the template: file fluxes_template.rst reads
51
52
53
54
55
56
57
58
59
60

     .. code-block:: rest

       .. role:: bash(code)
          :language: bash

       ###########################
       Template plugin for fluxes
       ###########################

61
       .. automodule:: pycif.plugins.datastreams.fluxes.flux_plugin_template
62

Antoine Berchet's avatar
Antoine Berchet committed
63
   c) add the reference to the rst file in docs/source/documentation/plugins/fluxes/index.rst:
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87

     .. code-block:: rest

        ####################
        Fluxes :bash:`fluxes`
        ####################

        Available Fluxes
        =========================

        The following :bash:`fluxes` are implemented in pyCIF:

        .. toctree::
             :maxdepth: 3
            
             fluxes_template
             dummy_nc
             dummy_txt
             edgar_v5
             flexpart
             chimere
             lmdz_bin
             lmdz_sflx

Antoine Berchet's avatar
Antoine Berchet committed
88
   d) built the documentation (:bash:`make html` in docs/) and check that the link to the new plugin appears in the documentation at file:///your_path/cif/docs/build/html/documentation/plugins/index.html and that the section "doc" of the input arguments is correctly displayed at file:///your_path/cif/docs/build/html/documentation/plugins/fluxes/the_new_plugin.html
89