Commit 5a6d4498ea4ba60a27049a05bafc36725e1c928d

Authored by Goutte
1 parent 05e269d1

Add a title to each of the parameters.

Showing 1 changed file with 14 additions and 8 deletions   Show diff stats
web/run.py
... ... @@ -288,32 +288,38 @@ PARAMETERS = {
288 288 'pdyn': {
289 289 'slug': 'pdyn',
290 290 'name': 'Dyn. Pressure',
291   - 'unit': 'nPa',
  291 + 'title': 'The dynamic pressure.',
  292 + 'units': 'nPa',
292 293 },
293 294 'vlen': {
294 295 'slug': 'vlen',
295 296 'name': 'Velocity',
296   - 'unit': 'km/s',
  297 + 'title': 'The velocity of the particles.',
  298 + 'units': 'km/s',
297 299 },
298 300 'magn': {
299 301 'slug': 'magn',
300 302 'name': 'Magnetism',
301   - 'unit': 'nT',
  303 + 'title': 'B Tangential.',
  304 + 'units': 'nT',
302 305 },
303 306 'temp': {
304 307 'slug': 'temp',
305 308 'name': 'Temperature',
306   - 'unit': 'K',
  309 + 'title': 'The absolute temperature.',
  310 + 'units': 'K',
307 311 },
308 312 'dens': {
309 313 'slug': 'dens',
310 314 'name': 'Density',
311   - 'unit': 'cm^-3',
  315 + 'title': 'The density N.',
  316 + 'units': 'cm^-3',
312 317 },
313 318 'angl': {
314 319 'slug': 'angl',
315 320 'name': 'Angle T-S-E',
316   - 'unit': 'deg',
  321 + 'title': 'Angle Target-Sun-Earth.',
  322 + 'units': 'deg',
317 323 },
318 324 }
319 325  
... ... @@ -613,7 +619,7 @@ def download_targets_netcdf(targets, params, started_at, stopped_at):
613 619 targets: string list of targets' slugs, separated by `-`.
614 620 params: string list of targets' parameters, separated by `-`.
615 621 """
616   - separator = '-'
  622 + separator = '-' # /!\ this char should never be in slugs
617 623 targets = targets.split(separator)
618 624 targets.sort()
619 625 targets_configs = []
... ... @@ -682,7 +688,7 @@ def download_targets_netcdf(targets, params, started_at, stopped_at):
682 688 for param in params:
683 689 indices.append(available_params.index(param))
684 690 nc_var = nc_group.createVariable(param, 'f8', (dimension,))
685   - nc_var.units = PARAMETERS[param]['unit']
  691 + nc_var.units = PARAMETERS[param]['units']
686 692 nc_vars.append(nc_var)
687 693 for i, nc_var in enumerate(nc_vars):
688 694 index = indices[i]
... ...