HOMEWORK  for  FORTRAN week 2.

You will continue the top-down approach of FORTRAN code writing that you started last week.  We will continue to write code to find wind power.  The numbering of these assignments is a continuation of the numbering from Fortran week 1.   

To allow you to all start on the same footing, and to give you all a head start, I will give you the fortran code for my version 12 that you can use as your starting point this week.  

We will start the first few assignments below together in lab, with you following along at first.  Then you can finish the remaining assignments as your homework.

Assignment Intro

Open your web browser to this  fortran2.html.
Run your NX client to connect to eidolon, and run the terminal program.
Use linux to check if a directory called "fortran2" exists in your directory on eidolon.  If not, create it.  Change directories to be inside "fortran2"
Use this link to get a copy of Stull's program "wp12s.txt", so that you all can have the same starting point.  Open emacs with the new file name "wp12s.f95", and copy Stull's program into it.  
Via the terminal window, run emacs by typing "emacs wp12s.f95 &" without the quotes.
.
12s. Version 12s  goals:   Learn how to use an alias in linux.  Then compile and run the wind-power program.  See what's inside Stull's Version 12, copy it to your "fortran2" directory on eidolon.
13.  Version 13 goals:    Learn more about input and output, such as reading formatted arrays of real numbers (see the pdf copy of the Lecture notes, online).

14.  Version 14 goals:  Learn about modules (from the online copy of the lecture pdfs for Fortran Lab 7).  Create module soundmod to hold the atmospheric sounding and related variables.  Modify subroutines getsounding and findpower to use this module.   Also, create a module turbinemod to hold the turbine specs.

15.  Version 15 goals:  Learn about user-defined functions, and create a function M(zr) that  returns the interpolated wind speed M at any height zr.   Use this function in findpower.   (follow along with the Instructor)

16.  Version 16 goals:  Get more practice with writing user-defined functions.  Also, In findpower, use the wind at each height and the area of each strip to get the wind power contribution from each height, and then sum over all heights to get the total wind power.

17.  Version 17 goals:  Calculation of total power from the wind turbine

18. Version 18 goals:  Learn about string manipulation and file handling.   Use this knowledge to create a new file to hold your wind-power output.  The new file should have the same root file name as the input file.  

19.   Version 19 goals:  Gain confidence by using much of what you learned about FORTRAN to finish writing the wind-power program.    This is homework that you do on your own.  

.

Marking:

The bottom line is that we will look for the following files in the "fortran2" directory under your user directory on eidolon:

  1. Seven ascii text files holding your fortran code versions:
  2. ... and Seven executable files:
  3. ... and the two output files:

The marker will grade your work by looking at EACH of your fortran versions, and compiling them himself to be sure they run.  Also, marks will be deducted if your code is not adequately documented with in-line comments.

The above files are due (i.e., must be inside your /fortran2 directory on eidolon) by the deadline discussed in class.

Hints:


Reading Assignment  

-end-


Copyright © 2012 by Roland Stull.
UBC.