Skip to content

Commit

Permalink
update links case for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
bertinia committed Dec 18, 2017
1 parent 9ecbc71 commit 5b62b3e
Showing 1 changed file with 60 additions and 4 deletions.
64 changes: 60 additions & 4 deletions Tools/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,72 @@

import os

for year in ['0001','0002','0003','0004','0005','0006','0007','0008','0009','0010']:
for year in ['0001','0002','0003','0004','0005','0006','0007','0008','0009','0010','0011','0012','0013','0014','0015']:
for month in ['01','02','03','04','05','06','07','08','09','10','11','12']:

srcdir = '/glade/p/cesm0005/archive/b.e20.B1850.f09_g17.pi_control.all.225/ocn/hist'
linkdir = '/glade/scratch/aliceb/b.e20.B1850.f09_g17.pi_control.all.225/ocn/hist'
srcdir = '/glade/p/cesm0005/archive/b.e20.B1850.f09_g17.pi_control.all.250/ocn/hist'
linkdir = '/glade/scratch/aliceb/b.e20.B1850.f09_g17.pi_control.all.250/ocn/hist'

if not os.path.exists(linkdir):
os.makedirs(linkdir)

casename = 'b.e20.B1850.f09_g17.pi_control.all.225.pop.h'
casename = 'b.e20.B1850.f09_g17.pi_control.all.250.pop.h'
filename = '{0}.{1}-{2}.nc'.format(casename,year,month)
os.symlink(os.path.join(srcdir, filename), os.path.join(linkdir, filename))


for year in ['0001','0002','0003','0004','0005','0006','0007','0008','0009','0010','0011','0012','0013','0014','0015']:
for month in ['01','02','03','04','05','06','07','08','09','10','11','12']:

srcdir = '/glade/p/cesm0005/archive/b.e20.B1850.f09_g17.pi_control.all.250/ice/hist'
linkdir = '/glade/scratch/aliceb/b.e20.B1850.f09_g17.pi_control.all.250/ice/hist'

if not os.path.exists(linkdir):
os.makedirs(linkdir)

casename = 'b.e20.B1850.f09_g17.pi_control.all.250.cice.h'
filename = '{0}.{1}-{2}.nc'.format(casename,year,month)
os.symlink(os.path.join(srcdir, filename), os.path.join(linkdir, filename))


for year in ['0001','0002','0003','0004','0005','0006','0007','0008','0009','0010','0011','0012','0013','0014','0015']:
for month in ['01','02','03','04','05','06','07','08','09','10','11','12']:

srcdir = '/glade/p/cesm0005/archive/b.e20.B1850.f09_g17.pi_control.all.250/atm/hist'
linkdir = '/glade/scratch/aliceb/b.e20.B1850.f09_g17.pi_control.all.250/atm/hist'

if not os.path.exists(linkdir):
os.makedirs(linkdir)

casename = 'b.e20.B1850.f09_g17.pi_control.all.250.cam.h0'
filename = '{0}.{1}-{2}.nc'.format(casename,year,month)
os.symlink(os.path.join(srcdir, filename), os.path.join(linkdir, filename))


for year in ['0001','0002','0003','0004','0005','0006','0007','0008','0009','0010','0011','0012','0013','0014','0015']:
for month in ['01','02','03','04','05','06','07','08','09','10','11','12']:

srcdir = '/glade/p/cesm0005/archive/b.e20.B1850.f09_g17.pi_control.all.250/lnd/hist'
linkdir = '/glade/scratch/aliceb/b.e20.B1850.f09_g17.pi_control.all.250/lnd/hist'

if not os.path.exists(linkdir):
os.makedirs(linkdir)

casename = 'b.e20.B1850.f09_g17.pi_control.all.250.clm2.h0'
filename = '{0}.{1}-{2}.nc'.format(casename,year,month)
os.symlink(os.path.join(srcdir, filename), os.path.join(linkdir, filename))


for year in ['0001','0002','0003','0004','0005','0006','0007','0008','0009','0010','0011','0012','0013','0014','0015']:
for month in ['01','02','03','04','05','06','07','08','09','10','11','12']:

srcdir = '/glade/p/cesm0005/archive/b.e20.B1850.f09_g17.pi_control.all.250/rof/hist'
linkdir = '/glade/scratch/aliceb/b.e20.B1850.f09_g17.pi_control.all.250/rof/hist'

if not os.path.exists(linkdir):
os.makedirs(linkdir)

casename = 'b.e20.B1850.f09_g17.pi_control.all.250.mosart.h0'
filename = '{0}.{1}-{2}.nc'.format(casename,year,month)
os.symlink(os.path.join(srcdir, filename), os.path.join(linkdir, filename))

0 comments on commit 5b62b3e

Please sign in to comment.