New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Sci Prog Atmos Sci

by: Rowan Ward

Sci Prog Atmos Sci MSC 321

Rowan Ward
GPA 3.97


Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Class Notes
25 ?




Popular in Course

Popular in Marine Science

This 4 page Class Notes was uploaded by Rowan Ward on Thursday September 17, 2015. The Class Notes belongs to MSC 321 at University of Miami taught by Staff in Fall. Since its upload, it has received 16 views. For similar materials see /class/205715/msc-321-university-of-miami in Marine Science at University of Miami.

Similar to MSC 321 at UM


Reviews for Sci Prog Atmos Sci


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/17/15
Chapter 10 Input and Output Computer programs interact with the world by receiving input and delivering out puts through hardware such as keyboards7 displays7 disk drives7 tape drives and network connections FORTRAN programs do these inputoutput IO operations by reading from and writing to logical IO units The actual data transfer is performed by a set of subprograms that are part of FORTRAN7 called the IO library The compiler inserts these lO library calls upon code compilation when ever it encounters lO statement in the code The lO library routines associate the logical lO units mentioned in the code with logical IO devices such as le names and UnixLinux logical devices These logical devices are in turn attached by Unix to the appropriate physical IO devices So far we have used only read and print for lO The statement read accepts input from the logical lO unit named standardin which is normally attached to the keyboard7 and print write to the logical unit named standard out7 which is normally associated with the display Standard in and standard out can both be redirected at run time using uniX pipelines Another important attribute of the read statements is that the value it reads can be in a wide variety of formats Suppose the following statements are encoun tered in a program real C read C and the value that is to be input is 37 Typing one of the following input text strings results in the variable getting that value 37 370 37e1 Because of the variations permitted in the format of the input value7 read is said to do freeformat input Programs receiving data from keyboard input should 65 66 CHAPTER 10 INPUT AND OUTPUT read it using free format so the user can enter the data in reasonable ways In the case of the write we leave it up to the FORTRAN library lO to decide the precise format to use in writing up the results7 and this is referred to as free format output Sometimes however7 it is important to insist that certain date be read in our written out in speci c xed formats7 or in binary form rather than as characters7 and it is often necessary to read from a unit other than standard in and to write to a unit other than standard out 101 read and write statements FORTRAN provides a more general form of the read statement7 and a write statement which is a generalization of print These statements permit the speci cation of a logical unit7 and a data format to be used in the lO operation and have the form readunit format list writeunit format list where 0 unit speci es the logical lO unit to use If is given for the unit7 read uses standard in and write uses standard out if unit is not it is an integer in the range 0 99 specifying the logical unit number Some numbers are refer to speci c units 5 to standard in7 6 corresponds to standard out and 0 corresponds to standarderror Like standard out7 standard error is usually attached to the display 0 format speci es the format of the data If is given for format7 free format is used So read a is the same as read a7 and write a is the same as print a There are two forms for the format statements 7 An integer indicating the label number of a format statement that is speci ed on a separate line7 eg write620 a i A character that inlines the format statement within the write state ment as in write6fmt i2 7 i We will look in more details at either constructs later 0 list is a list of variable names to be read or printed The list can include expressions7 such as 20sqrt X in the case of the write statement 102 UNIT ASSIGNMENTS 67 102 Unit Assignments Associating logical units with external les is done with the open statement There is a minimum number of attributes that must be speci ed in the open statement for it to establish the connection with the les The remaining attributes are optional and the compiler provide default values if none are speci ed in the code The open is an execution statement and may appear anywhere in the program Once executed the connection of the unit to the le is valid in the main program as well as in any subprograms for the remainder of the execution until a Close statement is encountered the latter terminates the connection and a new one can be established to a di ferent le using the same unit number If a le is connected to one unit it may not be connected to a di ferent unit at the same time Like connecting a le to a unit that is already assigned is not permitted The format of the open statement is open listofconnectionspecification where the permissible connection speci cations include o unit an integer expression is the logical unit number associated with the le 0 file scalar character expression is the name of the le to connect to If the le name is a constant enclose the name in single quotes 0 form scalar character expression This keyword can have one of two values formatted indicates that the variables to be printed will be translated from the binary form stored in the computer memory to something humanly readable like decimals and ASCII characters unformatted indicate that the binary form should be written to le no translation take place If large les are being written this is the preferred form for speed and to reduce le size 0 status scalar character expression indicates whether the le exist or not and how to handle it The permissible values are 7 old The le exist the OS should just open it An error message is printed otherwise and the code stops 7 new The le does not exist the OS should create it An error occurs if the le does not exist 7 unknown If the le exist then the OS just opens it otherwise it is created and made available to the program 68 CHAPTER 10 INPUT AND OUTPUT scratch indicates that the le is temporary and should be deleted upon issuing the Close statement 0 action scalar character expression 0 access scalar character expression 0 iostat scalar default integer variable


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Anthony Lee UC Santa Barbara

"I bought an awesome study guide, which helped me get an A in my Math 34B class this quarter!"

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.