Changeset 6f951ca in flex_extract.git for source/python/classes/MarsRetrieval.py
- Timestamp:
- Jan 15, 2019, 1:05:10 AM (5 years ago)
- Branches:
- master, ctbto, dev
- Children:
- d4696e0
- Parents:
- 2625ca8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/python/classes/MarsRetrieval.py
rbc1720f r6f951ca 17 17 # - added documentation 18 18 # - applied some minor modifications in programming style/structure 19 # - added writing of mars request attributes to a csv file 19 20 # 20 21 # @License: 21 # (C) Copyright 2015-2018. 22 # (C) Copyright 2014-2019. 23 # Anne Philipp, Leopold Haimberger 22 24 # 23 # This software is licensed under the terms of the Apache Licence Version 2.0 24 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 25 # 26 # @Class Description: 27 # A MARS revtrieval has a specific syntax with a selection of keywords and 28 # their corresponding values. This class provides the necessary functions 29 # by displaying the selected parameters and their values and the actual 30 # retrievement of the data through a mars request or a Python web api 31 # interface. The initialization already expects all the keyword values. 32 # 33 # @Class Content: 34 # - __init__ 35 # - display_info 36 # - data_retrieve 37 # 38 # @Class Attributes: 39 # - server 40 # - marsclass 41 # - dtype 42 # - levtype 43 # - levelist 44 # - repres 45 # - date 46 # - resol 47 # - stream 48 # - area 49 # - time 50 # - step 51 # - expver 52 # - number 53 # - accuracy 54 # - grid 55 # - gaussian 56 # - target 57 # - param 58 # 25 # This work is licensed under the Creative Commons Attribution 4.0 26 # International License. To view a copy of this license, visit 27 # http://creativecommons.org/licenses/by/4.0/ or send a letter to 28 # Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. 59 29 #******************************************************************************* 60 30 … … 73 43 # ------------------------------------------------------------------------------ 74 44 class MarsRetrieval(object): 75 '''Class for submitting MARS retrievals. 45 '''Specific syntax and content for submission of MARS retrievals. 46 47 A MARS revtrieval has a specific syntax with a selection of keywords and 48 their corresponding values. This class provides the necessary functions 49 by displaying the selected parameters and their values and the actual 50 retrievement of the data through a mars request or a Python web api 51 interface. The initialization already expects all the keyword values. 76 52 77 53 A description of MARS keywords/arguments and examples of their … … 79 55 https://software.ecmwf.int/wiki/display/UDOC/\ 80 56 Identification+keywords#Identificationkeywords-class 57 58 Attributes 59 ---------- 60 server : ECMWFService or ECMWFDataServer 61 This is the connection to the ECMWF data servers. 62 63 public : int 64 Decides which Web API Server version is used. 65 66 marsclass : str, optional 67 Characterisation of dataset. 68 69 dataset : str, optional 70 For public datasets there is the specific naming and parameter 71 dataset which has to be used to characterize the type of 72 data. 73 74 type : str, optional 75 Determines the type of fields to be retrieved. 76 77 levtype : str, optional 78 Denotes type of level. 79 80 levelist : str, optional 81 Specifies the required levels. 82 83 repres : str, optional 84 Selects the representation of the archived data. 85 86 date : str, optional 87 Specifies the Analysis date, the Forecast base date or 88 Observations date. 89 90 resol : str, optional 91 Specifies the desired triangular truncation of retrieved data, 92 before carrying out any other selected post-processing. 93 94 stream : str, optional 95 Identifies the forecasting system used to generate the data. 96 97 area : str, optional 98 Specifies the desired sub-area of data to be extracted. 99 100 time : str, optional 101 Specifies the time of the data in hours and minutes. 102 103 step : str, optional 104 Specifies the forecast time step from forecast base time. 105 106 expver : str, optional 107 The version of the dataset. 108 109 number : str, optional 110 Selects the member in ensemble forecast run. 111 112 accuracy : str, optional 113 Specifies the number of bits per value to be used in the 114 generated GRIB coded fields. 115 116 grid : str, optional 117 Specifies the output grid which can be either a Gaussian grid 118 or a Latitude/Longitude grid. 119 120 gaussian : str, optional 121 This parameter is deprecated and should no longer be used. 122 Specifies the desired type of Gaussian grid for the output. 123 124 target : str, optional 125 Specifies a file into which data is to be written after 126 retrieval or manipulation. 127 128 param : str, optional 129 Specifies the meteorological parameter. 81 130 ''' 82 131 … … 96 145 Parameters 97 146 ---------- 98 server : :obj:`ECMWFService`147 server : ECMWFService or ECMWFDataServer 99 148 This is the connection to the ECMWF data servers. 100 149 It is needed for the pythonic access of ECMWF data. 101 150 102 public : :obj:`integer`151 public : int 103 152 Decides which Web API version is used: 104 153 0: member-state users and full archive access … … 107 156 Default is "0" and for member-state users. 108 157 109 marsclass : :obj:`string`, optional158 marsclass : str, optional 110 159 Characterisation of dataset. E.g. EI (ERA-Interim), 111 160 E4 (ERA40), OD (Operational archive), ea (ERA5). 112 161 Default is the ERA-Interim dataset "ei". 113 162 114 dataset : :obj:`string`, optional163 dataset : str, optional 115 164 For public datasets there is the specific naming and parameter 116 165 dataset which has to be used to characterize the type of … … 119 168 Default is an empty string. 120 169 121 type : :obj:`string`, optional170 type : str, optional 122 171 Determines the type of fields to be retrieved. 123 172 Selects between observations, images or fields. … … 126 175 Default is an empty string. 127 176 128 levtype : :obj:`string`, optional177 levtype : str, optional 129 178 Denotes type of level. Has a direct implication on valid 130 179 levelist values! … … 134 183 Default is an empty string. 135 184 136 levelist : :obj:`string`, optional185 levelist : str, optional 137 186 Specifies the required levels. It has to have a valid 138 187 correspondence to the selected levtype. … … 140 189 Default is an empty string. 141 190 142 repres : :obj:`string`, optional191 repres : str, optional 143 192 Selects the representation of the archived data. 144 193 E.g. sh - spherical harmonics, gg - Gaussian grid, … … 146 195 Default is an empty string. 147 196 148 date : :obj:`string`, optional197 date : str, optional 149 198 Specifies the Analysis date, the Forecast base date or 150 199 Observations date. Valid formats are: … … 152 201 Default is an empty string. 153 202 154 resol : :obj:`string`, optional203 resol : str, optional 155 204 Specifies the desired triangular truncation of retrieved data, 156 205 before carrying out any other selected post-processing. … … 169 218 Default is an empty string. 170 219 171 stream : :obj:`string`, optional220 stream : str, optional 172 221 Identifies the forecasting system used to generate the data. 173 222 E.g. oper (Atmospheric model), enfo (Ensemble forecats), ... 174 223 Default is an empty string. 175 224 176 area : :obj:`string`, optional225 area : str, optional 177 226 Specifies the desired sub-area of data to be extracted. 178 227 Areas can be defined to wrap around the globe. … … 192 241 Default is an empty string. 193 242 194 time : :obj:`string`, optional243 time : str, optional 195 244 Specifies the time of the data in hours and minutes. 196 245 Valid values depend on the type of data: Analysis time, … … 202 251 Default is an empty string. 203 252 204 step : :obj:`string`, optional253 step : str, optional 205 254 Specifies the forecast time step from forecast base time. 206 255 Valid values are hours (HH) from forecast base time. It also … … 210 259 Default is an empty string. 211 260 212 expver : :obj:`string`, optional261 expver : str, optional 213 262 The version of the dataset. Each experiment is assigned a 214 263 unique code (version). Production data is assigned 1 or 2, … … 218 267 Default is "1". 219 268 220 number : :obj:`string`, optional269 number : str, optional 221 270 Selects the member in ensemble forecast run. (Only then it 222 271 is necessary.) It has a different meaning depending on … … 225 274 Default is an empty string. 226 275 227 accuracy : :obj:`string`, optional276 accuracy : str, optional 228 277 Specifies the number of bits per value to be used in the 229 278 generated GRIB coded fields. … … 236 285 Default is an empty string. 237 286 238 grid : :obj:`string`, optional287 grid : str, optional 239 288 Specifies the output grid which can be either a Gaussian grid 240 289 or a Latitude/Longitude grid. MARS requests specifying … … 257 306 Default is an empty string. 258 307 259 gaussian : :obj:`string`, optional308 gaussian : str, optional 260 309 This parameter is deprecated and should no longer be used. 261 310 Specifies the desired type of Gaussian grid for the output. … … 265 314 Default is an empty string. 266 315 267 target : :obj:`string`, optional316 target : str, optional 268 317 Specifies a file into which data is to be written after 269 318 retrieval or manipulation. Path names should always be … … 279 328 Default is an empty string. 280 329 281 param : :obj:`string`, optional330 param : str, optional 282 331 Specifies the meteorological parameter. 283 332 The list of meteorological parameters in MARS is extensive. … … 352 401 Parameters 353 402 ---------- 354 inputdir : :obj:`string`403 inputdir : str 355 404 The path where all data from the retrievals are stored. 356 405 357 request_number : :obj:`integer`406 request_number : int 358 407 Number of mars requests for flux and non-flux data. 359 408
Note: See TracChangeset
for help on using the changeset viewer.