Here are a couple of questions that I got from Willy:


Good questions, Willy:   

Firstly, as to your questions about the differences between vi and Word.  Well, firstly let's think about the ways in which these two software packages are similar.  They are both types of EDITORS, right?  (You use them to make changes to a file.)  They are both used to edit TEXT (in contrast to editing IMAGES or something like that.)  We could probably come up with other similarities -- like the tools they provide (search, for example).   

Now let's think about ways that vi and Word are different.  The vi editor edits only TEXT -- there is no ability to control things like fonts or embedded images or margins or anything like that in vi the way there is in Word.  Word is a GUI (Graphical User Interface) program, meaning that it interacts with the mouse, has buttons and icons and menus and so on, whereas vi does not -- vi only interacts with the keyboard.  You could probably think of more differences.   

As for your second question-- it's not entirely clear from your message which question you are talking about from the review sheet, but I think it is this one:  Suppose that you have a file in the current directory called test.data.  Suppose that your C program creates a new file for output and calls it “test2.data”.  Both test.data and test2.data are in the same directory.  Physically, on the computer’s hard drive, are these files close to each other?  How does the computer know where to find these files on the hard drive?   

If so, this is an interesting question -- you might remember that we actually spent a day talking about this stuff while sitting in the conference room.  Basically, this gets to the heart of the reality that the whole business of "folders" or "directories" or whatever is just a metaphor-- the computer is NOT really storing the files "next to each other" on the hard drive, just because they are "side by side" in a folder.  Rather, when the computer needs to create a file, it just finds some empty space ANYWHERE on the hard drive and starts writing.  The operating system then maintains a "file allocation table" that keeps track of where each file is (actually, where each file STARTS) on the disk.   Inside the file allocation table, there is information about what "folder" or "directory" the file is (hypothetically) in.  So, for example, when you type "ls" in linux or open a folder in windows, all that is REALLY happening is the file allocation table is telling you which files are listed as being "in that folder" -- even though, in reality, they could be literally ANYWHERE on the hard drive.   I hope that this information helps!   Jon  
From: Sedlacek, William T.
Sent: Mon 5/2/2011 9:58 PM
To: Schrage, Jon M.
Subject: ATS 315 questions


Hi Dr. Schrage,
 
Well, I don't see any questions on the website yet, but I have a couple. The first is about comparing and contrasting vi and Microsoft Word. I have some idea of how they are similar and different, but I'm not quite sure how I would articulate it on the exam. The other question I'm not sure about is #2 under the questions that pertain to working with files in C.
 
Willy

 
 
Here is a question a student sent about the final:


Great question, Anna!  

  We did an example of something like this in the lecture, but I'm not sure that anything about this showed up in the powerpoint presentations that you are studying from.   Remember, NCL has the idea that you can work with whole arrays at one time -- you don't have to work with them "element by element" like you do in C.  

For example, if you had an array of temperatures in K called tempK (the array has NUMROWS rows and NUMCOLS columns), to convert this to Celsius in C we would have to do something like this:   for(i=0;i<NUMROWS;i++) {      

for(j=0;j<NUMCOLS;j++) {
          tempC[i][j] = tempK[i][j] - 273.15;
     }
}   

And, of course, various variables like i and j would have to be defined correctly as integers, tempC and tempK would have to be defined correctly as arrays of floating point numbers (with the right number of rows and columns)... In total, this is a lot of work and sort of error-prone.   

In NCL, you would just do something like this:   

tempC = tempK - 273.15   

NCL would understand here (given that tempK is already an array of floating point numbers with a number of rows and columns) that tempC will also need to be an array with the same number of rows and columns, so NCL will go ahead and declare tempC for you -- preventing a source of error.  NCL will then look at this statement and see that you are subtracting a single floating point number (273.15) from the array -- the only legitimate thing that can mean is that you are subtracting that number from each element of the array, so it will go ahead and do all of that for you, again saving you programming time and preventing possible errors.   Pretty slick, right?   Jon  
From: Weber, Anna E.
Sent: Mon 5/2/2011 7:48 PM
To: Schrage, Jon M.
Subject: RE: final review


Hi Dr. Schrage,

I am wondering how you convert temperature from Kelvin to Celsius in NCL. I couldn't find anything on it in the powerpoint and I looked on the NCL website a bit and couldn't come up with anything.

Anna


-----Original Message-----
From: Schrage, Jon M.
Sent: Sun 5/1/2011 1:18 PM
To: Cato, Mallory K.
Cc: Reynolds, Rhonda S.; Sedlacek, William T.; Dusselier, Hallie E.; Austerberry, Michael J.; Weber, Anna E.; MacCarron, Jacob R.; Huddleston, Lucas M.; Happe, Nathan E.; Wright, Nathan F.

Subject: RE: final review
 
Here is the review sheet for the ATS 315 final, for those of you who either misplaced it or never got it at class on Friday.


Jon Schrage
 

________________________________

From: Cato, Mallory K.
Sent: Sat 4/30/2011 8:25 PM
To: Schrage, Jon M.
Subject: final review




Dr. Schrage,

I seem to have misplaced my review sheet for the final exam. If you could please email me a copy of it so that I may start studying, that would be great!

Thanks,

Mallory


 
 
Need to know how to draw contours in this class?  Here you go!
 
 
If you are looking for the powerpoint about objective analysis and the Barnes function, here it is.
 
 
There are actually two powerpoint files about working with weather information and plotting it on a map.  Here is the first one, and here is the second.
 
 
For the big assignment that is due on Friday, you need two powerpoints:  one about drawing maps and one about clipping.
 
 
Here is the powerpoint about the basics of C Graphics.
 
 
The powerpoint with the big assignment about working with meteorological data sets (namely, the current_sao.wxp data file) is available here.  Don't forget that the current_sao.wxp file is actually in /home/schragej rather than whatever directory it claims in the powerpoint file, which is from a different semester.  Additionally, don't forget that we have created part of the assignment that you need in a file called "readstuff.c"--also in the /home/schragej directory.
 
 
Looking for the powerpoint about working with files in C?  Here it is!
 
 
"Functions" are one of the most important topics in programming.  We use them every day.  Here is the first powerpoint about them.