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

gencost_outputlevel(0) #28

Open
ifenty opened this issue Nov 6, 2019 · 0 comments
Open

gencost_outputlevel(0) #28

ifenty opened this issue Nov 6, 2019 · 0 comments

Comments

@ifenty
Copy link
Contributor

ifenty commented Nov 6, 2019

@owang01

igen_XXX terms for sea level cost are initialized as zero and then set to k if a matching name appears in the gencost_name array:

cost_gencost_sshv4.F:
igen_gmsl=0
cost_gencost_sshv4.F:
if (gencost_name(k).EQ.'sshv4-gmsl') igen_gmsl=k

However, later these igen_XXX terms are used as array indices:
cost_gencost_sshv4.F: if (gencost_outputlevel(igen_gmsl).GT.0) then

without checking to make sure that igen_XXX > 0.

This results in array out of bounds.

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

1 participant