From fd1829c318f4284d20723d894a967ba626def7d3 Mon Sep 17 00:00:00 2001 From: Goutte Date: Fri, 14 Sep 2018 14:21:55 +0200 Subject: [PATCH] Use the new AMDA API Add Mercury Real Time Add Venus Real Time --- CHANGELOG.md | 14 +++++++++++--- config.yml | 14 ++++---------- web/run.py | 18 ++++++++++-------- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3bc7ba..2dd05f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,13 +29,21 @@ et prendre aussi ## Future ? -- [ ] Set the log level to _error_ in production (see `web/run.py`) -- [ ] Rework the images of Rosetta and Juno +- [ ] Re-enable Earth - [ ] Enable p67 - [ ] Layer : Auroral Emissions +- [ ] Set the log level to _error_ in production (see `web/run.py`) +- [ ] Add a README to the download tarball (no tarball anymore) +- [ ] Rework the images of Rosetta and Juno - [ ] Optimize data aggregation (numpy vectorization?) - [ ] IE compat, if you can (I can't) -- [ ] Add a README to the download tarball (no tarball anymore) + + +## 1.5 + +- [x] Use the new AMDA API +- [x] Add Mercury Real Time +- [x] Add Venus Real Time ## 1.4 diff --git a/config.yml b/config.yml index 1cacbf1..d8f5328 100644 --- a/config.yml +++ b/config.yml @@ -44,7 +44,8 @@ authors: mail: vincent.genot@irap.omp.eu -amda: "http://cdpp.irap.omp.eu/BASE/DDService/getDataUrl.php?dataSet={dataSet}&StartTime={startTime}&StopTime={stopTime}" +#amda: "http://cdpp.irap.omp.eu/BASE/DDService/getDataUrl.php?dataSet={dataSet}&StartTime={startTime}&StopTime={stopTime}" +amda: "http://amda.irap.omp.eu/DDService/getDataUrl.php?dataSet={dataSet}&StartTime={startTime}&StopTime={stopTime}" # Data files are in data/catalog/ @@ -99,15 +100,6 @@ inputs: name: "STEREO-B" desc: "The second of the STEREO (Solar Terrestrial Relations Observatory), a solar observation mission." -#Targets -#Earth earth_orb_all -#Jupiter jupiter_orb_all -#Mars mars_orb_all -#Mercury mercury_orb_all -#Neptune neptune_orb_all -#Venus venus_orb_all -#Uranus uranus_orb_all -# #Comets #67P p67_orb_all # @@ -142,6 +134,7 @@ targets: models: l1: - slug: 'tao_mercury_sw' + - slug: 'tao_mercury_swrt' sa: - slug: 'tao_mercury_sw' sb: @@ -160,6 +153,7 @@ targets: models: l1: - slug: 'tao_venus_sw' + - slug: 'tao_venus_swrt' sa: - slug: 'tao_venus_sw' sb: diff --git a/web/run.py b/web/run.py index 5117341..6e36ea8 100755 --- a/web/run.py +++ b/web/run.py @@ -514,7 +514,7 @@ def get_data_for_target(target_config, input_slug, raise Exception("No variable '%s' found in NetCDF." % _keys[_key]) return [None] * len(_nc.variables['Time']) # slow -- use numpy! - # Override these using the model configurationget_data_for_target + # Override these using the model configuration in config.yml default_nc_keys = { 'hee': 'HEE', 'vtot': 'V', @@ -646,13 +646,15 @@ def get_data_for_target(target_config, input_slug, # Keep adding exceptions here until you can't or become mad - # /!\ MUST be in the same order as PROPERTIES - all_data[dkey] = ( - dtime.strftime("%Y-%m-%dT%H:%M:%S+00:00"), - vrad, vtan, vtot, - datum_b, datum_t, datum_p, datum_n, datum_a, - x_hee, y_hee - ) + # First model has priority: ignore data from other models + if dkey not in all_data: + # /!\ MUST be in the same order as PROPERTIES + all_data[dkey] = ( + dtime.strftime("%Y-%m-%dT%H:%M:%S+00:00"), + vrad, vtan, vtot, + datum_b, datum_t, datum_p, datum_n, datum_a, + x_hee, y_hee + ) cdf_handle.close() return all_data -- libgit2 0.21.2