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

Edge case on high-temp, southern locations. Tempcal ntd[] is full of nulls out of the model. #15

Closed
GoogleCodeExporter opened this issue Mar 17, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

Occurs on datasets 169013 and 20080, these will be added to the unit tests 
after this has been completed.

When model produces a results object, the input ntd[] array is full of nulls 
for some reason.  This has a negative impact on everything else as a result.

Original issue reported on code.google.com by edwalt...@gmail.com on 26 Jul 2011 at 7:55

@GoogleCodeExporter
Copy link
Author

None of the conditions to set ntd[] variables in BasicSimulationModel are being 
hit during the execution of these datasets.  These population routines are all 
inside an if() block that checks to see if:

if (tc != 0 || tu != 0) {

These conditions are not being satisfied.

Original comment by edwalt...@gmail.com on 26 Jul 2011 at 8:06

@GoogleCodeExporter
Copy link
Author

In one of the test datasets, MEAD89, the following is true for its run:

tc = -1, tu = 0

Original comment by edwalt...@gmail.com on 26 Jul 2011 at 8:08

@GoogleCodeExporter
Copy link
Author

In MEAD89, the tc variable is only ever modified twice, two set it to -1 both 
times.  Conditions to set tc to -1 does not occur in 169013 and 20080.

The condition skipTo890 has been flagged true, setting tc to 0.  Again around 
920, tc is getting set to 0 again, this is because tempUnder8C has been flagged 
false, which speaks toward the kind of datasets that we are encountering this.

Two conditions cause skipTo890 to occur:  np = 0 and wt <= 5

Original comment by edwalt...@gmail.com on 26 Jul 2011 at 8:21

@GoogleCodeExporter
Copy link
Author

The temperature calculator is short circuiting because no temperatures under 8 
degrees Celsius are being detected.  As such, the entire temperature calendar 
would be full of 8's for "in excess of 8C".

What should occur is the total population of the temperature calendar with 8's. 
 However, I will verify what the BASIC model does under DOS with these datasets.

Original comment by edwalt...@gmail.com on 26 Jul 2011 at 8:25

@GoogleCodeExporter
Copy link
Author

Added special behavior for this edge case in the model.  Seems to fix 
everything and match FLEXNSM behavior.  Unit tests still required.

Original comment by edwalt...@gmail.com on 26 Jul 2011 at 9:29

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Unit tests added, and they pass.  Problem fixed in 1.4.5.

Original comment by edwalt...@gmail.com on 26 Jul 2011 at 9:38

  • Changed state: Fixed

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

No branches or pull requests

1 participant