SOUTH DAKOTA

SCHOOL OF MINES
& TECHNOLOGY


Directories
Current Students
Faculty & Staff
Local Weather

Syllabus, ATM 519 [Fall 2010] Computing Methods in Atmospheric Sciences

IAS Logo ATM 519
Computing Methods in Atmospheric Sciences
"Programming Boot Camp for Meteorologists and Fellow Travelers"
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": Tuesday/Thursday 3:00PM-3:50PM for Fall 2010
"Lab": Tuesday/Thursday 3:50PM-5:00PM for Fall 2010
(In reality, Lecture and Lab will be intertwined in the IAS Computer Lab, MI 227)
WWW:
http://capehart.sdsmt.edu/atm-cmas.html

Reference Text

  • Chivers & Sleightholme, Introduction to Programming with Fortran
  • Robbins: UNIX in a Nutshell (I don't recommend the Linux version)
  • You should view these texts as reference manuals as much as you would treat them like text books. My approach in this class also presumes that you have a pressing need to learn Fortran quickly. The bare minimum skill set needed to get you started will be "fast-tracked". Other skills that are not frequently used in ad-hoc two-fisted programming will be tabled for later in the class or set aside completely for you to teach yourself in the future.

    Like many modern Fortran books, Introduction to Programming with Fortran presumes that many readers will have previous experience with other languages. We will also be treating the text mostly as an as-you-go reference manual rather than a front-to-back reference text. I will assign readings before class (typically at the end of the previous lecture) on various topics, typically by chapter, but these will bounce about the text's natural order to accommodate skills that I set as priorities. As such, you will experience a goodly amount of foreshadowing and Fortran-by-Immersion as you read through the pre-class prep where you will get a taste of things before we formally introduce them.

    Books on Reserve

  • To be determined
  • Scope of the Course

    Chris Muir's Day by Day Cartoon for 24 November 2002


    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, 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, stopped looking at Fortran since Fortran 77, 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). Some screedy goodness on the continued relevance and need for Fortran can be 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 but are waiting to learn netCDF and NCL may expect to be drafted into assisting their peers and in the meanwhile should use this as an opportunity to practice, perfect and upgrade their skillset. 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 (or would have had B+'s if the SD University System had a +/- system like Tech had in the good old days), will be need a short 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.

    Students, staff and faculty alike are also Strongly encouraged™ to attend the Spring Semester offerings of Henry Neeman's Supercomputing in Plain English. This class is offered every spring through our campus's Access Grid node.

    This course will count as an ATM MS "Techniques" course.

    Anticipated Travel

    I expect to be on Institute Travel on the following dates
    13-20 September
    04-08 October
    25-29 October
    You will be given activities to keep you sharp, abused and entertained during these windows. At least one guest lecture is in the planning.

    2010 Course Concepts and Take-home Skills

    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"ť)
      1. 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. GUI[s] [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 (e.g., gedit, kwrite, kedit, nedit)
    2. Introduction to the basics of Fortran 90/95 and Two Fisted Programming
      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. Simple Arithmetic and Intrinsic Functions
        3. Sample Activity: Various Conversion Programs (Units, Physical Properties, Etc)
      3. Intro to Input and Output and Intro to Arrays
        1. Console Input
        2. Formatted Output in Fortran
        3. Sample Activity: Interactive Conversion Programs
      1. Program Flow: If/Then/Else Blocks and Loops
        1. Arrays and how to manage them
        2. If/Then/Else Conditional Blocks
        3. Cases
        4. Do Loops and While Loops
        5. What will happen to you if we ever catch you using a GOTO statement
        6. Other college-educated-stupid things we'd rather you not do that you could have gotten away with in F77 if you knew you could have done it
        1. Sample Activity: Decisions and Multiple Line I/O
        2. Sample Activity: Input a data field, Calculate its Gradient, Output the Field - i.e., create a geostrophic wind vector set
      1. Characters and Strings
      2. Files and File-based I/O
        1. Reading and Writing to ASCII files
        2. Column(Fortran)-major vs. row(C)-major Arrays and I/O
        3. Introduction to Binary Files and How Fortran binary I/O is different than C-family I/O
        4. Sample Activity: Read and Process ASCII Formatted Meteo Data
      1. 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. Modules
        5. Sample Activity: Do all of the above in a demonstration code exercize
    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) -- netCDF for humans and professors
        3. The netCDF Convention
          1. Dimensions, Attributes, Data and Globals
        4. The basic netCDF command line utilities: ncdump and ncgen
          1. 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. 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
      2. Programming with the netCDF API
        1. Sample Activity: Read/Edit/Create netCDFs file in Fortran
        2. 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)
          1. If you can do this.  You should be afraid of NOTHING.
      3. WMO Gridded Binary (GRIB)
        1. The GRIB Product (Versions 1 and Versions 2)
        2. wgrib and wgrib2
        3. GRIB around the World!  The devil everyone knows, but only in their native tounge.
        4. Sample Activity: Explore and Crack a GRIB file
    4. NCAR Command Language (NCL)
      1. NCL File Input (GRIB and netCDF)
      2. Simple Plotting
      3. Mapping
      4. Color!
      5. Analysis
      6. NCL File Output (netCDF)
    5. The BIG Measurable Goal of this Class : The Project Activity
      1. Solve a Meteorology Problem as Meteorologists (or someone taking a class with Meteorologists)
      2. If you aren't a meteorologist, be your advisor's abused graduate student, for CREDIT!
    6. Additional Material Time Permitting
      1. Simple shell scripts
      2. Two-fisted Makefiles
      1. 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

    Quizlets 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.

    Students from other academic divisions may be given an equivalent project that meets their discipline's equivalents and advisor's expectations.

    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 519: 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 519: 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 519: 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 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 those 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! Cut that check and send it in!

    Selected Links



    Contact: William Capehart

    This page has been visited 2,704 times since 03/17/2008
    http://sdmines.sdsmt.edu/sdsmt/ias/courses/atm-cmas Last Modified: 08/27/2010

     
         

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