Changeset 4491
- Timestamp:
- Apr 3, 2023, 10:25:44 AM (20 months ago)
- Location:
- LMDZ6/trunk/libf/phylmdiso
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmdiso/add_phys_tend_mod.F90
r4143 r4491 313 313 ! Ajout des tendances sur le vent et l'eau liquide 314 314 !====================================================================== 315 316 #ifdef ISO 317 #ifdef ISOVERIF 318 if (iso_eau.gt.0) then 319 call iso_verif_egalite_vect2D( & 320 xt_seri,q_seri, & 321 'add_phys_tend 321a: '//text,ntraciso,klon,klev) 322 call iso_verif_egalite_vect2D( & 323 xtl_seri,ql_seri, & 324 'add_phys_tend 321b: '//text,ntraciso,klon,klev) 325 endif !if (iso_eau.gt.0) then 326 #ifdef ISOTRAC 327 call iso_verif_traceur_vect(xt_seri,klon,klev, & 328 & 'add_phys_tend 328a: '//text) 329 call iso_verif_traceur_vect(xtl_seri,klon,klev, & 330 & 'add_phys_tend 328b: '//text) 331 #endif 332 #endif 333 #endif 315 334 316 335 u_seri(:,:)=u_seri(:,:)+zdu(:,:) … … 370 389 'add_phys_tend 138: '//text,ntraciso,klon,klev) 371 390 endif !if (iso_eau.gt.0) then 391 #ifdef ISOTRAC 392 call iso_verif_traceur_vect(xt_seri,klon,klev, & 393 & 'add_phys_tend 374a: '//text) 394 call iso_verif_traceur_vect(xtl_seri,klon,klev, & 395 & 'add_phys_tend 374b: '//text) 396 #endif 372 397 #endif 373 398 #endif … … 495 520 'add_phys_tend 175'//text,ntraciso,klon,klev) 496 521 endif !if (iso_eau.gt.0) then 522 #ifdef ISOTRAC 523 call iso_verif_traceur_vect(xt_seri,klon,klev, & 524 & 'add_phys_tend 499'//text) 525 #endif 497 526 #endif 498 527 #endif -
LMDZ6/trunk/libf/phylmdiso/cv30_routines.F90
r4143 r4491 2647 2647 & ) 2648 2648 #ifdef ISO 2649 use infotrac_phy, ONLY: ntraciso=>ntiso 2649 use infotrac_phy, ONLY: ntraciso=>ntiso, niso 2650 2650 use isotopes_mod, ONLY: essai_convergence, iso_eau,iso_HDO,ridicule 2651 use isotopes_routines_mod, ONLY: appel_stewart_vectall 2651 use isotopes_routines_mod, ONLY: appel_stewart_vectall,appel_stewart_debug 2652 2652 #ifdef ISOVERIF 2653 2653 use isotopes_verif_mod, ONLY: errmax,errmaxrel, & … … 3208 3208 enddo 3209 3209 #endif 3210 3211 if (1.eq.0) then 3210 3212 ! appel de appel_stewart_vectorise 3211 3213 call appel_stewart_vectall(lwork,ncum, & … … 3218 3220 & i,inb, & ! altitude: car cas particulier en INB 3219 3221 & na,nd,nloc,cvflag_grav,ginv,1e-16) 3222 3223 else !if (1.eq.0) then 3224 ! truc simple sans fractionnement 3225 ! juste pour debuggage 3226 call appel_stewart_debug(lwork,nloc,inb,na,i, & 3227 evap,water,rpprec,rr,wdtrain, & 3228 xtevap,xtwater,xtp,xt,xtwdtrain) 3229 endif ! if (1.eq.0) then 3230 3220 3231 3221 3232 #ifdef ISOVERIF -
LMDZ6/trunk/libf/phylmdiso/cv3p_mixing.F90
r4143 r4491 451 451 call iso_verif_aberrant_choix( & 452 452 xtelij(iso_HDO,il,i,j),elij(il,i,j), & 453 ridicule,deltalim ,'cv3p_mixing 1993')453 ridicule,deltalim_snow,'cv3p_mixing 1993') 454 454 endif !if (iso_hdo.gt.0) then 455 455 #ifdef ISOTRAC -
LMDZ6/trunk/libf/phylmdiso/cv_driver.F90
r4143 r4491 997 997 998 998 #ifdef ISO 999 write(*,*) 'klev=',klev999 ! write(*,*) 'klev=',klev 1000 1000 #ifdef ISOVERIF 1001 1001 write(*,*) 'cv_driver 930: apres cv3_unsat' -
LMDZ6/trunk/libf/phylmdiso/fisrtilp.F90
r4380 r4491 509 509 endif !if (iso_eau.gt.0) then 510 510 if (iso_HDO.gt.0) then 511 if (zrfl(i).gt.ridicule_rain) then 512 call iso_verif_aberrant(zxtrfl(iso_HDO,i) & 513 & /zrfl(i),'il pleut 316') 514 endif !if (zrfl(i).gt.ridicule_rain) then 511 call iso_verif_aberrant_choix(zxtrfl(iso_HDO,i) & 512 & ,zrfl(i),ridicule_rain,deltalim_snow,'il pleut 316') 515 513 endif !if (iso_HDO.gt.0) then 516 514 #ifdef ISOTRAC … … 1732 1730 if (iso_HDO.gt.0) then 1733 1731 do i=1,klon 1734 if (zcond(i).gt.ridicule) then1735 call iso_verif_aberrant(zxtcond(iso_HDO,i) &1736 & /zcond(i), 'il pleut 637')1737 endif !if (zcond(i).gt.ridicule) then1738 IF ((t(i,1)) .LT. RTT) THEN1739 1732 call iso_verif_aberrant_choix(zxtcond(iso_hdo,i), & 1740 1733 & zcond(i),ridicule_rain,deltalim_snow,'il pleut 1276') 1741 endif1742 1734 enddo ! do i=1,klon 1743 1735 endif !if ((iso_eau.gt.0).and.(ixt.eq.iso_eau)) then … … 2031 2023 if (zoliq(i).gt.ridicule) then 2032 2024 if (iso_HDO.gt.0) then 2033 call iso_verif_aberrant(zxtoliq(iso_HDO,i)/zoliq(i), & 2034 & 'il pleut 895a') 2025 ! Camille 9 mars 2023: on est moins stricte avec le condensat 2026 call iso_verif_aberrant_choix(zxtoliq(iso_HDO,i),zoliq(i), & 2027 & ridicule_rain,deltalim_snow, 'il pleut 895a') 2035 2028 if (iso_O18.gt.0) then 2036 2029 if (iso_verif_O18_aberrant_nostop(zxtoliq(iso_HDO,i)/zoliq(i), & 2037 2030 & zxtoliq(iso_O18,i)/zoliq(i),'il pleut 895b').eq.1) then 2038 2031 write(*,*) 'i,k,zoliq,zfice=',i,k,zoliq(i),zfice(i) 2039 stop2032 !stop 2040 2033 endif 2041 2034 endif ! if (iso_HDO.gt.0) then … … 2171 2164 endif !if (iso_eau.gt.0) then 2172 2165 if (iso_HDO.gt.0) then 2173 if (zoliq(i).gt.ridicule) then 2174 call iso_verif_aberrant(zxtoliq(iso_HDO,i)/zoliq(i), & 2175 & 'il pleut 963') 2176 endif 2166 call iso_verif_aberrant_choix(zxtoliq(iso_HDO,i),zoliq(i), & 2167 & ridicule_rain, deltalim_snow, 'il pleut 963') 2177 2168 endif !if (iso_HDO.gt.0) then 2178 2169 ! end cam verif … … 2482 2473 call iso_verif_aberrant(pxtrainfl(iso_HDO,i,k)/prfl(i,k), & 2483 2474 & 'il pleut 1020') 2484 endif !if (prfl(i,k).gt.ridicule_rain) then 2485 if (psfl(i,k).gt.ridicule_rain) then 2486 call iso_verif_aberrant(pxtsnowfl(iso_HDO,i,k)/psfl(i,k), & 2487 & 'il pleut 1024') 2488 endif !if (psfl(i,k).gt.ridicule_rain) then 2475 endif !if (prfl(i,k).gt.ridicule_rain) then 2476 call iso_verif_aberrant_choix(pxtsnowfl(iso_HDO,i,k),psfl(i,k), & 2477 & ridicule_rain, deltalim_snow, 'il pleut 1024') 2489 2478 if (zq(i).gt.ridicule) then 2490 2479 call iso_verif_aberrant_encadre(zxt(iso_HDO,i)/zq(i), & -
LMDZ6/trunk/libf/phylmdiso/isotopes_mod.F90
r4399 r4491 302 302 IF(getKey('Rdefault',Rdefault,isoName)) CALL abort_physic(modname, 'can''t get Rdefault',1) 303 303 IF(getKey('Rmethox', Rmethox, isoName)) CALL abort_physic(modname, 'can''t get Rmethox', 1) 304 IF(.NOT.Rdefault_smow) Rdefault(:) = 0.0 304 305 IF(.NOT.Rdefault_smow) then 306 Rdefault(:) = 0.0 307 if (iso_eau.gt.0) Rdefault(iso_eau) = 1.0 ! correction Camille 30 mars 2023 308 ENDIF 309 write(*,*) 'Rdefault=',Rdefault 305 310 306 311 !--- Sensitivity test: no kinetic effect in sfc evaporation -
LMDZ6/trunk/libf/phylmdiso/isotopes_routines_mod.F90
r4452 r4491 154 154 & 'revap_ilp 131') 155 155 enddo 156 #ifdef ISOTRAC 157 call iso_verif_traceur(zxtrfl_ancien(1,i), & 158 & 'iso_revap_fisrtilp 158: debut') 159 #endif 156 160 #endif 157 161 endif !if (zrfln(i).gt.ridicule*1e-2) then … … 193 197 endif !if (zq(i).gt.ridicule) then 194 198 endif !if ((iso_HDO.gt.0.and.(iso_O18.gt.0) then 199 #ifdef ISOTRAC 200 call iso_verif_traceur(zxtrfl_ancien(1,i), & 201 & 'iso_revap_fisrtilp 201: debut quand pas de precip') 202 #endif 195 203 ! write(*,*) 'iso_routines tmp 184' 196 204 #endif … … 504 512 ! stop 505 513 endif 506 enddo 514 enddo !do iiso=1,niso 507 515 enddo !do i=1,ncas_evap_liq 508 516 #endif … … 514 522 & izone,zqevfl(1),Exi(1,1),fac_fluxtomixratio(1), & 515 523 & xtrevap_tag(1,1),1,hdiag(1)) 524 ! dans cette routine, zxtrfl reçoit zxtrfln_cas 516 525 517 526 enddo !do izone=1,ntraceurs_zone 527 518 528 #ifdef ISOVERIF 519 529 do i=1,ncas_evap_liq … … 522 532 & 0.0,'revap_ilp 414') 523 533 enddo 534 call iso_verif_traceur(zxtrfl(1,cas_evap_liq(i)), & 535 & 'iso_revap_fisrtilp 470a: apres stewart_explicite_vectall') 524 536 enddo !do i=1,ncas 525 537 #endif … … 536 548 call iso_verif_traceur(zxt(1,cas_evap_liq(i)), & 537 549 & 'iso_revap_fisrtilp 282') 550 call iso_verif_traceur(zxtrfl(1,cas_evap_liq(i)), & 551 & 'iso_revap_fisrtilp 804a') 538 552 call iso_verif_traceur(zxtrfln(1,cas_evap_liq(i)), & 539 & 'iso_revap_fisrtilp 804 ')553 & 'iso_revap_fisrtilp 804b') 540 554 do ixt=1,ntraciso 541 555 call iso_verif_positif_choix(zxt(ixt,cas_evap_liq(i)), & … … 676 690 if (iso_HDO.gt.0) then 677 691 do i=1,ncas_evap_glace 678 if (zrfln_cas(i).gt.ridicule_rain) then 679 call iso_verif_aberrant( & 680 & (zxtrfln_cas(iso_HDO,i) & 681 & /zrfln_cas(i)), 'iso_revap_fisrtilp 4563') 682 endif 692 call iso_verif_aberrant_choix(zxtrfln_cas(iso_HDO,i), zrfln_cas(i), & 693 ridicule_rain,deltalim_snow, 'iso_revap_fisrtilp 4563') 683 694 enddo !do i=1,ncas_evap_glace 684 695 endif !if ((iso_HDO.gt.0).and.(ixt.eq.iso_HDO)) then … … 789 800 call iso_verif_traceur(zxt(1,cas_evap_glace(i)), & 790 801 & 'iso_revap_fisrtilp 1033') 802 call iso_verif_traceur(zxtrfl(1,cas_evap_glace(i)), & 803 & 'iso_revap_fisrtilp 1035a') 791 804 call iso_verif_traceur(zxtrfln(1,cas_evap_glace(i)), & 792 & 'iso_revap_fisrtilp 1035 ')805 & 'iso_revap_fisrtilp 1035b') 793 806 enddo 794 807 #endif … … 830 843 call iso_verif_traceur(zxt(1,i),'iso_revap_fisrtilp 532') 831 844 call iso_verif_traceur(zxtrfln(1,i), & 832 & 'iso_revap_fisrtilp 533') 845 & 'iso_revap_fisrtilp 533a') 846 call iso_verif_traceur(zxtrfl(1,i), & 847 & 'iso_revap_fisrtilp 533b') 833 848 do ixt=1,ntraciso 834 849 call iso_verif_positif_choix(zxt(ixt,i),0.0, & … … 836 851 enddo 837 852 enddo !do i=1,klon 838 write(*,*) 'revap_ilp 814: sortie'853 !write(*,*) 'revap_ilp 814: sortie' 839 854 #endif 840 855 #endif … … 2384 2399 endif !if (iso_eau.gt.0) then 2385 2400 if (abs(evap(i)).gt.ridicule_rain) then 2386 if (iso_HDO.gt.0) then 2387 if (iso_verif_aberrant_ nostop(xtevap(iso_HDO,i)/evap(i), &2388 & 'iso_surf>iso_rosee_givre 3193').eq.1) then2401 if (iso_HDO.gt.0) then 2402 if (iso_verif_aberrant_choix_nostop(xtevap(iso_HDO,i),evap(i), & 2403 & ridicule_rain,deltalim_snow,'iso_surf>iso_rosee_givre 3193').eq.1) then 2389 2404 write(*,*) 'zxtalphai(iso_HDO)=',zxtalphai(iso_HDO) 2390 2405 write(*,*) 'deltaD1eff=',deltaD(xt1lay(iso_HDO,i)/q1lay(i)) 2391 2406 write(*,*) 'tsurf(i)=',tsurf(i) 2392 2407 write(*,*) 'q1lay(i)=',q1lay(i) 2393 stop2408 !stop 2394 2409 endif !if (iso_verif_aberrant_nostop 2395 2410 endif !if (iso_HDO.gt.0) then … … 2534 2549 2535 2550 ! quelques verifs de bilan d'eau 2536 #ifdef ISOVERIF 2551 #ifdef ISOVERIF 2537 2552 do il=1,ncas 2538 2553 do ixt=1,niso … … 2647 2662 & 'stewart_explicite_vectall 220') 2648 2663 enddo 2649 #endif 2650 #ifdef ISOVERIF 2651 if (iso_eau.gt.0) then 2664 if (iso_eau.gt.0) then 2652 2665 call iso_verif_egalite_choix( & 2653 2666 & (Exi(iso_eau,il)*fac_ftmr(il)), & … … 2669 2682 & *fac_ftmr(il))),'stewart_explicite 214') 2670 2683 endif !if ((iso_HDO.gt.0).and. 2671 if ((debug.eq.1).and.(il.eq.il_debug)) then 2672 write(*,*) 'stewart_explicit 224: cas Pqisup<=0' 2673 write(*,*) 'Eqi(il),deltaD=',Eqi(il), & 2674 & deltaD((Exi(iso_HDO,il)/Eqi(il))) 2675 endif 2684 2676 2685 #endif 2677 2686 else !if (Pqisup.eq.0) then … … 2679 2688 h(il)=qeff(il)/qs(il) 2680 2689 h(il)= MAX(MIN(h(il),1.0),0.0) 2681 #ifdef ISOVERIF 2690 #ifdef ISOVERIF 2682 2691 call iso_verif_positif(h(il)-thumxt1,'stewart_explicit 209') 2683 2692 #endif … … 2739 2748 endif !if ((iso_HDO.gt.0).and. 2740 2749 endif !if (iso_HDO.gt.0) then 2741 if ((debug.eq.1).and.(il.eq.il_debug) ) then2750 if ((debug.eq.1).and.(il.eq.il_debug).and.(Eqi(il).gt.0.)) then 2742 2751 write(*,*) 'stewart_explicit 302: cas evap~0' 2743 2752 write(*,*) 'deltaDv est inchangé:',deltaD( & … … 2779 2788 f(il)=m(il)/m0(il) 2780 2789 ! verifs 2781 #ifdef ISOVERIF 2790 #ifdef ISOVERIF 2782 2791 call iso_verif_positif((m(il)), & 2783 2792 & 'stewart_explicite 173') … … 2836 2845 ! rajout verif 4 sept 2009 2837 2846 if (iso_HDO.gt.0) then 2838 if (Pqisup(il).gt.ridicule) then 2839 call iso_verif_aberrant((Rl0(iso_HDO,il)), & 2840 & 'stewart_explicite 368') 2841 endif 2842 endif 2847 call iso_verif_aberrant_choix(Rl0(iso_HDO,il)*Pqisup(il),Pqisup(il), & 2848 & ridicule_rain,deltalim_snow,'stewart_explicite 368') 2849 endif !if (iso_HDO.gt.0) then 2843 2850 endif !(iso_eau.gt.0) 2844 2851 #endif … … 2868 2875 & 'stewart_explicite 271') 2869 2876 enddo !do ixt=1,niso 2870 #endif2871 #ifdef ISOVERIF2872 2877 if (iso_eau.gt.0) then 2873 2878 call iso_verif_egalite_choix( & … … 2923 2928 endif !if (qp0(il)+Eqi(il)*fac_ftmr(il).gt.ridicule) then 2924 2929 endif !if (iso_HDO.gt.0) 2925 if ((debug.eq.1).and.(il.eq.il_debug) ) then2930 if ((debug.eq.1).and.(il.eq.il_debug).and.(Eqi(il).gt.0.)) then 2926 2931 write(*,*) 'stewart_explicit 442: tout se réévapore' 2927 2932 write(*,*) 'Eqi(il),deltaD=',Eqi(il), & … … 2943 2948 if ((h(il).gt.0.99).or. & 2944 2949 & (h(il).gt.0.98).and.(f(il).lt.1e-3)) then 2945 #ifdef ISOVERIF2946 ! write(*,*) 'stewart_explicit 191: cas h=1: il=',il2947 #endif2948 2950 do ixt=1,niso 2949 2951 interm(ixt,il)=alphap(ixt,il)*(1.0-h(il)) & … … 2981 2983 & 'stewart_explicite 261') 2982 2984 enddo !do ixt=1,niso 2983 #endif2984 #ifdef ISOVERIF2985 2985 if (iso_eau.gt.0) then 2986 2986 call iso_verif_egalite_choix( & … … 3007 3007 3008 3008 if (iso_HDO.gt.0) then 3009 if (Pqiinf(il).gt.ridicule_rain) then 3010 if (iso_verif_aberrant_nostop( & 3011 & (Pxtiinf(iso_HDO,il)/Pqiinf(il)), & 3012 & 'stewart_explicie 248').eq.1) then 3009 if (iso_verif_aberrant_choix_nostop(Pxtiinf(iso_HDO,il),Pqiinf(il), & 3010 & ridicule_rain,deltalim_snow,'stewart_explicite 248').eq.1) then 3013 3011 write(*,*) 'cas reeq totale, il=',il 3014 3012 write(*,*) 'deltaDl0=',deltaD( & … … 3019 3017 & (Rb(iso_hdo,il))) 3020 3018 stop 3021 endif 3022 endif !if ((iso_HDO.gt.0).and.(ixt.eq.iso_HDO).and. 3019 endif !if (iso_verif_aberrant_choix_nostop 3023 3020 if (qp0(il)+Eqi(il)*fac_ftmr(il).gt.ridicule) then 3024 3021 call iso_verif_aberrant(( & … … 3027 3024 endif !if ((iso_HDO.gt.0).and. 3028 3025 endif !if (iso_HDO.gt.0) then 3029 if ((debug.eq.1).and.(il.eq.il_debug)) then3026 if ((debug.eq.1).and.(il.eq.il_debug).and.(Eqi(il).gt.0.)) then 3030 3027 write(*,*) 'stewart_explicit 526: cas h~1: rééq' 3031 3028 write(*,*) 'Eqi(il),deltaD=',Eqi(il), & … … 3034 3031 & (Rb0(iso_hdo,il))),deltaD( & 3035 3032 & (Rl0(iso_hdo,il))) 3036 endif3033 endif !if ((debug.eq.1).and.(il.eq.il_debug)) then 3037 3034 #endif 3038 3035 ! end verifs 3039 3036 3040 3037 else if ((f(il).gt.0.998).and. & 3041 & (Eqi(il)*fac_ftmr(il).lt.1e-2*qp0(il))) then 3038 & (Eqi(il)*fac_ftmr(il).lt.1e-2*qp0(il))) then ! if ((h(il).gt.0.99).or. 3042 3039 3043 3040 !*** cas particulier pour éviter imprécisions numériques: … … 3083 3080 & 'stewart_explicite 397') 3084 3081 enddo !do ixt=1,niso 3085 #endif3086 #ifdef ISOVERIF3087 3082 if (iso_eau.gt.0) then 3088 3083 call iso_verif_egalite_choix( & … … 3167 3162 stop 3168 3163 endif !if (iso_verif_aberrant_nostop(( 3169 endif !if ( (iso_HDO.gt.0).and.3164 endif !if (qp0(il)+Eqi(il)*fac_ftmr(il).gt.ridicule) then 3170 3165 endif !!if ((iso_HDO.gt.0) 3171 if ((debug.eq.1).and.(il.eq.il_debug) ) then3166 if ((debug.eq.1).and.(il.eq.il_debug).and.(Eqi(il).gt.0.)) then 3172 3167 write(*,*) 'stewart_explicit 663: cas où réévap faible' 3173 3168 write(*,*) 'ordre 1 pour la vapeur et le liquide' … … 3271 3266 endif !if (qp0(il)+Eqi(il)*fac_ftmr(il).gt.ridicule) then 3272 3267 endif !if ((iso_HDO.gt.0) 3273 if ((debug.eq.1).and.(il.eq.il_debug) ) then3268 if ((debug.eq.1).and.(il.eq.il_debug).and.(Eqi(il).gt.0.)) then 3274 3269 write(*,*) 'stewart_explicit 767: cas de réévap sèche' 3275 3270 write(*,*) 'distill de Rayleigh' … … 3317 3312 & 'stewart_explicite 467') 3318 3313 enddo !do ixt=1,niso 3319 #endif3320 #ifdef ISOVERIF3321 3314 if (iso_eau.gt.0) then 3322 3315 call iso_verif_egalite_choix( & … … 3360 3353 endif !if (qp0(il)+Eqi(il)*fac_ftmr(il).gt.ridicule) then 3361 3354 endif !if (iso_HDO.gt.0) 3362 if ((debug.eq.1).and.(il.eq.il_debug) ) then3355 if ((debug.eq.1).and.(il.eq.il_debug).and.(Eqi(il).gt.0.)) then 3363 3356 write(*,*) 'stewart_explicit 831: flux de masse vap~0' 3364 3357 write(*,*) 'Eqi(il),deltaD=',Eqi(il), & … … 3429 3422 enddo !do ixt=1,niso 3430 3423 #endif 3431 #ifdef ISOVERIF 3424 #ifdef ISOVERIF 3432 3425 if (iso_eau.gt.0) then 3433 3426 call iso_verif_egalite_choix( & … … 3546 3539 enddo !do ixt=1,niso 3547 3540 #endif 3548 #ifdef ISOVERIF 3541 #ifdef ISOVERIF 3549 3542 if (iso_eau.gt.0) then 3550 3543 call iso_verif_egalite_choix( & … … 3750 3743 ! pour meilleure convergence numérique: 3751 3744 !xtnew=qp0+Eqi*fac_ftmr 3752 endif ! if (iso_eau.gt.0).and.(ixt.eq.iso_eau) 3753 3745 endif ! if (iso_eau.gt.0).and.(ixt.eq.iso_eau) 3754 3746 if (iso_HDO.gt.0) then 3755 3747 if (Pqiinf(il).gt.ridicule_rain) then … … 3778 3770 & xtnew(iso_HDO,il)/(qp0(il)+Eqi(il) & 3779 3771 & *fac_ftmr(il))),'stewart_explicite 912') 3780 endif !if (qp0(il)+Eqi(il)*fac_ftmr(il).gt.ridicule) then 3781 endif !if (iso_HDO.gt.0) 3782 if ((debug.eq.1).and.(il.eq.il_debug)) then 3772 endif !if (qp0(il)+Eqi(il)*fac_ftmr(il).gt.ridicule) then 3773 if ((debug.eq.1).and.(il.eq.il_debug).and.(Eqi(il).gt.0.)) then 3783 3774 write(*,*) 'stewart_explicit 991: fcas général' 3784 3775 write(*,*) 'mais avec formule simplifiée' 3785 write(*,*) 'il,Eqi(il),deltaD=',il,Eqi(il), & 3786 & deltaD((Exi(iso_HDO,il)/Eqi(il))) 3787 endif 3788 #endif 3776 write(*,*) 'il,Eqi(il)=',il,Eqi(il) 3777 write(*,*) 'deltaD=',deltaD((Exi(iso_HDO,il)/Eqi(il))) 3778 endif 3779 endif !if (iso_HDO.gt.0) 3780 #endif 3789 3781 ! end verifs 3790 3782 … … 3838 3830 ! compression 3839 3831 if (ncas_Jsimple+ncas_rieman.gt.0) then 3840 !#ifdef ISOVERIF 3832 !#ifdef ISOVERIF 3841 3833 ! write(*,*) 'stewart_explicite_vectall 873:compression_calculJ' 3842 3834 !#endif … … 3927 3919 ! ******* traitement vectoriel du cas Rieman (=2533) 3928 3920 if (ncas_rieman.gt.0) then 3929 !#ifdef ISOVERIF 3930 !! write(*,*) 'traitement vectoriel rieman: x',ncas_rieman 3931 ! do icas_rieman=1+ncas_Jsimple,ncas_rieman+ncas_Jsimple 3932 !! write(*,*) 'ntot_cas(icas_rieman)=',ntot_cas(icas_rieman) 3933 ! call iso_verif_positif(float(ntot_cas(icas_rieman))-1.0, 3934 ! : 'stewart_expl 984: ntot faux') 3935 ! enddo !do icas_rieman=1,ncas_rieman 3936 !#endif 3921 3937 3922 icas_rieman=1+ncas_Jsimple 3938 ! write(*,*) 'stewart_expl 988 tmp: icas_rieman=',icas_rieman 3939 ! write(*,*) 'qp0_cas(1)=',qp0_cas(1) 3940 ! write(*,*) 'A_cas(1)=',A_cas(1) 3941 ! write(*,*) 'm0_cas(1)=',m0_cas(1) 3942 ! write(*,*) 'm_cas(1)=',m_cas(1) 3943 ! if (iso_eau.gt.0) then 3944 ! write(*,*) 'beta_cas(iso_eau,1)=',beta_cas(iso_eau,1) 3945 ! write(*,*) 'gama_cas(iso_eau,1)=',gama_cas(iso_eau,1) 3946 ! endif 3947 ! write(*,*) 'f_cas(1)=',f_cas(1) 3948 ! write(*,*) 'g_cas(1)=',g_cas(1) 3949 !#ifdef rieman 3950 ! call integrale_rieman_vectall 3951 ! : (ncas_rieman,m_cas(icas_rieman), 3952 ! : J(1,icas_rieman),e(1,icas_rieman), 3953 ! : qp0_cas(icas_rieman),A_cas(icas_rieman), 3954 ! : m0_cas(icas_rieman),beta_cas(1,icas_rieman), 3955 ! : gama_cas(1,icas_rieman),f_cas(icas_rieman), 3956 ! : g_cas(icas_rieman),ntot_cas(icas_rieman)) 3957 !#else 3923 3958 3924 call integrale_gauss_vectall & 3959 3925 & (ncas_rieman,m_cas(icas_rieman), & … … 3964 3930 ! : g_cas(icas_rieman),ntot_cas(icas_rieman)) 3965 3931 & g_cas(icas_rieman)) 3966 !#endif3967 !#ifdef ISOVERIF3968 ! do il=1+ncas_Jsimple,ncas_rieman+ncas_Jsimple3969 ! do ixt=1,niso3970 ! call integrale_Rieman_precision(m_cas(il),m0_cas(il),3971 ! : Jtmp,etmp,ntot_cas(il)*1e2,3972 ! : qp0_cas(il),A_cas(il),m0_cas(il),3973 ! : beta_cas(ixt,il),gama_cas(ixt,il),f_cas(il),g_cas(il))3974 ! call iso_verif_egalite_choix((Jtmp),3975 ! : (J(ixt,il)),3976 ! : 'stewart_exp 999: test rieman',errmax,errmaxrel)3977 ! if ((iso_eau.gt.0).and.(ixt.eq.iso_eau)) then3978 ! write(*,*) 'stew exp tmp 1005: il,J(iso_eau,il),Jtmp=',3979 ! : il,J(iso_eau,il),Jtmp3980 ! endif3981 ! enddo3982 ! enddo3983 !#endif3984 3932 3985 3933 endif !if (ncas_rieman.gt.0) then … … 4008 3956 & -beta_cas(ixt,il)*gama_cas(ixt,il)*r_jqp0(ixt,il) & 4009 3957 & /g_cas(il)/g_cas(il)) 4010 !#ifdef ISOVERIF4011 ! if ((iso_eau.gt.0).and.(iso_eau.eq.ixt)) then4012 ! write(*,*) 'stewart_explicite tmp 1071: il=',il4013 ! if (il.le.ncas_Jsimple) then4014 ! write(*,*) 'cas_Jsimple(il)=',cas_Jsimple(il)4015 ! else !if (il.le.ncas_Jsimple) then4016 ! write(*,*) 'cas_rieman(il)=',cas_rieman(il)4017 ! endif !if (il.le.ncas_Jsimple) then4018 ! write(*,*) 'f_cas(il),beta_cas(ixt,il),gama_cas(ixt,il)=',4019 ! : f_cas(il),beta_cas(ixt,il),gama_cas(ixt,il)4020 ! write(*,*) 'g_cas(il),r_jqp0(ixt,il),r_jl0(ixt,il)=',4021 ! ; g_cas(il),r_jqp0(ixt,il),r_jl0(ixt,il)4022 ! write(*,*) 'A_cas(il)=',A_cas(il)4023 ! write(*,*) 'pond Rl0=',(f_cas(il)**beta_cas(ixt,il))4024 ! : *(g_cas(il)**(-beta_cas(ixt,il)*gama_cas(ixt,il)))4025 ! : +beta(ixt,il)*gama_cas(ixt,il)*r_jqp0(ixt,il)4026 ! : /f_cas(il)/g_cas(il)4027 ! write(*,*) 'pond Rb0=',gama_cas(ixt,il)*beta_cas(ixt,il)4028 ! : *r_jl0(ixt,il)/f_cas(il)/g_cas(il)4029 ! write(*,*) 'pondRl0=fac1*fac2+t3'4030 ! write(*,*) 'fac1=',4031 ! : f_cas(il)**beta_cas(ixt,il)4032 ! write(*,*) 'fac2=',4033 ! : g_cas(il)**(-beta_cas(ixt,il)*gama_cas(ixt,il))4034 ! write(*,*) 't3=',4035 ! : beta_cas(ixt,il)*gama_cas(ixt,il)*r_jqp0(ixt,il)4036 ! : /f_cas(il)/g_cas(il)4037 ! endif4038 !#endif4039 3958 4040 3959 Pxtiinf_cas(ixt,il)=Pqiinf_cas(il)*Rl(ixt,il) … … 4097 4016 enddo 4098 4017 #endif 4099 #ifdef ISOVERIF 4018 #ifdef ISOVERIF 4100 4019 if (iso_eau.gt.0) then 4101 4020 if (iso_verif_egalite_choix_nostop( & … … 4411 4330 if (iso_HDO.gt.0) then 4412 4331 if (Pqiinf(il).gt.ridicule_rain) then 4413 if (iso_verif_aberrant_nostop( & 4414 & (Pxtiinf(iso_HDO,il)/Pqiinf(il)), & 4415 & 'stewart_explicie 871').eq.1) then 4332 if (iso_verif_aberrant_choix_nostop(Pxtiinf(iso_HDO,il),Pqiinf(il),ridicule_rain,deltalim_snow, & 4333 & 'stewart_explicite 871').eq.1) then 4416 4334 write(*,*) 'deltaDl0=',deltaD( & 4417 4335 & (Rl0(iso_HDO,il))) … … 4428 4346 endif !if (iso_HDO.gt.0) 4429 4347 4430 if ((debug.eq.1).and.(il.eq.il_debug) ) then4348 if ((debug.eq.1).and.(il.eq.il_debug).and.(Eqi(il).gt.0.)) then 4431 4349 write(*,*) 'stewart_explicit 1558: cas avec calcul J' 4432 4350 write(*,*) 'Eqi(il),deltaD=',Eqi(il), & … … 4478 4396 4479 4397 #ifdef ISOVERIF 4480 !write(*,*) 'stewart_explicite vectall 1179: fin'4398 write(*,*) 'stewart_explicite vectall 1179: fin' 4481 4399 #endif 4482 4400 … … 4702 4620 & 'stewart_sublim_nofrac 39') 4703 4621 endif !if ((iso_eau.gt.0).and.(ixt.eq.iso_eau)) then 4704 if ((iso_HDO.gt.0).and. & 4705 & (Pqisup(il).gt.ridicule_rain)) then 4706 call iso_verif_aberrant( & 4707 & (Pxtisup(iso_HDO,il)/Pqisup(il)), & 4708 & 'stewart_sublim_nofrac 40') 4622 if (iso_HDO.gt.0) then ! Camille 9 mars 2023: moins stricte pour condensat 4623 call iso_verif_aberrant_choix(Pxtisup(iso_HDO,il),Pqisup(il), & 4624 & ridicule_rain,deltalim_snow, 'stewart_sublim_nofrac 40') 4709 4625 endif !if ((iso_HDO.gt.0).and.(ixt.eq.iso_HDO).and. 4710 4626 enddo !do il=1,ncas … … 4834 4750 enddo ! do ixt=1,niso 4835 4751 ! verif que deltaD(Pqiinf) raisonable 4836 if ((iso_HDO.gt.0).and. & 4837 & (Pqiinf(il).gt.ridicule_rain)) then 4838 call iso_verif_aberrant( & 4839 & (Pxtiinf(iso_HDO,il)/Pqiinf(il)), & 4840 & 'stewart_sublim 175') 4752 if (iso_HDO.gt.0) then 4753 call iso_verif_aberrant_choix(Pxtiinf(iso_HDO,il),Pqiinf(il), & 4754 & ridicule_rain,deltalim_snow, 'stewart_sublim 175') 4841 4755 endif !if ((iso_HDO.gt.0).and.(ixt.eq.iso_HDO).and. 4842 4756 if (iso_eau.gt.0) then … … 4923 4837 ! integer ntot_cas(ncas) 4924 4838 integer il,ixt 4925 integer coeff_precision4926 parameter (coeff_precision=0.2)4927 4839 4928 4840 … … 10827 10739 & Exi_cas(1,1),Exi(1,1), & 10828 10740 #endif 10829 & xtp_avantevaptrac_cas,0,hdiag(1)) ! hdiag ne sera pas utilis é10741 & xtp_avantevaptrac_cas,0,hdiag(1)) ! hdiag ne sera pas utilise 10830 10742 10831 10743 enddo ! do izone=1,ntraceurs_zone … … 12615 12527 if (iso_verif_aberrant_choix_nostop( & 12616 12528 & zxtliq(iso_HDO,i),cond(i), & 12617 & ridicule,deltalim , &12529 & ridicule,deltalim_snow, & 12618 12530 & 'condiso_liq_ice_vectall 32b').eq.1) then 12619 12531 write(*,*) 'deltaDvap=',deltaD(xt(iso_hdo,i)/qt(i)) … … 12636 12548 write(*,*) 'deltaO18(zxtliq/cond)=',deltaO(zxtliq(iso_O18,i)/cond(i)) 12637 12549 write(*,*) 'tcond(i)=',tcond(i)-t_coup,'°C' 12638 stop12550 !stop ! Camille 9 mars 2023: trop strict 12639 12551 endif !if (iso_verif_O18_aberrant_nostop( 12640 12552 endif ! if (iso_O18.gt.0) then … … 12714 12626 write(*,*) 'zxtalphai(iso_O18,i)=',zxtalphai(iso_O18,i) 12715 12627 write(*,*) 'xt(1:niso,i)=',xt(1:niso,i) 12716 stop12628 !stop ! Camille 9 mars 2023: trop strict 12717 12629 endif !if (iso_verif_O18_aberrant_nostop( 12718 12630 endif ! if (iso_O18.gt.0) then … … 12765 12677 if (zfice(i).gt.0.9) then 12766 12678 if (iso_verif_aberrant_choix_nostop( & 12767 & zxtice(iso_HDO,i),cond(i),ridicule,deltalim_snow, & 12679 & zxtice(iso_HDO,i),cond(i),ridicule,deltalim_snow, & 12680 ! Camille 9 mars 2023: pour le condensat, on laisse plus de 12681 ! marge 12768 12682 & 'condiso_liq_ice_vect 412').eq.1) then 12769 12683 write(*,*) 'debug condiso_liq_ice_vect 449: i,zfice=', & … … 13470 13384 endif !if (iso_eau.gt.0) then 13471 13385 #ifdef ISOTRAC 13472 call iso_verif_traceur(xtsnow_evap(1,i), & 13386 ! call iso_verif_traceur(xtsnow_evap(1,i), & 13387 ! & 'gestion neige 2146') ! attention car snow_evap parfois 13388 ! négatif -> il ne faut pas passer dans les verifs de positivité. 13389 call iso_verif_traceur_justmass(xtsnow_evap(1,i), & 13473 13390 & 'gestion neige 2146') 13474 13391 #endif … … 14141 14058 if (iso_HDO.gt.0) then 14142 14059 call iso_verif_aberrant_choix(-xtsol_evap(iso_HDO,i), & 14143 & sol_evap(i),ridicule_evap,deltalim , &14144 & 'calcul_iso_surf_sic 257 ')14060 & sol_evap(i),ridicule_evap,deltalim_snow, & 14061 & 'calcul_iso_surf_sic 257_sol_evap') 14145 14062 endif 14146 14063 #endif … … 14162 14079 endif !if (iso_eau.gt.0) then 14163 14080 if (iso_HDO.gt.0) then 14164 if (evap(i).gt.ridicule_evap) then 14165 call iso_verif_aberrant(xtevap(iso_HDO,i)/evap(i), & 14166 & 'calcul_iso_surf_sic 257') 14167 endif !if (evap(i).gt.ridicule_evap) then 14081 call iso_verif_aberrant_choix(xtevap(iso_HDO,i),evap(i), & 14082 & ridicule_evap,deltalim_snow,'calcul_iso_surf_sic 257_evap') 14168 14083 endif !if (iso_eau.gt.0) then 14169 14084 #ifdef ISOTRAC … … 14323 14238 enddo !do i=1,knon 14324 14239 endif !if (iso_HDO.gt.0) then 14325 14326 if (iso_eau.gt.0) then 14240 14327 14241 do i=1,knon 14242 if (iso_eau.gt.0) then 14328 14243 call iso_verif_egalite_choix(xtsnow(iso_eau,i),snow(i), & 14329 & 'calcul_iso_surf_lic_vectall 587',errmax,errmaxrel) 14330 enddo 14244 & 'calcul_iso_surf_lic_vectall 587a',errmax,errmaxrel) 14331 14245 endif 14246 if (iso_HDO.gt.0) then 14247 call iso_verif_aberrant_choix(xtsnow(iso_HDO,i), & 14248 & snow(i),ridicule_snow,deltalim_snow, & 14249 & 'calcul_iso_surf_lic 587b') 14250 endif 14251 enddo !do i=1,knon 14332 14252 #endif 14333 14253 … … 14476 14396 & 'calcul_iso_surf_lic 363',errmax,errmaxrel) 14477 14397 endif !if (iso_eau.gt.0) then 14478 if (iso_HDO.gt.0) then 14479 if (snow(i).gt.ridicule_snow) then 14480 call iso_verif_aberrant(xtsnow(iso_HDO,i)/snow(i), & 14481 & 'calcul_iso_surf_lic 367') 14482 endif !if (snow(i).gt.ridicule_snow) then 14398 if (iso_HDO.gt.0) then 14483 14399 call iso_verif_aberrant_choix(xtsnow(iso_HDO,i), & 14484 & snow(i),ridicule ,deltalim_snow, &14400 & snow(i),ridicule_snow,deltalim_snow, & 14485 14401 & 'calcul_iso_surf_lic 797') 14486 if (abs(evap(i)).gt.ridicule_evap) then 14487 call iso_verif_aberrant(xtevap(iso_HDO,i)/evap(i), & 14488 & 'calcul_iso_surf_lic 369') 14489 endif ! if (evap(i).gt.ridicule_evap) then 14402 call iso_verif_aberrant_choix(xtevap(iso_HDO,i),evap(i), & 14403 & ridicule_evap,deltalim_snow, 'calcul_iso_surf_lic 369') 14490 14404 endif !if (iso_eau.gt.0) then 14491 14405 #ifdef ISOTRAC … … 15795 15709 endif !if (iso_eau.gt.0) then 15796 15710 if (iso_HDO.gt.0) then 15797 if (snow(i).gt.ridicule_snow) then 15798 call iso_verif_aberrant(xtsnow(iso_HDO,i)/snow(i), & 15799 & 'calcul_iso_surf_ter 749') 15800 endif !if (snow(i).gt.ridicule_snow) then 15711 call iso_verif_aberrant_choix(xtsnow(iso_HDO,i),snow(i), & 15712 & ridicule_snow,deltalim_snow, 'calcul_iso_surf_ter 749') 15801 15713 call iso_verif_aberrant_choix(xtsnow(iso_HDO,i), & 15802 15714 & snow(i),ridicule,deltalim_snow, & … … 15809 15721 write(*,*) 'sol_evap,snow_evap=', & 15810 15722 & sol_evap(i),snow_evap(i) 15811 write(*,*) 'deltaDsol_evap=', &15723 if (sol_evap(i).gt.ridicule_evap)write(*,*) 'deltaDsol_evap=', & 15812 15724 & deltaD(xtsol_evap(iso_hdo,i)/sol_evap(i)) 15813 write(*,*) 'deltaDsnow_evap=', &15725 if (snow_evap(i).gt.ridicule_evap)write(*,*) 'deltaDsnow_evap=', & 15814 15726 & deltaD(xtsnow_evap(iso_hdo,i)/snow_evap(i)) 15815 15727 write(*,*) 'deltaD1new=',deltaD( & … … 16094 16006 endif !if (iso_eau.gt.0) then 16095 16007 if (iso_HDO.gt.0) then 16096 if (snow(i,nsrf).gt.ridicule_snow) then 16097 call iso_verif_aberrant(xtsnow(iso_hdo,i,nsrf)/snow(i,nsrf), & 16098 & 'phyisoetat0 117') 16099 endif 16008 call iso_verif_aberrant_choix(xtsnow(iso_hdo,i,nsrf),snow(i,nsrf), & 16009 & ridicule_snow, deltalim_snow, 'phyisoetat0 117') 16100 16010 endif !if (iso_eau.gt.0) then 16101 16011 enddo !do nsrf=1,nbsrf … … 16180 16090 real deltaD_snow_fall_O18,deltaD_rain_fall_O18 16181 16091 real alpha(niso),kcin(niso) 16182 real q0,h016183 parameter (q0=20e-3,h0=0.7)16184 16092 ! character*50 text 16185 16093 … … 16314 16222 do k=1,klev 16315 16223 do ixt=1,niso 16316 RMerlivat(ixt)=toce(ixt)/alpha(ixt) & 16317 & *(1-kcin(ixt))/(1.0-kcin(ixt)*h0) 16318 xt_ancien(ixt,i,k)=q_ancien(i,k)*RMerlivat(ixt) & 16319 & *(min(q0,q_ancien(i,k))/q0)**(alpha(ixt)-1.0) 16224 call iso_init_ideal(q_ancien(i,k),xt_ancien(ixt,i,k),ixt, & 16225 alpha(ixt),kcin(ixt),toce(ixt)) 16226 16320 16227 if (q_ancien(i,k).gt.ridicule) then 16321 16228 xtl_ancien(ixt,i,k)=ql_ancien(i,k)*alpha(ixt) & … … 16338 16245 & 'phyisoetat0 16067') 16339 16246 enddo !do ixt=1,niso 16340 if ((k.eq.1).and.(iso_HDO.gt.0).and.(iso_O18.gt.0) & 16341 .and.(abs(q_ancien(i,k)-q0).lt.1e-3)) then16342 ! vérifier qu'on est proche de la fermeture de Merlivat16343 write(*,*) 'i,k=',i,k16344 write(*,*) 'q_ancien(i,k)=',q_ancien(i,k)16345 write(*,*) 'deltaD=',deltaD(xt_ancien(iso_HDO,i,k)/q_ancien(i,k))16346 write(*,*) 'deltaDM=',deltaD(RMerlivat(iso_HDO))16347 write(*,*) 'deltaO=',deltaO(xt_ancien(iso_O18,i,k)/q_ancien(i,k)) 16348 write(*,*) 'deltaOM=',deltaO(RMerlivat(iso_O18))16349 write(*,*) 'dexcess=',dexcess(xt_ancien(iso_HDO,i,k)/q_ancien(i,k), &16350 xt_ancien(iso_O18,i,k)/q_ancien(i,k))16351 write(*,*) 'dexcessM=',dexcess(RMerlivat(iso_HDO),RMerlivat(iso_O18))16352 write(*,*) 'kcin=',kcin16353 write(*,*) 'toce=',toce16354 write(*,*) 'alpha=',alpha16355 call iso_verif_positif(20.0-abs(-80.0-deltaD(xt_ancien(iso_HDO,i,k)/q_ancien(i,k))), &16356 'phyisoetat0 16398a')16357 call iso_verif_positif(5.0-abs(10.0-dexcess(xt_ancien(iso_HDO,i,k)/q_ancien(i,k), &16358 xt_ancien(iso_O18,i,k)/q_ancien(i,k))),'phyisoetat0 16398b')16359 endif 16247 16248 ! Camille 7 mars 2023: ajout d'un check 16249 if ((i.eq.1).and.(k.eq.1).and.(iso_HDO.gt.0)) then 16250 write(*,*) 'phyisoetat0 16362: q_ancien(1,1)=',q_ancien(1,1) 16251 write(*,*) 'deltaD_ancien=',deltaD(xt_ancien(iso_HDO,i,k)/q_ancien(i,k)) 16252 write(*,*) 'xt_ancien(:,i,k)=',xt_ancien(:,i,k) 16253 endif !if ((i.eq.1).and.(k.eq.1)) then 16254 16255 if ((iso_HDO.gt.0).and.(iso_O18.gt.0)) then 16256 if (q_ancien(i,k).gt.ridicule) then 16257 if (iso_verif_o18_aberrant_nostop( & 16258 & xt_ancien(iso_HDO,i,k)/q_ancien(i,k), & 16259 & xt_ancien(iso_O18,i,k)/q_ancien(i,k), & 16260 & 'phyisoetat0 16366 q_ancien').eq.1) then 16261 write(*,*) 'phyisoetat0 16367: i,k,q_ancien(i,k)=',i,k,q_ancien(i,k) 16262 write(*,*) 'xt_ancien(:,i,k)=',xt_ancien(:,i,k) 16263 stop 16264 endif ! if (iso_verif_o18_aberrant_nostop 16265 endif !if (q_seri(i,k).gt.errmax) then 16266 endif !if ((iso_HDO.gt.0).and.(iso_O18.gt.0)) then 16360 16267 #endif 16361 16268 … … 16543 16450 CHARACTER(LEN=2) :: str2 16544 16451 CHARACTER(LEN=5) :: str5 16545 CHARACTER(LEN=maxlen) :: outiso, oldIso, modname, nam( 2)16452 CHARACTER(LEN=maxlen) :: outiso, oldIso, modname, nam(3), oldIso2 16546 16453 REAL :: xmin, xmax 16547 16454 LOGICAL :: found … … 16559 16466 outiso = isoName(ixt) 16560 16467 oldIso = strTail(new2oldH2O(outiso), '_') !--- Remove "H2O_" from "H2O_<iso>[_<tag>]" 16468 i = INDEX(outiso, '_', .TRUE.) 16469 oldIso2 = outiso(1:i-1)//outiso(i+1:LEN_TRIM(outiso)) ! CR 2023: on ajoute cette possibilité aussi, elle correspond au cas le plus récent. 16470 ! write(*,*) 'tmp 16541:' 16471 ! write(*,*) 'outiso=',outiso 16472 ! write(*,*) 'oldIso=',oldIso 16473 ! write(*,*) 'oldIso2=',oldIso2 16474 16561 16475 ! on lit seulement si ixt<=niso ou si on initialise les traceurs d'après fichier: 16562 16476 #ifdef ISOTRAC 16563 16477 IF(ixt <= niso .OR. initialisation_isotrac == 0) THEN 16564 16478 #endif 16565 found = phyetat0iso_srf3(xtsnow, "XTSNOW", "Surface snow", 0.)16566 if (.NOT.found) CALL abort_physic('isotopes_routines_mod', 'phyiso_etat0_fichier 16581: unfound isotopic variable',1)16567 16479 found = phyetat0iso_srf3(fxtevap, "XTEVAP", "evaporation", 0.) 16480 if (.NOT.found) CALL abort_physic('isotopes_routines_mod', 'phyiso_etat0_fichier 16581a: unfound isotopic variable',1) 16568 16481 found = phyetat0iso_get2(xtrain_fall, "xtrain_f", "xrain fall", 0.) 16569 16482 found = phyetat0iso_get2(xtsnow_fall, "xtsnow_f", "xsnow fall", 0.) … … 16571 16484 found = phyetat0iso_get3(xtl_ancien, "XTLANCIEN", "QLANCIEN", 0.) 16572 16485 found = phyetat0iso_get3(xts_ancien, "XTSANCIEN", "QSANCIEN", 0.) 16573 found = phyetat0iso_get2(xtrun_off_lic_0, "XTRUNOFFLIC0", "RUNOFFLIC0", 0.)16574 16486 found = phyetat0iso_get3(wake_deltaxt, "WAKE_DELTAXT", "Delta hum. wake/env", 0.) 16575 16487 #ifdef ISOVERIF … … 16580 16492 DO nsrf = 1, nbsrf 16581 16493 CALL iso_verif_egalite(fxtevap(iso_eau,i,nsrf),fevap(i,nsrf),TRIM(modname)//' 231c') 16582 CALL iso_verif_egalite( xtsnow(iso_eau,i,nsrf), snow(i,nsrf),TRIM(modname)//' 231d')16583 16494 END DO 16584 16495 END DO … … 16592 16503 END DO 16593 16504 END IF 16594 IF(iso_eau > 0 .AND. ixt == iso_eau) THEN16595 DO i=1,klon16596 IF(iso_verif_egalite_nostop(run_off_lic_0(i),xtrun_off_lic_0(iso_eau,i),TRIM(modname)//' 326') == 1) THEN16597 WRITE(*,*) 'i=',i16598 STOP16599 END IF16600 END DO16601 END IF16602 16505 #endif 16603 16506 ! ces variables n'ont pas de traceurs: 16604 16507 IF(ixt <= niso) THEN 16605 16508 found = phyetat0iso_get2(xtsol, "XTSOL", "Surface humidity / bucket", 0.) 16509 if (.NOT.found) CALL abort_physic('isotopes_routines_mod', 'phyiso_etat0_fichier 16581b: unfound isotopic variable',1) 16606 16510 found = phyetat0iso_get2(Rland_ice, "Rland_ice", "SR land ice", 0.) 16607 #ifdef ISOVERIF 16608 16511 found = phyetat0iso_srf3(xtsnow, "XTSNOW", "Surface snow", 0.) ! CR avril 2023: deplacer ici 16512 found = phyetat0iso_get2(xtrun_off_lic_0, "XTRUNOFFLIC0", "RUNOFFLIC0", 0.) 16513 #ifdef ISOVERIF 16609 16514 DO i=1,klon 16610 16515 IF(iso_verif_noNaN_nostop(xtsol(ixt,i),TRIM(modname)//' 95') == 1) THEN … … 16612 16517 STOP 16613 16518 END IF 16614 END DO 16519 IF(ixt == iso_eau .AND. iso_eau > 0) THEN 16520 DO nsrf = 1, nbsrf 16521 CALL iso_verif_egalite(fxtevap(iso_eau,i,nsrf),fevap(i,nsrf),TRIM(modname)//' 231c') 16522 CALL iso_verif_egalite( xtsnow(iso_eau,i,nsrf), snow(i,nsrf),TRIM(modname)//' 231d') 16523 END DO 16524 CALL iso_verif_egalite( xtrun_off_lic_0(iso_eau,i), run_off_lic_0(i),TRIM(modname)//' 231e') 16525 ENDIF !IF(ixt == iso_eau .AND. iso_eau > 0) THEN 16526 END DO !DO i=1,klon 16615 16527 #endif 16616 16528 END IF … … 16680 16592 nam(1) = TRIM(pref)//TRIM(outiso) 16681 16593 nam(2) = TRIM(pref)//TRIM(oldIso) 16594 nam(3) = TRIM(pref)//TRIM(oldIso2) 16682 16595 lFound = phyetat0_get(iso_tmp, nam, descr, default) 16683 16596 field(ixt,:) = iso_tmp … … 16692 16605 nam(1) = TRIM(pref)//TRIM(outiso) 16693 16606 nam(2) = TRIM(pref)//TRIM(oldIso) 16607 nam(3) = TRIM(pref)//TRIM(oldIso2) 16694 16608 lFound = phyetat0_get(iso_tmp_lonlev, nam, descr, default) 16695 16609 field(ixt,:,:) = iso_tmp_lonlev(:,:) … … 16703 16617 nam(1) = TRIM(pref)//TRIM(outiso) 16704 16618 nam(2) = TRIM(pref)//TRIM(oldIso) 16619 nam(3) = TRIM(pref)//TRIM(oldIso2) 16705 16620 lFound = phyetat0_srf(iso_tmp_lonsrf, nam, descr, default) 16706 16621 field(ixt,:,:) = iso_tmp_lonsrf … … 18129 18044 18130 18045 do iessai=1,nessai 18131 day_nucl(iessai) = 0 .18132 month_nucl(iessai) = 0 .18133 year_nucl(iessai) = 0 .18046 day_nucl(iessai) = 0 18047 month_nucl(iessai) = 0 18048 year_nucl(iessai) = 0 18134 18049 lat_nucl(iessai) = 0. 18135 18050 lon_nucl(iessai) = 0. … … 18816 18731 do i=1,n 18817 18732 qttrac(i)=xt(ieau,i) 18818 ! if (qt(i).gt.0.0) then ! modif C Risi juillet 2020 18819 if ((qt(i).gt.0.0).and.(xt(ieau,i).gt.0.0)) then18820 zcondtrac(i)=(zcond(i)/qt(i))* xt(ieau,i)18733 if (qt(i).gt.0.0) then ! modif C Risi juillet 2020 ! remodif Camille 9 mars 2023 18734 ! if ((qt(i).gt.0.0).and.(xt(ieau,i).gt.0.0)) then 18735 zcondtrac(i)=(zcond(i)/qt(i))*qttrac(i) 18821 18736 else !if (qt(i).eq.0) then 18822 18737 #ifdef ISOVERIF … … 18836 18751 endif 18837 18752 if (iso_HDO.gt.0) then 18838 ! if (qttrac(i).gt.ridicule_trac) then18839 18753 call iso_verif_aberrant_choix(xttrac(iso_HDO,i), & 18840 18754 & qttrac(i),ridicule_trac,deltalimtrac, & 18841 18755 & 'condisotrac 205') 18842 ! endif18843 18756 endif 18844 18757 call iso_verif_positif(qt(i)-cond(i), & … … 18853 18766 call condiso_liq_ice_vectall(xttrac,qttrac,zcondtrac, & 18854 18767 & tcond,zfice,zxticetrac,zxtliqtrac,n) 18855 #ifdef ISOVERIF 18856 write(*,*) 'condisotrac 167: après condiso' 18857 #endif 18768 18858 18769 do i=1,n 18859 18770 do iiso=1,niso … … 18881 18792 #endif 18882 18793 18794 subroutine iso_init_ideal(q,xt,ixt,alpha,kcin,toce) 18795 18796 USE isotopes_mod, ONLY: iso_eau,iso_HDO,ridicule 18797 #ifdef ISOVERIF 18798 USE isotopes_verif_mod 18799 #endif 18800 implicit none 18801 18802 ! inputs 18803 real q ! humidité spec 18804 integer ixt ! indice isotopique 18805 real alpha ! coef frac à l'eq 18806 real kcin ! coef frac cinétique 18807 real toce ! rapport iso ds ocean surface 18808 18809 ! outputs 18810 real xt ! equivalent iso de l'humidité spec, même unité. 18811 18812 ! locals 18813 real RMerlivat 18814 real q0,h0 ! conditions initiales de la distill de Rayleigh 18815 parameter (q0=20e-3,h0=0.7) 18816 18817 ! verifier que ixt est un isotope et pas un tagging 18818 if (ixt.gt.niso) then 18819 CALL abort_physic('isotopes_routines_mod', 'iso_init_ideal, ixt>niso', 1) 18820 endif 18821 18822 ! R selon Merlivat: 18823 RMerlivat=toce/alpha *(1.0-kcin)/(1.0-kcin*h0) 18824 18825 ! R d'après Rayleigh 18826 xt=q*RMerlivat*(min(q0,q)/q0)**(alpha-1.0) 18827 18828 #ifdef ISOVERIF 18829 call iso_verif_noNaN(xt, 'isotopes_routines_mod 18930a: iso_init_ideal') 18830 if ((iso_HDO.gt.0).and.(ixt.eq.iso_HDO)) then 18831 if (q.gt.ridicule) then 18832 call iso_verif_aberrant_encadre( xt/q, 'isotopes_routines_mod 18930b: iso_init_ideal') 18833 endif 18834 endif 18835 if ((iso_eau.gt.0).and.(ixt.eq.iso_eau)) then 18836 call iso_verif_egalite(xt,q, 'isotopes_routines_mod 18930c: iso_init_ideal') 18837 endif 18838 #endif 18839 18840 18841 end subroutine iso_init_ideal 18842 18843 18844 subroutine appel_stewart_debug(lwork,nloc,inb,na,i, & 18845 evap,water,rpprec,rr,wdtrain, & 18846 xtevap,xtwater,xtp,xt,xtwdtrain) 18847 USE isotopes_mod, ONLY: iso_eau, iso_HDO,thumxt1, & 18848 & bidouille_anti_divergence,ridicule,Rdefault 18849 use infotrac_phy, ONLY: ntraciso=>ntiso, niso 18850 #ifdef ISOTRAC 18851 use isotrac_mod, only: option_cond,izone_cond,index_iso,index_zone,izone_poubelle 18852 #endif 18853 #ifdef ISOVERIF 18854 USE isotopes_verif_mod 18855 #endif 18856 implicit none 18857 18858 18859 ! inputs 18860 integer nloc,na,i ! dimension horiz effective 18861 logical lwork(nloc) 18862 real wdtrain(nloc),xtwdtrain(ntraciso,nloc) 18863 real xt(ntraciso,nloc,na) 18864 real evap(nloc,na),water(nloc,na),rpprec(nloc,na),rr(nloc,na) 18865 integer inb(nloc) 18866 18867 ! outputs 18868 real xtevap(ntraciso,nloc,na),xtwater(ntraciso,nloc,na),xtp(ntraciso,nloc,na) 18869 18870 ! locals 18871 integer il,ixt 18872 18873 do il=1,nloc 18874 if (i.le.inb(il) .and. lwork(il)) then 18875 if (wdtrain(il).gt.0.) then 18876 do ixt=1,ntraciso 18877 xtwater(ixt,il,i)= xtwdtrain(ixt,il)/wdtrain(il)*water(il,i) 18878 xtevap(ixt,il,i)= xtwdtrain(ixt,il)/wdtrain(il)*evap(il,i) 18879 enddo 18880 else !if (wdtrain(il).gt.0.) then 18881 do ixt=1,niso 18882 xtwater(ixt,il,i)= Rdefault(ixt)*water(il,i) 18883 xtevap(ixt,il,i)= Rdefault(ixt)*evap(il,i) 18884 enddo 18885 #ifdef ISOTRAC 18886 do ixt=1+niso,ntraciso 18887 if (index_zone(ixt).eq.izone_poubelle) then 18888 xtwater(ixt,il,i)= Rdefault(index_iso(ixt))*water(il,i) 18889 xtevap(ixt,il,i)= Rdefault(index_iso(ixt))*evap(il,i) 18890 else 18891 xtwater(ixt,il,i)= 0. 18892 xtevap(ixt,il,i)=0. 18893 endif 18894 enddo ! do ixt=1+niso,ntraciso 18895 #endif 18896 endif !if (wdtrain(il).gt.0.) then 18897 do ixt=1,ntraciso 18898 xtp(ixt,il,i)= xt(ixt,il,i)/rr(il,i)*rpprec(il,i) 18899 enddo !do ixt=1,ntraciso 18900 endif 18901 enddo ! do il=1,ncum 18902 end subroutine appel_stewart_debug 18903 18883 18904 END MODULE isotopes_routines_mod 18884 18905 #endif -
LMDZ6/trunk/libf/phylmdiso/isotopes_verif_mod.F90
r4300 r4491 2028 2028 2029 2029 if (iso_verif_egalite_choix_nostop(xtractot,x(iiso), & 2030 & err_msg//', verif trac egalite , iso '// &2030 & err_msg//', verif trac egalite1, iso '// & 2031 2031 & TRIM(isoName(iiso)), & 2032 2032 & errmaxin,errmaxrelin).eq.1) then 2033 2033 write(*,*) 'iso_verif_traceur 202: x=',x 2034 2034 ! write(*,*) 'xtractot=',xtractot 2035 do izone=1,nzone 2036 ixt=itZonIso(izone,iiso) 2037 write(*,*) 'izone,iiso,ixt=',izone,iiso,ixt 2038 enddo 2035 2039 iso_verif_tracm_choix_nostop=1 2036 2040 endif … … 2398 2402 call iso_verif_egalite_std_vect( & 2399 2403 & xtractot,xiiso, & 2400 & err_msg//', verif trac egalite , iso ' &2404 & err_msg//', verif trac egalite2, iso ' & 2401 2405 & //TRIM(isoName(iiso)), & 2402 2406 & n,m,errmax,errmaxrel) -
LMDZ6/trunk/libf/phylmdiso/isotrac_routines_mod.F90
r4325 r4491 508 508 ! write(*,*) 'compress 910: xtp_avantevap(iso_eau,cas(1))=', 509 509 ! : xtp_avantevap(iso_eau,cas(1)) 510 ! write(*,*) 'compress_evap_liq_zone 510: ncas,ncum=',ncas,ncum 511 ptrac(:)=0. ! CR 31 mars 2023: initialisation de ptrac 510 512 511 513 ieau=index_trac(izone,iso_eau) … … 519 521 else 520 522 #ifdef ISOVERIF 521 523 call iso_verif_egalite(( & 522 524 & Eqi_prime(cas(il))),0.0, & 523 525 & 'compress_stewart 979') … … 685 687 call iso_verif_egalite(( & 686 688 & Eqi_prime(cas(il))),0.0, & 687 & 'compress_stewart 979 ')689 & 'compress_stewart 979b') 688 690 #endif 689 691 Eqi_prime_cas(il)=0.0 … … 870 872 enddo ! do iiso=1,niso 871 873 endif !if ((Eqi(il)*fac_ftmr(il).gt.evap_franche).and. 872 #ifdef ISOVERIF873 if (il.eq.9) then874 ixt=index_trac(2,2)875 write(*,*) 'il,ixt,xtrevap_tag(ixt,il)=', &876 & il,xtrevap_tag(ixt,il)877 endif !if (il.eq.9) then878 #endif879 874 enddo !do il=1,ncas 880 875 ! write(*,*) 'compress_stewart 1453 tmp: zxt=', … … 2791 2786 real xtractot 2792 2787 2793 write(*,*) 'iso_verif_traceur tmp 822: xt(:,66,1)=',x(:,66,1)2794 2788 ! verif noNaN 2795 2789 call iso_verif_traceur_noNaN_vect(x,n,m,err_msg) -
LMDZ6/trunk/libf/phylmdiso/pbl_surface_mod.F90
r4478 r4491 2407 2407 call iso_verif_noNaN(yxtevap(ixt,j), & 2408 2408 & 'pbl_surface 1056a: apres surf_land') 2409 enddo 2410 do ixt=1,niso 2409 2411 call iso_verif_noNaN(yxtsol(ixt,j), & 2410 2412 & 'pbl_surface 1056b: apres surf_land') … … 2475 2477 call iso_verif_noNaN(yxtevap(ixt,j), & 2476 2478 & 'pbl_surface 1095a: apres surf_landice') 2479 enddo 2480 do ixt=1,niso 2477 2481 call iso_verif_noNaN(yxtsol(ixt,j), & 2478 2482 & 'pbl_surface 1095b: apres surf_landice') … … 2570 2574 call iso_verif_noNaN(yxtevap(ixt,j), & 2571 2575 & 'pbl_surface 1165a: apres surf_seaice') 2576 enddo 2577 do ixt=1,niso 2572 2578 call iso_verif_noNaN(yxtsol(ixt,j), & 2573 2579 & 'pbl_surface 1165b: apres surf_seaice') -
LMDZ6/trunk/libf/phylmdiso/phyredem.F90
r4389 r4491 581 581 CALL put_field_srf1(pass, "XTEVAP"//TRIM(outiso), "Evaporation de surface",iso_tmp_lonsrf) 582 582 583 iso_tmp_lonsrf(:,:)=xtsnow(ixt,:,:)584 CALL put_field_srf1(pass, "XTSNOW"//TRIM(outiso), "NEIGE", iso_tmp_lonsrf)585 586 583 iso_tmp(:)=xtrain_fall(ixt,:) 587 584 CALL put_field(pass, "xtrain_f"//TRIM(outiso), "precipitation liquide",iso_tmp) … … 602 599 CALL put_field(pass,"WAKE_DELTAXT"//TRIM(outiso), "WAKE_DELTAQ", iso_tmp_lonlev) 603 600 601 iso_tmp_lonlev(:,:)=wake_deltaxt(ixt,:,:) 602 CALL put_field(pass,"WAKE_DELTAXT"//TRIM(outiso), "WAKE_DELTAXT",iso_tmp_lonlev) 603 604 ! variables seulement pour niso: 605 if (ixt.le.niso) then 606 607 iso_tmp_lonsrf(:,:)=xtsnow(ixt,:,:) 608 CALL put_field_srf1(pass, "XTSNOW"//TRIM(outiso), "NEIGE", iso_tmp_lonsrf) 609 610 iso_tmp(:)=xtsol(ixt,:) 611 CALL put_field(pass, "XTSOL"//TRIM(outiso), "Eau dans le sol (mm)",iso_tmp) 612 613 iso_tmp(:)=Rland_ice(ixt,:) 614 CALL put_field(pass, "Rland_ice"//TRIM(outiso), "ratio land ice", iso_tmp) 615 604 616 iso_tmp(:)=xtrun_off_lic_0(ixt,:) 605 617 CALL put_field(pass,"XTRUNOFFLIC0"//TRIM(outiso), "Runofflic0", iso_tmp) 606 618 607 iso_tmp_lonlev(:,:)=wake_deltaxt(ixt,:,:)608 CALL put_field(pass,"WAKE_DELTAXT"//TRIM(outiso), "WAKE_DELTAXT",iso_tmp_lonlev)609 610 ! variables seulement pour niso:611 if (ixt.le.niso) then612 613 iso_tmp(:)=xtsol(ixt,:)614 CALL put_field(pass, "XTSOL"//TRIM(outiso), "Eau dans le sol (mm)",iso_tmp)615 616 iso_tmp(:)=Rland_ice(ixt,:)617 CALL put_field(pass, "Rland_ice"//TRIM(outiso), "ratio land ice", iso_tmp)618 619 619 endif ! if (ixt.le.niso) then 620 620 -
LMDZ6/trunk/libf/phylmdiso/physiq_mod.F90
r4479 r4491 157 157 & iso_verif_aberrant_choix,iso_verif_positif, & 158 158 & iso_verif_positif_choix_vect,iso_verif_o18_aberrant_nostop, & 159 & iso_verif_init, &159 & iso_verif_init,iso_verif_aberrant_enc_choix_nostop,& 160 160 & iso_verif_positif_strict_nostop,iso_verif_O18_aberrant_enc_vect2D 161 161 #endif … … 2480 2480 #ifdef ISO 2481 2481 #ifdef ISOVERIF 2482 ! write(*,*) 'physiq 1847: qx(1,1,:)=',qx(1,1,:) 2482 write(*,*) 'physiq 1847: qx(1,1,:)=',qx(1,1,:) 2483 write(*,*) 'iqIsoPha(:,ivap)=',iqIsoPha(:,ivap) 2483 2484 write(*,*) 'physiq 1846b: ok_isotopes,ntraciso,niso=',niso>0,ntraciso,niso 2484 2485 #endif … … 2596 2597 & 'physiq 2099 ql').eq.1) then 2597 2598 write(*,*) 'i,k,ql_seri(i,k)=',i,k,ql_seri(i,k) 2598 stop2599 !stop 2599 2600 endif ! if (iso_verif_o18_aberrant_nostop 2600 2601 endif !if (q_seri(i,k).gt.errmax) then … … 2605 2606 & 'physiq 2099 qs').eq.1) then 2606 2607 write(*,*) 'i,k,qs_seri(i,k)=',i,k,qs_seri(i,k) 2607 stop2608 !stop 2608 2609 endif ! if (iso_verif_o18_aberrant_nostop 2609 2610 endif !if (q_seri(i,k).gt.errmax) then 2610 2611 enddo !k=1,klev 2611 2612 enddo !i=1,klon 2612 endif !if ((iso_HDO.gt.0).and.(iso_O18.gt.0)) then 2613 endif !if ((iso_HDO.gt.0).and.(iso_O18.gt.0)) then 2614 #ifdef ISOTRAC 2615 DO k = 1, klev 2616 DO i = 1, klon 2617 call iso_verif_traceur(xt_seri(1,i,k),'physiq 2620a') 2618 call iso_verif_traceur(xtl_seri(1,i,k),'physiq 2620b') 2619 call iso_verif_traceur(xts_seri(1,i,k),'physiq 2620c') 2620 enddo 2621 enddo 2622 #endif 2613 2623 #endif 2614 2624 ! … … 2844 2854 ENDIF 2845 2855 ENDIF 2856 2857 #ifdef ISO 2858 #ifdef ISOVERIF 2859 #ifdef ISOTRAC 2860 DO k = 1, klev 2861 DO i = 1, klon 2862 call iso_verif_traceur(xt_seri(1,i,k), & 2863 & 'physiq 2856: avant reevp') 2864 enddo 2865 enddo 2866 #endif 2867 #endif 2868 #endif 2846 2869 ! 2847 2870 ! Re-evaporer l'eau liquide nuageuse … … 3458 3481 call iso_verif_egalite(q_w(i,k),xt_w(iso_eau,i,k),'physiq 3338') 3459 3482 endif 3483 if (iso_HDO.gt.0) then 3484 if ((iso_verif_aberrant_enc_choix_nostop(xt_x(iso_hdo,i,k),q_x(i,k), & 3485 ridicule,deltalim,'physic 3462a xt_x').eq.1).or. & 3486 (iso_verif_aberrant_enc_choix_nostop(xt_w(iso_hdo,i,k),q_w(i,k), & 3487 ridicule,deltalim,'physic 3462b xt_w').eq.1)) then 3488 write(*,*) 'i,k=',i,k 3489 write(*,*) 'q_x(i,k),q_seri(i,k),wake_s(i),wake_deltaq(i,k)=', & 3490 q_x(i,k),q_seri(i,k),wake_s(i),wake_deltaq(i,k) 3491 write(*,*) 'xt_x(iso_hdo,i,k),xt_seri(iso_hdo,i,k),wake_s(i),wake_deltaxt(iso_hdo,i,k)=', & 3492 xt_x(iso_hdo,i,k),xt_seri(iso_hdo,i,k),wake_s(i),wake_deltaxt(iso_hdo,i,k) 3493 write(*,*) 'deltaD_seri,wake=',deltaD(xt_seri(iso_hdo,i,k)/q_seri(i,k)), & 3494 deltaD(wake_deltaxt(iso_hdo,i,k)/wake_deltaq(i,k)) 3495 write(*,*) 'deltaD_x,deltaD_w=',deltaD(xt_x(iso_hdo,i,k)/q_x(i,k)),deltaD(xt_w(iso_hdo,i,k)/q_w(i,k)) 3496 stop 3497 endif 3498 endif 3460 3499 #endif 3461 3500 #endif … … 3590 3629 call iso_verif_aberrant_encadre( & 3591 3630 & xt_w(iso_hdo,i,k)/q_w(i,k), & 3592 & 'physic 2657 b')3631 & 'physic 2657c') 3593 3632 endif !if (q_x(i,k).gt.ridicule) then 3594 3633 endif !if (iso_HDO.gt.0) then … … 4255 4294 endif !if ((iso_HDO.gt.0).and.(iso_O18.gt.0)) then 4256 4295 if ((iso_O17.gt.0).and.(iso_O18.gt.0)) then 4257 if ((q_seri(i,k).gt.ridicule).and.( l.lt.nlevmaxO17)) then4296 if ((q_seri(i,k).gt.ridicule).and.(k.lt.nlevmaxO17)) then 4258 4297 call iso_verif_aberrant_o17(xt_seri(iso_o17,i,k) & 4259 4298 & /q_seri(i,k),xt_seri(iso_o18,i,k) & … … 4619 4658 do i=1,klon 4620 4659 if ((iso_O17.gt.0).and.(iso_O18.gt.0)) then 4621 if ((q_seri(i,k).gt.ridicule).and.( l.lt.nlevmaxO17)) then4660 if ((q_seri(i,k).gt.ridicule).and.(k.lt.nlevmaxO17)) then 4622 4661 call iso_verif_aberrant_o17(xt_seri(iso_o17,i,k) & 4623 4662 & /q_seri(i,k),xt_seri(iso_o18,i,k) & … … 4841 4880 endif !if (q_seri(i,k).gt.errmax) then 4842 4881 if (ql_seri(i,k).gt.ridicule) then 4843 call iso_verif_aberrant (&4844 & xtl_seri(iso_HDO,i,k)/ql_seri(i,k),'physiq 2871')4882 call iso_verif_aberrant_choix(xtl_seri(iso_HDO,i,k),ql_seri(i,k), & 4883 ridicule,deltalim_snow,'physiq 2871') 4845 4884 if (iso_O18.gt.0) then 4846 4885 if (iso_verif_o18_aberrant_nostop( & … … 4854 4893 write(*,*) 'deltaO(d_ql_lsc(i,k))=',deltaO( & 4855 4894 & d_xtl_lsc(iso_O18,i,k)/d_ql_lsc(i,k)) 4856 stop4895 !stop 4857 4896 endif 4858 4897 endif ! if (iso_O18.gt.0) then … … 4864 4903 do i=1,klon 4865 4904 do k=1,nlev 4866 if ((q_seri(i,k).gt.ridicule).and.( l.lt.nlevmaxO17)) then4905 if ((q_seri(i,k).gt.ridicule).and.(k.lt.nlevmaxO17)) then 4867 4906 call iso_verif_aberrant_o17(xt_seri(iso_o17,i,k) & 4868 4907 & /q_seri(i,k),xt_seri(iso_o18,i,k) & … … 6149 6188 & xt_seri(iso_HDO,i,k)/q_seri(i,k), & 6150 6189 & xt_seri(iso_O18,i,k)/q_seri(i,k), & 6151 & 'physiq 5937 , juste apres methox, qv').eq.1) then6190 & 'physiq 5937a, juste apres methox, qv').eq.1) then 6152 6191 write(*,*) 'physic 2444: i,k,q_seri(i,k)=',i,k,q_seri(i,k) 6153 6192 write(*,*) 'xt_seri(:,i,k)=',xt_seri(:,i,k) … … 6159 6198 & xtl_seri(iso_HDO,i,k)/ql_seri(i,k), & 6160 6199 & xtl_seri(iso_O18,i,k)/ql_seri(i,k), & 6161 & 'physiq 5937 , juste apres methox, ql').eq.1) then6200 & 'physiq 5937b, juste apres methox, ql').eq.1) then 6162 6201 write(*,*) 'i,k,ql_seri(i,k)=',i,k,ql_seri(i,k) 6163 stop6202 !stop 6164 6203 endif ! if (iso_verif_o18_aberrant_nostop 6165 6204 endif !if (q_seri(i,k).gt.errmax) then … … 6168 6207 & xts_seri(iso_HDO,i,k)/qs_seri(i,k), & 6169 6208 & xts_seri(iso_O18,i,k)/qs_seri(i,k), & 6170 & 'physiq 5937 , juste apres methox, qs').eq.1) then6209 & 'physiq 5937c, juste apres methox, qs').eq.1) then 6171 6210 write(*,*) 'i,k,qs_seri(i,k)=',i,k,qs_seri(i,k) 6172 stop6211 !stop 6173 6212 endif ! if (iso_verif_o18_aberrant_nostop 6174 6213 endif !if (q_seri(i,k).gt.errmax) then -
LMDZ6/trunk/libf/phylmdiso/reevap.F90
r4143 r4491 85 85 do ixt=1,ntiso 86 86 call iso_verif_noNaN(xt_seri(ixt,i,k), & 87 & ' physiq2417: apres evap tot')87 & 'reevap 2417: apres evap tot') 88 88 enddo 89 89 if (iso_eau.gt.0) then 90 90 call iso_verif_egalite_choix( & 91 91 & xt_seri(iso_eau,i,k),q_seri(i,k), & 92 & ' physiq1891+, après reevap totale',errmax,errmaxrel)92 & 'reevap 1891+, après reevap totale',errmax,errmaxrel) 93 93 call iso_verif_egalite_choix( & 94 94 & xtl_seri(iso_eau,i,k),ql_seri(i,k), & 95 & ' physiq2209+, après reevap totale',errmax,errmaxrel)95 & 'reevap 2209+, après reevap totale',errmax,errmaxrel) 96 96 endif !if (iso_eau.gt.0) then 97 97 if ((iso_HDO.gt.0).and.(iso_O18.gt.0)) then … … 100 100 & xt_seri(iso_HDO,i,k)/q_seri(i,k), & 101 101 & xt_seri(iso_O18,i,k)/q_seri(i,k), & 102 & ' physiq2315: apres reevap totale').eq.1) then102 & 'reevap 2315: apres reevap totale').eq.1) then 103 103 write(*,*) 'i,k,q_seri(i,k)=',i,k,q_seri(i,k) 104 104 write(*,*) 'd_q_eva(i,k)=',d_q_eva(i,k) … … 111 111 #ifdef ISOTRAC 112 112 call iso_verif_traceur(xt_seri(1,i,k), & 113 & ' physiq 2165')113 & 'reevap 2165a') 114 114 call iso_verif_traceur_pbidouille(xt_seri(1,i,k), & 115 & ' physiq2165b')115 & 'reevap 2165b') 116 116 #endif 117 117 … … 146 146 do ixt=1,ntiso 147 147 call iso_verif_noNaN(xt_seri(ixt,i,k), & 148 & ' physiq2417: apres evap tot')148 & 'reevap 2417: apres evap tot') 149 149 enddo 150 150 if (iso_eau.gt.0) then 151 151 call iso_verif_egalite_choix( & 152 152 & xt_seri(iso_eau,i,k),q_seri(i,k), & 153 & ' physiq1891, après réévap totale',errmax,errmaxrel)153 & 'reevap 1891, après réévap totale',errmax,errmaxrel) 154 154 call iso_verif_egalite_choix( & 155 155 & xtl_seri(iso_eau,i,k),ql_seri(i,k), & 156 & ' physiq2209, après réévap totale',errmax,errmaxrel)156 & 'reevap 2209, après réévap totale',errmax,errmaxrel) 157 157 call iso_verif_egalite_choix( & 158 158 & xts_seri(iso_eau,i,k),qs_seri(i,k), & 159 & ' physiq2209b, après réévap totale',errmax,errmaxrel)159 & 'reevap 2209b, après réévap totale',errmax,errmaxrel) 160 160 endif !if (iso_eau.gt.0) then 161 161 … … 165 165 & xt_seri(iso_HDO,i,k)/q_seri(i,k), & 166 166 & xt_seri(iso_O18,i,k)/q_seri(i,k), & 167 & ' physiq2408: apres reevap totale').eq.1) then167 & 'reevap 2408: apres reevap totale').eq.1) then 168 168 write(*,*) 'i,k,q_seri(i,k)=',i,k,q_seri(i,k) 169 169 stop … … 173 173 #ifdef ISOTRAC 174 174 call iso_verif_traceur(xt_seri(1,i,k), & 175 & ' physiq 2165')175 & 'reevap 2165c') 176 176 call iso_verif_traceur_pbidouille(xt_seri(1,i,k), & 177 & ' physiq 2165b')177 & 'reevap 2165d') 178 178 #endif 179 179 #endif -
LMDZ6/trunk/libf/phylmdiso/wake.F90
r4374 r4491 38 38 USE isotopes_verif_mod 39 39 !, ONLY: errmax,errmaxrel 40 USE isotopes_mod, ONLY: iso_eau,iso_hdo 40 USE isotopes_mod, ONLY: iso_eau,iso_hdo,ridicule 41 41 #endif 42 42 #endif … … 714 714 xtu(ixt,i,k) = xte(ixt,i,k) - deltaxtw(ixt,i,k)*sigmaw(i) 715 715 enddo !do ixt=1,ntraciso 716 #endif717 END DO718 END DO719 720 721 #ifdef ISO722 716 #ifdef ISOVERIF 723 ! TODO 724 #endif 725 #endif 717 if (iso_eau.gt.0) then 718 call iso_verif_egalite(deltaqw(i,k),deltaxtw(iso_eau,i,k),'wake 723a') 719 call iso_verif_egalite(qu(i,k),xtu(iso_eau,i,k),'wake 723b') 720 endif 721 if (iso_HDO.gt.0) then 722 if (iso_verif_aberrant_enc_choix_nostop(xtu(iso_hdo,i,k),qu(i,k),ridicule,deltalim, & 723 'wake 723c xtu').eq.1) then 724 stop 725 endif 726 endif 727 #endif 728 #endif 729 END DO 730 END DO 731 732 726 733 727 734 DO k = 1, klev - 1 … … 1837 1844 #ifdef ISO 1838 1845 #ifdef ISOVERIF 1846 write(*,*) 'wake 1859' 1839 1847 if (iso_eau.gt.0) then 1840 1848 DO k= 1,klev
Note: See TracChangeset
for help on using the changeset viewer.