Changeset 879
- Timestamp:
- Feb 12, 2013, 12:27:38 PM (12 years ago)
- 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 )1 subroutine interpolateN2H2(wn,temp,presN2,presH2,abcoef,firstcall,ind) 2 2 3 3 !================================================================== … … 54 54 double precision blah, Ttemp 55 55 integer nres 56 integer ind 56 57 57 58 if(temp.gt.400)then … … 107 108 print*,' and H2 partial pressure ',presH2,' Pa' 108 109 109 call bilinearN2H2(wn_arr,temp_arr,abs_arr,wn,temp,abcoef)110 endif 110 111 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) 113 113 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' 115 116 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 119 118 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' 121 122 122 call bilinearN2H2(wn_arr,temp_arr,abs_arr,wn,temp,abcoef)123 abcoef=abcoef*losch**2*100.0*amagatN2*amagatH2 ! convert to m^-1124 123 125 !unlike for Rayleigh scattering, we do not currently weight by the BB function126 !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. 127 126 128 endif129 127 130 128 return 131 129 end subroutine interpolateN2H2 132 130 133 134 !-------------------------------------------------------------------------135 subroutine bilinearN2H2(x_arr,y_arr,f2d_arr,x_in,y_in,f)136 137 implicit none138 139 integer nX,nY,i,j,a,b140 parameter(nX=1914)141 parameter(nY=10)142 143 real*8 x_in,y_in,x,y,x1,x2,y1,y2144 real*8 f,f11,f12,f21,f22,fA,fB145 real*8 x_arr(nX)146 real*8 y_arr(nY)147 real*8 f2d_arr(nX,nY)148 149 integer strlen150 character*100 label151 label='subroutine bilinear'152 153 x=x_in154 y=y_in155 156 ! 1st check we're within the wavenumber range157 if ((x.lt.x_arr(2)).or.(x.gt.x_arr(nX-2))) then158 f=0.0D+0159 return160 else161 162 ! in the x (wavenumber) direction 1st163 i=1164 10 if (i.lt.(nX+1)) then165 if (x_arr(i).gt.x) then166 x1=x_arr(i-1)167 x2=x_arr(i)168 a=i-1169 i=9999170 endif171 i=i+1172 goto 10173 endif174 endif175 176 if ((y.lt.y_arr(1)).or.(y.gt.y_arr(nY))) then177 write(*,*) 'Warning from bilinearN2H2:'178 write(*,*) 'Outside continuum temperature range!'179 if(y.lt.y_arr(1))then180 y=y_arr(1)+0.01181 endif182 if(y.gt.y_arr(nY))then183 y=y_arr(nY)-0.01184 endif185 else186 187 ! in the y (temperature) direction 2nd188 j=1189 20 if (j.lt.(nY+1)) then190 if (y_arr(j).gt.y) then191 y1=y_arr(j-1)192 y2=y_arr(j)193 b=j-1194 j=9999195 endif196 j=j+1197 goto 20198 endif199 endif200 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 return209 end subroutine bilinearN2H2 -
trunk/LMDZ.GENERIC/libf/phystd/sugas_corrk.F90
r873 r879 593 593 if (igas .eq. igas_N2) then 594 594 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) 596 597 597 598 elseif (igas .eq. igas_H2) then … … 603 604 do jgas=1,ngasmx 604 605 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) 606 608 elseif (jgas .eq. igas_He) then 607 609 dummy = -9999 … … 616 618 call interpolateH2Ocont_PPC(990.D+0,296.D+0,683.2D+0*2,0.D+0,testcont,.true.) 617 619 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) 619 622 endif 620 623
Note: See TracChangeset
for help on using the changeset viewer.