APSIMInitiative / ApsimX

ApsimX is the next generation of APSIM
http://www.apsim.info
Other
132 stars 161 forks source link

Include soil specification inside a level of a factor #3439

Closed JJguri closed 5 years ago

JJguri commented 5 years ago

I created one experiment with two factors (weather and water). The levels of weather are different climate files (different gridded data). The levels of water are dryland and irrigated. For each level of weather (i.e. each grid ) I have a different soil. I already created the soils in apsim (10 soils) and I would like to specify inside the level of weather the corresponding soil for each grid. I do not need to add soil as a factor becuase it is grid-specific.

image

sno036 commented 5 years ago

It seems to me what you really have is a compound factor that is a location and it has elements of weather, soil, perhaps more. Something like below should work perhaps?

image

JJguri commented 5 years ago

I have created the following tree, but it does no work. Some comments, experiments were divided in two (taking all grids [all areas] and just grids with more than 50% of suitable potato areas [suitable areas]). Factors are two: Climate resolution (point, grid5km, grid15km, etc) and water (irri and dry). For each level of Climate resolution I have different sub-levels (number of grids or points). Please see the error below:

image

hol430 commented 5 years ago

Can you upload your apsimx file?

JJguri commented 5 years ago

I could not attach the apsimx file directly in GitHub. Please follow the link: https://www.dropbox.com/s/xtuqakk8zahathb/5km.apsimx?dl=0

hol353 commented 5 years ago

I suspect the problem is with having too many levels of Factors. I don't think you can have factors within factors within factors. I think you can have a factor within a factor but not more than that. My suggestion would be to start simple and build complexity until it stops working. Also, I'm not sure that having a field within a factor would work. I've never seen anyone do this.

JJguri commented 5 years ago

I would like to have only one simulation in order to read only one db file to analyse the complete dataset using Python. Otherwise, I can reduce the level of complexity creating multiple simulations, therefore multiple db files, and then read and merge these in Python. Please check the previous @sno036 's comment, who used a field (although not using the field 'field') within a factor within a factor. I tried the same approach, but still the file does not work. @hol353, any hypothesis why the model is not able to do this job?. @sno036 , please could you upload your apsimx file?

hol430 commented 5 years ago

Part of the problem was that neither of your experiments had a 'base' simulation. This is basically a template skeleton simulation which holds the components which are replaced by your factors.

The second problem was that each of your lowest-level factors (which you called 1 or 2 usually) needs to specify which components it is replacing. Have a look at the attached apsimx file to see what I mean.

5km.zip

JJguri commented 5 years ago

I used the attached file and everything is running well now. On the other hand, I got a final Experiment with more than 4000 simulations. When I want to display more than 1000 simulations I got the following alert: "displaying more than 1000 rows of data is not recommended". Why is it not recommended? Is there some possibility to get an error if more than 1000 rows are displayed?

hol430 commented 5 years ago

The UI can sometimes become somewhat sluggish/unresponsive if there are a large number of simulations displayed in the experiment view. There is a a textbox in the top-right of the view which should allow you to control the maximum number of simulations displayed. I just tested this and it seems to work alright for me for 4000 simulations.

JJguri commented 5 years ago

Everything OK with this issue. Thanks