Index: /dynamico_lmdz/guided/Data/job_interpolation_camelot.sh
===================================================================
--- /dynamico_lmdz/guided/Data/job_interpolation_camelot.sh	(revision 4162)
+++ /dynamico_lmdz/guided/Data/job_interpolation_camelot.sh	(revision 4163)
@@ -3,5 +3,5 @@
 #PBS -q day
 #PBS -n
-#PBS -l nodes=1:ppn=8
+#PBS -l nodes=1:ppn=64
 #PBS -l walltime=20:30:00
 #PBS -l mem=120gb
@@ -9,5 +9,4 @@
 
 #####comment:PBS -l mem=31922327552,ncpus=60
-#Jobs start in the HOME directory, cd to submitted directory
 cd "$PBS_O_WORKDIR"
 
@@ -34,12 +33,10 @@
 
 
-export OMP_NUM_THREADS=1
-export OMP_STACKSIZE=128M
+#export OMP_NUM_THREADS=1
+#export OMP_STACKSIZE=128M
 ulimit -s unlimited
 
 module load python/2.7-anaconda50
 python vertical_interpolation_camelot.py >> vertical_interpolation.log
-#mpirun -np 40 -cpus-per-proc $OMP_NUM_THREADS -bycore -bind-to-core -report-bindings ./gcm.exe >> gcm.log
-#gdb ./gcm.exe >> gcm.log
 
 
Index: /dynamico_lmdz/guided/Data/vertical_interpolation_camelot.py
===================================================================
--- /dynamico_lmdz/guided/Data/vertical_interpolation_camelot.py	(revision 4162)
+++ /dynamico_lmdz/guided/Data/vertical_interpolation_camelot.py	(revision 4163)
@@ -1,16 +1,18 @@
 from __future__ import division
-import argparse
 import numpy as np
 from netCDF4 import Dataset
-import matplotlib.pyplot as plt 
-from mpl_toolkits.basemap import Basemap
-import matplotlib.mlab as mlab
-import matplotlib.colors
 import sys 
 import os
 import math
 from scipy.interpolate import interp1d
-from matplotlib.ticker import AutoMinorLocator
 import netCDF4 as cdf
+
+
+#levels = [100., 200., 300., 500., 700., 1000., 2000., 3000., 5000., 7000., 10000., 12500., 15000., 17500., 20000., 22500.,25000., 30000., 35000., 40000., 
+#    45000., 50000., 55000., 60000., 65000., 70000., 75000., 77500., 80000., 82500., 85000., 87500., 90000., 92500., 95000., 97500., 100000.]
+levels = [1., 2., 3., 5., 7., 10., 20., 30., 50., 70., 100., 125., 150., 175., 200., 225.,250., 300., 350., 400.,
+    450., 500., 550., 600., 650., 700., 750., 775., 800., 825., 850., 875., 900., 925., 950., 975., 1000.]
+levels = levels[::-1]
+print(levels)
 
 dw1 = Dataset('2001.nc','r')
@@ -18,8 +20,10 @@
 dpfulloned = dw1.variables['level'][:]
 dpfull = np.zeros(((len(dpfulloned),dtfull.shape[2],dtfull.shape[3])))
-for l in xrange(0, len(dpfulloned)):
+#------ mb conversion
+#dpfulloned = dpfulloned *100.
+for l in range(0, len(dpfulloned)):
     dpfull[l,:,:]= dpfulloned[l]
-        
 print(dpfull)
+
 dtfull = dw1.variables['t'][:,:,:,:]
 #dPSfull = dw1.variables['PS'][:,:,:]
@@ -27,9 +31,4 @@
 lat = dw1.variables['lat'][:]
 lon = dw1.variables['lon'][:]
-levels = [100., 200., 300., 500., 700., 1000., 2000., 3000., 5000., 7000., 10000., 12500., 15000., 17500., 20000., 22500.,25000., 30000., 35000., 40000., 
-    45000., 50000., 55000., 60000., 65000., 70000., 75000., 77500., 80000., 82500., 85000., 87500., 90000., 92500., 95000., 97500., 100000.]
-
-levels = levels[::-1]
-print(levels)
 
 dim0=dtfull.shape[0]
@@ -50,15 +49,14 @@
 pfull = dpfull
 
-for t in range(dim1):
+for t in range(dim0):
     print("time step=",t)
     tfull = dtfull[t,:,:,:]
     out2 = vertical_int2(levels, pfull, tfull)
     out3[t,:,:,:]=out2[:,:,:]
-
 del tfull,dtfull
 
 dufull = dw1.variables['u'][:,:,:,:]
 out4 = np.zeros((((dim0,len(levels),dim2,dim3))))
-for t in range(dim1):
+for t in range(dim0):
     print("time step=",t)
     ufull = dufull[t,:,:,:]
@@ -69,5 +67,5 @@
 dvfull = dw1.variables['v'][:,:,:,:]
 out5 = np.zeros((((dim0,len(levels),dim2,dim3))))
-for t in range(dim1):
+for t in range(dim0):
     print("time step=",t)
     vfull = dvfull[t,:,:,:]
@@ -76,14 +74,14 @@
 del vfull,dvfull
 
+
 print("-----------------------------writing NetCDF--------------------------------")
 print(out3)
-#sys.exit(0)
 try:
     f = cdf.Dataset('interpolated_data.nc', 'w', format='NETCDF4')
 except:
     print("Error occurred while opening new netCDF file, Error: ", sys.exc_info()[0])
-levels2 = [levels[i] / 100. for i in range(len(levels))]
+#levels2 = [levels[i] / 100. for i in range(len(levels))]
+levels2 = levels
 #levels2 = [int(i) for i in levels2]
-#print(levels2)
 f.createDimension('lon', len(lon))
 f.createDimension('lat', len(lat))
