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

Generic ecotype read #472

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Open

Generic ecotype read #472

wants to merge 13 commits into from

Conversation

chporter
Copy link
Contributor

This pull request includes a generic read routine for ecotype files. It has been implemented for CROPGRO, but not yet other crops.

The new file ECO_read.for reads all ecotype parameters for the current eoctype and stores in memory for retrieval by crop routines with a separate call for each parameter requested. Ecotype files must be one line per ecotype with the data values right-justified under each header. Values are stored in memory as text, but sent back as real. Integer values are converted by the calling routine.
A new ecotype file is read each time the routine is called with input parameter LABEL = 'NEW'. This call must be done prior to any other calls to the routine.

Missing values are identified on a crop model-specific basis. For example, if the strawberry parameter XFPHT is not found, the problem is ignored unless this is a strawberry simulation. Parameters for cotton lint and fresh weight are also tested in this way. Other crop model-specific parameters can be easily added.

Some genotype files had to be changed:

  • Many crops use header "PP-SS" instead of "THVAR". I changed all to THVAR, but maybe we want to handle either header in the code, i.e., a call for THVAR would look for both headers. Note that all definition sections in the ecotype files still use THVAR, not PP-SS.
  • Soybean cultivars RB0002 and RB0003 specified ecotypes that do not exist. I changed the ecotype name to DFAULT for both. The previous code used DFAULT when there was a missing ecotype name but the new code does not do that anymore and instead ends the run with an error.
  • SRGRO048.ECO file was missing a "!" in line 51.

Testing - I ran all CROPGRO experiments / treatments and compared with the previous model prior to these changes. There were differences but they reflect differences between debug and release model versions, with the same experiments / treatments affected. I'm inclined to ignore these, but we might need to investigate further, particularly with the worst problem soybean treatment (NCRM8701.SBX trt 24).

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

Successfully merging this pull request may close these issues.

1 participant