Recent content by freja

  1. F

    Fortran Error 112 /undef when running fortran code

    I sorted out the initial error by assigning the arrays initial values of zero os the columns or rows not looped over had values, which was what was causing the out of bounds error. Only problems is having sorted out that problem Iv found loads more!
  2. F

    Fortran Error 112 /undef when running fortran code

    I have put initial values of zero for u, v and surf for all array elements. However when surfnext is calculated the values are nonzero, this is the code for that section, I can't see how that doesn't end up as a zero value (as its meant to) ! Calculate the surface elevation DO j =...
  3. F

    Fortran Error 112 /undef when running fortran code

    I gave that a try but it still does it. Funny thing is when I use the debugger it says that the arrays are 51 by 51, as they should be, so I don't understand why when it outputs it to the file it it outputs in a 372 x 7 grid unless i put the formatting in? Also when I increase the number of...
  4. F

    Fortran Error 112 /undef when running fortran code

    I have checked the variables and they are the correct values, but when I output the array values, such as u and y they have the correct number of elements but they are always only seven instead of fifty square and I can't understand why.This is the most recent top part of the program...
  5. F

    Fortran Error 112 /undef when running fortran code

    Hiya. I am able ot compile my program with no errors but when I run it I get the message: Error 112, Reference to undefined variable, array element or function result. I cannot see where I have gone wrong and more frustratingly this code was working, running producing results on the unix...
  6. F

    Fortran Fortran complex numbers and do loops

    I have a very simple question, but have been unable to find an answer for it. When using fortran 90 can you use a DO loop to calculate a complex number? For example: [code] COMPLEX FUNCTION forwards (tincdum,tstartdum,tenddum,fdum,ydum,idum,wdum&...
  7. F

    Derivation of the wave dispersion equation

    My homework question is: If the ocean surface is disturbed by a wave, η=η_0 cos(ωt-kx), show that the dispersion equation is given by ω^2=gHk^2+f^2. I have looked every where and while there is a lot of sites with this on they tend to just jump from one to the other saying 'substitue and...
Back
Top