Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8029647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:29:45+00:00 2026-06-05T00:29:45+00:00

Why do I get this message? Traceback (most recent call last): File C:\EclipseWorkspaces\csse120\Lake2\Mainloop2.py, line

  • 0

Why do I get this message?

 Traceback (most recent call last):
  File "C:\EclipseWorkspaces\csse120\Lake2\Mainloop2.py", line 46, in <module>

Q[i+1]=Qn(HSR[i],TD[i],FW[i],TempLake[i][0])

IndexError: index out of bounds



Nlayers=23
N=365

HSR=Hsr(rad)
TD=Td(air,neb)
FW=Fw(wind)

def main_loop(Z,z,Areat0,Areat1,TempLake,wind,Q0,Q1):
    n=TempLake.size
    var00=Imp_scheme(Q0,Q1,z,Areat0,Areat1,Z,TempLake,wind)
    var01=fix_profile(n,var00,Areat0)
    return var01

TempLake=np.zeros((N,Nlayers))
TempLake[0]=T0

Q=np.zeros(N)
Q[0]=0.0
for i in xrange(N):
    Q[i+1]=Qn(HSR[i],TD[i],FW[i],TempLake[i][0])
    TempLake[i+1]=main_loop(Z,z,Areat0,Areat1,TempLake[i],wind[i],Q[i],Q[i+1])
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:29:46+00:00Added an answer on June 5, 2026 at 12:29 am

    xrange(N) gives you values from 0 to N-1. You are adding one to it, so you access Q at indices 1 through N. But Q only has N elements, so N is one more than the highest index, N-1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Traceback (most recent call last): File filter_import.py, line 77, in <module> get(sys.argv[1]) File filter_import.py,
I get this error message from a Ghostscript call: Error: /syntaxerror in -file- Operand
when I use MySQLdb get this message: /var/lib/python-support/python2.6/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated
When loading up a solution in VS2008 I get this message: An error was
I try to use the boolean in my class and get this message reference
I get this error message when I try to use mysql_fetch_array(): while( $deffefgpSfet->fetch() )
I get this error message in Visual Studio when I'm trying to run the
I get this error message when i use URL Linter with my website http://developers.facebook.com/tools/debug/og/object?q=iulianonofrei.com
I get this error message in Eclipse: Access restriction: The type DirectoryWalker is not
Sometimes I get this error message from time-based trigger of many scripts ... There

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.