#!/usr/bin/env python
#-*- coding:Utf-8 -*-

from    netCDF4               import    Dataset
from	scipy.ndimage.filters                import	gaussian_filter1d	
from	scipy.ndimage.filters                import	convolve1d
from	scipy.ndimage.filters                import	uniform_filter1d
from numpy import *		
import  numpy                 as        np
import  matplotlib.pyplot     as        mpl
import  math
from math import log
from matplotlib.colors import LogNorm
import pylab



#data2b = loadtxt('ma_tipping_digit_cont_296K.dat')

data1 = loadtxt('h2o-co2_323K_recalc_nov18_1cm_cutoff.dat')
data11 = loadtxt('h2o-co2_323K_recalc_nov18_1cm_cutoff.dat')
data2 = loadtxt('h2o-co2_323K_recalc_nov18.dat')

data1b = loadtxt('file_Ma_296K.dat')
data2b = loadtxt('file_Ma_430K.dat')
data3b=np.zeros(len(data1[:,1]),dtype='f')

for i in range(0,len(data3b),1):
   data3b[i]=data1b[i,1]+((323.-296.)/(430.-296.))*(data2b[i,1]-data1b[i,1])

mpl.figure(1)
mpl.plot(data1[:,0],data1[:,1],label='296K')
mpl.plot(data1[:,0],data11[:,1],label='cutoff 2cm')
mpl.plot(data2[:,0],data2[:,1],label='323K')
mpl.plot(data1b[:,0],data1b[:,1],label='296K Ma')
mpl.plot(data2b[:,0],data3b[:],label='323K Ma')
mpl.xlabel(r'wavenumber (cm$^{-1}$)')
mpl.ylabel(r'Absorption coefficient (cm$^{2}$ molecule$^{-1}$ atm$^{-1}$)')
mpl.legend()

mpl.show()

