Changeset 1301 for trunk/LMDZ.VENUS/libf/phyvenus/load_ksi.F
- Timestamp:
- Jun 26, 2014, 12:25:31 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.VENUS/libf/phyvenus/load_ksi.F
r892 r1301 23 23 C MODIFICATIONS. 24 24 C -------------- 25 C version multimatrice (topographie, sommet nuages): 20/12/2006 25 C 26 c New ksi matrix: possibility of different cloud model fct of lat 05/2014 26 27 C ------------------------------------------------------------------ 27 28 C … … 30 31 c inputs 31 32 real psurf(klon) ! Surface pressure 32 real ztop(klon) ! Altitude of the top of cloud deck (km)33 33 c outputs 34 34 real ksive(0:klev+1,0:klev+1,nnuve,nbmat) ! ksi matrixes in Vincent's file 35 35 36 36 c local variables 37 integer i,j,ig,band,pve,nlve 38 integer mat,Nb,m,Nmat,nl_init,mat0 39 parameter(nl_init=8) 37 integer i,j,isza,ips,band,pve,sve,nlve 38 integer lat,Nb,m,mat 40 39 character*9 tmp1 41 40 character*100 file 41 CHARACTER*2 str2 42 42 real lambda(nnuve) ! wavelenght in table (mu->m, middle of interval) 43 43 real lambdamin(nnuve),lambdamax(nnuve) ! in microns 44 real dlambda ! cm-144 real dlambda ! in microns 45 45 46 46 nlve = klev … … 53 53 open(10,file=file) 54 54 55 do i=1,nl_init-1 56 read(10,*) 57 enddo 58 read(10,*) (tmp1,i=1,4),Nmat 55 read(10,*) 56 read(10,*) nlatve 57 read(10,*) 59 58 60 if (nbmat.ne.Nmat) then 61 write(*,*) 'This is subroutine load_ksi' 62 print*,'Probleme de dimension entre ksi.txt et le param nbmat' 63 print*,'Nb matrices = ',nbmat,Nmat 64 stop 65 endif 66 67 do mat=1,nbmat 59 write(*,*) 'This is subroutine load_ksi' 60 write(*,*) 'Nb of lat bands:',nlatve 61 62 do lat=1,nlatve 63 read(10,*) !line for lat range 64 read(10,*) indexve(lat) 65 read(10,*) nbpsve(lat) 68 66 read(10,*) 69 read(10,*) 67 read(10,*) nbszave(lat) 68 read(10,*) 69 70 do isza=1,nbszave(lat) 71 do ips=1,nbpsve(lat) 72 73 read(10,*) (tmp1,j=1,3),mat !line for matrix number 70 74 read(10,*) (tmp1,j=1,2),pve 71 psurfve( mat) = pve*1.e5 ! pve en bar, psurfve en Pa72 read(10,*) (tmp1,j=1, 7),ztopve(mat)73 ztopve(mat) = ztopve(mat)*1.e-3 ! passage en km 75 psurfve(ips,lat) = pve*1.e5 ! pve in bar, psurfve in Pa 76 read(10,*) (tmp1,j=1,3),sve 77 szave(isza,lat) = cos(sve*RPI/180.) ! conversion in mu0 74 78 read(10,*) 75 79 read(10,*) m,Nb 76 80 if (m.ne.nlve) then 77 81 write(*,*) 'This is subroutine load_ksi' 78 print*,' Probleme de dimension entre ksi.txt et le paramnlve'82 print*,'Dimension problem between ksi.txt and nlve' 79 83 print*,'N levels = ',m,nlve 80 84 stop … … 82 86 if (Nb.ne.nnuve) then 83 87 write(*,*) 'This is subroutine load_ksi' 84 print*,' Probleme de dimension entre ksi.txt et le paramnnuve'88 print*,'Dimension problem between ksi.txt and nnuve' 85 89 print*,'N freq = ',Nb,nnuve 86 90 stop 87 91 endif 88 92 c Now reading ksi matrix index "mat" 93 write(str2,'(i2.2)') m+2 89 94 do band=1,Nb 90 95 read(10,*) lambdamin(band),lambdamax(band) 91 96 do i=0,m+1 92 read(10,'( 100e17.9)') (ksive(i,j,band,mat),j=0,m+1) ! sr/µm/cm¯¹97 read(10,'('//str2//'e17.9)') (ksive(i,j,band,mat),j=0,m+1) ! no unit 93 98 enddo ! i 94 99 enddo ! band 95 100 c print*,"Matrice ",mat," lue" 96 c print*," psurf=",psurfve(mat)," bars, Ztop=",ztopve(mat)," km" 97 enddo ! mat 101 c print*," psurf=",psurfve(ips,lat)," bars" 102 if (mat+1.gt.nbmat) then 103 write(*,*) 'This is subroutine load_ksi' 104 print*,'Dimension problem between ksi.txt and nbmat' 105 print*,'(max number of matrixes)' 106 print*,'nbmat (in comcstVE.h) should be raised' 107 stop 108 endif 109 110 enddo ! ips 111 enddo ! isza 112 enddo ! lat 113 114 write(*,*) 'Total nb of matrixes:',mat 98 115 99 116 close(10) 100 117 101 c longueur d'onde centrale et largeur de chaque bande118 c central wavelength and wavelength width 102 119 do band=1,nnuve 103 lambda(band)=(lambdamin(band)+lambdamax(band))/2.*1.e-6 ! en m104 dlambda =( 1./lambdamin(band)-1./lambdamax(band))*1.e4 ! en cm-1120 lambda(band)=(lambdamin(band)+lambdamax(band))/2.*1.e-6 ! in m 121 dlambda =(lambdamax(band)-lambdamin(band)) ! in microns 105 122 c print*,band,lambdamin(band),dlambda,lambdamax(band) 106 123 107 c changement de convention (signe) pour ksi,108 c et prise en compte de la largeur de bande (en cm-1):124 c sign convention for ksi, 125 c and taking into account the wavelength width (in microns): 109 126 do mat=1,nbmat 110 127 do i=0,nlve+1 111 128 do j=0,nlve+1 112 ksive(i,j,band,mat) = -ksive(i,j,band,mat)*dlambda129 ksive(i,j,band,mat) = +ksive(i,j,band,mat)*dlambda ! in µm 113 130 enddo 114 131 enddo 115 132 enddo 116 c c alcul des coeff al et bl pour luminance Planck133 c computing coeff al and bl for Planck luminance 117 134 al(band) = 2.*RHPLA*RCLUM*RCLUM/(lambda(band))**5. 118 c cette luminance doit etre en W/m²/sr/µm pour correspondre au calcul119 c des ksi. Ici, elle est en W/m²/sr/m donc il faut mettre un facteur 1.e-6135 c in W/m²/m 136 c We need W/m²/µm : 120 137 . * 1.e-6 121 138 bl(band) = RHPLA*RCLUM/(RKBOL*lambda(band))
Note: See TracChangeset
for help on using the changeset viewer.