Docsity

Computing Assignment for Mesoscale Modeling | MEA 712, Assignments of Earth Sciences

Toggle sidebar
bg1
MEA 712: (An Introduction to) Mesoscale Atmospheric Modeling
First mini computing assignment
Before embarking on the more complicated tasks that will come later in the semester, we are going to build
up a very very simple model, step by step. The goal is to brush up our coding skills and familiarize everyone
with what a finite difference model ”looks like”.
Due at the start of the next class (Tuesday 28 August)
The first mini assignment is to simply set up the FORTRAN code.
1. Set up a program named SIMPLEMOD, with STOP and END statements at the end.
2. Declare the variables to be used in the code.
a) Our model will be 1–D, extending only in the x–direction. The number of points on the domain
will be NX, which is an integer.
b) Use a PARAMETER statement to assign a value to NX. For now, it can be any integer value that you
like. c) The spacing between the points on our grid (with units of meters) will be represented by the
variable DX, which is a real.
d) Our simple model will be used to timestep forward the variable PSI, which is a real. We will
represent this variable on each grid point, so the dimension of PSI should be NX.
e) We will use the index Ito represent which grid point we’re looking at/working on. It should be an
integer.
f) Add a PRINT *, ’HELLO WORLD!’ statement as the body of your code, and make sure that it
compiles and runs.
3. Print out your code and bring it to class to receive credit.

Partial preview of the text

Download Computing Assignment for Mesoscale Modeling | MEA 712 and more Assignments Earth Sciences in PDF only on Docsity!

MEA 712: (An Introduction to) Mesoscale Atmospheric Modeling First mini computing assignment

Before embarking on the more complicated tasks that will come later in the semester, we are going to build up a very very simple model, step by step. The goal is to brush up our coding skills and familiarize everyone with what a finite difference model ”looks like”.

Due at the start of the next class (Tuesday 28 August)

The first mini assignment is to simply set up the FORTRAN code.

  1. Set up a program named SIMPLEMOD, with STOP and END statements at the end.
  2. Declare the variables to be used in the code. a) Our model will be 1–D, extending only in the x–direction. The number of points on the domain will be NX, which is an integer. b) Use a PARAMETER statement to assign a value to NX. For now, it can be any integer value that you like. c) The spacing between the points on our grid (with units of meters) will be represented by the variable DX, which is a real. d) Our simple model will be used to timestep forward the variable PSI, which is a real. We will represent this variable on each grid point, so the dimension of PSI should be NX. e) We will use the index I to represent which grid point we’re looking at/working on. It should be an integer. f) Add a PRINT *, ’HELLO WORLD!’ statement as the body of your code, and make sure that it compiles and runs.
  3. Print out your code and bring it to class to receive credit.