Changeset 1442 for trunk/LMDZ.VENUS/libf/phyvenus/physiq.F
- Timestamp:
- Jun 4, 2015, 4:23:32 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.VENUS/libf/phyvenus/physiq.F
r1310 r1442 64 64 USE write_field_phy 65 65 USE iophy 66 usecpdet_mod, only: cpdet, t2tpot66 USE cpdet_mod, only: cpdet, t2tpot 67 67 USE chemparam_mod 68 68 USE conc … … 240 240 EXTERNAL conduction 241 241 EXTERNAL molvis 242 EXTERNAL moldiff_red 243 242 244 c 243 245 c Variables locales … … 260 262 REAL zdtime, zlongi 261 263 c 262 INTEGER i, k, iq, ig, j, ll 264 INTEGER i, k, iq, ig, j, ll, ilon, ilat, ilev 263 265 c 264 266 REAL zphi(klon,klev) … … 301 303 real d_v_molvis(klon,klev) ! (m/s) /s 302 304 305 c Tendencies due to molecular diffusion 306 real d_q_moldif(klon,klev,nqmax) 307 303 308 c 304 309 c Variables liees a l'ecriture de la bande histoire physique … … 322 327 REAL :: tr_seri(klon,klev,nqmax) 323 328 REAL :: d_tr(klon,klev,nqmax) 329 330 c Champ de modification de la temperature par rapport a VIRAII 331 REAL delta_temp(klon,klev) 332 c SAVE delta_temp 333 REAL mat_dtemp(33,50) 334 SAVE mat_dtemp 324 335 325 336 c Variables tendance sedimentation … … 493 504 C TRACEURS 494 505 C source dans couche limite 495 source = 0.0 ! pas de source, pour l'instant506 source(:,:) = 0.0 ! pas de source, pour l'instant 496 507 c--------- 497 508 … … 510 521 rnew(ig,j)=R 511 522 cpnew(ig,j)=cpdet(tmoy(j)) 512 c print*, ' physique l503' 513 c print*, j, cpdet(tmoy(j)) 514 mmean(ig,j)=RMD 523 mmean(ig,j)=RMD 515 524 akknew(ig,j)=1.e-4 516 525 enddo … … 522 531 call compo_hedin83_init2 523 532 ENDIF 524 if (callnlte ) call nlte_setup525 if (callnirco2.and.(nircorr.eq.1)) call nir_leedat533 if (callnlte.and.nltemodel.eq.2) call nlte_setup 534 if (callnirco2.and.nircorr.eq.1) call nir_leedat 526 535 c--------- 527 536 … … 627 636 endif 628 637 629 if ((nlon .GT. 1) .AND. ok_chem) then638 if ((nlon .GT. 1) .AND. (ok_chem.OR.ok_cloud)) then 630 639 c !!! DONC 3D !!! 631 640 CALL chemparam_ini() … … 636 645 CALL cloud_ini(nlon,nlev) 637 646 endif 647 648 c====================================================================== 649 c Lecture du fichier DeltaT 650 c====================================================================== 651 652 c ATTENTION tout ce qui suit est pour un 48*32*50 653 654 if (ok_deltatemp) then 655 656 print*,'lecture de VenusDeltaT.txt ' 657 open(99, form = 'formatted', status = 'old', file = 658 & 'VenusDeltaT.dat') 659 print*,'Ouverture de VenusDeltaT.txt ' 660 661 DO ilev = 1, klev 662 read(99,'(33(1x,e13.6))') (mat_dtemp(ilat,ilev),ilat=1,33) 663 print*,'lecture de VenusDeltaT.txt ligne:',ilev 664 ENDDO 665 666 close(99) 667 print*,'FIN lecture de VenusDeltaT.txt ok.' 668 669 DO k = 1, klev 670 DO i = 1, klon 671 ilat=(rlatd(i)/5.625) + 17. 672 delta_temp(i,k)=mat_dtemp(INT(ilat),k) 673 ENDDO 674 ENDDO 675 676 endif 638 677 639 678 ENDIF ! debut 640 c==================================================================== 679 c====================================================================== 641 680 c====================================================================== 642 681 … … 830 869 ! Case 3: Full chemistry and/or clouds 831 870 832 call phytrac_chimie( 871 if (ok_deltatemp) then 872 ! PRINT*,'Def de delta_temp' 873 DO k = 1, klev 874 DO i = 1, klon 875 ilat=(rlatd(i)/5.625) + 17. 876 ! PRINT*,INT(ilat),rlatd(i),mat_dtemp(INT(ilat),k) 877 delta_temp(i,k)=mat_dtemp(INT(ilat),k) 878 ENDDO 879 ENDDO 880 881 endif 882 883 if (ok_deltatemp) then 884 ! Utilisation du champ de temperature modifie 885 call phytrac_chimie( 833 886 I debut, 834 887 I gmtime, 835 888 I nqmax, 836 I nlon,889 I klon, 837 890 I rlatd, 838 891 I rlond, 839 892 I nlev, 840 893 I dtime, 841 I t_seri,pplay, 842 O tr_seri, 843 O NBRTOT, 844 O WH2SO4, 845 O rho_droplet) 894 I t_seri+delta_temp, 895 I pplay, 896 O tr_seri) 897 else 898 899 call phytrac_chimie( 900 I debut, 901 I gmtime, 902 I nqmax, 903 I klon, 904 I rlatd, 905 I rlond, 906 I nlev, 907 I dtime, 908 I t_seri, 909 I pplay, 910 O tr_seri) 911 endif 846 912 847 913 c CALL WriteField_phy('Pression',pplay,nlev) … … 856 922 if (ok_sedim) then 857 923 924 if (ok_deltatemp) then 925 ! Utilisation du champ de temperature modifie 858 926 CALL new_cloud_sedim( 859 I klon, 860 I nlev, 861 I dtime, 862 I pplay, 863 I paprs, 864 I t_seri, 865 I WH2SO4, 866 I tr_seri, 867 I nqmax, 868 I NBRTOT, 869 I rho_droplet, 870 O Fsedim, 871 O d_tr_sed, 872 O d_tr_ssed) 873 874 DO k = 1, klev 875 DO i = 1, klon 876 877 c WRITE(88,"(11(e15.8,','))") pplay(5,25), 878 c & t_seri(5,25),tr_seri(5,25,i_h2oliq), 879 c & tr_seri(5,25,i_h2o),tr_seri(5,25,i_h2so4liq), 880 c & tr_seri(5,25,i_h2so4),NBRTOT(5,25),WH2SO4(5,25), 881 c & Fsedim(5,25),d_tr_sed(5,25,1),d_tr_sed(5,25,2) 927 I klon, 928 I nlev, 929 I dtime, 930 I pplay, 931 I paprs, 932 I t_seri+delta_temp, 933 I tr_seri, 934 O d_tr_sed, 935 O d_tr_ssed, 936 I nqmax, 937 O Fsedim) 938 else 939 940 CALL new_cloud_sedim( 941 I klon, 942 I nlev, 943 I dtime, 944 I pplay, 945 I paprs, 946 I t_seri, 947 I tr_seri, 948 O d_tr_sed, 949 O d_tr_ssed, 950 I nqmax, 951 O Fsedim) 952 953 endif 954 955 DO k = 1, klev 956 DO i = 1, klon 882 957 883 958 c-------------------- … … 888 963 PRINT*,'d_tr_sed Nan?',d_tr_sed(i,k,:),'Temp',t_seri(i,k) 889 964 PRINT*,'lat-lon',i,'level',k,'dtime',dtime 890 PRINT*,' NBRTOT',NBRTOT(i,k),'F_sed',Fsedim(i,k)965 PRINT*,'F_sed',Fsedim(i,k) 891 966 PRINT*,'===============================================' 892 967 d_tr_sed(i,k,:)=0. … … 901 976 Fsedim(i,k) = Fsedim(i,k) / dtime 902 977 903 ENDDO904 978 ENDDO 979 ENDDO 905 980 906 981 Fsedim(:,klev+1) = 0. … … 988 1063 ENDDO 989 1064 ENDDO 1065 990 1066 DO iq=1, nqmax 1067 c AS: changement 1068 c Pourquoi d_tr_vdf(1,1,iq) et tr_seri(1,1,iq) 1069 c et pas d_tr_vdf(:,:,iq) tr_seri(:,:,iq) 1070 c Je vois pas en quoi cltrac ne prendrait en compte que le traceur à la surface et au point 1 en klon 1071 c 1072 1073 c Je garde le source(:,iq) parce que je comprend pas sinon source 1074 c dimension(klon,nqmax) et flux dans cltrac (klon) ??? 1075 1076 c CALL cltrac(dtime,ycoefh,t_seri, 1077 c s tr_seri(1,1,iq),source(:,iq), 1078 c e paprs, pplay,delp, 1079 c s d_tr_vdf(1,1,iq)) 1080 991 1081 CALL cltrac(dtime,ycoefh,t_seri, 992 s tr_seri( 1,1,iq),source,1082 s tr_seri(:,:,iq),source(:,iq), 993 1083 e paprs, pplay,delp, 994 s d_tr_vdf(1,1,iq)) 1084 s d_tr_vdf(:,:,iq)) 1085 995 1086 tr_seri(:,:,iq) = tr_seri(:,:,iq) + d_tr_vdf(:,:,iq) 996 1087 d_tr_vdf(:,:,iq)= d_tr_vdf(:,:,iq)/dtime ! /s 1088 1089 DO k = 1, klev 1090 DO i = 1, klon 1091 tr_seri(i,k,iq) = tr_seri(i,k,iq) + d_tr_vdf(i,k,iq) 1092 d_tr_vdf(i,k,iq)= d_tr_vdf(i,k,iq)/dtime ! /s 997 1093 ENDDO 998 endif 1094 ENDDO 1095 1096 ENDDO !nqmax 1097 1098 endif 999 1099 1000 1100 IF (if_ebil.ge.2) THEN … … 1084 1184 d_tr_ajs(:,:,:)= d_tr_ajs(:,:,:)/dtime ! /s 1085 1185 endif 1086 1087 1186 endif 1088 1187 … … 1104 1203 END IF 1105 1204 1205 1106 1206 c==================================================================== 1107 1207 c RAYONNEMENT 1108 1208 c==================================================================== 1109 1209 1110 c------------------------------------ -----------------------------------1210 c------------------------------------ 1111 1211 c . Compute radiative tendencies : 1112 1212 c------------------------------------ … … 1118 1218 c PRINT*,'dtimerad,dtime,radpas',dtimerad,dtime,radpas 1119 1219 1120 c Calcul pour Cp rnew et mmean avec traceurs (Cp independant de T !! ) 1121 IF(callnlte.or.callthermos) THEN 1220 1221 c------------------------------------ 1222 c . Compute mean mass, cp and R : 1223 c------------------------------------ 1224 1225 if(callthermos) then 1226 call concentrations2(pplay,t_seri,d_t,tr_seri, nqmax, 1227 & pdtphys) 1228 1229 endif 1230 1231 1232 cc!!! ADD key callhedin 1233 1234 IF(callnlte.or.callthermos) THEN 1122 1235 call compo_hedin83_mod(pplay,rmu0, 1123 1236 & co2vmr_gcm,covmr_gcm,ovmr_gcm,n2vmr_gcm,nvmr_gcm) 1237 1238 IF(ok_chem) then 1239 1240 CC !! GG : Using only mayor species tracers abundances to compute NLTE heating/cooling 1241 1242 CC Conversion [mmr] ---> [vmr] 1243 1244 co2vmr_gcm(:,:) = tr_seri(1:nlon,1:nlev,i_co2)* 1245 & mmean(1:nlon,1:nlev)/M_tr(i_co2) 1246 covmr_gcm(:,:) = tr_seri(1:nlon,1:nlev,i_co)* 1247 & mmean(1:nlon,1:nlev)/M_tr(i_co) 1248 ovmr_gcm(:,:) = tr_seri(1:nlon,1:nlev,i_o)* 1249 & mmean(1:nlon,1:nlev)/M_tr(i_o) 1250 n2vmr_gcm(:,:) = tr_seri(1:nlon,1:nlev,i_n2)* 1251 & mmean(1:nlon,1:nlev)/M_tr(i_n2) 1252 1253 ENDIF 1254 1124 1255 ENDIF 1125 1256 1126 if(callthermos) then 1127 call concentrations2(pplay,t_seri,d_t,co2vmr_gcm, n2vmr_gcm, 1128 & covmr_gcm, ovmr_gcm,nvmr_gcm,pdtphys) 1129 endif 1130 1131 1132 c NLTE cooling from CO2 emission 1133 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1257 c 1258 c NLTE cooling from CO2 emission 1259 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1134 1260 1135 1261 IF(callnlte) THEN 1136 1262 if(nltemodel.eq.0.or.nltemodel.eq.1) then 1137 CALL nltecool(klon, klev, pplay*9.869e-6, t_seri, 1138 $ co2vmr_gcm,n2vmr_gcm, covmr_gcm, ovmr_gcm, 1139 $ d_t_nlte) 1263 CALL nltecool(klon, klev, nqmax, pplay*9.869e-6, t_seri, 1264 $ tr_seri, d_t_nlte) 1140 1265 else if(nltemodel.eq.2) then 1141 1266 CALL nlte_tcool(klon,klev,pplay*9.869e-6, 1142 1267 $ t_seri,zzlay,co2vmr_gcm, n2vmr_gcm, covmr_gcm, 1143 1268 $ ovmr_gcm,d_t_nlte,ierr_nlte,varerr ) … … 1162 1287 $ CALL nlthermeq(klon, klev, paprs, pplay) 1163 1288 1164 1165 c LTE radiative transfert / solar / IR matrix 1166 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1167 1289 c 1290 c LTE radiative transfert / solar / IR matrix 1291 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1168 1292 CALL radlwsw 1169 1293 e (dist, rmu0, fract, zzlev, … … 1171 1295 1172 1296 1173 c 1174 c 1297 c CO2 near infrared absorption 1298 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1175 1299 1176 1300 d_t_nirco2(:,:)=0. 1177 1301 if (callnirco2) then 1178 call nirco2abs (klon, klev, pplay, dist, nqmax, qx, 1179 . rmu0, fract, d_t_nirco2, 1180 . co2vmr_gcm, ovmr_gcm) 1302 call nirco2abs (klon, klev, pplay, dist, nqmax, tr_seri, 1303 . rmu0, fract, d_t_nirco2) 1181 1304 endif 1182 1305 … … 1209 1332 IF (callthermos) THEN 1210 1333 1211 c call thermosphere(zplev,zplay,dist_sol, 1212 c $ mu0,ptimestep,ptime,zday,tsurf,zzlev,zzlay, 1213 c & pt,pq,pu,pv,pdt,pdq, 1214 c $ zdteuv,zdtconduc,zdumolvis,zdvmolvis,zdqmoldiff) 1215 1216 call euvheat(klon, klev, t_seri,paprs,pplay,zzlay, 1217 $ rmu0,pdtphys,gmtime,rjourvrai, 1218 C $ pq,pdq,zdteuv) 1219 $ co2vmr_gcm, n2vmr_gcm, covmr_gcm, 1220 $ ovmr_gcm,nvmr_gcm,d_t_euv ) 1221 1334 c call euvheat(klon, klev,t_seri,paprs,pplay,zzlay, 1335 c $ rmu0,pdtphys,gmtime,rjourvrai, co2vmr_gcm, n2vmr_gcm, 1336 c $ covmr_gcm, ovmr_gcm,d_t_euv ) 1337 call euvheat(klon, klev, nqmax, t_seri,paprs,pplay,zzlay, 1338 $ rmu0,pdtphys,gmtime,rjourvrai, 1339 $ tr_seri, d_tr, d_t_euv ) 1340 1222 1341 DO k=1,klev 1223 1342 DO ig=1,klon … … 1262 1381 call molvis(klon, klev, pdtphys, 1263 1382 $ pplay,paprs,t_seri, 1264 $ v,tsurf,zzlev,zzlay,d_ u_molvis)1383 $ v,tsurf,zzlev,zzlay,d_v_molvis) 1265 1384 1266 1385 DO k=1,klev … … 1271 1390 ENDDO 1272 1391 ENDDO 1273 1274 ENDIF ! callthermos 1392 ENDIF 1393 1394 1395 ! -- MOLECULAR DIFFUSION --- 1396 1397 d_q_moldif(:,:,:)=0 1398 1399 IF (callthermos .and. ok_chem) THEN 1400 1401 call moldiff_red(klon, klev, nqmax, 1402 & pplay,paprs,t_seri, tr_seri, pdtphys, 1403 & zzlay,d_t_euv,d_t_conduc,d_q_moldif) 1404 1405 1406 ! --- update tendencies tracers --- 1407 1408 DO iq = 1, nqmax 1409 DO k=1,klev 1410 DO ig=1,klon 1411 tr_seri(ig,k,iq)= tr_seri(ig,k,iq)+ 1412 & d_q_moldif(ig,k,iq)*dtime ! [Kg/kg]? 1413 ENDDO 1414 ENDDO 1415 ENDDO 1416 1417 1418 ENDIF ! callthermos & ok_chem 1275 1419 1276 1420 c====================================================================
Note: See TracChangeset
for help on using the changeset viewer.