Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with APSIM 7.10 r4212 for simulating phenology (flowering and maturity) for pearl millet crop #2243

Open
TOUNKARA1302 opened this issue Aug 13, 2024 · 13 comments

Comments

@TOUNKARA1302
Copy link

TOUNKARA1302 commented Aug 13, 2024

Hello, I'm new to APSIM and I'm working on calibrating 10 varieties of pearl millet. When I launch the simulation with APSIM for the rendering, I have questions mark for the flowering and maturity dates. And that's not the only problem I have when I click on the met file I get the following error message Object cannot be cast from DBNull to other types. I have a problem with the millet.xml file when I try to redefine it with a single millet model and place it in the ini module, the simulation doesn't work. For the simulation to work, I have to add my cultivars to all 5 models. In addition, I have a problem with the decimal point, for me it's the comma that works whereas normally it's a point for the decimal point in APSIM.

@peter-devoil
Copy link
Collaborator

That's a whole bunch of problems you have! That's not surprising as millet had a very advanced design - cohorts & tillers were a new thing back then.

  1. The met files have to be carefully prepared with no tab separators. Numbers must use decimal points.
  2. We recommend changing your computer's regionalisation settings to "australia". There are many languages making up apsim, and not all of them are aware of localisation settings.
  3. yes, there are 5 tillers described in the xml file, and your cultivar definitions must be repeated for each. Take one cultivar that is close to yours, copy and then modify it.

The apsim workflow is easiest when changes are made in small amounts, and immediately tested. So - take a sample simulation out of the box, see if it works, then incrementally add your changes.. Test often so that you don't end up with 50 errors to fix all at once.

There was another millet (WFMillet), in the non-validated toolbox that may be easier to deal with (but doesnt do tillering)

@TOUNKARA1302
Copy link
Author

TOUNKARA1302 commented Aug 14, 2024

Good moning Sir Peter, how do I set the regionalisation settings on my computer to ‘Australia’?
If I take an example out of the box like the continuous wheat simulation and follow the instructions in the APSIM training manual I get the following error when trying to see Goond.met file (the object cannot be converted from DBNull to other types). However, the simulation passed except when graphical representations are required, which didn't work. I'm wondering whether the problem might be with the APSIM version I have, or whether there are some settings I need to make first for my PC, as the examples in the box should normally work for everyone?

@peter-devoil
Copy link
Collaborator

Yes, the DBNull error occurs when the met data component tries to parse a file with "." separators as if they were "," separators. Perversely, the simulation model isnt troubled by this, as it was written in a different language (C++).

You can set regionalisation with help from here

@TOUNKARA1302
Copy link
Author

TOUNKARA1302 commented Aug 15, 2024

Peter after redefining my regionalisation I don't have any problems with the separators and the graphs are displayed. However, I have question marks for the simulation of flowering and maturity dates and when I look in the summaryfile I see:

 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                  APSIM Warning Error
                  -------------------
 Value of variable is out of bounds.
 Variable: row_spacing
 Value:      900.0000000
 Bounds:        0.0000000 to        2.0000000
 Component name: paddock.millet3
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I defined row spacing (mm) : 900 in the manager folder in Sow on fixed date and I see in the summaryfile

            Crop Initiate Data
     ------------------------------------------------
    Initiate   Axes   DM      N   Spacing Cultivar
     Day no    m^2 g/plant g/plant   m      Name
     ------------------------------------------------
         90    1.2    0.0    0.0  900.0 souna3
     ------------------------------------------------

I also see that the flowering and the maturity dates are simulated but it does not appear in the outputfile why?

 flowering day  =  117                  stover (kg/ha) =     322.3
 maturity day    =  145             grain yield (kg/ha) =     231.2
                                 ...
  stress indices for emergence
  water stress 1 =       0.0000000   nitrogen stress 1 =       0.0961702
  water stress 2 =       0.0000000   nitrogen stress 2 =       0.2534603
                                ...

@peter-devoil
Copy link
Collaborator

I think it's trying to tell you that row spacing should be in m, not mm. Back in those days some components wanted m; others mm and there was always much confusion, especially on the UI displays. Good that you found the answer in the summary file.

The flowering/ maturity dates are points in time, and you have to either a) construct a piece of logic to "monitor" when the event occurred - then write that out at maturity, or b) write daily output of plant stage and search for it after the simulation has run

@TOUNKARA1302
Copy link
Author

I don't know how:

  1. construct a piece of logic to "monitor" when the event occurred - then write that out at maturity, or
  2. write daily output of plant stage and search for it after the simulation has run

On the other hand, I had simply defined the output variables ( dd/mm/yyyy as Date, FloweringDAS, MaturityDAS, LAI, Yield and Biomass) in the outpoutfile and I put in the Reporting Frequency end_day. If that's what you want to talk about

@peter-devoil
Copy link
Collaborator

Try the manual page for some pointers on writing "logic", and there are some youtube clips that may help as well.

@TOUNKARA1302
Copy link
Author

TOUNKARA1302 commented Aug 20, 2024

Thank you Peter for all your support, it has helped me a lot. I would like if possible to be directed on a guide of paramétrisation for the pearl millet and to know the varieties of millet which were parameterized in West Africa.

@peter-devoil
Copy link
Collaborator

@jwhish or @hut104 may remember who did that early millet work, and where it might be found

@jwhish
Copy link
Contributor

jwhish commented Aug 20, 2024 via email

@TOUNKARA1302
Copy link
Author

Dr Jeremy Whish thank you for your response. Could you please share with us Carberry's contact details, especially her email if possible.

@jwhish
Copy link
Contributor

jwhish commented Aug 22, 2024 via email

@TOUNKARA1302
Copy link
Author

TOUNKARA1302 commented Aug 22, 2024

OK Dr Jeremy Whish thanks .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants