= MINERVE-D3 = Le projet TRAC `MINERVE-D3` correspond aux développements informatiques réalisés dans le cadre de la thèse MINERVE d'[https://people.epfl.ch/alain.foehn?lang=fr Alain Foehn]. Un certain nombre d'outils, présentés ci-dessous, ont été développés. [[BR]] Les outils interagissent aux travers des '''api-node''' et '''api-research''' directement avec les bases de données spatiales '''MAYA''' et '''DANA''' ainsi que la base de données mysql '''MINERVE'''. [[br]]Les fonctions de base permettant cette interaction avec les api on été regroupées dans le dossier suivant: {{{ MINERVE-D3\Code }}} Le fichier '''fc_API-REST.R''' contient les fonctions suivantes : ||='''Function name'''=||='''Description'''=||='''Calling function'''=||='''API'''=||='''Type of output'''=|| || download_data_in_slots || Parallel computation of slots download (value of a pixel or aggregated raster) over a period || download_slot || - || time series OR raster || || download_slot || Manages data download (value of a pixel or aggregated raster) for a given slot of the entire period || download_timeseries_from_raster_Node [[br]] download_timeseries_from_raster_research [[br]] manage_download_raster || - || time series OR raster || || download_timeseries_from_raster_node || Request set up with good variable arguments || download_request || node || time series || || download_timeseries_from_raster_research || Request set up with good variable arguments || download_request || research || time series || || download_request || Manages download_request to node and research APIs || download_request_node [[br]] download_request_research || - || time series || || download_request_node || Curl subprocess to call the request || spawn_process (in-built function) || node || time series || || download_request_research || Curl subprocess to call the request || spawn_process (in-built function) || research || time series || || manage_download_raster || Manages between ''server'' and ''local'' raster acquisition || download_raster (server option) || - || raster || || download_raster || Request set up with good variable arguments || curl_fetch_memory (in-built function) + [[br]] curl_download (in-built function) || node '''(!)''' || raster || || download_altitude_of_pixel ||Manages download_request to node and research APIs || download_altitude_of_pixel_node [[br]] download_altitude_of_pixel_research || - || value || || download_altitude_of_pixel_node || Function to download the elevation value of a pixel from the metadata DEM of a given product || curl_fetch_memory (in-built function) + [[br]] curl_download (in-built function) || node || value || || download_altitude_of_pixel_research || Function to download the elevation value of a pixel from the metadata DEM of a given product || curl_fetch_memory (in-built function) + [[br]] curl_download (in-built function) || research || value || Le fichier '''fc_common.R''' contient les fonction suivantes : ||='''Function name'''=||='''Description'''=|| || read.dst || Function to read a .dst file and transform it into a structure usable in R || || write.RSMcsv || Function to export data in a CSV format readable by RS MINERVE (currently not used in the tools listed below) || || || || || get_token || Manage acquisition of the token : first uses ''get_token_local'', if it fails, uses ''get_token_server'' and the saves the token with ''write_token'' || || get_token_local || Reads the token from the local file || || get_token_server || Acquires a new token from the API-REST || || write_token || Saves in the local file the newly acquire token || || || || || define_computetime || Date formating function || || print_elapsed_time || Function to print the time of a code part, with an argument for the text to be printed || || pause_and_print || Function to makes a break and print that it has done a break (used in the download functions, to handle cases where API-REST does temporary not answer, for example due to a manuel restart) || || || || || is_windows || Checks if the OS of the machine is Windows || || cURL_binary || Returns location of the curl .exe || || || || = Computer configuration = In order to work properly, the code requires - An installation of [https://curl.haxx.se/download.html curl] in C:\opt\Curl - Jave 8 Update 171 (64-bit) installed on the machine - RS MINERVE (at least version 2.6.0.0) installed on the machine = Available tools = The following tools have been or are currently developped. == Combi-Valais == Outil de spatialisation des pluies. {{{ MINERVE-D3\Combi-Valais }}} == Spatial_Temp == Outil de spatialisatoin des températures permettant de générer les fichiers t-obs-gradobs. {{{ MINERVE-D3\Spatial_Temp }}} == Snow_Analyzer == Outil pour calculer les coefficients degré-jour de fonte de neige, à partir d'un produit de neige tel que MODIS ou OSHD du SLF. {{{ MINERVE-D3\Snow_Analyzer }}} == Raster_gap_Analyzer == Outil pour identifier les valeurs manquantes sur un produit raster dans la BD MAYA ou la BD DANA. [[BR]] Possible d'analyser plusieurs produits en même temps. [[BR]] {{{ MINERVE-D3\Divers\Raster_gap_Analyzer }}} == Raster_Additioner == Outil pour appliquer une fonction d'aggréation sur un produit raster sur une longue période (pas possible directement par l'API-REST). [[BR]] Note : la fonction d'aggrégation est définie dans le fichier API-node. {{{ MINERVE-D3\Divers\Raster_Additioner }}} == Raster_to_CSVR [En développement par javflu]== Outil pour extraire les valeurs d'un produit de la BD MAYA sur une période, un extent et une résolution spatiale définie par l'utilisateur. [[BR]] {{{ MINERVE-D3\Divers\Raster_to_CSVR }}} == Data assimilation == Outil pour l'assimilation de données en temps réel. {{{ MINERVE-D3\Data_Assimilation }}} {{{ #!div style="margin-top:3em; width:95%;border:1px solid #cccccc;" }}} [[span(Personne(s) de contact:,style=font-weight:bold;)]] [mailto:alain.foehn@crealp.ch?subject=Projet%20MINERVE-D3%20sur%20Trac alafoe] {{{ #!div style="width:95%;border:1px solid #cccccc;" }}} '''Autres projets:''' [http://trac.crealp.ch/Crealp-Admin/wiki Crealp-Admin], [http://trac.crealp.ch/Crealp-API/wiki Crealp-API], [https://trac.crealp.ch/Crealp-Product/wiki Crealp-Product], [http://trac.crealp.ch/polhydro-scripts/wiki MINERVE-scripts], [http://trac.crealp.ch/Ofev-CC/wiki Ofev-CC], [http://trac.crealp.ch/polhydro-pcr/wiki polhydro-pcr], [http://trac.crealp.ch/RSDataset/wiki RSDataset], [http://trac.crealp.ch/RSMinerve/wiki RSMinerve], [https://trac.crealp.ch/S.T.R.E.S.S/wiki S.T.R.E.S.S], [http://trac.crealp.ch/TeREsA/wiki TeREsA], [http://trac.crealp.ch/VIVA/wiki VIVA] '''Projets inactifs:''' [http://trac.crealp.ch/polhydro-bulletin/wiki MINERVE-bulletin], [http://trac.crealp.ch/polhydro-rest/wiki MINERVE-rest], [http://trac.crealp.ch/polhydro-www/wiki MINERVE-www], [http://trac.crealp.ch/SnowMapping/wiki SnowMapping], [https://trac.crealp.ch/toolmap2/wiki ToolMap 2] {{{ #!div style="width:95%;border:1px solid #cccccc;" }}}