GeoscienceAustralia / Wind_multipliers

Wind multipliers
GNU General Public License v3.0
8 stars 6 forks source link

global attributes in netcdf output files #6

Closed CEKrause closed 7 years ago

CEKrause commented 7 years ago

global attributes are hard coded. Need to make them more dynamic so that they are correct for new runs.

global attributes are written in Utilities/nctools.py

CEKrause commented 7 years ago

Updated the global attributes that are written into the netcdf files. Lineage now only links to the reference. Input datasets are captured under their own heading, "Inputs".

    global_atts = {'Abstract': ('This dataset is the local ' +
                                multiplier[multiplier_name] +
                                ' for each grid cell in ' + direction +
                                ' direction for this tile'),
                   'Lineage': ('Methodology is '
                               'based on the reference: Yang, T., Nadimpalli, '
                               'K. & Cechet, R.P. 2014. Local wind assessment '
                               'in Australia: computation methodology for wind'
                               ' multipliers. Record 2014/33. Geoscience '
                               'Australia, Canberra.'),
                   'Inputs': ('terrain data: {0}, dem data: {1}'
                              .format(str(terrain_map), str(dem))),
                   'Version': fl_program_version(),
                   'Python_ver': sys.version,
                   'Custodian': ('Geoscience Australia')}

Example output global attributes now look like,

global attributes:
                :Lineage = "Methodology is based on the reference: Yang, T., Nadimpalli, K. & Cechet, R.P. 2014. Local wind assessment in Australia: computation methodology for wind multipliers. Record 2014/33. Geoscience Australia, Canberra." ;
                :Inputs = "terrain data: /short/w85/cek156/Wind_multipliers/input/lc_terrain_class.img, dem data: /short/w85/cek156/Wind_multipliers/input/dems1_whole.img" ;
                :Python_ver = "2.7.6 (default, Mar 20 2014, 09:04:21) \n",
                        "[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]" ;
                :Custodian = "Geoscience Australia" ;
                :Abstract = "This dataset is the local shielding multiplier for each grid cell in e direction for this tile" ;
                :created_by = "cek156" ;
                :Conventions = "CF-1.6" ;
                :created_on = "2017-05-22 09:11:24" ;
                :Version = "2.0" ;
                :title = "Ms multiplier" ;