APSIMInitiative / APSIM710

APSIM
https://www.apsim.info
33 stars 48 forks source link

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

Open TOUNKARA1302 opened 3 months ago

TOUNKARA1302 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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

TOUNKARA1302 commented 3 months ago

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 commented 3 months ago

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

jwhish commented 3 months ago

Pearl millet was built by Carberry I think. The white French millet was built by me and has no phenology it is basically a biomass plant that was used for cover crops

I hope that helps

Jeremy Dr Jeremy Whish Farming Systems Researcher CSIRO Agriculture & Food Phone: +61 7 32142448 | Mobile: 0428763 426

Address: CSIRO Agriculture, Queensland Biosciences Precinct 306 Carmody Road, St Lucia QLD 4067, Australia

On 21 Aug 2024, at 7:29 AM, Peter de Voil @.***> wrote:

@jwhishhttps://github.com/jwhish or @hut104https://github.com/hut104 may remember who did that early millet work, and where it might be found

— Reply to this email directly, view it on GitHubhttps://github.com/APSIMInitiative/APSIM710/issues/2243#issuecomment-2299798497, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJITF4LHCKIY26LBRNSLR7DZSOYNNAVCNFSM6AAAAABMOFEJDWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJZG44TQNBZG4. You are receiving this because you were mentioned.Message ID: @.***>

TOUNKARA1302 commented 3 months ago

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

jwhish commented 3 months ago

Sorry Peter Carberry has retired

And is no longer and active APSIM user

Jeremy Dr Jeremy Whish Farming Systems Researcher CSIRO Agriculture & Food Phone: +61 7 32142448 | Mobile: 0428763 426

Address: CSIRO Agriculture, Queensland Biosciences Precinct 306 Carmody Road, St Lucia QLD 4067, Australia

On 21 Aug 2024, at 9:33 PM, TOUNKARA1302 @.***> wrote:

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

— Reply to this email directly, view it on GitHubhttps://github.com/APSIMInitiative/APSIM710/issues/2243#issuecomment-2301831725, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJITF4OAJQPSDFQK5MEPMSTZSR3KLAVCNFSM6AAAAABMOFEJDWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBRHAZTCNZSGU. You are receiving this because you were mentioned.Message ID: @.***>

TOUNKARA1302 commented 3 months ago

OK Dr Jeremy Whish thanks .