entities
aquacrop.entities.clockStruct
Contains model information regarding dates and step times etc.
ClockStruct
Contains model information regarding dates and step times etc.
Attributes:
time_step_counter (int): Keeps track of current timestep
model_is_finished (Bool): False unless model has finished
simulation_start_date (np.Datetime64): Date of simulation start
simulation_end_date (np.Datetime64): Date of simulation end
time_step (int): time step (evaluation needed
n_steps (int): total number of days of simulation
time_span (np.array): all dates that lie within the start and end dates of simulation
step_start_time (np.Datetime64): Date at start of timestep
step_end_time (np.Datetime64): Date at end of timestep
evap_time_steps (int): Number of time-steps (per day) for soil evaporation calculation
sim_off_season (str): 'Y' if you want to simulate the off season,'N' otherwise
planting_dates (list-like): list of planting dates in datetime format
harvest_dates (list-like): list of harvest dates in datetime format
n_seasons (int): Total number of seasons to be simulated
season_counter (int): counter to keep track of which season we are currenlty simulating
Source code in aquacrop/entities/clockStruct.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
aquacrop.entities.co2
CO2
Bases: object
Attributes:
ref_concentration (float): reference CO2 concentration
current_concentration (float): current CO2 concentration (initialize if constant_conc=True)
constant_conc (bool): use constant conc every season
co2_data (DataFrame): CO2 timeseries (2 columns: 'year' and 'ppm')
Source code in aquacrop/entities/co2.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
aquacrop.entities.crop
Crop class module
Crop
The Crop Class contains paramaters and variables of the crop used in the simulation
Most Crop attributes can be found in the crops.crop_params.py
file
A number of default program properties of type float are also specified during initialisation
Initialization example:
crop = Crop('Maize', planting_date='05/01')
Attributes:
c_name (str): crop name ('custom' or one of built in defaults e.g. 'Maize')
planting_date (str): Planting Date (mm/dd)
harvest_date (str): Latest Harvest Date (mm/dd)
Source code in aquacrop/entities/crop.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
|
calculate_additional_params()
Calculate additional parameters for all self types in mix
Source code in aquacrop/entities/crop.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
|
CropStruct
Bases: object
Duplicate crop object for Jit compilation
Source code in aquacrop/entities/crop.py
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
|
aquacrop.entities.fieldManagement
FieldMngt
Field Management Class containing mulches and bunds parameters
Attributes:
mulches (bool): Soil surface covered by mulches (yield_ or N)
bunds (bool): Surface bunds present (yield_ or N)
curve_number_adj (bool): Field conditions affect curve number (yield_ or N)
sr_inhb (bool): Management practices fully inhibit surface runoff (yield_ or N)
mulch_pct (float): Area of soil surface covered by mulches (%)
f_mulch (float): Soil evaporation adjustment factor due to effect of mulches
z_bund (float): Bund height, user specifies in (m) but immediately converted to (mm) on initialisation for coherent calculations
bund_water (float): Initial water height in surface bunds (mm)
curve_number_adj_pct (float): Percentage change in curve number (positive or negative)
Source code in aquacrop/entities/fieldManagement.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
FieldMngtStruct
Source code in aquacrop/entities/fieldManagement.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
|
aquacrop.entities.groundWater
GroundWater
Ground Water Class stores information on water table params
Attributes:
water_table (str): Water table considered (Y or N)
method (str): Water table input data ('Constant' or 'Variable')
dates (list): water table observation dates
values (list): water table observation depths
Source code in aquacrop/entities/groundWater.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
aquacrop.entities.inititalWaterContent
InitialWaterContent
Initial water content Class defines water content at start of sim
Attributes:
wc_type (str): Type of value ('Prop' = 'WP'/'FC'/'SAT'; 'Num' = XXX m3/m3; 'Pct' = % taw))
method (str): method ('Depth' = Interpolate depth points; 'Layer' = Constant value for each soil layer)
depth_layer (list): location in soil profile (soil layer or depth)
value (list): value at each location given in depth_layer
Source code in aquacrop/entities/inititalWaterContent.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
aquacrop.entities.initParamVariables
InitialCondition
The InitCond Class contains all Paramaters and variables used in the simulation
updated each timestep with the name NewCond
Source code in aquacrop/entities/initParamVariables.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
|
aquacrop.entities.irrigationManagement
IrrMngtStruct
Source code in aquacrop/entities/irrigationManagement.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|
IrrigationManagement
IrrigationManagement Class defines irrigation strategy
Attributes:
irrigation_method (int): Irrigation method {0: rainfed, 1: soil moisture targets, 2: set time interval,
3: predifined schedule, 4: net irrigation, 5: constant depth }
WetSurf (int): Soil surface wetted by irrigation (%)
AppEff (int): Irrigation application efficiency (%)
MaxIrr (float): Maximum depth (mm) that can be applied each day
SMT (list): Soil moisture targets (%taw) to maintain in each growth stage (only used if irrigation method is equal to 1)
IrrInterval (int): Irrigation interval in days (only used if irrigation method is equal to 2)
Schedule (pandas.DataFrame): DataFrame containing dates and depths
NetIrrSMT (float): Net irrigation threshold moisture level (% of taw that will be maintained, for irrigation_method=4)
Depth (float): constant depth to apply on each day (mm)
Source code in aquacrop/entities/irrigationManagement.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
aquacrop.entities.moistureDepletion
Dr
Depletion class to hold the rootzone and topsoil depletion
Attributes:
Rz (float): Root zone soil-water depletion
Zt (float): Top soil depletion
Source code in aquacrop/entities/moistureDepletion.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
aquacrop.entities.output
Output
Class to hold output data
During Simulation these are numpy arrays and are converted to pandas dataframes at the end of the simulation
Atributes:
water_flux (pandas.DataFrame, numpy.array): Daily water flux changes
water_storage (pandas.DataFrame, numpy array): daily water content of each soil compartment
crop_growth (pandas.DataFrame, numpy array): daily crop growth variables
final_stats (pandas.DataFrame, numpy array): final stats at end of each season
Source code in aquacrop/entities/output.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
aquacrop.entities.paramStruct
ParamStruct
The ParamStruct class contains the bulk of model Paramaters. In general these will not change over the course of the simulation
Attributes:
Soil (Soil): Soil object contains data and paramaters related to the soil
FallowFieldMngt (FieldMngt): Object containing field management variables for the off season (fallow periods)
NCrops (int): Number of crop types to be simulated
SpecifiedPlantCalander (str): Specified crop rotation calendar (yield_ or N)
CropChoices (list): List of crop type names in each simulated season
CO2data (pd.Series): CO2 data indexed by year
CO2 (CO2): object containing reference and current co2 concentration
water_table (int): Water table present (1=yes, 0=no)
z_gw (np.array): water_table depth (mm) for each day of simulation
zGW_dates (np.array): Corresponding dates to the z_gw values
WTMethod (str): 'Constant' or 'Variable'
CropList (list): List of Crop Objects which contain paramaters for all the differnet crops used in simulations
python_crop_list (list): List of Crop Objects, one for each season
python_fallow_crop (Crop): Crop object for off season
Seasonal_Crop_List (list): List of CropStructs, one for each season (jit class objects)
crop_name_list (list): List of crop names, one for each season
Fallow_Crop (CropStruct): CropStruct object (jit class) for off season
Fallow_Crop_Name (str): name of fallow crop
Source code in aquacrop/entities/paramStruct.py
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
aquacrop.entities.rootZoneWaterContent
RootZoneWater
Bases: object
TODO: This class is not used
root zone water content
Attributes:
Act
: float
: .
S
: float
: .
FC
: float
: .
WP
: float
: .
Dry
: float
: .
Aer
: float
: .
Source code in aquacrop/entities/rootZoneWaterContent.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
aquacrop.entities.soil
Soil
The Soil Class contains Paramaters and variables of the soil used in the simulation
More float attributes are specified in the initialisation of the class
Attributes:
profile (pandas.DataFrame): holds soil profile information
Profile (SoilProfile): jit class object holdsing soil profile information
Hydrology (pandas.DataFrame): holds soil layer hydrology informaiton
Comp (pandas.DataFrame): holds soil compartment information
Source code in aquacrop/entities/soil.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 |
|
calculate_soil_hydraulic_properties(Sand, Clay, OrgMat, DF=1)
Function to calculate soil hydraulic properties, given textural inputs. Calculations use pedotransfer function equations described in Saxton and Rawls (2006)
Source code in aquacrop/entities/soil.py
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
|
aquacrop.entities.soilProfile
SoilProfile
Attributes:
Comp
: list
:
Layer
: list
:
dz
: list
:
dzsum
: list
:
zBot
: list
:
z_top
: list
:
zMid
: list
:
Source code in aquacrop/entities/soilProfile.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
aquacrop.entities.temperatureStressCoefficients
Kst
Bases: object
TODO: THIS CLASS IS NOT USED
temperature stress coefficients
Attributes:
PolH
: float
: heat stress
PolC
: float
: cold stress
Source code in aquacrop/entities/temperatureStressCoefficients.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
aquacrop.entities.totalAvailableWater
TAW
TODO: THIS CLASS IS NOT USED - seems to now be in use, CB 14.09.23 Attributes:
Rz
: float
: .
Zt
: float
: .
Source code in aquacrop/entities/totalAvailableWater.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
aquacrop.entities.waterEvaporation
WaterEvaporation
Bases: object
TODO: THIS CLASS IS NOT USED
stores soil water contents in the evaporation layer
Attributes:
Sat
: float
: Water storage in evaporation layer at saturation (mm)
Fc
: float
: Water storage in evaporation layer at Field Capacity (mm)
Wp
: float
: Water storage in evaporation layer at Wilting Point (mm)
Dry
: float
: Water storage in evaporation layer at air dry (mm)
Act
: float
: Actual Water storage in evaporation layer (mm)
Source code in aquacrop/entities/waterEvaporation.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|
aquacrop.entities.waterStressCoefficients
Ksw
Bases: object
water stress coefficients
Attributes:
exp
: float
: .
sto
: float
: .
sen
: float
: .
pol
: float
: .
sto_lin
: float
: .
Source code in aquacrop/entities/waterStressCoefficients.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|