Professional Documents
Culture Documents
Install PYROMS, netcdf, parallel netcdf 1.2, EMSF 5.2.0rp2, EPD PYTHON, XML XERCES, MPI,
ROMS
Extract a smaller ETOP01 grid, surrounding the region of study, using either NCO or CDO:
OR
Specify lower left and upper right corners, which surround the entire lake region.
In this case, this box includes all 5 lakes with a little buffer around it. Don’t make it too big
or it will slow the model down.
llcrnrlon= -92.0
llcrnrlat=40.8
urcrnrlon=-74.
urcrnrlat=48.8
Plot map in python.
Type ipython
At first, you need to cut and paste the python script commands into command-line python
to get a satisfactory grid. Later, you can run the entire script as is.
Copy 1st part of superior.py into python to make a map of x,y points.
To draw a map:
run map.drawcoastlines
Find upper-left point 1st and then go counterclockwise, identifying the values of x and y.
This box should surround the entire lakes.
For the Great Lakes, these are the values:
UL: x=19617 y=915744
LL: x=19617 y=30170
LR: x=1356380 y=30170
UR: x=1356380 y=901730
In python, copy and paste 2nd section from superior.py to generate grid map.
Need to specify # points in N-S direction (Mm) and # points in E-W direction (Lm).
Try these initial values:
Mm=84
Lm=130
To check the current x-direction and y-direction resolution of your grid in meters, type:
hgrd.dx
hgrd.dy
Check to see that both are close to 10-km, which was our goal resolution.
If either is not close to 10-km, change Mm and Lm until they are closer to 10-km.
Now, cut and paste next part of superior.py. We are checking for the correct segment,
which represents the Great Lakes. Unfortunately, there are 126 segments total and we
don’t know which represents the Great Lakes. In fact, 3 of them in total represent the lakes,
not one.
These commands will help you figure out which segments are largest and the likely ones
that represent the Great Lakes.
print(nseg)
print(verts)
print(size(verts))
print(nseg, size(verts))
Try different segments to see which captures the lakes. Segment 2 gave the 3 western lakes.
Segment 5 gave Erie. Segment 6 gave Ontario. We need to change the line below so it
includes all 3 segments to get all of the lakes.
In superior.py, change
“if nsseg==4” line and lines below TO:
nseg = 0
hgrd.mask_rho[:] = 0.0
for verts in map.coastsegs:
nseg=nseg+1
if (nseg == 2 or nseg == 5 or nseg == 6):
hgrd.mask_polygon(verts, mask_value=1.0)
(Be careful to get the spacing right in the above commands or it won’t work.)
Brings up grid map that we can manually edit to remove land points.
To edit map, press “e” and click points to change to specify land points.
Click 5th icon on lower left (with magnifying glass) for zooming.
Close connections between lakes.
Elevation:
Superior=180m Huron=176m Ontario=75m Michigan=176m
Erie=174m
So, can use 176m for 4 lakes and 75m for Ontario.
topo_org = topo.copy()
topo = topo_orig-176.0
mkdir cpl2
cd cpl2
mkdir input
mkdir output
cd input
Need to merge all of the SRF output files into a single file, GLAKE_SRF.200004-200103.nc
ncrcat ../../cpl/output/GLAKE_SRF.2000040100.nc
../../cpl/output/GLAKE_SRF.2000050100.nc
../../cpl/output/GLAKE_SRF.2000060100.nc
../../cpl/output/GLAKE_SRF.2000070100.nc
../../cpl/output/GLAKE_SRF.2000080100.nc
../../cpl/output/GLAKE_SRF.2000090100.nc
../../cpl/output/GLAKE_SRF.200100100.nc
../../cpl/output/GLAKE_SRF.2000110100.nc
../../cpl/output/GLAKE_SRF.2000120100.nc
../../cpl/output/GLAKE_SRF.2001010100.nc
../../cpl/output/GLAKE_SRF.2001020100.nc ../../cpl/output/GLAKE_SRF.2001030100.nc
GLAKE_SRF.200004-200103.nc
vi roms_forc.ncl
prefix = “GLAKE”
fin=”GLAKE_grd_v2.nc”
cycle_length = 365
durl = ”.”
Edit the “if (dname….) loop” twice, regarding SRF, in script to:
url = durl+”/GLAKE_SRF.200004-200103.nc”
Don’t worry about the RAD files because the model won’t use them.
for mm in 04 05 06 07 08 09 10 11 12
(since we want to run April 2000 – December 2000)
Specify GLAKE_forcing_${str}.nc
Run script
./roms_forc.sh
(This script will run roms_forc.ncl)
for mm in 01 02 03
(Since we want to run Jan 2001-Mar 2001)
vi roms_split_fld.sh
./roms_split_fld.sh
(Runs roms_split_fld.ncl)
vi roms_glue_forc.sh
prefix=”GLAKE_forcing”
List of variables should begin with lwrad, etc (remove two variables for clouds and
radiation before it).
suffix=”200”
./roms_glue_forc.sh
(Runs roms_glue_forc.ncl)
In cpl2 directory,
cp ../cpl/regcm.in_LAKESUP20km_16-05-12-09:57 regcm.in_LAKESUP20km
cp ../cpl/glake.in .
cp ../cpl/ice.in .
cp ../cpl/varinfo.dat .
cp ../cpl/regcm.job .
cp ../cpl/regcm.rc .
We’ll use the same executable as a previous run, so link to those binaries.
ln –s ../cpl/src/RegCM-4.3-rc7/Bin .
Link the ICBCs, domain, and SSTs from the previous run so we can use them again.
cd input
ln –s ../../cpl/input/GLAKE_ICBC.200* .
ln –s ../../cpl/input/GLAKE_DOMAIN000.nc .
ln –s ../../cpl/input/GLAKE_SST.nc .
cd ..
(in cpl2 dir)
vi regcm.in_LAKESUP20km
lakemod = 0
dirter=’/home/mnotaro/cpl2/input’
dirglob=’/home/mnotaro/cpl2/input’
dirout=’/home/mnotaro/cpl2/output’
ncdump –h GLAKE_grd_v2.nc
xi_rho=129, eta_rho=83
vi glake.in
GRDNAME == input/GLAKE_grd_v2.nc
ININAME == /dev/null (we provided the initial conditions)
vi regcm.job
PBS_O_WORKDIR=/home/mnotaro/cpl2
Submit job:
qsub regcm.job