SOUTH DAKOTA

SCHOOL OF MINES
& TECHNOLOGY

Search
Directories
Current Students
Faculty & Staff
Local Weather

Syllabus, ATM 599-CMAS [Spring 2009] Computing Methods in Atmospheric Sciences

IAS Logo ATM 599-CMAS-SP2009
Computing Methods in Atmospheric Sciences
"Programming Boot Camp for Meteorologists"
Institute of Atmospheric Sciences
South Dakota School of Mines
Rapid City, South Dakota

Who Where When

Prof.:
Bill Capehart, MI 213, Open Door Office Hours, Ph: 394-1994, Email: <William.Capehart@sdsmt.edu>
Classroom:
Lecture: TBD
Lab: TBD
WWW:
http://capehart.sdsmt.edu/atm-cmas.html

Reference Text

  • Metcalf, Reid and Cohen:  Fortran 95/2003 Explained
  • LeBlanc and Blum: UNIX for Dummies (I don't recommend the Linux version)
  • Books on Reserve

  • To be determined
  • Scope of the Course

    Catalog Entry: (2-1) Prerequisite: CSC 150 or equivalent.  Introduction to the Linux/UNIX operating system from the user’s perspective.  Fundamentals of the Fortran 90/95 programming languages.  Introduction to scientific data formats commonly used in the meteorology community (netCDF, GRIB, Climate and Forecast Metadata Convention).  Additional material may include shell scripts, and visualization of meteorological data using community based software (IDV, NCAR Command Language).  This experimental course is a candidate for the ATM MS Techniques requirement but has not been formally established as such.

    Overview:  Programming, Data Smithing and "Code Jockeying" and other aspects of Scientific Computing are not things you learn in one semester. It is a skill you accrue, hone and develop throughout your career.  As such, the goal of this class is not to make you a scientific programmer overnight or over four months.  Rather, our goal is to make you unafraid of making a working “two-fisted” programming solution to most geosciences problem and likewise make you unafraid to “code dive” or otherwise jump into community code (or two-fistedly programmed code!) and make the necessary changes for your own agendas.

    This class focuses on meteorologically-oriented programming using the Fortran family of programming languages.  Fortran, namely Fortran 77, while some consider it to be dated, remains the lingua franca of scientific computing and number crunching.  Unfortunately it unfairly receives bad (and often rabidly prejudicial) PR by people who are not number-crunchers, have never had, used nor learned Fortran, or simply have neither realized nor appreciated the upgrades in Fortran 90 and Fortran 95, as well as more recent upgrades of Fortran 2003 (which have not fully yet percolated down to the user community).  Some of these improvements include access to Object Oriented Programming that once again make Fortran very attractive to those working in Finite Element Modeling.  Moreover, many small and even larger Computer Science programs lack the resources and enrolments to support Fortran instruction at the introductory level, favoring the C-family or Java.  As meteorologists (and those students working in computational fluid dynamics and companion fields who wish to join us), Fortran is an important language to have ready to work for you.  In this course, we wish to familiarize you with Fortran 90 so as to reduce your learning curve later (or now if you are working with MM5, WRF or other model code).  A treatise on the renaissance of Fortran is found here.

    Additionally, high performance computing is rarely done in the Windows with friendly workbenches by most users.  It's done in the Linux/UNIX-family of OS environments.  Therefore, we will be working exclusively with Linux using the GNU family and Portland Group compilers for Fortran.

    Because meteorologically-based programming also requires specific constructs not seen in externally-offered programming courses, we will introduce you one such construct: the netCDF Application Programming Interface (API). This format is use in observational, archival, and numerical weather prediction applications and is one of the more widely used “standard data formats” along with WMO GRIB. 

    Students will also learn how to develop data products that are readily sharable with the larger meteorological community through the Climate and Forecast (CF) Metadata conventions.

    Finally, we shall explore other programming and computing skills that are nice to have under your belt, such as how to write a simple shell script, and work with some viewing/analysis software commonly used in the atmospheric sciences community that also follow language-based, not GUI- based formats.

    Prerequisites and Qualification Standards

    This course requires CSC 150 (Computer Science I) or equivalent study as a prerequisite.  Students are expected to have previous coursework in programming (e.g., the C- or BASIC-families) but not the Fortran family. Students whose programming coursework and work experience already includes proficiency in Fortran 77/90/95 should consider auditing and may expect to be drafted into assisting their peers.  We are not planning for this course to replace coursework in the C-family of languages at the undergraduate level (CSC 150) since C is frequently used in meteorological code in concert with Fortran programming elements, especially in areas of Input and Output.

    We will presume that you have had some course work in programming (e.g., C or C++) but may be somewhat rusty at first due to time and lack of use of those skills.  We, therefore, will have a short period of repressed false memory therapy with some re-familiarization drills with you as we spin up to more aggressive tasks.  However, we wish to keep this period as short as possible.  Students will be expected to bring themselves up to speed by investing significant time out of class to rebuild their computing skills portfolio.

    Current undergraduates wishing to enroll should interview with the professor-in-charge the semester beforehand.  Students with "As" in CSC 150 will be permitted to enroll.  Students with high "B"s (our would have had High-B's if the SD University System had a +/- system like Tech had in the good old days before someone decided to merge everything but couldn't be bothered to add it the larger system), will be subject to an interview and short evaluation of programming skills.

    This class will be taught completely in the Linux/UNIX environment as used within IAS (Fedora and Mandriva).  We will be working with the GNU Fortran (gfortran) and G95 compilers.   Commercial compilers (Portland Group) may also be used.  This class will not use MPICH or OpenMPI.  Students interested in learning parallel programming, as opposed to being an end user of parallel code (e.g., MM5 or WRF), may wish to also consider CSC 410/510 (Parallel Computing) which also includes elements of Fortran.

    This experimental course has not yet been classified as an ATM MS "Techniques" course.

    Course Outline

    1. Navigating the Linux/Unix Operating System (distributed through the course)
      1. UNIX for Dummies 101,201,301,401 & 501 (the basics of walking and working around a “shell”)
      2. GUI[D] [K]SUX!:  Weaning you from the Graphical User Interface
        1. Terminal Linux Usage and the secure shell
        2. Navigating in a Linux shell
        3. Editing in "vi" (Linux's no-frills in- terminal editor)
        4. GUI-oriented umbrella-drink editors (kwrite, kedit, nedit)
      3. Typical Linux User Tasks
        1. Account maintenance
        2. Environment variables
        3. Working with a networked system, at work and from home
        4. Understanding what is really where
        5. Archiving
        6. Efficient and responsible account use for community systems
    2. Introduction to the basics of Fortran 90/95 and Fortran 77 (mostly 90/95)
      1. The Obligatory Starters (a.k.a., "The Most Important Program You Will Ever Write")
        1. Compiling Fortran programs with GNU's gfortran and/or pgf90 on a Linux system
        2. Sample Activity: "Hello Kitty! Kill -9!  Kill -9!"  "Hello World!"
      2. Variable Types and Simple Math Operations (including intrinsic functions)
        1. Variable Types, Implicit vs. Explicit Declarations (and why you should default to the latter!)
        2. Sample Activity: Fahrenheit to Centigrade Conversions
        3. Sample Activity: U and V to Speed/Direction Conversions
      3. Basic Input and Output and an Intro to Arrays
        1. Simple I/O for Binary and ASCII
        2. Formatted Output in Fortran
        3. How Fortran binary I/O is different than C-family I/O
        4. Simple small arrays
        5. Column(Fortran)-major vs. row(C)-major indicing
        6. Sample Activity: Read and Process ASCII Formatted NCDC Climate Data
      4. Program Flow: If/Then/Else Blocks and Loops
        1. Bigger Arrays and how to manage them
        2. If/Then/Else Conditional Blocks
        3. Do Loops and While Loops
        4. What will happen to you if we ever catch you using a GOTO statement
        5. Other things we’d rather you not do that you could have gotten away with in F77 if you knew you could have done it
        6. A few things that you couldn’t do in F77 that you can now do in F90/95
        7. Sample Activity: The activity from 2.3.6 with multiple line and parsing.
        8. Sample Activity: Input a data a Field, Calculate its Gradient, Output the Field
      5. Functions, Subroutines and Modules
        1. Partitioning repeated or common tasks into functions and subroutines
        2. Creating a personal toolbox of support code
        3. Compiling and running a set of source code files using a simple Makefile
        4. Same as exercise 2.4.7 but in modular form using functions and subroutines
    3. Scientific Data Formats and Creating Meteorologically-Friendly Files for Colleagues and Applications
      1. Introduction to netCDF (your community’s Common Data Format)
        1. The concept of self-describing files
          1. Dimensions, Variables, Attributes (Global and Local) and Data
        2. Common Data form Language (CDL)
        3. The netCDF Convention (from the user perspective)
          1. Building and Installing netCDF (and other community software resources) from the tarball.
        4. The basic netCDF command line utilities: ncdump and ncgen
      2. The Climate and Forecast (CF) Metadata Standard
        1. Storage Conventions (t-z-y-x)
        2. Standardized Names
        3. Standardized Units
        4. Geospatial References and Horizontal/Vertical Coordinates
      3. Programming with the netCDF API
      4. Sample Activity: "Crack" a netCDF file into an ASCII CDL file with ncdump, edit the CDL file, and rebuild the "corrected" netCDF file with ncgen.
      5. Sample Activity: Read a netCDF file in Fortran
      6. Sample Activity: Create a community-readable netCDF File in Fortran (and why you may never want to use ncgen after this - but you will continue to worship ncdump)
    4. The Measurable Goal of this Class : The Project Activity
      1. Solve a Meteorology Problem as Meteorologists (or someone taking a class with Meteorologists)
      2. Sample Activity: Input a height field and supplemental data, calculate and output geostrophic wind as a readable netCDF File, view it in a community viewing software package such as IDV or NCAR Command Language. (This is the open-hand example we will use to kick you off into your projects).
    5. Additional Material
      1. Simple shell scripts
      2. NCAR Command Language
      3. WMO GRIB Format (the global community standard for gridded meteorological data)
      4. A heads-up on Fortran 2003/2008, Earth System Modeling Framework (ESMF) APIs, and GRID Technologies

    Grading

    Lab Assignments (1/3)

    Lab exercises will often be based on recent lectures and building off the material learned in previous labs and lectures

    Quizzes and Drills (1/3)

    There will be staggered quizzes proficiency drills every two weeks (one week topic quiz, one week drill)

    Project (1/3)

    Students will demonstrate proficiency in programming through a project that ingests meteorological or climatological data, processes the data, and outputs the results in a community-readable NetCDF/CF compatible file.

    Course Assessment (0/3)

    Course assessment of experimental (x99) classes is the job of all participants in the course.  Students are expected to provide candid professional opinions regarding the pace, relevance, presumed skill-levels, expectations (teacher and student) and applicability/expandability of the material and overall path of the class.  Your feedback is crticial to the success of advancing this course into the formal curriculum of the ATM program.

    ADA Statement and Specific Special Needs

    "Students with special needs or requiring special accommodations should contact the instructor, (Bill Capehart, at 394-1994) and/or the campus ADA coordinator, Jolie McCoy, at 394-1924 at the earliest opportunity."

    SD School of Mines

    Specifically for ATM 599-CMAS:  This course uses skills that require color recognition, keyboard work and computer vision. Students with vision problems (e.g., color blindness) or any other possible impediment should bring these issues to the professor ASAP so as to assess accommodation. Most issues ought not prevent participation in the class.

     

    SDSM&T Electronic Devices Policy

    "Please turn off your cell phone before class starts. No text messaging in class. No headphones. If you wish to use a laptop in this class for purposes of note taking, that's great; however, you will be required to download DyKnow software and then join ATM 450 to activate. Any attempt to circumvent the DyKnow monitoring system will be considered a form of cheating and a breach of academic integrity. Note that according to "Policy Governing Academic Integrity" in the SDSM&T Undergraduate Catalog, the instructor of record for this course has discretion of how acts of academic dishonesty are penalized, subject to the appeal process, and that "Penalties may range from requiring the student to repeat the work in question to failure in the course" (72-73). No other use of any other electronic/computer media is allowed during class time."

    SD School of Mines

    Specifically for ATM 599-CMAS: As ATM upperclassmen and graduate students you are "on duty" professionals in this course.  I will treat you as such.  Therefore, cell phones on vibrate only under reasonable (e.g., emergency) use.    Instant Messaging and other non-relevant, inappropriate and otherwise non-directed internet usage is absolutely forbidden.   The traditional "Old School" Honor Code applies to programming assignments, drills and projects, as well as account access and will be enforced.  You will be given a secure UNIX/LINUX account for use with the IAS computing network.  Observe all proper security and acceptable use policies, regarding access, internet use, general use, and disk discipline.  Any "Live OS" CDs issued in the class are for at- home use only.  The unauthorized use of "Live OS" CDs on the Tech campus machines connected to the internet is not endorsed by IAS or ATM, and may be seen and interpreted as an attempt to circumvent university security measures.  Violation of University and IAS acceptable use policies may mean the revoking of computer privileges. 

    SD BOR Freedom of Learning Statement

    "Students are responsible for learning the content of any course of study in which they are enrolled. Under Board of Regents and University policy, student academic performance shall be evaluated solely on an academic basis and students should be free to take reasoned exception to the data or views offered in any course of study. Students who believe that an academic evaluation is unrelated to academic standards but is related instead to judgment of their personal opinion or conduct should contact the dean of the college which offers the class to initiate a review of the evaluation." 

    SD Board of Regents

    Specifically for ATM 599-CMAS:  While the faculty of IAS accepts the use of a diverse range of problem solving environments (from tablet PCs to Linux to Macs, from single systems to clusters to GRIDs), we are operationally limited to those that we can provide.  As such, we don't care what OS or Linux distribution you prefer.  IAS uses Mandriva and Fedora on its fleet machines.  We don't care if you prefer Intel or Lahey compilers.  IAS uses those by GNU and the Portland Group (and due to the latter, can't afford much else!).  Those wanting to use these OSs, distros or compilers not supported by IAS are welcome to do so on their own time and their own systems so long as they produce the same results.  Unfortunately we will not be able to support them.  Those wanting us to do so are offered and engraved invitation to back up those recommendations by showering IAS and ATM with very generous and welcome gifts of filthy lucre through the SDSMT Foundation to support said changes.  No, really!

    Selected Links



    Contact: William Capehart

    This page has been visited 313 times since 03/17/2008
    http://www.hpcnet.org/sdsmt/ias/courses/atm-cmas Last Modified: 05/08/2008

     
         

    © - 1994-2008 - SDSM&T - All rights Reserved.