Changeset 5204 for LMDZ6/trunk/libf/phylmdiso
- Timestamp:
- Sep 20, 2024, 1:28:24 PM (2 months ago)
- Location:
- LMDZ6/trunk
- Files:
-
- 1 deleted
- 4 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk
- Property svn:mergeinfo changed
/LMDZ6/branches/cirrus (added) merged: 4945,4951,4974,5019,5025,5041,5055,5161-5163,5165,5202-5203
- Property svn:mergeinfo changed
-
LMDZ6/trunk/libf/phylmdiso/phyetat0_mod.F90
r5199 r5204 25 25 du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, & 26 26 falb_dir, falb_dif, prw_ancien, prlw_ancien, prsw_ancien, prbsw_ancien, & 27 ftsol, pbl_tke, pctsrf, q_ancien, ql_ancien, qs_ancien, qbs_ancien, rneb_ancien, radpas, radsol, rain_fall, ratqs, & 27 ftsol, pbl_tke, pctsrf, q_ancien, ql_ancien, qs_ancien, qbs_ancien, & 28 cf_ancien, rvc_ancien, radpas, radsol, rain_fall, ratqs, & 28 29 rnebcon, rugoro, sig1, snow_fall, bs_fall, solaire_etat0, sollw, sollwdown, & 29 30 solsw, solswfdiff, t_ancien, u_ancien, v_ancien, w01, wake_cstar, wake_deltaq, & … … 420 421 ancien_ok=ancien_ok.AND.phyetat0_get(ql_ancien,"QLANCIEN","QLANCIEN",0.) 421 422 ancien_ok=ancien_ok.AND.phyetat0_get(qs_ancien,"QSANCIEN","QSANCIEN",0.) 422 ancien_ok=ancien_ok.AND.phyetat0_get(rneb_ancien,"RNEBANCIEN","RNEBANCIEN",0.)423 423 ancien_ok=ancien_ok.AND.phyetat0_get(u_ancien,"UANCIEN","UANCIEN",0.) 424 424 ancien_ok=ancien_ok.AND.phyetat0_get(v_ancien,"VANCIEN","VANCIEN",0.) … … 435 435 prbsw_ancien(:)=0. 436 436 ENDIF 437 438 ! cas specifique des variables de la sursaturation par rapport a la glace 439 IF ( ok_ice_supersat ) THEN 440 ancien_ok=ancien_ok.AND.phyetat0_get(cf_ancien,"CFANCIEN","CFANCIEN",0.) 441 ancien_ok=ancien_ok.AND.phyetat0_get(rvc_ancien,"RVCANCIEN","RVCANCIEN",0.) 442 ELSE 443 cf_ancien(:,:)=0. 444 rvc_ancien(:,:)=0. 445 ENDIF 437 446 438 447 ! Ehouarn: addtional tests to check if t_ancien, q_ancien contain … … 442 451 (maxval(ql_ancien).EQ.minval(ql_ancien)) .OR. & 443 452 (maxval(qs_ancien).EQ.minval(qs_ancien)) .OR. & 444 (maxval(rneb_ancien).EQ.minval(rneb_ancien)) .OR. &445 453 (maxval(prw_ancien).EQ.minval(prw_ancien)) .OR. & 446 454 (maxval(prlw_ancien).EQ.minval(prlw_ancien)) .OR. & … … 455 463 ancien_ok=.false. 456 464 ENDIF 465 ENDIF 466 467 IF ( ok_ice_supersat ) THEN 468 IF ( (maxval(cf_ancien).EQ.minval(cf_ancien)) .OR. & 469 (maxval(rvc_ancien).EQ.minval(rvc_ancien)) ) THEN 470 ancien_ok=.false. 471 ENDIF 457 472 ENDIF 458 473 -
LMDZ6/trunk/libf/phylmdiso/phyredem.F90
r4613 r5204 19 19 zval, rugoro, t_ancien, q_ancien, & 20 20 prw_ancien, prlw_ancien, prsw_ancien, prbsw_ancien, & 21 ql_ancien, qs_ancien, qbs_ancien, u_ancien, & 22 v_ancien, clwcon, rnebcon, ratqs, pbl_tke, & 21 ql_ancien, qs_ancien, qbs_ancien, cf_ancien, & 22 rvc_ancien, u_ancien, v_ancien, & 23 clwcon, rnebcon, ratqs, pbl_tke, & 23 24 wake_delta_pbl_tke, zmax0, f0, sig1, w01, & 24 25 wake_deltat, wake_deltaq, wake_s, wake_dens, & … … 265 266 CALL put_field(pass,"QBSANCIEN", "QBSANCIEN", qbs_ancien) 266 267 CALL put_field(pass,"PRBSWANCIEN", "PRBSWANCIEN", prbsw_ancien) 268 ENDIF 269 270 IF ( ok_ice_supersat ) THEN 271 CALL put_field(pass,"CFANCIEN", "CFANCIEN", cf_ancien) 272 CALL put_field(pass,"RVCANCIEN", "RVCANCIEN", rvc_ancien) 267 273 ENDIF 268 274 -
LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90
r5199 r5204 72 72 USE tracinca_mod, ONLY: config_inca 73 73 USE tropopause_m, ONLY: dyn_tropopause 74 USE ice_sursat_mod, ONLY: flight_init, airplane75 74 USE vampir 76 75 USE write_field_phy … … 195 194 ! [Variables internes non sauvegardees de la physique] 196 195 ! Variables locales pour effectuer les appels en serie 197 t_seri,q_seri,ql_seri,qs_seri,qbs_seri,u_seri,v_seri,tr_seri,rneb_seri, & 196 t_seri,q_seri,ql_seri,qs_seri,qbs_seri, & 197 u_seri,v_seri,cf_seri,rvc_seri,tr_seri, & 198 rhcl, & 198 199 qx_seri, & ! CR 199 200 rhcl, & 200 201 ! Dynamic tendencies (diagnostics) 201 d_t_dyn,d_q_dyn,d_ql_dyn,d_qs_dyn,d_qbs_dyn,d_u_dyn,d_v_dyn,d_tr_dyn,d_rneb_dyn, & 202 d_t_dyn,d_q_dyn,d_ql_dyn,d_qs_dyn,d_qbs_dyn, & 203 d_u_dyn,d_v_dyn,d_cf_dyn,d_rvc_dyn,d_tr_dyn, & 202 204 d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d,d_qbs_dyn2d, & 203 205 ! Physic tendencies … … 374 376 pfraclr, pfracld, cldfraliq, sigma2_icefracturb, mean_icefracturb, & 375 377 distcltop, temp_cltop, & 376 zqsatl, zqsats, & 377 qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, & 378 !-- LSCP - condensation and ice supersaturation variables 379 qsub, qissr, qcld, subfra, issrfra, gamma_cond, ratio_qi_qtot, & 380 dcf_sub, dcf_con, dcf_mix, dqi_adj, dqi_sub, dqi_con, dqi_mix, & 381 dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix, qsatliq, qsatice, & 382 !-- LSCP - aviation and contrails variables 378 383 Tcontr, qcontr, qcontr2, fcontrN, fcontrP, & 384 dcf_avi, dqi_avi, dqvc_avi, flight_dist, flight_h2o, & 385 ! 379 386 cldemi, & 380 387 cldfra, cldtau, fiwc, & … … 584 591 ! reevap -> je commente les 2 lignes au dessus et je laisse la definition 585 592 ! plutot dans infotrac_phy 586 INTEGER,SAVE :: irneb, ibs 587 !$OMP THREADPRIVATE(irneb, ibs )593 INTEGER,SAVE :: irneb, ibs, icf,irvc 594 !$OMP THREADPRIVATE(irneb, ibs, icf,irvc) 588 595 ! 589 596 ! … … 1479 1486 iliq = strIdx(tracers(:)%name, addPhase('H2O', 'l')) 1480 1487 isol = strIdx(tracers(:)%name, addPhase('H2O', 's')) 1481 irneb= strIdx(tracers(:)%name, addPhase('H2O', 'r'))1482 1488 ibs = strIdx(tracers(:)%name, addPhase('H2O', 'b')) 1489 icf = strIdx(tracers(:)%name, addPhase('H2O', 'f')) 1490 irvc = strIdx(tracers(:)%name, addPhase('H2O', 'c')) 1483 1491 ! CALL init_etat0_limit_unstruct 1484 !IF (.NOT. create_etat0_limit) CALL init_limit_read(days_elapsed)1492 IF (.NOT. create_etat0_limit) CALL init_limit_read(days_elapsed) 1485 1493 !CR:nvelles variables convection/poches froides 1486 1494 … … 1533 1541 ENDIF 1534 1542 1535 IF (ok_ice_su rsat.AND.(iflag_ice_thermo.EQ.0)) THEN1536 WRITE (lunout, *) ' ok_ice_su rsat=y requires iflag_ice_thermo=1 as well'1543 IF (ok_ice_supersat.AND.(iflag_ice_thermo.EQ.0)) THEN 1544 WRITE (lunout, *) ' ok_ice_supersat=y requires iflag_ice_thermo=1 as well' 1537 1545 abort_message='see above' 1538 1546 CALL abort_physic(modname,abort_message,1) 1539 1547 ENDIF 1540 1548 1541 IF (ok_ice_su rsat.AND.(nqo.LT.4)) THEN1542 WRITE (lunout, *) ' ok_ice_su rsat=y requires 4H2O tracers ', &1543 '(H2O_g, H2O_l, H2O_s, H2O_ r) but nqo=', nqo, '. Might as well stop here.'1549 IF (ok_ice_supersat.AND.(nqo.LT.5)) THEN 1550 WRITE (lunout, *) ' ok_ice_supersat=y requires 5 H2O tracers ', & 1551 '(H2O_g, H2O_l, H2O_s, H2O_f, H2O_c) but nqo=', nqo, '. Might as well stop here.' 1544 1552 abort_message='see above' 1545 1553 CALL abort_physic(modname,abort_message,1) 1546 1554 ENDIF 1547 1555 1548 IF (ok_plane_h2o.AND..NOT.ok_ice_su rsat) THEN1549 WRITE (lunout, *) ' ok_plane_h2o=y requires ok_ice_su rsat=y '1556 IF (ok_plane_h2o.AND..NOT.ok_ice_supersat) THEN 1557 WRITE (lunout, *) ' ok_plane_h2o=y requires ok_ice_supersat=y ' 1550 1558 abort_message='see above' 1551 1559 CALL abort_physic(modname,abort_message,1) 1552 1560 ENDIF 1553 1561 1554 IF (ok_plane_contrail.AND..NOT.ok_ice_su rsat) THEN1555 WRITE (lunout, *) ' ok_plane_contrail=y requires ok_ice_su rsat=y '1562 IF (ok_plane_contrail.AND..NOT.ok_ice_supersat) THEN 1563 WRITE (lunout, *) ' ok_plane_contrail=y requires ok_ice_supersat=y ' 1556 1564 abort_message='see above' 1557 1565 CALL abort_physic(modname,abort_message,1) … … 1562 1570 abort_message='blowing snow cannot be activated with water isotopes yet' 1563 1571 CALL abort_physic(modname,abort_message, 1) 1564 #endif 1565 IF ((ok_ice_sursat.AND.nqo .LT.5).OR.(.NOT.ok_ice_sursat.AND.nqo.LT.4)) THEN 1572 IF ((ok_ice_supersat.AND.nqo .LT.6).OR.(.NOT.ok_ice_supersat.AND.nqo.LT.4)) THEN 1566 1573 WRITE (lunout, *) 'activation of blowing snow needs a specific H2O tracer', & 1567 1574 'but nqo=', nqo … … 2015 2022 & RG,RD,RCPD,RKAPPA,RLVTT,RETV) 2016 2023 CALL ratqs_ini(klon,klev,iflag_thermals,lunout,nbsrf,is_lic,is_ter,RG,RV,RD,RCPD,RLSTT,RLVTT,RTT) 2017 CALL lscp_ini(pdtphys,lunout,prt_level,ok_ice_sursat,iflag_ratqs,fl_cor_ebil,RCPD,RLSTT,RLVTT,RLMLT,RVTMP2,RTT,RD,RG,RV,RPI) 2024 CALL lscp_ini(pdtphys,lunout,prt_level,ok_ice_supersat,iflag_ratqs,fl_cor_ebil, & 2025 RCPD,RLSTT,RLVTT,RLMLT,RVTMP2,RTT,RD,RV,RG,RPI,EPS_W) 2018 2026 CALL blowing_snow_ini(RCPD, RLSTT, RLVTT, RLMLT, & 2019 2027 RVTMP2, RTT,RD,RG, RV, RPI) … … 2497 2505 sollwdown(:)) 2498 2506 2507 !--Init for LSCP - condensation 2508 ratio_qi_qtot(:,:) = 0. 2499 2509 2500 2510 … … 2604 2614 q_seri(i,k) = qx(i,k,ivap) 2605 2615 ql_seri(i,k) = qx(i,k,iliq) 2606 qbs_seri(i,k) = 0. 2616 qbs_seri(i,k)= 0. 2617 cf_seri(i,k) = 0. 2618 rvc_seri(i,k)= 0. 2607 2619 !CR: ATTENTION, on rajoute la variable glace 2608 2620 IF (nqo.EQ.2) THEN !--vapour and liquid only 2609 2621 qs_seri(i,k) = 0. 2610 rneb_seri(i,k) = 0.2611 2622 ELSE IF (nqo.EQ.3) THEN !--vapour, liquid and ice 2612 2623 qs_seri(i,k) = qx(i,k,isol) 2613 rneb_seri(i,k) = 0. 2614 ELSE IF (nqo.GE.4) THEN !--vapour, liquid, ice and rneb and blowing snow 2624 ELSE IF (nqo.GE.4) THEN !--vapour, liquid, ice, blowing snow, cloud fraction and cloudy water vapor to total water vapor ratio 2615 2625 qs_seri(i,k) = qx(i,k,isol) 2616 IF (ok_ice_sursat) THEN 2617 rneb_seri(i,k) = qx(i,k,irneb) 2626 IF (ok_ice_supersat) THEN 2627 cf_seri(i,k) = qx(i,k,icf) 2628 rvc_seri(i,k) = qx(i,k,irvc) 2618 2629 ENDIF 2619 2630 IF (ok_bs) THEN … … 2784 2795 d_ql_dyn(:,:) = (ql_seri(:,:)-ql_ancien(:,:))/phys_tstep 2785 2796 d_qs_dyn(:,:) = (qs_seri(:,:)-qs_ancien(:,:))/phys_tstep 2786 d_qbs_dyn(:,:) = (qbs_seri(:,:)-qbs_ancien(:,:))/phys_tstep 2797 d_qbs_dyn(:,:)= (qbs_seri(:,:)-qbs_ancien(:,:))/phys_tstep 2798 d_cf_dyn(:,:) = (cf_seri(:,:)-cf_ancien(:,:))/phys_tstep 2799 d_rvc_dyn(:,:)= (rvc_seri(:,:)-rvc_ancien(:,:))/phys_tstep 2787 2800 CALL water_int(klon,klev,q_seri,zmasse,zx_tmp_fi2d) 2788 2801 d_q_dyn2d(:)=(zx_tmp_fi2d(:)-prw_ancien(:))/phys_tstep … … 2796 2809 IF (nqtot > nqo) d_tr_dyn(:,:,:)=(tr_seri(:,:,:)-tr_ancien(:,:,:))/phys_tstep 2797 2810 ! !! RomP <<< 2798 !!d_rneb_dyn(:,:)=(rneb_seri(:,:)-rneb_ancien(:,:))/phys_tstep2799 d_rneb_dyn(:,:)=0.02800 2811 2801 2812 #ifdef ISO … … 2879 2890 d_ql_dyn(:,:) = 0.0 2880 2891 d_qs_dyn(:,:) = 0.0 2892 d_qbs_dyn(:,:)= 0.0 2893 d_cf_dyn(:,:) = 0.0 2894 d_rvc_dyn(:,:)= 0.0 2881 2895 d_q_dyn2d(:) = 0.0 2882 2896 d_ql_dyn2d(:) = 0.0 … … 2905 2919 IF (nqtot > nqo) d_tr_dyn(:,:,:)= 0.0 2906 2920 ! !! RomP <<< 2907 d_rneb_dyn(:,:)=0.02908 d_qbs_dyn(:,:)=0.02909 2921 ancien_ok = .TRUE. 2910 2922 #ifdef ISO … … 3017 3029 ! "zmasse" changes a little.) 3018 3030 ENDIF 3031 ENDIF 3032 3033 !-- Needed for LSCP - condensation and ice supersaturation 3034 IF (ok_ice_supersat) THEN 3035 DO k = 1, klev 3036 DO i = 1, klon 3037 IF ( ( q_seri(i,k) + ql_seri(i,k) + qs_seri(i,k) ) .GT. 0. ) THEN 3038 ratio_qi_qtot(i,k) = qs_seri(i,k) / ( q_seri(i,k) + ql_seri(i,k) + qs_seri(i,k) ) 3039 rvc_seri(i,k) = rvc_seri(i,k) * q_seri(i,k) / ( q_seri(i,k) + ql_seri(i,k) + qs_seri(i,k) ) 3040 ELSE 3041 ratio_qi_qtot(i,k) = 0. 3042 rvc_seri(i,k) = 0. 3043 ENDIF 3044 ENDDO 3045 ENDDO 3019 3046 ENDIF 3020 3047 … … 5060 5087 5061 5088 !--mise à jour de flight_m et flight_h2o dans leur module 5062 IF (ok_plane_h2o .OR. ok_plane_contrail) THEN5063 CALL airplane(debut,pphis,pplay,paprs,t_seri)5064 ENDIF5089 !IF (ok_plane_h2o .OR. ok_plane_contrail) THEN 5090 ! CALL airplane(debut,pphis,pplay,paprs,t_seri) 5091 !ENDIF 5065 5092 5066 5093 CALL lscp(klon,klev,phys_tstep,missing_val,paprs,pplay, & 5067 5094 t_seri, q_seri,qs_ini,ptconv,ratqs, & 5068 d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, rneb_seri,&5095 d_t_lsc, d_q_lsc, d_ql_lsc, d_qi_lsc, rneb, rneblsvol, & 5069 5096 pfraclr, pfracld, cldfraliq, sigma2_icefracturb, mean_icefracturb, & 5070 5097 radocond, picefra, rain_lsc, snow_lsc, & … … 5072 5099 prfl, psfl, rhcl, & 5073 5100 zqasc, fraca,ztv,zpspsk,ztla,zthl,iflag_cld_th, & 5074 iflag_ice_thermo, ok_ice_sursat, zqsatl, zqsats, distcltop, temp_cltop, & 5075 pbl_tke(:,:,is_ave), pbl_eps(:,:,is_ave), qclr, qcld, qss, qvc, rnebclr, rnebss, gamma_ss, & 5076 Tcontr, qcontr, qcontr2, fcontrN, fcontrP , & 5101 iflag_ice_thermo, distcltop, temp_cltop, 5102 pbl_tke(:,:,is_ave), pbl_eps(:,:,is_ave), & 5103 cell_area, & 5104 cf_seri, rvc_seri, u_seri, v_seri, & 5105 qsub, qissr, qcld, subfra, issrfra, gamma_cond, ratio_qi_qtot, & 5106 dcf_sub, dcf_con, dcf_mix, dqi_adj, dqi_sub, dqi_con, dqi_mix, & 5107 dqvc_adj, dqvc_sub, dqvc_con, dqvc_mix, qsatliq, qsatice, & 5108 Tcontr, qcontr, qcontr2, fcontrN, fcontrP, & 5109 dcf_avi, dqi_avi, dqvc_avi, flight_dist, flight_h2o, & 5077 5110 cloudth_sth,cloudth_senv,cloudth_sigmath,cloudth_sigmaenv, & 5078 5111 qraindiag, qsnowdiag, dqreva, dqssub, dqrauto, dqrcol, dqrmelt, & … … 7129 7162 d_qx(i,k,isol) = ( qs_seri(i,k) - qx(i,k,isol) ) / phys_tstep 7130 7163 ENDIF 7131 !--ice_sursat: nqo=4, on ajoute rneb 7132 IF (nqo.ge.4 .and. ok_ice_sursat) THEN 7133 d_qx(i,k,irneb) = ( rneb_seri(i,k) - qx(i,k,irneb) ) / phys_tstep 7164 !--ice_supersat: nqo=5, we add cloud fraction and cloudy water vapor to total water vapor ratio 7165 IF (nqo.ge.5 .and. ok_ice_supersat) THEN 7166 d_qx(i,k,icf) = ( cf_seri(i,k) - qx(i,k,icf) ) / phys_tstep 7167 d_qx(i,k,irvc) = ( rvc_seri(i,k) - qx(i,k,irvc) ) / phys_tstep 7134 7168 ENDIF 7135 7169 … … 7137 7171 d_qx(i,k,ibs) = ( qbs_seri(i,k) - qx(i,k,ibs) ) / phys_tstep 7138 7172 ENDIF 7139 7140 7173 7141 7174 ENDDO … … 7186 7219 ql_ancien(:,:) = ql_seri(:,:) 7187 7220 qs_ancien(:,:) = qs_seri(:,:) 7188 qbs_ancien(:,:) = qbs_seri(:,:) 7189 rneb_ancien(:,:) = rneb_seri(:,:) 7221 qbs_ancien(:,:)= qbs_seri(:,:) 7222 cf_ancien(:,:) = cf_seri(:,:) 7223 rvc_ancien(:,:)= rvc_seri(:,:) 7190 7224 #ifdef ISO 7191 7225 xt_ancien(:,:,:)=xt_seri(:,:,:)
Note: See TracChangeset
for help on using the changeset viewer.