API
DSSATTools library allows the user to create low-code scripts to run simulations using the DSSAT modeling framework. |
|
This module contains the classes that handle the weather definition. The WeatherStation class represents the DSSAT weather station. The weather station object can be created by reading the data from existing DSSAT wheater files: >>> weather = WeatherStation.from_files(["UAFD9001.WTH", "UAFD9101.WTH",]) Note that the input parameter is a list of files, as DSSAT can have multiple files for the same station. The list of files must correspond to the same station. The weather station can also be created using the data from a DataFrame: >>> weather_station = WeatherStation( >>> insi='UNCU', lat=4.34, long=-74.40, elev=1800, >>> table=df_with_data >>> ) where the df_with_data contains the weather data and its column names match the DSSAT weather parameters' names. As with the event-based sections of the FileX, the table is a list of events (daily weather records). In this case the WeatherRecord class is the class representing each daily weather record. |
|
This module contains the classes and functions that handle the soil definition. The soil profile object is created using the SoilProfile class. One way of doing that is just loading soil profile from an existing DSSAT Soil file. For that, the from_file soil profile class function is used: >>> soil = SoilProfile.from_file("IBMZ910214", "SOIL.SOL") The soil profile can also be created from scratch using the SoilProfile and SoilLayer classes similar to the layer-based sections of the FileX: >>> soil = SoilProfile( >>> name='IBMZ910214', soil_series_name='Millhopper Fine Sand', >>> site='Gainesville', country='USA', lat=29.6, long=-82.37, >>> soil_data_source='Gainesville', soil_clasification='S', >>> scs_family='Loamy,silic,hyperth Arnic Paleudult', scom='', salb=0.18, >>> slu1=2.0, sldr=0.65, slro=60.0, slnf=1.0, slpf=0.92, smhb='IB001', >>> smpx='IB001', smke='IB001', >>> table = [ >>> SoilLayer( >>> slb=5.0, slmh='', slll=0.026, sdul=0.096, ssat=0.345, srgf=1.0, >>> ssks=7.4, sbdm=1.66, sloc=0.67, slcl=1.7, slsi=0.9, slcf=0.0, >>> slhw=7.0, scec=20.0 >>> ), >>> SoilLayer( >>> slb=15.0, slmh='', slll=0.025, sdul=0.105, ssat=0.345, srgf=1.0, >>> ssks=7.4, sbdm=1.66, sloc=0.67, slcl=1.7, slsi=0.9, slcf=0.0, >>> slhw=7.0 >>> ), >>> SoilLayer( >>> slb=30.0, slmh='', slll=0.075, sdul=0.12, ssat=0.345, srgf=0.7, >>> ssks=14.8, sbdm=1.66, sloc=0.17, slcl=2.4, slsi=2.6, slcf=0.0, >>> slhw=7.0 >>> ), >>> SoilLayer( >>> slb=45.0, slmh='', slll=0.025, sdul=0.086, ssat=0.345, srgf=0.3, >>> ssks=3.7, sbdm=1.66, sloc=0.17, slcl=2.4, slsi=2.6, slcf=0.0, >>> slhw=7.0 >>> ), >>> SoilLayer( >>> slb=60.0, slmh='', slll=0.025, sdul=0.072, ssat=0.345, srgf=0.3, >>> ssks=3.7, sbdm=1.66, sloc=0.17, slcl=2.4, slsi=2.6, slcf=0.0, >>> slhw=7.0 >>> ), >>> SoilLayer( >>> slb=90.0, slmh='', slll=0.028, sdul=0.072, ssat=0.345, srgf=0.1, >>> ssks=3.7, sbdm=1.66, sloc=0.17, slcl=2.4, slsi=2.6, slcf=0.0, >>> slhw=7.0 >>> ), >>> SoilLayer( >>> slb=120.0, slmh='', slll=0.028, sdul=0.08, ssat=0.345, srgf=0.1, >>> ssks=0.1, sbdm=1.66, sloc=0.18, slcl=7.7, slsi=3.1, slcf=0.0, >>> slhw=7.0, >>> ), >>> SoilLayer( >>> slb=150.0, slmh='', slll=0.029, sdul=0.09, ssat=0.345, srgf=0.05, >>> ssks=0.1, sbdm=1.66, sloc=0.15, slcl=7.7, slsi=3.1, slcf=0.0, >>> slhw=7.0 >>> ), >>> SoilLayer( >>> slb=180.0, slmh='', slll=0.029, sdul=0.09, ssat=0.345, srgf=0.05, >>> ssks=0.1, sbdm=1.66, sloc=0.1, slcl=7.7, slsi=3.1, slcf=0.0, >>> slhw=7.0 >>> ) >>> ] >>> ). |
|
This module implement the sections of the DSSAT FileX as python objects. |
|
This module hosts the DSSAT class. |