FORTRAN - Lab 1

Goals 

Introductory LecturePDF Copy of PowerPoint Lecture for FORTRAN 1

Handouts (paper or electronic) 

Activities in Lab  

  1. Open your terminal window, either in NXclient or using ssh (instructions), and log into eidolon.  
  2. Type "ls" to confirm which files are in your home directory.
  3. Make a new directory called "fortran" (without the quotes). 
  4. Then "cd" into  the fortran directory.
  5. Run the Firefox web browser from within eidolon by typing  "firefox &" .
  6. Then, copy the sounding input files for PortHardy and Darwin into the fortran folder by right-clicking in firefox over the name of the input file, and select Save Link As and then navigate into the fortran folder to save it there.  Do it for both input files.
  7. Quit Firefox (or leave it open to view the lab pdf and HW instructions).
  8. In the terminal window, type "emacs wp01.f95 &", to invoke the program editor while creating a new file called wp01.f95.    
  9. Learn basics of FORTRAN by following along with the instructor, to start writing a FORTRAN program.  Then finish writing most of it during lab.
  10. Compile and execute the code. 
  11. Learn how to debug code.
Instructions

Homework Assignment.  You will write your fortran code in stages starting with the main program.  This is the top-down approach to programming, where all the subroutines are initially stubs (empty).  To ensure that you do this, I ask that you give a different name to each version of your code.  You must get each version of the code compiled and running, before you enhance the code to create the next version.  This is a method of version control -- a good programming practice.  This way, the marker can see all the versions of your code, can confirm that each version compiled and ran successfully, and can mark each one separately.   You will do most of this "FORTRAN-1 HW" by following along with the instructor during the lab period.

Reading Assignment  

-end-


Copyright © 2012 by Roland Stull.
UBC.