Commit fd1829c318f4284d20723d894a967ba626def7d3

Authored by Goutte
1 parent 2fe06b17

Use the new AMDA API

Add Mercury Real Time
Add Venus Real Time
Showing 3 changed files with 25 additions and 21 deletions   Show diff stats
CHANGELOG.md
... ... @@ -29,13 +29,21 @@ et prendre aussi
29 29  
30 30 ## Future ?
31 31  
32   -- [ ] Set the log level to _error_ in production (see `web/run.py`)
33   -- [ ] Rework the images of Rosetta and Juno
  32 +- [ ] Re-enable Earth
34 33 - [ ] Enable p67
35 34 - [ ] Layer : Auroral Emissions
  35 +- [ ] Set the log level to _error_ in production (see `web/run.py`)
  36 +- [ ] Add a README to the download tarball (no tarball anymore)
  37 +- [ ] Rework the images of Rosetta and Juno
36 38 - [ ] Optimize data aggregation (numpy vectorization?)
37 39 - [ ] IE compat, if you can (I can't)
38   -- [ ] Add a README to the download tarball (no tarball anymore)
  40 +
  41 +
  42 +## 1.5
  43 +
  44 +- [x] Use the new AMDA API
  45 +- [x] Add Mercury Real Time
  46 +- [x] Add Venus Real Time
39 47  
40 48  
41 49 ## 1.4
... ...
config.yml
... ... @@ -44,7 +44,8 @@ authors:
44 44 mail: vincent.genot@irap.omp.eu
45 45  
46 46  
47   -amda: "http://cdpp.irap.omp.eu/BASE/DDService/getDataUrl.php?dataSet={dataSet}&StartTime={startTime}&StopTime={stopTime}"
  47 +#amda: "http://cdpp.irap.omp.eu/BASE/DDService/getDataUrl.php?dataSet={dataSet}&StartTime={startTime}&StopTime={stopTime}"
  48 +amda: "http://amda.irap.omp.eu/DDService/getDataUrl.php?dataSet={dataSet}&StartTime={startTime}&StopTime={stopTime}"
48 49  
49 50  
50 51 # Data files are in data/catalog/
... ... @@ -99,15 +100,6 @@ inputs:
99 100 name: "STEREO-B"
100 101 desc: "The second of the STEREO (Solar Terrestrial Relations Observatory), a solar observation mission."
101 102  
102   -#Targets
103   -#Earth earth_orb_all
104   -#Jupiter jupiter_orb_all
105   -#Mars mars_orb_all
106   -#Mercury mercury_orb_all
107   -#Neptune neptune_orb_all
108   -#Venus venus_orb_all
109   -#Uranus uranus_orb_all
110   -#
111 103 #Comets
112 104 #67P p67_orb_all
113 105 #
... ... @@ -142,6 +134,7 @@ targets:
142 134 models:
143 135 l1:
144 136 - slug: 'tao_mercury_sw'
  137 + - slug: 'tao_mercury_swrt'
145 138 sa:
146 139 - slug: 'tao_mercury_sw'
147 140 sb:
... ... @@ -160,6 +153,7 @@ targets:
160 153 models:
161 154 l1:
162 155 - slug: 'tao_venus_sw'
  156 + - slug: 'tao_venus_swrt'
163 157 sa:
164 158 - slug: 'tao_venus_sw'
165 159 sb:
... ...
web/run.py
... ... @@ -514,7 +514,7 @@ def get_data_for_target(target_config, input_slug,
514 514 raise Exception("No variable '%s' found in NetCDF." % _keys[_key])
515 515 return [None] * len(_nc.variables['Time']) # slow -- use numpy!
516 516  
517   - # Override these using the model configurationget_data_for_target
  517 + # Override these using the model configuration in config.yml
518 518 default_nc_keys = {
519 519 'hee': 'HEE',
520 520 'vtot': 'V',
... ... @@ -646,13 +646,15 @@ def get_data_for_target(target_config, input_slug,
646 646  
647 647 # Keep adding exceptions here until you can't or become mad
648 648  
649   - # /!\ MUST be in the same order as PROPERTIES
650   - all_data[dkey] = (
651   - dtime.strftime("%Y-%m-%dT%H:%M:%S+00:00"),
652   - vrad, vtan, vtot,
653   - datum_b, datum_t, datum_p, datum_n, datum_a,
654   - x_hee, y_hee
655   - )
  649 + # First model has priority: ignore data from other models
  650 + if dkey not in all_data:
  651 + # /!\ MUST be in the same order as PROPERTIES
  652 + all_data[dkey] = (
  653 + dtime.strftime("%Y-%m-%dT%H:%M:%S+00:00"),
  654 + vrad, vtan, vtot,
  655 + datum_b, datum_t, datum_p, datum_n, datum_a,
  656 + x_hee, y_hee
  657 + )
656 658 cdf_handle.close()
657 659  
658 660 return all_data
... ...