Index: trunk/LMDZ.GENERIC/libf/phystd/interpolateN2H2.F90
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/interpolateN2H2.F90	(revision 878)
+++ trunk/LMDZ.GENERIC/libf/phystd/interpolateN2H2.F90	(revision 879)
@@ -1,3 +1,3 @@
-subroutine interpolateN2H2(wn,temp,presN2,presH2,abcoef,firstcall)
+subroutine interpolateN2H2(wn,temp,presN2,presH2,abcoef,firstcall,ind)
 
   !==================================================================
@@ -54,4 +54,5 @@
   double precision blah, Ttemp
   integer nres
+  integer ind
 
   if(temp.gt.400)then
@@ -107,103 +108,23 @@
      print*,'   and H2 partial pressure     ',presH2,' Pa'
 
-     call bilinearN2H2(wn_arr,temp_arr,abs_arr,wn,temp,abcoef)
+  endif
 
-     print*,'the absorption is ',abcoef,' cm^5 molecule^-2'
-     print*,'or ',abcoef*losch**2,' cm^-1 amagat^-2'
+  call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,temp,abcoef,ind)
 
-     abcoef=abcoef*losch**2*100.0*amagatN2*amagatH2 ! convert to m^-1
+!     print*,'the absorption is ',abcoef,' cm^5 molecule^-2'
+!     print*,'or ',abcoef*losch**2,' cm^-1 amagat^-2'
 
-     print*,'We have ',amagatN2,' amagats of N2'
-     print*,'and     ',amagatH2,' amagats of H2'
-     print*,'So the absorption is ',abcoef,' m^-1'
+  abcoef=abcoef*losch**2*100.0*amagatN2*amagatH2 ! convert to m^-1
 
-  else
+!     print*,'We have ',amagatN2,' amagats of N2'
+!     print*,'and     ',amagatH2,' amagats of H2'
+!     print*,'So the absorption is ',abcoef,' m^-1'
 
-     call bilinearN2H2(wn_arr,temp_arr,abs_arr,wn,temp,abcoef)
-     abcoef=abcoef*losch**2*100.0*amagatN2*amagatH2 ! convert to m^-1
 
-     ! unlike for Rayleigh scattering, we do not currently weight by the BB function
-     ! however our bands are normally thin, so this is no big deal.
+!  unlike for Rayleigh scattering, we do not currently weight by the BB function
+!  however our bands are normally thin, so this is no big deal.
 
-  endif
 
   return
 end subroutine interpolateN2H2
 
-
-!-------------------------------------------------------------------------
-subroutine bilinearN2H2(x_arr,y_arr,f2d_arr,x_in,y_in,f)
-
-  implicit none
-
-  integer nX,nY,i,j,a,b
-  parameter(nX=1914)
-  parameter(nY=10)
-
-  real*8 x_in,y_in,x,y,x1,x2,y1,y2
-  real*8 f,f11,f12,f21,f22,fA,fB
-  real*8 x_arr(nX)
-  real*8 y_arr(nY)
-  real*8 f2d_arr(nX,nY)
-
-  integer strlen
-  character*100 label
-  label='subroutine bilinear'
-
-  x=x_in
-  y=y_in
-
-  ! 1st check we're within the wavenumber range
-  if ((x.lt.x_arr(2)).or.(x.gt.x_arr(nX-2))) then
-     f=0.0D+0
-     return
-  else
-
-     ! in the x (wavenumber) direction 1st
-     i=1
-10   if (i.lt.(nX+1)) then
-        if (x_arr(i).gt.x) then
-           x1=x_arr(i-1)
-           x2=x_arr(i)
-           a=i-1
-           i=9999
-        endif
-        i=i+1
-        goto 10
-     endif
-  endif
-
-  if ((y.lt.y_arr(1)).or.(y.gt.y_arr(nY))) then
-     write(*,*) 'Warning from bilinearN2H2:'
-     write(*,*) 'Outside continuum temperature range!'
-     if(y.lt.y_arr(1))then
-        y=y_arr(1)+0.01
-     endif
-     if(y.gt.y_arr(nY))then
-        y=y_arr(nY)-0.01
-     endif
-  else
-
-     ! in the y (temperature) direction 2nd
-     j=1
-20   if (j.lt.(nY+1)) then
-        if (y_arr(j).gt.y) then
-           y1=y_arr(j-1)
-           y2=y_arr(j)
-           b=j-1
-           j=9999
-        endif
-        j=j+1
-        goto 20
-     endif
-  endif
-
-  f11=f2d_arr(a,b)
-  f21=f2d_arr(a+1,b)
-  f12=f2d_arr(a,b+1)
-  f22=f2d_arr(a+1,b+1)
-
-  call bilinear(f,f11,f21,f12,f22,x,x1,x2,y,y1,y2)
-
-  return
-end subroutine bilinearN2H2
Index: trunk/LMDZ.GENERIC/libf/phystd/sugas_corrk.F90
===================================================================
--- trunk/LMDZ.GENERIC/libf/phystd/sugas_corrk.F90	(revision 878)
+++ trunk/LMDZ.GENERIC/libf/phystd/sugas_corrk.F90	(revision 879)
@@ -593,5 +593,6 @@
          if (igas .eq. igas_N2) then
 
-            call interpolateN2N2(100.D+0,250.D+0,17500.D+0,testcont,.true.)
+            dummy = -9999
+            call interpolateN2N2(100.D+0,250.D+0,17500.D+0,testcont,.true.,dummy)
 
          elseif (igas .eq. igas_H2) then
@@ -603,5 +604,6 @@
             do jgas=1,ngasmx
                if (jgas .eq. igas_N2) then
-                  call interpolateN2H2(592.D+0,278.15D+0,200000.D+0,10000.D+0,testcont,.true.)
+                  dummy = -9999
+                  call interpolateN2H2(592.D+0,278.15D+0,200000.D+0,10000.D+0,testcont,.true.,dummy)
                elseif (jgas .eq. igas_He) then
                   dummy = -9999
@@ -616,5 +618,6 @@
                call interpolateH2Ocont_PPC(990.D+0,296.D+0,683.2D+0*2,0.D+0,testcont,.true.)
             else
-               call interpolateH2Ocont_CKD(990.D+0,296.D+0,683.2D+0*2,0.D+0,testcont,.true.)
+               dummy = -9999
+               call interpolateH2Ocont_CKD(990.D+0,296.D+0,683.2D+0*2,0.D+0,testcont,.true.,dummy)
             endif
 
