R Under development (unstable) (2024-08-17 r87027 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ## Test APSIM SWIM code for 'Classic' > require(apsimx) Loading required package: apsimx APSIM(X) not found. If APSIM(X) is installed in an alternative location, set paths manually using 'apsimx_options' or 'apsim_options'. You can still try as the package will look into the registry (under Windows) > > ## This test does not need APSIM Classic to run > run.test.apsim.swim <- TRUE > > ## Only write to a temp directory > tmp.dir <- tempdir() > > extd.dir <- system.file("extdata", package = "apsimx") > > if(run.test.apsim.swim){ + + inspect_apsim("maize-swim.apsim", src.dir = extd.dir) + inspect_apsim("maize-swim.apsim", src.dir = extd.dir, node = "Weather") + inspect_apsim("maize-swim.apsim", src.dir = extd.dir, + node = "Soil", soil.child = "Water") + inspect_apsim("maize-swim.apsim", src.dir = extd.dir, + node = "Soil", soil.child = "SWIM") + edit_apsim("maize-swim.apsim", + src.dir = extd.dir, wrt.dir = tmp.dir, + node = "Soil", soil.child = "SWIM", + parm = "Salb", value = 0.10) + inspect_apsim("maize-swim-edited.apsim", src.dir = tmp.dir, + node = "Soil", soil.child = "SWIM") + edit_apsim("maize-swim-edited.apsim", + src.dir = tmp.dir, wrt.dir = tmp.dir, + overwrite = TRUE, + node = "Soil", soil.child = "SWIM", + parm = "WaterTableDepth", value = 1500) + inspect_apsim("maize-swim-edited.apsim", src.dir = tmp.dir, + node = "Soil", soil.child = "SWIM") + + } start_date : 01/01/2010 end_date : 09/11/2019 Met file: boone-10-19.met Soil Type: Canisteo Latitude: 44.7892 Longitude: -95.2114 |Depth | maize LL| maize KL| maize XF| soybean LL| soybean KL| soybean XF| wheat LL| wheat KL| wheat XF| maize LL| maize KL| maize XF| soybean LL| soybean KL| soybean XF| wheat LL| wheat KL| wheat XF| Thickness| BD| AirDry| LL15| DUL| SAT| KS| |:-------|--------:|--------:|--------:|----------:|----------:|----------:|--------:|--------:|--------:|--------:|--------:|--------:|----------:|----------:|----------:|--------:|--------:|--------:|---------:|-----:|------:|-----:|-----:|-----:|-------:| |0-25 | 0.234| 0.080| 1| 0.234| 0.080| 1| 0.234| 0.08| 1| 0.234| 0.080| 1| 0.234| 0.080| 1| 0.234| 0.08| 1| 250| 1.400| 0.211| 0.234| 0.345| 0.422| 792.567| |25-50 | 0.234| 0.069| 1| 0.234| 0.069| 1| 0.234| 0.07| 1| 0.234| 0.069| 1| 0.234| 0.069| 1| 0.234| 0.07| 1| 250| 1.400| 0.234| 0.234| 0.345| 0.422| 792.567| |50-54 | 0.212| 0.062| 1| 0.212| 0.062| 1| 0.212| 0.06| 1| 0.212| 0.062| 1| 0.212| 0.062| 1| 0.212| 0.06| 1| 40| 1.425| 0.212| 0.212| 0.330| 0.412| 792.567| |54-58 | 0.212| 0.061| 1| 0.212| 0.061| 1| 0.212| 0.06| 1| 0.212| 0.061| 1| 0.212| 0.061| 1| 0.212| 0.06| 1| 40| 1.425| 0.212| 0.212| 0.330| 0.412| 792.567| |58-77 | 0.137| 0.056| 1| 0.137| 0.056| 1| 0.137| 0.06| 1| 0.137| 0.056| 1| 0.137| 0.056| 1| 0.137| 0.06| 1| 190| 1.400| 0.137| 0.137| 0.272| 0.422| 792.567| |77-96 | 0.137| 0.049| 1| 0.137| 0.049| 1| 0.137| 0.05| 1| 0.137| 0.049| 1| 0.137| 0.049| 1| 0.137| 0.05| 1| 190| 1.400| 0.137| 0.137| 0.272| 0.422| 792.567| |96-124 | 0.154| 0.040| 1| 0.154| 0.040| 1| 0.154| 0.04| 1| 0.154| 0.040| 1| 0.154| 0.040| 1| 0.154| 0.04| 1| 280| 1.525| 0.154| 0.154| 0.290| 0.310| 792.567| |124-152 | 0.154| 0.030| 1| 0.154| 0.030| 1| 0.154| 0.03| 1| 0.154| 0.030| 1| 0.154| 0.030| 1| 0.154| 0.03| 1| 280| 1.525| 0.154| 0.154| 0.290| 0.320| 1.000| |152-158 | 0.154| 0.000| 0| 0.154| 0.030| 1| 0.154| 0.03| 1| 0.154| 0.000| 0| 0.154| 0.030| 1| 0.154| 0.03| 1| 60| 1.525| 0.154| 0.154| 0.290| 0.310| 0.001| Soil Type: Canisteo Latitude: 44.7892 Longitude: -95.2114 |parm |value | |:--------------------------|:-----| |Salb |0.13 | |CN2Bare |75 | |CNRed |20 | |CNCov |0.8 | |KDul |0.1 | |PSIDul |-100 | |VC |true | |DTmin |0 | |DTmax |1440 | |MaxWaterIncrement |10 | |SpaceWeightingFactor |0 | |SoluteSpaceWeightingFactor |0 | |Diagnostics |false | |parm |value | |:----------------------------------|:-----| |SwimWaterTable : WaterTableDepth |2000 | |SwimSubsurfaceDrain : DrainDepth |1200 | |SwimSubsurfaceDrain : DrainSpacing |6100 | |SwimSubsurfaceDrain : DrainRadius |38 | |SwimSubsurfaceDrain : Klat |1000 | |SwimSubsurfaceDrain : ImpermDepth |3000 | Edited .//Soil/Swim/Salb Edited parameter Salb New values 0.1 Created D:\temp\Rtmp2l2B0E/maize-swim-edited.apsim Soil Type: Canisteo Latitude: 44.7892 Longitude: -95.2114 |parm |value | |:--------------------------|:-----| |Salb |0.1 | |CN2Bare |75 | |CNRed |20 | |CNCov |0.8 | |KDul |0.1 | |PSIDul |-100 | |VC |true | |DTmin |0 | |DTmax |1440 | |MaxWaterIncrement |10 | |SpaceWeightingFactor |0 | |SoluteSpaceWeightingFactor |0 | |Diagnostics |false | |parm |value | |:----------------------------------|:-----| |SwimWaterTable : WaterTableDepth |2000 | |SwimSubsurfaceDrain : DrainDepth |1200 | |SwimSubsurfaceDrain : DrainSpacing |6100 | |SwimSubsurfaceDrain : DrainRadius |38 | |SwimSubsurfaceDrain : Klat |1000 | |SwimSubsurfaceDrain : ImpermDepth |3000 | Edited .//Soil/Swim/SwimWaterTable/WaterTableDepth Edited parameter WaterTableDepth New values 1500 Created D:\temp\Rtmp2l2B0E/maize-swim-edited.apsim Soil Type: Canisteo Latitude: 44.7892 Longitude: -95.2114 |parm |value | |:--------------------------|:-----| |Salb |0.1 | |CN2Bare |75 | |CNRed |20 | |CNCov |0.8 | |KDul |0.1 | |PSIDul |-100 | |VC |true | |DTmin |0 | |DTmax |1440 | |MaxWaterIncrement |10 | |SpaceWeightingFactor |0 | |SoluteSpaceWeightingFactor |0 | |Diagnostics |false | |parm |value | |:----------------------------------|:-----| |SwimWaterTable : WaterTableDepth |1500 | |SwimSubsurfaceDrain : DrainDepth |1200 | |SwimSubsurfaceDrain : DrainSpacing |6100 | |SwimSubsurfaceDrain : DrainRadius |38 | |SwimSubsurfaceDrain : Klat |1000 | |SwimSubsurfaceDrain : ImpermDepth |3000 | > > proc.time() user system elapsed 0.50 0.21 0.68