- Timestamp:
- Sep 8, 2023, 1:55:07 AM (15 months ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/calltherm.F90
r4657 r4678 4 4 subroutine calltherm(dtime & 5 5 & ,pplay,paprs,pphi,weak_inversion & 6 & ,u_seri ,v_seri,t_seri,q_seri,zqsat,debut &6 & ,u_seri_,v_seri_,t_seri_,q_seri_,zqsat,debut & 7 7 & ,d_u_ajs,d_v_ajs,d_t_ajs,d_q_ajs & 8 8 & ,fm_therm,entr_therm,detr_therm,zqasc,clwcon0,lmax,ratqscth, & … … 55 55 INTEGER nbptspb 56 56 57 REAL u_seri(klon,klev),v_seri(klon,klev) 58 REAL t_seri(klon,klev),q_seri(klon,klev),qmemoire(klon,klev) 57 REAL, DIMENSION(klon,klev), INTENT(IN) :: u_seri_,v_seri_ 58 REAL, DIMENSION(klon,klev), INTENT(IN) :: t_seri_,q_seri_ 59 REAL, DIMENSION(klon,klev) :: u_seri,v_seri 60 REAL, DIMENSION(klon,klev) :: t_seri,q_seri 61 REAL, DIMENSION(klon,klev) :: qmemoire 59 62 REAL weak_inversion(klon) 60 63 REAL paprs(klon,klev+1) … … 165 168 first=.false. 166 169 endif 170 171 u_seri(:,:)=u_seri_(:,:) 172 v_seri(:,:)=v_seri_(:,:) 173 t_seri(:,:)=t_seri_(:,:) 174 q_seri(:,:)=q_seri_(:,:) 167 175 168 176 ! Incrementer le compteur de la physique -
LMDZ6/trunk/libf/phylmd/lmdz_thermcell_main.F90
r4590 r4678 2 2 ! $Id$ 3 3 ! 4 ! A REGARDER !!!!!!!!!!!!!!!!! 5 ! ATTENTION : zpspsk est inout et out mais c'est pas forcement pour de bonnes raisons (FH, 2023) 4 6 CONTAINS 5 7 6 8 subroutine thermcell_main(itap,ngrid,nlay,ptimestep & 7 9 & ,pplay,pplev,pphi,debut & 8 & ,pu,pv,pt,p o &10 & ,pu,pv,pt,p_o & 9 11 & ,pduadj,pdvadj,pdtadj,pdoadj & 10 12 & ,fm0,entr0,detr0,zqta,zqla,lmax & … … 104 106 real, intent(in) :: ptimestep 105 107 real, intent(in), dimension(ngrid,nlay) :: pt,pu,pv,pplay,pphi 106 ! ATTENTION : po et zpspsk sont inout et out mais c'est pas forcement pour de bonnes raisons (FH, 2023)107 real, intent(in out), dimension(ngrid,nlay) :: po108 ! ATTENTION : zpspsk est inout et out mais c'est pas forcement pour de bonnes raisons (FH, 2023) 109 real, intent(in), dimension(ngrid,nlay) :: p_o 108 110 real, intent(out), dimension(ngrid,nlay) :: zpspsk 109 111 real, intent(in), dimension(ngrid,nlay+1) :: pplev … … 142 144 integer,dimension(ngrid) :: lmin,lmix,lmix_bis,nivcon 143 145 real, dimension(ngrid,nlay) :: ztva_est 144 real, dimension(ngrid,nlay) :: deltaz,zlay,zh,zdthladj,zu,zv,z o,zl,zva,zua,zoa146 real, dimension(ngrid,nlay) :: deltaz,zlay,zh,zdthladj,zu,zv,z_o,zl,zva,zua,z_oa 145 147 real, dimension(ngrid,nlay) :: zta,zha,q2,wq,wthl,wthv,thetath2,wth2 146 148 real, dimension(ngrid,nlay) :: rho,masse … … 200 202 ! -------------------------------------------------------------------- 201 203 ! 202 CALL thermcell_env(ngrid,nlay,p o,pt,pu,pv,pplay, &203 & pplev,z o,zh,zl,ztv,zthl,zu,zv,zpspsk,zqsat,lev_out)204 CALL thermcell_env(ngrid,nlay,p_o,pt,pu,pv,pplay, & 205 & pplev,z_o,zh,zl,ztv,zthl,zu,zv,zpspsk,zqsat,lev_out) 204 206 205 207 if (prt_level.ge.1) print*,'thermcell_main apres thermcell_env' … … 215 217 ! wh,wt,wo ... 216 218 ! 217 ! + + + + + + + + + + + zh,zu,zv,z o,rho219 ! + + + + + + + + + + + zh,zu,zv,z_o,rho 218 220 ! 219 221 ! … … 343 345 if (iflag_thermals_ed<=9) then 344 346 ! print*,'THERM NOUVELLE/NOUVELLE Arnaud' 345 CALL thermcell_plume_6A(itap,ngrid,nlay,ptimestep,ztv,zthl,p o,zl,rhobarz,&347 CALL thermcell_plume_6A(itap,ngrid,nlay,ptimestep,ztv,zthl,p_o,zl,rhobarz,& 346 348 & zlev,pplev,pphi,zpspsk,alim_star,alim_star_tot, & 347 349 & lalim,f0,detr_star,entr_star,f_star,csc,ztva, & … … 351 353 elseif (iflag_thermals_ed<=19) then 352 354 ! print*,'THERM RIO et al 2010, version d Arnaud' 353 CALL thermcell_plume_5B(itap,ngrid,nlay,ptimestep,ztv,zthl,p o,zl,rhobarz,&355 CALL thermcell_plume_5B(itap,ngrid,nlay,ptimestep,ztv,zthl,p_o,zl,rhobarz,& 354 356 & zlev,pplev,pphi,zpspsk,alim_star,alim_star_tot, & 355 357 & lalim,f0,detr_star,entr_star,f_star,csc,ztva, & … … 357 359 & ,lev_out,lunout1,igout) 358 360 else 359 CALL thermcell_plume(itap,ngrid,nlay,ptimestep,ztv,zthl,p o,zl,rhobarz,&361 CALL thermcell_plume(itap,ngrid,nlay,ptimestep,ztv,zthl,p_o,zl,rhobarz,& 360 362 & zlev,pplev,pphi,zpspsk,alim_star,alim_star_tot, & 361 363 & lalim,f0,detr_star,entr_star,f_star,csc,ztva, & … … 366 368 if (prt_level.ge.1) print*,'apres thermcell_plume ',lev_out 367 369 368 call test_ltherm(ngrid,nlay,pplay,lalim,ztv,p o,ztva,zqla,f_star,zw2,'thermcell_plum lalim ')369 call test_ltherm(ngrid,nlay,pplay,lmix ,ztv,p o,ztva,zqla,f_star,zw2,'thermcell_plum lmix ')370 call test_ltherm(ngrid,nlay,pplay,lalim,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_plum lalim ') 371 call test_ltherm(ngrid,nlay,pplay,lmix ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_plum lmix ') 370 372 371 373 if (prt_level.ge.1) print*,'thermcell_main apres thermcell_plume' … … 395 397 396 398 397 call test_ltherm(ngrid,nlay,pplay,lalim,ztv,p o,ztva,zqla,f_star,zw2,'thermcell_heig lalim ')398 call test_ltherm(ngrid,nlay,pplay,lmin ,ztv,p o,ztva,zqla,f_star,zw2,'thermcell_heig lmin ')399 call test_ltherm(ngrid,nlay,pplay,lmix ,ztv,p o,ztva,zqla,f_star,zw2,'thermcell_heig lmix ')400 call test_ltherm(ngrid,nlay,pplay,lmax ,ztv,p o,ztva,zqla,f_star,zw2,'thermcell_heig lmax ')399 call test_ltherm(ngrid,nlay,pplay,lalim,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_heig lalim ') 400 call test_ltherm(ngrid,nlay,pplay,lmin ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_heig lmin ') 401 call test_ltherm(ngrid,nlay,pplay,lmix ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_heig lmix ') 402 call test_ltherm(ngrid,nlay,pplay,lmax ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_heig lmax ') 401 403 402 404 if (prt_level.ge.1) print*,'thermcell_main apres thermcell_height' … … 411 413 412 414 413 call test_ltherm(ngrid,nlay,pplay,lmin,ztv,p o,ztva,zqla,f_star,zw2,'thermcell_dry lmin ')414 call test_ltherm(ngrid,nlay,pplay,lalim,ztv,p o,ztva,zqla,f_star,zw2,'thermcell_dry lalim ')415 call test_ltherm(ngrid,nlay,pplay,lmin,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_dry lmin ') 416 call test_ltherm(ngrid,nlay,pplay,lalim,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_dry lalim ') 415 417 416 418 if (prt_level.ge.1) print*,'thermcell_main apres thermcell_dry' … … 477 479 478 480 if (prt_level.ge.1) print*,'thermcell_main apres thermcell_flux' 479 call test_ltherm(ngrid,nlay,pplay,lalim,ztv,p o,ztva,zqla,f_star,zw2,'thermcell_flux lalim ')480 call test_ltherm(ngrid,nlay,pplay,lmax ,ztv,p o,ztva,zqla,f_star,zw2,'thermcell_flux lmax ')481 call test_ltherm(ngrid,nlay,pplay,lalim,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_flux lalim ') 482 call test_ltherm(ngrid,nlay,pplay,lmax ,ztv,p_o,ztva,zqla,f_star,zw2,'thermcell_flux lmax ') 481 483 482 484 !------------------------------------------------------------------ … … 523 525 ! we want to transport potential temperature, total water and momentum 524 526 CALL thermcell_updown_dq(ngrid,nlay,ptimestep,lmax,entr0,detr0,entrdn,detrdn,masse,zthl,zdthladj) 525 CALL thermcell_updown_dq(ngrid,nlay,ptimestep,lmax,entr0,detr0,entrdn,detrdn,masse,p o,pdoadj)527 CALL thermcell_updown_dq(ngrid,nlay,ptimestep,lmax,entr0,detr0,entrdn,detrdn,masse,p_o,pdoadj) 526 528 CALL thermcell_updown_dq(ngrid,nlay,ptimestep,lmax,entr0,detr0,entrdn,detrdn,masse,zu,pduadj) 527 529 CALL thermcell_updown_dq(ngrid,nlay,ptimestep,lmax,entr0,detr0,entrdn,detrdn,masse,zv,pdvadj) … … 531 533 call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse, & 532 534 & zthl,zdthladj,zta,lev_out) 535 536 do ll=1,nlay 537 print*,'Z_O ',ll,z_o(1,ll),p_o(1,ll)-z_o(1,ll) 538 do ig=1,ngrid 539 z_o(ig,ll)=p_o(ig,ll) 540 enddo 541 enddo 533 542 call thermcell_dq(ngrid,nlay,dqimpl,ptimestep,fm0,entr0,masse, & 534 & po,pdoadj,zoa,lev_out)543 & z_o,pdoadj,z_oa,lev_out) 535 544 536 545 #ifdef ISO … … 565 574 if (iso_HDO.gt.0) then 566 575 call iso_verif_aberrant_encadre(xtpo(iso_hdo,ig,ll) & 567 & /p o(ig,ll),'thermcell_main 610')576 & /p_o(ig,ll),'thermcell_main 610') 568 577 endif 569 578 enddo … … 623 632 !nouveau calcul 624 633 do ig=1,ngrid 625 CHI=zh(ig,1)/(1669.0-122.0*z o(ig,1)/zqsat(ig,1)-zh(ig,1))626 pcon(ig)=pplay(ig,1)*(z o(ig,1)/zqsat(ig,1))**CHI634 CHI=zh(ig,1)/(1669.0-122.0*z_o(ig,1)/zqsat(ig,1)-zh(ig,1)) 635 pcon(ig)=pplay(ig,1)*(z_o(ig,1)/zqsat(ig,1))**CHI 627 636 enddo 628 637 !IM do k=1,nlay … … 685 694 wth3(ig,l)=zf2*(1-2.*fraca(ig,l))/(1-fraca(ig,l)) & 686 695 & *zw2(ig,l)*zw2(ig,l)*zw2(ig,l) 687 q2(ig,l)=zf2*(zqta(ig,l)*1000.-p o(ig,l)*1000.)**2688 !test: on calcul q2/p o=ratqsc689 ratqscth(ig,l)=sqrt(max(q2(ig,l),1.e-6)/(p o(ig,l)*1000.))696 q2(ig,l)=zf2*(zqta(ig,l)*1000.-p_o(ig,l)*1000.)**2 697 !test: on calcul q2/p_o=ratqsc 698 ratqscth(ig,l)=sqrt(max(q2(ig,l),1.e-6)/(p_o(ig,l)*1000.)) 690 699 enddo 691 700 enddo … … 693 702 do l=1,nlay 694 703 do ig=1,ngrid 695 wq(ig,l)=fraca(ig,l)*zw2(ig,l)*(zqta(ig,l)*1000.-p o(ig,l)*1000.)704 wq(ig,l)=fraca(ig,l)*zw2(ig,l)*(zqta(ig,l)*1000.-p_o(ig,l)*1000.) 696 705 wthl(ig,l)=fraca(ig,l)*zw2(ig,l)*(ztla(ig,l)-zthl(ig,l)) 697 706 wthv(ig,l)=fraca(ig,l)*zw2(ig,l)*(ztva(ig,l)-ztv(ig,l)) … … 728 737 do l=1,nlay 729 738 do ig=1,ngrid 730 ratqsdiff(ig,l)=sqrt(vardiff)/(p o(ig,l)*1000.)739 ratqsdiff(ig,l)=sqrt(vardiff)/(p_o(ig,l)*1000.) 731 740 enddo 732 741 enddo … … 741 750 !///////////////////////////////////////////////////////////////////////////// 742 751 !============================================================================= 743 subroutine test_ltherm(ngrid,nlay,pplay,long,ztv,p o,ztva, & ! in752 subroutine test_ltherm(ngrid,nlay,pplay,long,ztv,p_o,ztva, & ! in 744 753 & zqla,f_star,zw2,comment) ! in 745 754 !============================================================================= … … 748 757 749 758 integer i, k, ngrid,nlay 750 real, intent(in), dimension(ngrid,nlay) :: pplay,ztv,p o,ztva,zqla759 real, intent(in), dimension(ngrid,nlay) :: pplay,ztv,p_o,ztva,zqla 751 760 real, intent(in), dimension(ngrid,nlay) :: f_star,zw2 752 761 integer, intent(in), dimension(ngrid) :: long … … 768 777 print*,' K P(MB) THV(K) Qenv(g/kg)THVA QLA(g/kg) F* W2' 769 778 do k=1,nlay 770 write(6,'(i3,7f10.3)') k,pplay(i,k),ztv(i,k),1000*p o(i,k),ztva(i,k),1000*zqla(i,k),f_star(i,k),zw2(i,k)779 write(6,'(i3,7f10.3)') k,pplay(i,k),ztv(i,k),1000*p_o(i,k),ztva(i,k),1000*zqla(i,k),f_star(i,k),zw2(i,k) 771 780 enddo 772 781 endif -
LMDZ6/trunk/libf/phylmd/lmdz_thermcell_plume_6A.F90
r4590 r4678 734 734 REAL ztv(ngrid,nlay) 735 735 REAL zthl(ngrid,nlay) 736 REAL po(ngrid,nlay)736 REAL, INTENT(IN) :: po(ngrid,nlay) 737 737 REAL zl(ngrid,nlay) 738 738 REAL rhobarz(ngrid,nlay) -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r4677 r4678 1255 1255 INTEGER ieru 1256 1256 1257 print*,'COUCOU COUCOU' 1257 1258 !======================================================================! 1258 1259 ! Bifurcation vers un nouveau moniteur physique pour experimenter !
Note: See TracChangeset
for help on using the changeset viewer.