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

Floating-Point Exception Error #420

Open
mehmoodmz opened this issue Jun 4, 2024 · 2 comments
Open

Floating-Point Exception Error #420

mehmoodmz opened this issue Jun 4, 2024 · 2 comments

Comments

@mehmoodmz
Copy link

Hi,
I am getting a floating-point exception error while running CROPSIM-Wheat. What would be a better way to resolve this issue? Do I need to remove RSWT on Line 1022 or add RSWT on Line 1023?

! Originally included retained dead matter and reserves

IF (((LFWT+STWT+RSWT)*PLTPOP*10.0).GT.0.0)

& VANC = VNAD/((LFWT+STWT)*PLTPOP*10.0)

@palderman
Copy link
Contributor

It seems like these comments indicate a desire to remove reserves from calculation of VNPCM:

! Changes for KSAS 02/12/2013
! 1. Established flag set when LAI>0.0,not when shoot/root>2
! (But ? this as allows re-use in the fall)
! 2. May need to take reserve CH2O out of calculation of VNPCM

VNPCM is itself calculated based on VANC:

VNPCM = VANC*100.0

So presumably the calculation on line 1023 is as intended and it is the if statement on the preceding line that should be corrected:

! Originally included retained dead matter and reserves
IF (((LFWT+STWT+RSWT)*PLTPOP*10.0).GT.0.0)
& VANC = VNAD/((LFWT+STWT)*PLTPOP*10.0)

If so, then line 1022 would become:

            IF (((LFWT+STWT)*PLTPOP*10.0).GT.0.0)

@lpmorenoc , @GerritHoogenboom, @chporter , what do y'all think?

@chporter
Copy link
Contributor

chporter commented Jun 4, 2024

@palderman Nice detective work! Yes, I agree that this should solve the problem.

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