Ignore:
Timestamp:
Feb 12, 2013, 12:27:38 PM (12 years ago)
Author:
jleconte
Message:

forgot two files in previous commit

Location:
trunk/LMDZ.GENERIC/libf/phystd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateN2H2.F90

    r716 r879  
    1 subroutine interpolateN2H2(wn,temp,presN2,presH2,abcoef,firstcall)
     1subroutine interpolateN2H2(wn,temp,presN2,presH2,abcoef,firstcall,ind)
    22
    33  !==================================================================
     
    5454  double precision blah, Ttemp
    5555  integer nres
     56  integer ind
    5657
    5758  if(temp.gt.400)then
     
    107108     print*,'   and H2 partial pressure     ',presH2,' Pa'
    108109
    109      call bilinearN2H2(wn_arr,temp_arr,abs_arr,wn,temp,abcoef)
     110  endif
    110111
    111      print*,'the absorption is ',abcoef,' cm^5 molecule^-2'
    112      print*,'or ',abcoef*losch**2,' cm^-1 amagat^-2'
     112  call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,temp,abcoef,ind)
    113113
    114      abcoef=abcoef*losch**2*100.0*amagatN2*amagatH2 ! convert to m^-1
     114!     print*,'the absorption is ',abcoef,' cm^5 molecule^-2'
     115!     print*,'or ',abcoef*losch**2,' cm^-1 amagat^-2'
    115116
    116      print*,'We have ',amagatN2,' amagats of N2'
    117      print*,'and     ',amagatH2,' amagats of H2'
    118      print*,'So the absorption is ',abcoef,' m^-1'
     117  abcoef=abcoef*losch**2*100.0*amagatN2*amagatH2 ! convert to m^-1
    119118
    120   else
     119!     print*,'We have ',amagatN2,' amagats of N2'
     120!     print*,'and     ',amagatH2,' amagats of H2'
     121!     print*,'So the absorption is ',abcoef,' m^-1'
    121122
    122      call bilinearN2H2(wn_arr,temp_arr,abs_arr,wn,temp,abcoef)
    123      abcoef=abcoef*losch**2*100.0*amagatN2*amagatH2 ! convert to m^-1
    124123
    125      ! unlike for Rayleigh scattering, we do not currently weight by the BB function
    126      ! however our bands are normally thin, so this is no big deal.
     124! unlike for Rayleigh scattering, we do not currently weight by the BB function
     125! however our bands are normally thin, so this is no big deal.
    127126
    128   endif
    129127
    130128  return
    131129end subroutine interpolateN2H2
    132130
    133 
    134 !-------------------------------------------------------------------------
    135 subroutine bilinearN2H2(x_arr,y_arr,f2d_arr,x_in,y_in,f)
    136 
    137   implicit none
    138 
    139   integer nX,nY,i,j,a,b
    140   parameter(nX=1914)
    141   parameter(nY=10)
    142 
    143   real*8 x_in,y_in,x,y,x1,x2,y1,y2
    144   real*8 f,f11,f12,f21,f22,fA,fB
    145   real*8 x_arr(nX)
    146   real*8 y_arr(nY)
    147   real*8 f2d_arr(nX,nY)
    148 
    149   integer strlen
    150   character*100 label
    151   label='subroutine bilinear'
    152 
    153   x=x_in
    154   y=y_in
    155 
    156   ! 1st check we're within the wavenumber range
    157   if ((x.lt.x_arr(2)).or.(x.gt.x_arr(nX-2))) then
    158      f=0.0D+0
    159      return
    160   else
    161 
    162      ! in the x (wavenumber) direction 1st
    163      i=1
    164 10   if (i.lt.(nX+1)) then
    165         if (x_arr(i).gt.x) then
    166            x1=x_arr(i-1)
    167            x2=x_arr(i)
    168            a=i-1
    169            i=9999
    170         endif
    171         i=i+1
    172         goto 10
    173      endif
    174   endif
    175 
    176   if ((y.lt.y_arr(1)).or.(y.gt.y_arr(nY))) then
    177      write(*,*) 'Warning from bilinearN2H2:'
    178      write(*,*) 'Outside continuum temperature range!'
    179      if(y.lt.y_arr(1))then
    180         y=y_arr(1)+0.01
    181      endif
    182      if(y.gt.y_arr(nY))then
    183         y=y_arr(nY)-0.01
    184      endif
    185   else
    186 
    187      ! in the y (temperature) direction 2nd
    188      j=1
    189 20   if (j.lt.(nY+1)) then
    190         if (y_arr(j).gt.y) then
    191            y1=y_arr(j-1)
    192            y2=y_arr(j)
    193            b=j-1
    194            j=9999
    195         endif
    196         j=j+1
    197         goto 20
    198      endif
    199   endif
    200 
    201   f11=f2d_arr(a,b)
    202   f21=f2d_arr(a+1,b)
    203   f12=f2d_arr(a,b+1)
    204   f22=f2d_arr(a+1,b+1)
    205 
    206   call bilinear(f,f11,f21,f12,f22,x,x1,x2,y,y1,y2)
    207 
    208   return
    209 end subroutine bilinearN2H2
  • trunk/LMDZ.GENERIC/libf/phystd/sugas_corrk.F90

    r873 r879  
    593593         if (igas .eq. igas_N2) then
    594594
    595             call interpolateN2N2(100.D+0,250.D+0,17500.D+0,testcont,.true.)
     595            dummy = -9999
     596            call interpolateN2N2(100.D+0,250.D+0,17500.D+0,testcont,.true.,dummy)
    596597
    597598         elseif (igas .eq. igas_H2) then
     
    603604            do jgas=1,ngasmx
    604605               if (jgas .eq. igas_N2) then
    605                   call interpolateN2H2(592.D+0,278.15D+0,200000.D+0,10000.D+0,testcont,.true.)
     606                  dummy = -9999
     607                  call interpolateN2H2(592.D+0,278.15D+0,200000.D+0,10000.D+0,testcont,.true.,dummy)
    606608               elseif (jgas .eq. igas_He) then
    607609                  dummy = -9999
     
    616618               call interpolateH2Ocont_PPC(990.D+0,296.D+0,683.2D+0*2,0.D+0,testcont,.true.)
    617619            else
    618                call interpolateH2Ocont_CKD(990.D+0,296.D+0,683.2D+0*2,0.D+0,testcont,.true.)
     620               dummy = -9999
     621               call interpolateH2Ocont_CKD(990.D+0,296.D+0,683.2D+0*2,0.D+0,testcont,.true.,dummy)
    619622            endif
    620623
Note: See TracChangeset for help on using the changeset viewer.