Changeset 139 in lmdz_wrf
- Timestamp:
- Jul 29, 2014, 11:41:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LMDZ_WRFmeas/WRFV3/lmdz/thermcell_main.F90
r132 r139 251 251 ! 252 252 253 ! Lluis254 INTEGER :: llp255 CHARACTER(LEN=50) :: lvarname, lfname256 REAL :: largest257 258 llp = 734259 lfname = 'physiq'260 largest = 10.e5261 262 253 ! L. Fita, LMD July 2014. Initializing variables. 263 254 ! Some not initializated according to values: iflag_trig_bl, iflag_clos_bl … … 355 346 ! -------------------------------------------------------------------- 356 347 ! 357 lfname='thermcell_main before thermcell_env'358 lvarname = 'pt'359 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.)360 lvarname = 'pdtadj'361 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.)362 lvarname = 'pplev'363 CALL check_var3D(lfname, lvarname, pplev, ngrid, nlay, largest, .FALSE.)364 365 348 CALL thermcell_env(ngrid,nlay,po,pt,pu,pv,pplay, & 366 349 & pplev,zo,zh,zl,ztv,zthl,zu,zv,zpspsk,zqsat,lev_out) 367 350 368 lfname='thermcell_main after thermcell_env'369 lvarname = 'pt'370 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.)371 lvarname = 'pdtadj'372 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.)373 lvarname = 'pplev'374 CALL check_var3D(lfname, lvarname, pplev, ngrid, nlay, largest, .FALSE.)375 376 351 if (prt_level.ge.1) print*,'thermcell_main apres thermcell_env' 377 352 … … 430 405 masse(:,l)=(pplev(:,l)-pplev(:,l+1))/RG 431 406 enddo 432 433 lfname='thermcell_main after initialization'434 lvarname = 'rhobarz'435 CALL check_var3D(lfname, lvarname, rhobarz, ngrid, nlay, largest, .FALSE.)436 lvarname = 'rho'437 CALL check_var3D(lfname, lvarname, rho, ngrid, nlay, largest, .FALSE.)438 lvarname = 'zpspsk'439 CALL check_var3D(lfname, lvarname, zpspsk, ngrid, nlay, largest, .FALSE.)440 lvarname = 'pplay'441 CALL check_var3D(lfname, lvarname, pplay, ngrid, nlay, largest, .FALSE.)442 lvarname = 'zw2'443 CALL check_var3D(lfname, lvarname, zw2, ngrid, nlay+1, largest, .FALSE.)444 407 445 408 if (prt_level.ge.1) print*,'thermcell_main apres initialisation' … … 521 484 ! Gestion temporaire de plusieurs appels à thermcell_plume au travers 522 485 ! de la variable iflag_thermals 523 lfname='thermcell_main before plume'524 lvarname = 'alim_star'525 CALL check_var3D(lfname, lvarname, alim_star, ngrid, nlay, largest, .FALSE.)526 486 527 487 ! print*,'THERM thermcell_main iflag_thermals_ed=',iflag_thermals_ed … … 543 503 544 504 endif 545 lfname='thermcell_main after thermcell_plume'546 lvarname = 'pt'547 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.)548 lvarname = 'pdtadj'549 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.)550 lvarname = 'zw2'551 CALL check_var3D(lfname, lvarname, zw2, ngrid, nlay+1, largest, .FALSE.)552 lvarname = 'alim_star'553 CALL check_var3D(lfname, lvarname, alim_star, ngrid, nlay, largest, .FALSE.)554 505 555 506 if (prt_level.ge.1) print*,'apres thermcell_plume ',lev_out … … 582 533 ! print*,"ZMAX ",lalim,lmin,linter,lmix,lmax,zmax,zmax0,zmix,wmax 583 534 584 lfname='thermcell_main after thermcell_height'585 lvarname = 'zw2'586 CALL check_var3D(lfname, lvarname, zw2, ngrid, nlay+1, largest, .FALSE.)587 588 535 call test_ltherm(ngrid,nlay,pplev,pplay,lalim,seuil,ztv,po,ztva,zqla,f_star,zw2,'thermcell_heig lalim ') 589 536 call test_ltherm(ngrid,nlay,pplev,pplay,lmin ,seuil,ztv,po,ztva,zqla,f_star,zw2,'thermcell_heig lmin ') … … 615 562 endif 616 563 617 lfname='thermcell_main after thermcell_dry'618 lvarname = 'alim_star'619 CALL check_var3D(lfname, lvarname, alim_star, ngrid, nlay, largest, .FALSE.)620 621 622 623 564 ! Choix de la fonction d'alimentation utilisee pour la fermeture. 624 565 ! Apparemment sans importance … … 655 596 !deduction des flux 656 597 !------------------------------------------------------------------------------- 657 lfname='thermcell_main before flux'658 lvarname = 'fm'659 CALL check_var3D(lfname, lvarname, fm, ngrid, nlay, largest, .FALSE.)660 lvarname = 'entr'661 CALL check_var3D(lfname, lvarname, entr, ngrid, nlay, largest, .FALSE.)662 lvarname = 'detr'663 CALL check_var3D(lfname, lvarname, detr, ngrid, nlay, largest, .FALSE.)664 lvarname = 'zqla'665 CALL check_var3D(lfname, lvarname, zqla, ngrid, nlay, largest, .FALSE.)666 lvarname = 'zw2'667 CALL check_var3D(lfname, lvarname, zw2, ngrid, nlay+1, largest, .FALSE.)668 lvarname = 'alim_star'669 CALL check_var3D(lfname, lvarname, alim_star, ngrid, nlay, largest, .FALSE.)670 671 598 CALL thermcell_flux2(ngrid,nlay,ptimestep,masse, & 672 599 & lalim,lmax,alim_star, & … … 674 601 & detr,zqla,lev_out,lunout1,igout) 675 602 !IM 060508 & detr,zqla,zmax,lev_out,lunout,igout) 676 lfname='thermcell_main after flux'677 lvarname = 'fm'678 CALL check_var3D(lfname, lvarname, fm, ngrid, nlay, largest, .FALSE.)679 lvarname = 'zw2'680 CALL check_var3D(lfname, lvarname, zw2, ngrid, nlay+1, largest, .FALSE.)681 lvarname = 'alim_star'682 CALL check_var3D(lfname, lvarname, alim_star, ngrid, nlay, largest, .FALSE.)683 603 684 604 if (prt_level.ge.1) print*,'thermcell_main apres thermcell_flux' … … 707 627 !------------------------------------------------------------------ 708 628 709 lfname='thermcell_main before transport_vertical'710 lvarname = 'zdthladj'711 CALL check_var3D(lfname, lvarname, zdthladj, ngrid, nlay, largest, .FALSE.)712 713 629 call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse, & 714 630 & zthl,zdthladj,zta,lev_out) 715 631 call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse, & 716 632 & po,pdoadj,zoa,lev_out) 717 lfname='thermcell_main after transport_vertical'718 lvarname = 'zdthladj'719 CALL check_var3D(lfname, lvarname, zdthladj, ngrid, nlay, largest, .FALSE.)720 lvarname = 'masse'721 CALL check_var3D(lfname, lvarname, masse, ngrid, nlay, largest, .FALSE.)722 723 lfname='thermcell_main before fraction ascendance'724 lvarname = 'fm'725 CALL check_var3D(lfname, lvarname, fm, ngrid, nlay, largest, .FALSE.)726 lvarname = 'zw2'727 CALL check_var3D(lfname, lvarname, zw2, ngrid, nlay+1, largest, .FALSE.)728 729 633 !------------------------------------------------------------------ 730 634 ! Calcul de la fraction de l'ascendance … … 747 651 ! calcul du transport vertical du moment horizontal 748 652 !------------------------------------------------------------------ 749 lfname='before thermcell_dv2'750 lvarname = 'pt'751 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.)752 lvarname = 'pdtadj'753 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.)754 lvarname = 'zw2'755 CALL check_var3D(lfname, lvarname, zw2, ngrid, nlay+1, largest, .FALSE.)756 lvarname = 'rhobarz'757 CALL check_var3D(lfname, lvarname, rhobarz, ngrid, nlay, largest, .FALSE.)758 lvarname = 'fraca'759 CALL check_var3D(lfname, lvarname, fraca, ngrid, nlay+1, largest, .FALSE.)760 653 761 654 !IM 090508 … … 786 679 enddo 787 680 enddo 788 lfname='after thermcell_dv2'789 lvarname = 'pt'790 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.)791 lvarname = 'pdtadj'792 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.)793 lvarname = 'zdthladj'794 CALL check_var3D(lfname, lvarname, zdthladj, ngrid, nlay, largest, .FALSE.)795 lvarname = 'zpspsk'796 CALL check_var3D(lfname, lvarname, zpspsk, ngrid, nlay, largest, .FALSE.)797 lvarname = 'pduadj'798 CALL check_var3D(lfname, lvarname, pduadj, ngrid, nlay, largest, .FALSE.)799 lvarname = 'pdvadj'800 CALL check_var3D(lfname, lvarname, pdvadj, ngrid, nlay, largest, .FALSE.)801 681 802 682 if (prt_level.ge.1) print*,'14 OK convect8' … … 883 763 enddo 884 764 enddo 885 lfname='thermcell_main calculation of wth3' 886 lvarname = 'wth3' 887 CALL check_var3D(lfname, lvarname, wth3, ngrid, nlay, largest, .FALSE.) 888 lvarname = 'fraca' 889 CALL check_var3D(lfname, lvarname, fraca, ngrid, nlay, largest, .FALSE.) 890 lvarname = 'zw2' 891 CALL check_var3D(lfname, lvarname, zw2, ngrid, nlay, largest, .FALSE.) 892 lvarname = '1-fraca' 893 CALL check_var3D(lfname, lvarname, 1./(1.-fraca), ngrid, nlay, largest, .FALSE.) 765 894 766 !calcul des flux: q, thetal et thetav 895 767 do l=1,nlay … … 918 790 if ((pplay(ig,l).ge.pcon(ig)) .and. (pplay(ig,l+1).le.pcon(ig)) .and. & 919 791 (klcl(ig).gt.0).and.(klcl(ig)+1.le.nlay-1) .and. (klcl(ig)+1.gt.0) ) then 920 ! (pplay(ig,klcl(ig)+1)-pplay(ig,klcl(ig)).ne.0.) ) then921 792 klcl(ig)=l 922 793 interp(ig)=(pcon(ig)-pplay(ig,klcl(ig)))/(pplay(ig,klcl(ig)+1)-pplay(ig,klcl(ig))) 923 IF (interp(ig) /= interp(ig)) THEN924 PRINT *,' Lluis wrong interp= ',interp(ig),' at ', ig,' klcl(ig): ', &925 klcl(ig),' klcl(ig)+1: ', klcl(ig)+1926 END IF927 794 endif 928 795 endif 929 796 enddo 930 797 enddo 931 lfname='thermcell_main calculation of LCL'932 lvarname = 'interp'933 CALL check_var3D(lfname, lvarname, interp, ngrid, nlay, largest, .FALSE.)934 lvarname = 'klcl'935 CALL check_var(lfname, lvarname, REAL(klcl), ngrid, largest, .FALSE.)936 lvarname = 'pcon'937 CALL check_var(lfname, lvarname, pcon, ngrid, largest, .FALSE.)938 lvarname = 'pplay'939 CALL check_var3D(lfname, lvarname, pplay, ngrid, nlay, largest, .FALSE.)940 lvarname = '1/pplay'941 CALL check_var3D(lfname, lvarname, 1./pplay, ngrid, nlay, largest, .FALSE.)942 943 798 944 799 !------------Hauteur des thermiques … … 967 822 enddo 968 823 !!jyg fin 969 lfname='thermcell_main before LCL'970 lvarname = 'rhobarz0'971 CALL check_var(lfname, lvarname, rhobarz0, ngrid, largest, .FALSE.)972 lvarname = 'pcon'973 CALL check_var(lfname, lvarname, pcon, ngrid, largest, .FALSE.)974 lvarname = 'fraca'975 CALL check_var3D(lfname, lvarname, fraca, ngrid, nlay+1, largest, .FALSE.)976 lvarname = 'fraca0'977 CALL check_var(lfname, lvarname, fraca0, ngrid, largest, .FALSE.)978 lvarname = 'w_conv'979 CALL check_var(lfname, lvarname, w_conv, ngrid, largest, .FALSE.)980 lvarname = 'interp'981 CALL check_var(lfname, lvarname, interp, ngrid, largest, .FALSE.)982 lvarname = 'zlcl'983 CALL check_var(lfname, lvarname, zlcl, ngrid, largest, .FALSE.)984 824 985 825 !------------Calcul des propriétés du thermique au LCL … … 1029 869 fraca0(ig)=fraca(ig,klcl(ig))+(fraca(ig,klcl(ig)+1) & 1030 870 & -fraca(ig,klcl(ig)))*interp(ig) 1031 IF (fraca0(ig) /= fraca0(ig) .OR. ABS(fraca0(ig)) > largest*10.e5) THEN1032 PRINT *,' Lluis wrong fraca0(ig): ',fraca0(ig),' at : ',ig1033 PRINT *,' klcl(ig): ', klcl(ig),' klcl(ig)+1: ',klcl(ig)+1, &1034 ' fraca(ig,klcl(ig)): ',fraca(ig,klcl(ig)),' fraca(ig,klcl(ig)+1): ', &1035 fraca(ig,klcl(ig)+1), ' interp(ig): ',interp(ig)1036 END IF1037 1038 871 w0(ig)=zw2(ig,klcl(ig))+(zw2(ig,klcl(ig)+1) & 1039 872 & -zw2(ig,klcl(ig)))*interp(ig) 1040 873 w_conv(ig)=w_ls(ig,klcl(ig))+(w_ls(ig,klcl(ig)+1) & 1041 874 & -w_ls(ig,klcl(ig)))*interp(ig) 1042 IF (w_conv(ig) /= w_conv(ig) .OR. ABS(w_conv(ig)) > largest*10.e5) THEN1043 PRINT *,' Lluis wrong w_conv(ig): ',w_conv(ig),' at : ',ig1044 PRINT *,' klcl(ig): ', klcl(ig),' klcl(ig)+1: ',klcl(ig)+1, &1045 ' w_ls(ig,klcl(ig)): ',w_ls(ig,klcl(ig)),' w_ls(ig,klcl(ig)+1): ', &1046 w_ls(ig,klcl(ig)+1), ' interp(ig): ',interp(ig)1047 END IF1048 875 therm_tke_max0(ig)=therm_tke_max(ig,klcl(ig)) & 1049 876 & +(therm_tke_max(ig,klcl(ig)+1)-therm_tke_max(ig,klcl(ig)))*interp(ig) … … 1056 883 if (pbl_tke_max0(ig).ge.20.) pbl_tke_max0(ig)=20. 1057 884 else 1058 IF (fraca0(ig) /= fraca0(ig) .OR. ABS(fraca0(ig)) > largest*10.e5) THEN1059 PRINT *,' Lluis wrong fraca0(ig): ',fraca0(ig),' at : ',ig1060 PRINT *,' klcl(ig): ', klcl(ig),' klcl(ig)+1: ',klcl(ig)+1, &1061 ' fraca(ig,klcl(ig)): ',fraca(ig,klcl(ig)),' fraca(ig,klcl(ig)+1): ', &1062 fraca(ig,klcl(ig)+1), ' interp(ig): ',interp(ig)1063 END IF1064 IF (w_conv(ig) /= w_conv(ig) .OR. ABS(w_conv(ig)) > largest*10.e5) THEN1065 PRINT *,' Lluis wrong w_conv(ig): ',w_conv(ig),' at : ',ig1066 PRINT *,' klcl(ig): ', klcl(ig),' klcl(ig)+1: ',klcl(ig)+1, &1067 ' w_ls(ig,klcl(ig)): ',w_ls(ig,klcl(ig)),' w_ls(ig,klcl(ig)+1): ', &1068 w_ls(ig,klcl(ig)+1), ' interp(ig): ',interp(ig)1069 END IF1070 885 fraca0(ig)=0. 1071 886 w0(ig)=0. … … 1137 952 ENDIF ! iflag_trig_bl 1138 953 ! print *,'ENDIF iflag_trig_bl' !!jyg 1139 lfname='thermcell_main before closure'1140 lvarname = 'pt'1141 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.)1142 lvarname = 'pdtadj'1143 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.)1144 lvarname = 'rhobarz0'1145 CALL check_var(lfname, lvarname, rhobarz0,ngrid, largest, .FALSE.)1146 lvarname = 'fraca0'1147 CALL check_var(lfname, lvarname, fraca0,ngrid, largest, .FALSE.)1148 lvarname = 'w_conv'1149 CALL check_var(lfname, lvarname, w_conv,ngrid, largest, .FALSE.)1150 lvarname = 'interp'1151 CALL check_var(lfname, lvarname, interp,ngrid, largest, .FALSE.)1152 lvarname = 'w0'1153 CALL check_var(lfname, lvarname, w0,ngrid, largest, .FALSE.)1154 lvarname = 'therm_tke_max0'1155 CALL check_var(lfname, lvarname, therm_tke_max0,ngrid, largest, .FALSE.)1156 lvarname = 'env_tke_max0'1157 CALL check_var(lfname, lvarname, env_tke_max0,ngrid, largest, .FALSE.)1158 lvarname = 'pbl_tke_max0'1159 CALL check_var(lfname, lvarname, pbl_tke_max0,ngrid, largest, .FALSE.)1160 954 !------------Closure------------------ 1161 955 … … 1184 978 1185 979 ENDIF ! (iflag_clos_bl.ge.1) 1186 lfname='thermcell main after closure'1187 lvarname = 'pt'1188 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.)1189 lvarname = 'pdtadj'1190 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.)1191 lvarname = 'alp_bl_det'1192 CALL check_var(lfname, lvarname, alp_bl_det,ngrid, largest, .FALSE.)1193 lvarname = 'rhobarz0'1194 CALL check_var(lfname, lvarname, rhobarz0,ngrid, largest, .FALSE.)1195 lvarname = 'fraca0'1196 CALL check_var(lfname, lvarname, fraca0,ngrid, largest, .FALSE.)1197 lvarname = 'w_conv'1198 CALL check_var(lfname, lvarname, w_conv,ngrid, largest, .FALSE.)1199 lvarname = 'w0'1200 CALL check_var(lfname, lvarname, w0,ngrid, largest, .FALSE.)1201 lvarname = 'alp_bl_fluct_m'1202 CALL check_var(lfname, lvarname, alp_bl_fluct_m,ngrid, largest, .FALSE.)1203 lvarname = 'alp_bl_fluct_tke'1204 CALL check_var(lfname, lvarname, alp_bl_fluct_tke,ngrid, largest, .FALSE.)1205 lvarname = 'therm_tke_max0'1206 CALL check_var(lfname, lvarname, therm_tke_max0,ngrid, largest, .FALSE.)1207 lvarname = 'env_tke_max0'1208 CALL check_var(lfname, lvarname, env_tke_max0,ngrid, largest, .FALSE.)1209 lvarname = 'pbl_tke_max0'1210 CALL check_var(lfname, lvarname, pbl_tke_max0,ngrid, largest, .FALSE.)1211 lvarname = 'alp_bl_conv'1212 CALL check_var(lfname, lvarname, alp_bl_conv,ngrid, largest, .FALSE.)1213 lvarname = 'alp_bl_stat'1214 CALL check_var(lfname, lvarname, alp_bl_stat,ngrid, largest, .FALSE.)1215 980 1216 981 !!! fin nrlmd le 10/04/2012 … … 1249 1014 enddo 1250 1015 enddo 1251 lfname='after calculation of Al[p/e]_bl'1252 lvarname = 'fm'1253 CALL check_var3D(lfname, lvarname, fm, ngrid, nlay, largest, .FALSE.)1254 lvarname = 'rhobarz'1255 CALL check_var3D(lfname, lvarname, rhobarz, ngrid, nlay, largest, .FALSE.)1256 lvarname = 'wth3'1257 CALL check_var3D(lfname, lvarname, wth3, ngrid, nlay, largest, .FALSE.)1258 lvarname = 'Alp_bl'1259 CALL check_var(lfname, lvarname, Alp_bl, ngrid, largest, .FALSE.)1260 lvarname = 'Ale_bl'1261 CALL check_var(lfname, lvarname, Ale_bl, ngrid, largest, .FALSE.)1262 1016 1263 1017 ! assez bizarre car, si on est dans la couche d'alim et que alim_star et … … 1314 1068 Alp_bl(:)=alp_bl_k*Alp_bl(:) 1315 1069 1316 lfname='thermcell_main last computations on Alp_bl'1317 lvarname = 'pplay'1318 CALL check_var3D(lfname, lvarname, pplay, ngrid, nlay, largest*10.e4, .FALSE.)1319 lvarname = 'alp_int'1320 CALL check_var(lfname, lvarname, alp_int, ngrid, largest*10.e4, .FALSE.)1321 lvarname = 'dp_int'1322 CALL check_var(lfname, lvarname, dp_int, ngrid, largest, .FALSE.)1323 lvarname = 'Alp_bl'1324 CALL check_var(lfname, lvarname, Alp_bl, ngrid, largest, .FALSE.)1325 1326 1070 !------------------------------------------------------------------------ 1327 1071 … … 1373 1117 1374 1118 if (prt_level.ge.1) print*,'thermcell_main FIN OK' 1375 1376 lfname='before leaving thermcell_main'1377 lvarname = 'pt'1378 CALL check_var3D(lfname, lvarname, pt, ngrid, nlay, largest, .FALSE.)1379 lvarname = 'pdtadj'1380 CALL check_var3D(lfname, lvarname, pdtadj, ngrid, nlay, largest, .FALSE.)1381 lvarname = 'Alp_bl'1382 CALL check_var(lfname, lvarname, Alp_bl, ngrid, largest, .FALSE.)1383 lvarname = 'Ale_bl'1384 CALL check_var(lfname, lvarname, Ale_bl, ngrid, largest, .FALSE.)1385 1386 1119 1387 1120 return
Note: See TracChangeset
for help on using the changeset viewer.