Changeset 6f951ca in flex_extract.git for source/python/classes/ControlFile.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/ControlFile.py
rf2616a3 r6f951ca 21 21 # 22 22 # @License: 23 # (C) Copyright 2015-2018. 23 # (C) Copyright 2014-2019. 24 # Anne Philipp, Leopold Haimberger 24 25 # 25 # This software is licensed under the terms of the Apache Licence Version 2.0 26 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 26 # This work is licensed under the Creative Commons Attribution 4.0 27 # International License. To view a copy of this license, visit 28 # http://creativecommons.org/licenses/by/4.0/ or send a letter to 29 # Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. 27 30 # 28 # @Class Description: 29 # The CONTROL file is the steering part of the FLEXPART extraction 30 # software. All necessary parameters needed to retrieve the data fields 31 # from the MARS archive for driving FLEXPART are set in a CONTROL file. 32 # Some specific parameters like the start and end dates can be overwritten 33 # by the command line parameters, but in generel all parameters needed 34 # for a complete set of fields for FLEXPART can be set in the CONTROL file. 35 # 36 # @Class Content: 37 # - __init__ 38 # - __read_controlfile__ 39 # - __str__ 40 # - assign_args_to_control 41 # - assign_envs_to_control 42 # - check_conditions 43 # - check_install_conditions 44 # - to_list 45 # 46 # @Class Attributes: 47 # 48 # 31 # @Class Methods: 32 # __init__ 33 # _read_controlfile 34 # __str__ 35 # assign_args_to_control 36 # assign_envs_to_control 37 # check_conditions 38 # check_install_conditions 39 # to_list 49 40 #******************************************************************************* 50 41 … … 76 67 ''' 77 68 Contains the information which are stored in the CONTROL files. 69 70 The CONTROL file is the steering part of the FLEXPART extraction 71 software. All necessary parameters needed to retrieve the data fields 72 from the MARS archive for driving FLEXPART are set in a CONTROL file. 73 Some specific parameters like the start and end dates can be overwritten 74 by the command line parameters, but in generel all parameters needed 75 for a complete set of fields for FLEXPART can be set in the CONTROL file. 76 77 Attributes 78 ---------- 79 controlfile : str 80 The name of the control file to be processed. Default value is the 81 filename passed to the init function when initialised. 82 83 start_date : str 84 The first day of the retrieval period. Default value is None. 85 86 end_date :str 87 The last day of the retrieval period. Default value is None. 88 89 date_chunk : int 90 Length of period for a single mars retrieval. Default value is 3. 91 92 dtime :str 93 The time step in hours. Default value is None. 94 95 basetime : str 96 The time for a half day retrieval. The 12 hours upfront are to be 97 retrieved. Default value is None. 98 99 maxstep : int 100 The maximum forecast step for non flux data. Default value is None. 101 102 type : list of str 103 List of field type per retrieving hour. Default value is None. 104 105 time : list of str 106 List of retrieving times in hours. Default valuer is None. 107 108 step : list of str or str 109 List of forecast time steps in hours for non flux data. 110 Default value is None. 111 112 acctype : str 113 The field type for the accumulated forecast fields. 114 Default value is None. 115 116 acctime : str 117 The starting time of the accumulated forecasts. Default value is None. 118 119 accmaxstep : int 120 The maximum forecast step for the accumulated forecast fields 121 (flux data). Default value is None. 122 123 marsclass : str 124 Characterisation of dataset. Default value is None. 125 126 dataset : str 127 For public datasets there is the specific naming and parameter 128 dataset which has to be used to characterize the type of 129 data. Default value is None. 130 131 stream : str 132 Identifies the forecasting system used to generate the data. 133 Default value is None. 134 135 number : str 136 Selects the member in ensemble forecast run. Default value is 'OFF'. 137 138 expver : str 139 The version number of the dataset. Default value is '1'. 140 141 gaussian : str 142 This parameter is deprecated and should no longer be used. 143 Specifies the desired type of Gaussian grid for the output. 144 Default value is an empty string ''. 145 146 grid : str 147 Specifies the output grid which can be either a Gaussian grid 148 or a Latitude/Longitude grid. Default value is None. 149 150 area : str 151 Specifies the desired sub-area of data to be extracted. 152 Default value is None. 153 154 left : str 155 The western most longitude of the area to be extracted. 156 Default value is None. 157 158 lower : str 159 The southern most latitude of the area to be extracted. 160 Default value is None. 161 162 upper : str 163 The northern most latitued of the area to be extracted. 164 Default value is None. 165 166 right : str 167 The eastern most longitude of the area to be extracted. 168 Default value is None. 169 170 level : str 171 Specifies the maximum level. Default value is None. 172 173 levelist : str 174 Specifies the required level list. Default value is None. 175 176 resol : str 177 Specifies the desired triangular truncation of retrieved data, 178 before carrying out any other selected post-processing. 179 Default value is None. 180 181 gauss : int 182 Switch to select gaussian fields (1) or regular lat/lon (0). 183 Default value is 0. 184 185 accuracy : int 186 Specifies the number of bits per value to be used in the 187 generated GRIB coded fields. Default value is 24. 188 189 omega : int 190 Switch to select omega retrieval (1) or not (0). Default value is 0. 191 192 omegadiff : int 193 Switch to decide to calculate Omega and Dps/Dt from continuity 194 equation for diagnostic purposes (1) or not (0). Default value is 0. 195 196 eta : int 197 Switch to select direct retrieval of etadot from MARS (1) or 198 wether it has to be calculated (0). Then Default value is 0. 199 200 etadiff : int 201 Switch to select calculation of etadot and Dps/Dt from continuity 202 equation for diagnostic purposes (1) or not (0). Default value is 0. 203 204 etapar : int 205 GRIB parameter Id for etadot fields. Default value is 77. 206 207 dpdeta : int 208 Switch to select multiplication of etadot with dpdeta. 209 Default value is 1. 210 211 smooth : int 212 Spectral truncation of ETADOT after calculation on Gaussian grid. 213 Default value is 0. 214 215 format : str 216 The format of the GRIB data. Default value is 'GRIB1'. 217 218 addpar : str 219 List of additional surface level ECMWF parameter to be retrieved. 220 Default value is None. 221 222 prefix : str 223 Prefix string for the final FLEXPART/FLEXTRA ready input files. 224 Default value is 'EN'. 225 226 cwc : int 227 Switch to select wether the sum of cloud liquid water content and 228 cloud ice water content should be retrieved. Default value is 0. 229 230 wrf : int 231 Switch to select further parameters for retrievment to support 232 WRF simulations. Default value is 0. 233 234 ecfsdir : str 235 Path to the ECMWF storage 'ectmp:/${USER}/econdemand/' 236 237 mailfail : list of str 238 Email list for sending error log files from ECMWF servers. 239 The email addresses should be seperated by a comma. 240 Default value is ['${USER}']. 241 242 mailops : list of str 243 Email list for sending operational log files from ECMWF servers. 244 The email addresses should be seperated by a comma. 245 Default value is ['${USER}']. 246 247 grib2flexpart : int 0 248 Switch to select generation of preprocessed FLEXPART files ".fp". 249 If it is selected, the program grib2flexpart will try 250 to convert the flex_extract output files into ".fp" format. 251 252 ecstorage : int 253 Switch to select storage of FLEXPART ready output files 254 in the ECFS file system. Default value is 0. 255 256 ectrans : int 257 Switch to select the transfer of FLEXPART ready output files 258 to the gateway server. Default value is 0. 259 260 inputdir : str 261 Path to the temporary directory for the retrieval grib files and 262 other processing files. Default value is _config.PATH_INPUT_DIR. 263 264 outputdir : str 265 Path to the final directory where the final FLEXPART ready input 266 files are stored. Default value is None. 267 268 flexextractdir : str 269 Path to the flex_extract root directory. Default value is 270 _config.PATH_FLEXEXTRACT_DIR. 271 272 exedir : str 273 Path to the FORTRAN executable file. Default value is 274 _config.PATH_FORTRAN_SRC. 275 276 flexpartdir : str 277 Path to a FLEXPART root directory. Default value is None. 278 279 makefile : str 280 Name of the makefile to be used for the Fortran program. 281 Default value is 'Makefile.gfortran'. 282 283 destination : str 284 The remote destination which is used to transfer files 285 from ECMWF server to local gateway server. Default value is None. 286 287 gateway : str 288 The gateway server the user is using. Default value is None. 289 290 ecuid : str 291 The user id on ECMWF server. Default value is None. 292 293 ecgid : str 294 The group id on ECMWF server. Default value is None. 295 296 install_target : str 297 Defines the location where the installation is to be done. 298 Default value is None. 299 300 debug : int 301 Switch to keep temporary files at the end of postprocessing (1) or 302 to delete all temporary files except the final output files (0). 303 Default value is 0. 304 305 request : int 306 Switch to select between just retrieving the data (0), writing the mars 307 parameter values to a csv file (1) or doing both (2). 308 Default value is 0. 309 310 public : int 311 Switch to select kind of ECMWF Web Api access and the 312 possible data sets. Public data sets (1) and Memberstate data sets (0). 313 Default value is 0. 314 315 ecapi : boolean 316 Tells wether the ECMWF Web APi was able to load or not. 317 Default value is None. 318 319 purefc : int 320 Switch to decide wether the job is a pure forecast retrieval or 321 coupled with analysis data. Default value is 0. 322 323 rrint: int 324 Switch to select between old precipitation disaggregation method (0) 325 or the new IA3 disaggegration method (1). Default value is 0. 326 327 logicals : list of str 328 List of the names of logical switches which controls the flow 329 of the program. Default list is ['gauss', 'omega', 'omegadiff', 'eta', 330 'etadiff', 'dpdeta', 'cwc', 'wrf', 'grib2flexpart', 'ecstorage', 331 'ectrans', 'debug', 'request', 'public', 'purefc', 'rrint'] 78 332 ''' 79 333 … … 85 339 Parameters 86 340 ---------- 87 filename : :obj:`string`341 filename : str 88 342 Name of CONTROL file. 89 343 … … 98 352 self.end_date = None 99 353 self.date_chunk = 3 354 self.job_chunk = None 100 355 self.dtime = None 101 356 self.basetime = None … … 273 528 Parameters 274 529 ---------- 275 args : :obj:`Namespace`530 args : Namespace 276 531 Contains the commandline arguments from script/program call. 277 532 … … 298 553 Parameters 299 554 ---------- 300 envs : :obj:`dictionary` of :obj:`strings`555 envs : dict of str 301 556 Contains the ECMWF environment parameternames "ECUID", "ECGID", 302 557 "DESTINATION" and "GATEWAY" with its corresponding values. … … 320 575 Parameters 321 576 ---------- 322 queue : :obj:`string`577 queue : str 323 578 Name of the queue if submitted to the ECMWF servers. 324 579 Used to check if ecuid, ecgid, gateway and destination … … 397 652 Return 398 653 ------ 399 l : :obj:`list`654 l : list of * 400 655 A sorted list of the all ControlFile class attributes with 401 656 their values except the attributes "_expanded", "exedir",
Note: See TracChangeset
for help on using the changeset viewer.