Changeset 5098 for LMDZ6/branches/Amaury_dev
- Timestamp:
- Jul 22, 2024, 6:53:44 PM (4 months ago)
- Location:
- LMDZ6/branches/Amaury_dev
- Files:
-
- 1 added
- 46 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/dyn3d/vlsplt.F
r5082 r5098 210 210 211 211 DO ij=iip2+1,ip1jm 212 #ifdef CRAY213 dxq(ij,l)=214 , cvmgp(dxqu(ij-1)+dxqu(ij),0.,dxqu(ij-1)*dxqu(ij))215 #else216 212 IF(dxqu(ij-1)*dxqu(ij)>0) THEN 217 213 dxq(ij,l)=dxqu(ij-1)+dxqu(ij) … … 220 216 dxq(ij,l)=0. 221 217 ENDIF 222 #endif223 218 dxq(ij,l)=0.5*dxq(ij,l) 224 219 dxq(ij,l)= … … 274 269 c calcul des flux a gauche et a droite 275 270 276 #ifdef CRAY277 278 DO l=1,llm279 DO ij=iip2,ip1jm-1280 zdum(ij,l)=cvmgp(1.-u_m(ij,l)/masse(ij,l,iq),281 , 1.+u_m(ij,l)/masse(ij+1,l,iq),282 , u_m(ij,l))283 zdum(ij,l)=0.5*zdum(ij,l)284 u_mq(ij,l)=cvmgp(285 , q(ij,l,iq)+zdum(ij,l)*dxq(ij,l),286 , q(ij+1,l,iq)-zdum(ij,l)*dxq(ij+1,l),287 , u_m(ij,l))288 u_mq(ij,l)=u_m(ij,l)*u_mq(ij,l)289 ENDDO290 ENDDO291 #else292 271 c on cumule le flux correspondant a toutes les mailles dont la masse 293 272 c au travers de la paroi pENDant le pas de temps. … … 307 286 ENDDO 308 287 ENDDO 309 #endif310 288 311 289 c go to 9999 … … 883 861 INTEGER ifils,iq2 ! CRisi 884 862 885 LOGICAL testcpu886 SAVE testcpu887 888 863 #ifdef BIDON 889 864 REAL temps0,temps1,second 890 865 SAVE temps0,temps1 891 866 892 DATA testcpu/.false./893 867 DATA temps0,temps1/0.,0./ 894 868 #endif … … 899 873 !write(*,*) 'vlz 923: entree' 900 874 901 #ifdef BIDON902 IF(testcpu) THEN903 temps0=second(0.)904 ENDIF905 #endif906 875 DO l=2,llm 907 876 DO ij=1,ip1jmp1 … … 913 882 DO l=2,llm-1 914 883 DO ij=1,ip1jmp1 915 #ifdef CRAY916 dzq(ij,l)=0.5*917 , cvmgp(dzqw(ij,l)+dzqw(ij,l+1),0.,dzqw(ij,l)*dzqw(ij,l+1))918 #else919 884 IF(dzqw(ij,l)*dzqw(ij,l+1)>0.) THEN 920 885 dzq(ij,l)=0.5*(dzqw(ij,l)+dzqw(ij,l+1)) … … 922 887 dzq(ij,l)=0. 923 888 ENDIF 924 #endif925 889 dzqmax=pente_max*min(adzqw(ij,l),adzqw(ij,l+1)) 926 890 dzq(ij,l)=sign(min(abs(dzq(ij,l)),dzqmax),dzq(ij,l)) … … 934 898 ENDDO 935 899 936 #ifdef BIDON937 IF(testcpu) THEN938 temps1=temps1+second(0.)-temps0939 ENDIF940 #endif941 900 c --------------------------------------------------------------- 942 901 c .... calcul des termes d'advection verticale ....... -
LMDZ6/branches/Amaury_dev/libf/dyn3d/vlspltqs.F
r5082 r5098 55 55 REAL temps1,temps2,temps3 56 56 REAL zzpbar, zzw 57 LOGICAL testcpu58 SAVE testcpu59 57 SAVE temps1,temps2,temps3 60 58 61 59 REAL qmin,qmax 62 60 DATA qmin,qmax/0.,1.e33/ 63 DATA testcpu/.false./64 61 DATA temps1,temps2,temps3/0.,0.,0./ 65 62 … … 220 217 INTEGER ifils,iq2 ! CRisi 221 218 222 Logical first ,testcpu223 SAVE first ,testcpu219 Logical first 220 SAVE first 224 221 225 222 REAL SSUM … … 228 225 229 226 230 DATA first ,testcpu/.true.,.false./227 DATA first/.true./ 231 228 232 229 IF(first) THEN … … 278 275 279 276 DO ij=iip2+1,ip1jm 280 #ifdef CRAY281 dxq(ij,l)=282 , cvmgp(dxqu(ij-1)+dxqu(ij),0.,dxqu(ij-1)*dxqu(ij))283 #else284 277 IF(dxqu(ij-1)*dxqu(ij)>0) THEN 285 278 dxq(ij,l)=dxqu(ij-1)+dxqu(ij) … … 288 281 dxq(ij,l)=0. 289 282 ENDIF 290 #endif291 283 dxq(ij,l)=0.5*dxq(ij,l) 292 284 dxq(ij,l)= … … 341 333 c calcul des flux a gauche et a droite 342 334 343 #ifdef CRAY344 c--pas encore modification sur Qsat345 DO l=1,llm346 DO ij=iip2,ip1jm-1347 zdum(ij,l)=cvmgp(1.-u_m(ij,l)/masse(ij,l,iq),348 , 1.+u_m(ij,l)/masse(ij+1,l,iq),349 , u_m(ij,l))350 zdum(ij,l)=0.5*zdum(ij,l)351 u_mq(ij,l)=cvmgp(352 , q(ij,l,iq)+zdum(ij,l)*dxq(ij,l),353 , q(ij+1,l,iq)-zdum(ij,l)*dxq(ij+1,l),354 , u_m(ij,l))355 u_mq(ij,l)=u_m(ij,l)*u_mq(ij,l)356 ENDDO357 ENDDO358 #else359 335 c on cumule le flux correspondant a toutes les mailles dont la masse 360 336 c au travers de la paroi pENDant le pas de temps. … … 373 349 ENDDO 374 350 ENDDO 375 #endif376 351 377 352 … … 581 556 REAL qpns,qpsn,dyn1,dys1,dyn2,dys2,newmasse,fn,fs 582 557 c REAL newq,oldmasse 583 Logical first ,testcpu558 Logical first 584 559 REAL temps0,temps1,temps2,temps3,temps4,temps5 585 560 SAVE temps0,temps1,temps2,temps3,temps4,temps5 586 SAVE first ,testcpu561 SAVE first 587 562 588 563 REAL convpn,convps,convmpn,convmps … … 598 573 REAL SSUM 599 574 600 DATA first ,testcpu/.true.,.false./575 DATA first/.true./ 601 576 DATA temps0,temps1,temps2,temps3,temps4,temps5/0.,0.,0.,0.,0.,0./ 602 577 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advn.F
r5082 r5098 31 31 REAL w(ip1jmp1,llm),pdt 32 32 c 33 c Local 33 c Local 34 34 c --------- 35 35 c … … 47 47 real zqh(ip1jmp1,llm),zqb(ip1jmp1,llm) 48 48 real temps0,temps1,temps2,temps3 49 real ztemps1,ztemps2,ztemps3,ssum 50 logical testcpu 51 save testcpu 49 real ztemps1,ztemps2,ssum 52 50 save temps1,temps2,temps3 53 51 real zzpbar,zzw 54 52 55 #ifdef CRAY56 real second57 #endif58 59 53 real qmin,qmax 60 54 data qmin,qmax/0.,1./ 61 data testcpu/.false./62 55 data temps1,temps2,temps3/0.,0.,0./ 63 56 … … 120 113 c call minmaxq(zq,qmin,qmax,'apres vlx ') 121 114 122 #ifdef CRAY123 if(testcpu) then124 ztemps1=second(0.)125 temps1=temps1+ztemps1-ztemps2126 print*,'VLSPLT X:',temps1,' Y:',temps2,' Z:',temps3127 endif128 #endif129 115 do l=1,llm 130 116 do ij=1,ip1jmp1 … … 155 141 real q(ip1jmp1,llm),qg(ip1jmp1,llm),qd(ip1jmp1,llm) 156 142 c 157 c Local 143 c Local 158 144 c --------- 159 145 c … … 272 258 real q(ip1jmp1,llm),qs(ip1jmp1,llm),qn(ip1jmp1,llm) 273 259 c 274 c Local 260 c Local 275 261 c --------- 276 262 c … … 368 354 real q(ip1jmp1,llm),qh(ip1jmp1,llm),qb(ip1jmp1,llm) 369 355 c 370 c Local 356 c Local 371 357 c --------- 372 358 c … … 493 479 real q(ip1jmp1,llm),qd(ip1jmp1,llm),qg(ip1jmp1,llm) 494 480 c 495 c Local 481 c Local 496 482 c --------- 497 483 c … … 510 496 save prec 511 497 512 #ifdef CRAY513 data prec/1.e-24/514 #else515 498 data prec/1.e-15/ 516 #endif517 499 518 500 do l=1,llm … … 573 555 u_mq(ij,l)= 574 556 s sign(zm,u_m(ij,l))*(zsigp*zqp+(zsig-zsigp)*zqm) 575 endif 557 endif 576 558 else 577 559 if (zsig<=zsigp) then … … 703 685 endif 704 686 enddo 705 endif ! n0.gt.0 687 endif ! n0.gt.0 706 688 707 689 c bouclage en latitude … … 758 740 real q(ip1jmp1,llm),qn(ip1jmp1,llm),qs(ip1jmp1,llm) 759 741 c 760 c Local 742 c Local 761 743 c --------- 762 744 c … … 772 754 save prec 773 755 774 #ifdef CRAY775 data prec/1.e-24/776 #else777 756 data prec/1.e-15/ 778 #endif779 757 do l=1,llm 780 758 do ij=1,ip1jmp1 … … 825 803 else 826 804 zz=0.5*(zsig-zsigp)/zsigm 827 v_mq(ij,l)=sign(zm,v_m(ij,l))*( 0.5*(zq+zqp)*zsigp 805 v_mq(ij,l)=sign(zm,v_m(ij,l))*( 0.5*(zq+zqp)*zsigp 828 806 s +(zsig-zsigp)*(zq+zz*(zqm-zq)) ) 829 807 endif … … 890 868 891 869 c 892 c Local 870 c Local 893 871 c --------- 894 872 c … … 902 880 save prec 903 881 904 #ifdef CRAY905 data prec/1.e-24/906 #else907 882 data prec/1.e-13/ 908 #endif909 883 910 884 do l=1,llm -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/infotrac.F90
r5091 r5098 3 3 MODULE infotrac 4 4 5 USE strings_mod, ONLY: msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse6 USE readTracFiles_mod, ONLY: trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, &7 delPhase, niso, getKey, isot_type, processIsotopes,isotope, maxTableWidth, iqIsoPha, nphas, ixIso, isoPhas, &8 addPhase, iH2O, addKey, isoSelect, testTracersFiles, isoKeys, indexUpdate,iqWIsoPha, nbIso, ntiso, isoName, isoCheck9 10 11 12 13 14 15 16 PUBLIC :: nqtot, nbtr, nqo, nqCO2,nqtottr !--- Main dimensions17 18 19 20 21 22 23 24 25 26 27 28 PUBLIC :: niso, nzone, nphas,ntiso !--- " " numbers + isotopes & tagging tracers number29 30 31 32 33 34 35 !=== CONVENTIONS FOR TRACERS NUMBERS:36 ! |--------------------+-----------------------+-----------------+---------------+----------------------------|37 ! | water in different | water tagging | water isotopes | other tracers | additional tracers moments |38 ! | phases: H2O_[gls] | isotopes | | | for higher order schemes |39 ! |--------------------+-----------------------+-----------------+---------------+----------------------------|40 ! | | | | | |41 ! |<-- nqo -->|<-- nqo*niso* nzone -->|<-- nqo*niso -->|<-- nbtr -->|<-- (nmom) -->| 42 ! | | | |43 ! | |<-- nqo*niso*(nzone+1) = nqo*ntiso -->|<-- nqtottr = nbtr + nmom -->|44 ! | = nqtot - nqo*(ntiso+1) |45 ! | |46 ! |<-- nqtrue = nbtr + nqo*(ntiso+1) -->| |47 ! | |48 ! |<-- nqtot = nqtrue + nmom -->|49 ! | |50 ! |-----------------------------------------------------------------------------------------------------------|51 ! NOTES FOR THIS TABLE:52 ! * Used "niso", "nzone" and "ntiso" are components of "isotopes(ip)" for water (isotopes(ip)%parent == 'H2O'),53 ! since water is so far the sole tracers family, except passive CO2, removed from the main tracers table.54 ! * For water, "nqo" is equal to the more general field "isotopes(ip)%nphas".55 ! * "niso", "nzone", "ntiso", "nphas" are defined for other isotopic tracers families, if any.56 !57 !=== DERIVED TYPE EMBEDDING MOST OF THE TRACERS-RELATED QUANTITIES (LENGTH: nqtot)58 ! Each entry is accessible using "%" sign.59 ! |-------------+------------------------------------------------------+-------------+------------------------+60 ! | entry | Meaning | Former name | Possible values |61 ! |-------------+------------------------------------------------------+-------------+------------------------+62 ! | name | Name (short) | tname | |63 ! | gen0Name | Name of the 1st generation ancestor | / | |64 ! | parent | Name of the parent | / | |65 ! | longName | Long name (with adv. scheme suffix) for outputs | ttext | |66 ! | type | Type (so far: tracer or tag) | / | tracer,tag |67 ! | phase | Phases list ("g"as / "l"iquid / "s"olid) | / | [g][l][s] |68 ! | component | Name(s) of the merged/cumulated section(s) | / | coma-separated names |69 ! | iGeneration | Generation (>=1) | / | |70 ! | iqParent | Index of the parent tracer | iqpere | 1:nqtot |71 ! | iqDescen | Indexes of the childs (all generations) | iqfils | 1:nqtot |72 ! | nqDescen | Number of the descendants (all generations) | nqdesc | 1:nqtot |73 ! | nqChildren | Number of childs (1st generation only) | nqfils | 1:nqtot |74 ! | keys | key/val pairs accessible with "getKey" routine | / | |75 ! | iadv | Advection scheme number | iadv | 1,2,10-20(exc.15,19),30|76 ! | isAdvected | advected tracers flag (.TRUE. if iadv >= 0) | / | nqtrue .TRUE. values |77 ! | isInPhysics | tracers not extracted from the main table in physics | / | nqtottr .TRUE. values |78 ! | iso_iGroup | Isotopes group index in isotopes(:) | / | 1:nbIso |79 ! | iso_iName | Isotope name index in isotopes(iso_iGroup)%trac(:) | iso_indnum | 1:niso |80 ! | iso_iZone | Isotope zone index in isotopes(iso_iGroup)%zone(:) | zone_num | 1:nzone |81 ! | iso_iPhas | Isotope phase index in isotopes(iso_iGroup)%phas(:) | phase_num | 1:nphas |82 ! +-------------+------------------------------------------------------+-------------+------------------------+83 !84 !=== DERIVED TYPE EMBEDDING MOST OF THE ISOTOPES-RELATED QUANTITIES (LENGTH: nbIso, NUMBER OF ISOTOPES FAMILIES)85 ! Each entry is accessible using "%" sign.86 ! |-----------------+--------------------------------------------------+--------------------+-----------------+87 ! | entry | length | Meaning | Former name | Possible values |88 ! |-----------------+--------------------------------------------------+--------------------+-----------------+89 ! | parent | Parent tracer (isotopes family name) | | |90 ! | keys | niso | Isotopes keys/values pairs list + number | | |91 ! | trac | ntiso | Isotopes + tagging tracers list + number | / | ntraciso | |92 ! | zone | nzone | Geographic tagging zones list + number | / | ntraceurs_zone | |93 ! | phase | nphas | Phases list + number | | [g][l][s], 1:3 |94 ! | iqIsoPha | Index in "qx" = f(name(1:ntiso)),phas) | iqiso | 1:nqtot |95 ! | itZonIso | Index in "trac(1:ntiso)"= f(zone, name(1:niso)) | index_trac | 1:ntiso |96 ! +-----------------+--------------------------------------------------+--------------------+-----------------+97 98 99 100 101 INTEGER, SAVE :: nqtot,& !--- Tracers nb in dynamics (incl. higher moments + H2O)102 nbtr,& !--- Tracers nb in physics (excl. higher moments + H2O)103 nqo,& !--- Number of water phases104 105 106 CHARACTER(LEN=maxlen), SAVE :: type_trac !--- Keyword for tracers type107 108 109 INTEGER,SAVE, ALLOCATABLE :: conv_flg(:), & !--- Convection activation ; needed for INCA (nbtr)110 5 USE strings_mod, ONLY : msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse 6 USE readTracFiles_mod, ONLY : trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, & 7 delPhase, niso, getKey, isot_type, processIsotopes, isotope, maxTableWidth, iqIsoPha, nphas, ixIso, isoPhas, & 8 addPhase, iH2O, addKey, isoSelect, testTracersFiles, isoKeys, indexUpdate, iqWIsoPha, nbIso, ntiso, isoName, isoCheck 9 IMPLICIT NONE 10 11 PRIVATE 12 13 !=== FOR TRACERS: 14 PUBLIC :: init_infotrac !--- Initialization of the tracers 15 PUBLIC :: tracers, type_trac !--- Full tracers database, tracers type keyword 16 PUBLIC :: nqtot, nbtr, nqo, nqCO2, nqtottr !--- Main dimensions 17 PUBLIC :: conv_flg, pbl_flg !--- Convection & boundary layer activation keys 18 19 !=== FOR ISOTOPES: General 20 PUBLIC :: isot_type, nbIso !--- Derived type, full isotopes families database + nb of families 21 PUBLIC :: isoSelect, ixIso !--- Isotopes family selection tool + selected family index 22 !=== FOR ISOTOPES: Specific to water 23 PUBLIC :: iH2O !--- H2O isotopes class index 24 PUBLIC :: min_qParent, min_qMass, min_ratio !--- Min. values for various isotopic quantities 25 !=== FOR ISOTOPES: Depending on the selected isotopes family 26 PUBLIC :: isotope, isoKeys !--- Selected isotopes database + associated keys (cf. getKey) 27 PUBLIC :: isoName, isoZone, isoPhas !--- Isotopes and tagging zones names, phases 28 PUBLIC :: niso, nzone, nphas, ntiso !--- " " numbers + isotopes & tagging tracers number 29 PUBLIC :: itZonIso !--- idx "it" (in "isoName(1:niso)") = function(tagging idx, isotope idx) 30 PUBLIC :: iqIsoPha !--- idx "iq" (in "qx") = function(isotope idx, phase idx) + aliases 31 PUBLIC :: isoCheck !--- Run isotopes checking routines 32 !=== FOR BOTH TRACERS AND ISOTOPES 33 PUBLIC :: getKey !--- Get a key from "tracers" or "isotope" 34 35 !=== CONVENTIONS FOR TRACERS NUMBERS: 36 ! |--------------------+-----------------------+-----------------+---------------+----------------------------| 37 ! | water in different | water tagging | water isotopes | other tracers | additional tracers moments | 38 ! | phases: H2O_[gls] | isotopes | | | for higher order schemes | 39 ! |--------------------+-----------------------+-----------------+---------------+----------------------------| 40 ! | | | | | | 41 ! |<-- nqo -->|<-- nqo*niso* nzone -->|<-- nqo*niso -->|<-- nbtr -->|<-- (nmom) -->| 42 ! | | | | 43 ! | |<-- nqo*niso*(nzone+1) = nqo*ntiso -->|<-- nqtottr = nbtr + nmom -->| 44 ! | = nqtot - nqo*(ntiso+1) | 45 ! | | 46 ! |<-- nqtrue = nbtr + nqo*(ntiso+1) -->| | 47 ! | | 48 ! |<-- nqtot = nqtrue + nmom -->| 49 ! | | 50 ! |-----------------------------------------------------------------------------------------------------------| 51 ! NOTES FOR THIS TABLE: 52 ! * Used "niso", "nzone" and "ntiso" are components of "isotopes(ip)" for water (isotopes(ip)%parent == 'H2O'), 53 ! since water is so far the sole tracers family, except passive CO2, removed from the main tracers table. 54 ! * For water, "nqo" is equal to the more general field "isotopes(ip)%nphas". 55 ! * "niso", "nzone", "ntiso", "nphas" are defined for other isotopic tracers families, if any. 56 ! 57 !=== DERIVED TYPE EMBEDDING MOST OF THE TRACERS-RELATED QUANTITIES (LENGTH: nqtot) 58 ! Each entry is accessible using "%" sign. 59 ! |-------------+------------------------------------------------------+-------------+------------------------+ 60 ! | entry | Meaning | Former name | Possible values | 61 ! |-------------+------------------------------------------------------+-------------+------------------------+ 62 ! | name | Name (short) | tname | | 63 ! | gen0Name | Name of the 1st generation ancestor | / | | 64 ! | parent | Name of the parent | / | | 65 ! | longName | Long name (with adv. scheme suffix) for outputs | ttext | | 66 ! | type | Type (so far: tracer or tag) | / | tracer,tag | 67 ! | phase | Phases list ("g"as / "l"iquid / "s"olid) | / | [g][l][s] | 68 ! | component | Name(s) of the merged/cumulated section(s) | / | coma-separated names | 69 ! | iGeneration | Generation (>=1) | / | | 70 ! | iqParent | Index of the parent tracer | iqpere | 1:nqtot | 71 ! | iqDescen | Indexes of the childs (all generations) | iqfils | 1:nqtot | 72 ! | nqDescen | Number of the descendants (all generations) | nqdesc | 1:nqtot | 73 ! | nqChildren | Number of childs (1st generation only) | nqfils | 1:nqtot | 74 ! | keys | key/val pairs accessible with "getKey" routine | / | | 75 ! | iadv | Advection scheme number | iadv | 1,2,10-20(exc.15,19),30| 76 ! | isAdvected | advected tracers flag (.TRUE. if iadv >= 0) | / | nqtrue .TRUE. values | 77 ! | isInPhysics | tracers not extracted from the main table in physics | / | nqtottr .TRUE. values | 78 ! | iso_iGroup | Isotopes group index in isotopes(:) | / | 1:nbIso | 79 ! | iso_iName | Isotope name index in isotopes(iso_iGroup)%trac(:) | iso_indnum | 1:niso | 80 ! | iso_iZone | Isotope zone index in isotopes(iso_iGroup)%zone(:) | zone_num | 1:nzone | 81 ! | iso_iPhas | Isotope phase index in isotopes(iso_iGroup)%phas(:) | phase_num | 1:nphas | 82 ! +-------------+------------------------------------------------------+-------------+------------------------+ 83 ! 84 !=== DERIVED TYPE EMBEDDING MOST OF THE ISOTOPES-RELATED QUANTITIES (LENGTH: nbIso, NUMBER OF ISOTOPES FAMILIES) 85 ! Each entry is accessible using "%" sign. 86 ! |-----------------+--------------------------------------------------+--------------------+-----------------+ 87 ! | entry | length | Meaning | Former name | Possible values | 88 ! |-----------------+--------------------------------------------------+--------------------+-----------------+ 89 ! | parent | Parent tracer (isotopes family name) | | | 90 ! | keys | niso | Isotopes keys/values pairs list + number | | | 91 ! | trac | ntiso | Isotopes + tagging tracers list + number | / | ntraciso | | 92 ! | zone | nzone | Geographic tagging zones list + number | / | ntraceurs_zone | | 93 ! | phase | nphas | Phases list + number | | [g][l][s], 1:3 | 94 ! | iqIsoPha | Index in "qx" = f(name(1:ntiso)),phas) | iqiso | 1:nqtot | 95 ! | itZonIso | Index in "trac(1:ntiso)"= f(zone, name(1:niso)) | index_trac | 1:ntiso | 96 ! +-----------------+--------------------------------------------------+--------------------+-----------------+ 97 98 REAL, PARAMETER :: min_qParent = 1.e-30, min_qMass = 1.e-18, min_ratio = 1.e-16 ! MVals et CRisi 99 100 !=== DIMENSIONS OF THE TRACERS TABLES AND OTHER SCALAR VARIABLES 101 INTEGER, SAVE :: nqtot, & !--- Tracers nb in dynamics (incl. higher moments + H2O) 102 nbtr, & !--- Tracers nb in physics (excl. higher moments + H2O) 103 nqo, & !--- Number of water phases 104 nqtottr, & !--- Number of tracers passed to phytrac (TO BE DELETED ?) 105 nqCO2 !--- Number of tracers of CO2 (ThL) 106 CHARACTER(LEN = maxlen), SAVE :: type_trac !--- Keyword for tracers type 107 108 !=== VARIABLES FOR INCA 109 INTEGER, SAVE, ALLOCATABLE :: conv_flg(:), & !--- Convection activation ; needed for INCA (nbtr) 110 pbl_flg(:) !--- Boundary layer activation ; needed for INCA (nbtr) 111 111 112 112 CONTAINS 113 113 114 SUBROUTINE init_infotrac115 USE control_mod, ONLY: planet_type114 SUBROUTINE init_infotrac 115 USE control_mod, ONLY : planet_type 116 116 #ifdef REPROBUS 117 117 USE CHEM_REP, ONLY: Init_chem_rep_trac 118 118 #endif 119 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA120 IMPLICIT NONE121 !==============================================================================================================================122 !123 ! Auteur: P. Le Van /L. Fairhead/F.Hourdin124 ! -------125 !126 ! Modifications:127 ! --------------128 ! 05/94: F.Forget Modif special traceur129 ! 02/02: M-A Filiberti Lecture de traceur.def130 ! 01/22: D. Cugnet Nouveaux tracer.def et tracer_*.def + encapsulation (types trac_type et isot_type)131 !132 ! Objet:133 ! ------134 ! GCM LMD nouvelle grille135 !136 !==============================================================================================================================137 ! ... modification de l'integration de q ( 26/04/94 ) ....138 !------------------------------------------------------------------------------------------------------------------------------139 ! Declarations:140 INCLUDE "dimensions.h"141 INCLUDE "iniprint.h"142 143 !------------------------------------------------------------------------------------------------------------------------------144 ! Local variables145 INTEGER, ALLOCATABLE :: hadv(:), vadv(:) !--- Horizontal/vertical transport scheme number146 INTEGER, ALLOCATABLE :: had (:), hadv_inca(:), conv_flg_inca(:), &!--- Variables specific to INCA147 vad (:), vadv_inca(:),pbl_flg_inca(:)148 CHARACTER(LEN=8), ALLOCATABLE :: solsym_inca(:) !--- Tracers names for INCA149 INTEGER :: nqINCA150 CHARACTER(LEN=2) ::suff(9) !--- Suffixes for schemes of order 3 or 4 (Prather)151 CHARACTER(LEN=3):: descrq(30) !--- Advection scheme description tags152 CHARACTER(LEN=maxlen) :: msg1, texp, ttp !--- Strings for messages and expanded tracers type153 INTEGER :: fType !--- Tracers description file type ; 0: none154 155 INTEGER :: nqtrue !--- Tracers nb from tracer.def (no higher order moments)156 INTEGER :: iad !--- Advection scheme number157 INTEGER :: iq, jq, nt, im, nm !--- Indexes and temporary variables158 LOGICAL :: lerr, ll159 TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:)160 TYPE(trac_type), POINTER:: t1, t(:)161 CHARACTER(LEN=maxlen),ALLOCATABLE :: types_trac(:) !--- Keyword for tracers type(s), parsed version162 163 CHARACTER(LEN=*), PARAMETER :: modname="init_infotrac"164 !------------------------------------------------------------------------------------------------------------------------------165 ! Initialization :166 !------------------------------------------------------------------------------------------------------------------------------167 suff = ['x ','y ','z ','xx','xy','xz','yy','yz','zz']168 descrq( 1:30) =' '169 descrq( 1: 2) = ['LMV','BAK']170 descrq(10:20) = ['VL1','VLP','FH1','FH2','VLH',' ','PPM','PPS','PPP',' ','SLP']171 descrq(30) ='PRA'172 173 CALL msg('type_trac = "'//TRIM(type_trac)//'"', modname)174 175 lerr=strParse(type_trac, '|', types_trac, n=nt)176 IF (nt > 1) THEN119 USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_INCA, CPPKEY_STRATAER 120 IMPLICIT NONE 121 !============================================================================================================================== 122 ! 123 ! Auteur: P. Le Van /L. Fairhead/F.Hourdin 124 ! ------- 125 ! 126 ! Modifications: 127 ! -------------- 128 ! 05/94: F.Forget Modif special traceur 129 ! 02/02: M-A Filiberti Lecture de traceur.def 130 ! 01/22: D. Cugnet Nouveaux tracer.def et tracer_*.def + encapsulation (types trac_type et isot_type) 131 ! 132 ! Objet: 133 ! ------ 134 ! GCM LMD nouvelle grille 135 ! 136 !============================================================================================================================== 137 ! ... modification de l'integration de q ( 26/04/94 ) .... 138 !------------------------------------------------------------------------------------------------------------------------------ 139 ! Declarations: 140 INCLUDE "dimensions.h" 141 INCLUDE "iniprint.h" 142 143 !------------------------------------------------------------------------------------------------------------------------------ 144 ! Local variables 145 INTEGER, ALLOCATABLE :: hadv(:), vadv(:) !--- Horizontal/vertical transport scheme number 146 INTEGER, ALLOCATABLE :: had (:), hadv_inca(:), conv_flg_inca(:), &!--- Variables specific to INCA 147 vad (:), vadv_inca(:), pbl_flg_inca(:) 148 CHARACTER(LEN = 8), ALLOCATABLE :: solsym_inca(:) !--- Tracers names for INCA 149 INTEGER :: nqINCA 150 CHARACTER(LEN = 2) :: suff(9) !--- Suffixes for schemes of order 3 or 4 (Prather) 151 CHARACTER(LEN = 3) :: descrq(30) !--- Advection scheme description tags 152 CHARACTER(LEN = maxlen) :: msg1, texp, ttp !--- Strings for messages and expanded tracers type 153 INTEGER :: fType !--- Tracers description file type ; 0: none 154 !--- 1/2/3: "traceur.def"/"tracer.def"/"tracer_*.def" 155 INTEGER :: nqtrue !--- Tracers nb from tracer.def (no higher order moments) 156 INTEGER :: iad !--- Advection scheme number 157 INTEGER :: iq, jq, nt, im, nm !--- Indexes and temporary variables 158 LOGICAL :: lerr, ll 159 TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:) 160 TYPE(trac_type), POINTER :: t1, t(:) 161 CHARACTER(LEN = maxlen), ALLOCATABLE :: types_trac(:) !--- Keyword for tracers type(s), parsed version 162 163 CHARACTER(LEN = *), PARAMETER :: modname = "init_infotrac" 164 !------------------------------------------------------------------------------------------------------------------------------ 165 ! Initialization : 166 !------------------------------------------------------------------------------------------------------------------------------ 167 suff = ['x ', 'y ', 'z ', 'xx', 'xy', 'xz', 'yy', 'yz', 'zz'] 168 descrq(1:30) = ' ' 169 descrq(1:2) = ['LMV', 'BAK'] 170 descrq(10:20) = ['VL1', 'VLP', 'FH1', 'FH2', 'VLH', ' ', 'PPM', 'PPS', 'PPP', ' ', 'SLP'] 171 descrq(30) = 'PRA' 172 173 CALL msg('type_trac = "' // TRIM(type_trac) // '"', modname) 174 175 lerr = strParse(type_trac, '|', types_trac, n = nt) 176 IF (nt > 1) THEN 177 177 IF (nt > 2) CALL abort_gcm(modname, 'you need to modify type_trac, this version is not supported by lmdz', 1) 178 if (nt == 2) type_trac =types_trac(2)179 ENDIF180 181 182 183 !--- MESSAGE ABOUT THE CHOSEN CONFIGURATION184 msg1 = 'For type_trac = "'//TRIM(type_trac)//'":'185 SELECT CASE(type_trac)186 CASE('inca'); CALL msg(TRIM(msg1)//' coupling with INCA chemistry model',modname)187 CASE('inco'); CALL msg(TRIM(msg1)//' coupling jointly with INCA and CO2 cycle',modname)188 CASE('repr'); CALL msg(TRIM(msg1)//' coupling with REPROBUS chemistry model',modname)189 CASE('co2i'); CALL msg(TRIM(msg1)//' you have chosen to run with CO2 cycle',modname)190 CASE('coag'); CALL msg(TRIM(msg1)//' tracers are treated for COAGULATION tests', modname)191 CASE('lmdz'); CALL msg(TRIM(msg1)//' tracers are treated in LMDZ only',modname)192 CASE DEFAULT; CALL abort_gcm(modname,'type_trac='//TRIM(type_trac)//' not possible yet.',1)193 END SELECT194 195 !--- COHERENCE TEST BETWEEN "type_trac" AND PREPROCESSING KEYS196 SELECT CASE(type_trac)197 178 if (nt == 2) type_trac = types_trac(2) 179 ENDIF 180 181 182 183 !--- MESSAGE ABOUT THE CHOSEN CONFIGURATION 184 msg1 = 'For type_trac = "' // TRIM(type_trac) // '":' 185 SELECT CASE(type_trac) 186 CASE('inca'); CALL msg(TRIM(msg1) // ' coupling with INCA chemistry model', modname) 187 CASE('inco'); CALL msg(TRIM(msg1) // ' coupling jointly with INCA and CO2 cycle', modname) 188 CASE('repr'); CALL msg(TRIM(msg1) // ' coupling with REPROBUS chemistry model', modname) 189 CASE('co2i'); CALL msg(TRIM(msg1) // ' you have chosen to run with CO2 cycle', modname) 190 CASE('coag'); CALL msg(TRIM(msg1) // ' tracers are treated for COAGULATION tests', modname) 191 CASE('lmdz'); CALL msg(TRIM(msg1) // ' tracers are treated in LMDZ only', modname) 192 CASE DEFAULT; CALL abort_gcm(modname, 'type_trac=' // TRIM(type_trac) // ' not possible yet.', 1) 193 END SELECT 194 195 !--- COHERENCE TEST BETWEEN "type_trac" AND PREPROCESSING KEYS 196 SELECT CASE(type_trac) 197 CASE('inca', 'inco') 198 198 IF (CPPKEY_INCA) THEN 199 199 CALL abort_gcm(modname, 'You must add cpp key INCA and compile with INCA code', 1) 200 200 END IF 201 201 CASE('repr') 202 202 #ifndef REPROBUS 203 203 CALL abort_gcm(modname, 'You must add cpp key REPROBUS and compile with REPROBUS code', 1) 204 204 #endif 205 206 #ifndef CPP_StratAer 207 208 #endif 209 END SELECT210 211 nqCO2 = COUNT( [type_trac == 'inco', type_trac == 'co2i'])212 213 !==============================================================================================================================214 ! 1) Get the numbers of: true (first order only) tracers "nqtrue", water tracers "nqo" (vapor/liquid/solid)215 !==============================================================================================================================216 texp = type_trac !=== EXPANDED VERSION OF "type_trac", WITH "|" SEPARATOR217 IF(texp == 'inco') texp = 'co2i|inca'218 IF(texp /= 'lmdz') texp = 'lmdz|'//TRIM(texp)219 220 !=== DETERMINE THE TYPE OF THE INPUT TRACERS DESCRIPTION FILE221 IF(testTracersFiles(modname, texp, fType, .TRUE.)) CALL abort_gcm(modname, 'problem with tracers file(s)',1)222 ttp = type_trac; IF(fType /= 1) ttp = texp223 224 IF(readTracersFiles(ttp, lRepr=type_trac=='repr')) CALL abort_gcm(modname, 'problem with tracers file(s)',1)225 !---------------------------------------------------------------------------------------------------------------------------226 IF(fType == 0) CALL abort_gcm(modname, 'Missing tracers file: "traceur.def", "tracer.def" or "tracer_<keyword>.def file.',1)227 !---------------------------------------------------------------------------------------------------------------------------228 IF(fType == 1 .AND. ANY(['inca','inco']==type_trac)) THEN !=== FOUND OLD STYLE INCA "traceur.def"229 !---------------------------------------------------------------------------------------------------------------------------230 IF (CPPKEY_INCA) THEN231 nqo = SIZE(tracers) - nqCO2232 CALL Init_chem_inca_trac(nqINCA) !--- Get nqINCA from INCA233 nbtr = nqINCA + nqCO2 !--- Number of tracers passed to phytrac234 nqtrue = nbtr + nqo !--- Total number of "true" tracers235 IF(ALL([2,3] /= nqo)) CALL abort_gcm(modname, 'Only 2 or 3 water phases allowed ; found nqo='//TRIM(int2str(nqo)), 1)236 ALLOCATE(hadv(nqtrue), hadv_inca(nqINCA), conv_flg_inca(nqINCA), solsym_inca(nqINCA))237 ALLOCATE(vadv(nqtrue), vadv_inca(nqINCA),pbl_flg_inca(nqINCA))238 CALL init_transport(solsym_inca, conv_flg_inca, pbl_flg_inca, hadv_inca, vadv_inca)239 ALLOCATE(ttr(nqtrue))240 ttr(1:nqo+nqCO2)= tracers241 ttr(1 : nqo)%component = 'lmdz'242 ttr(1+nqo:nqCO2+nqo)%component = 'co2i'243 ttr(1+nqo+nqCO2:nqtrue)%component = 'inca'244 ttr(1+nqo :nqtrue)%name = [('CO2 ', iq=1, nqCO2), solsym_inca]245 ttr(1+nqo+nqCO2:nqtrue)%parent= tran0246 ttr(1+nqo+nqCO2:nqtrue)%phase= 'g'247 lerr = getKey('hadv', had, ky=tracers(:)%keys)248 lerr = getKey('vadv', vad, ky=tracers(:)%keys)249 hadv(1:nqo+nqCO2) = had(:); hadv(1+nqo+nqCO2:nqtrue) = hadv_inca250 vadv(1:nqo+nqCO2) = vad(:); vadv(1+nqo+nqCO2:nqtrue) = vadv_inca251 CALL MOVE_ALLOC(FROM=ttr, TO=tracers)252 DO iq = 1, nqtrue253 t1 => tracers(iq)254 CALL addKey('name', t1%name,t1%keys)255 CALL addKey('component', t1%component, t1%keys)256 CALL addKey('parent', t1%parent,t1%keys)257 CALL addKey('phase', t1%phase,t1%keys)258 END DO259 IF(setGeneration(tracers)) CALL abort_gcm(modname,'See above',1) !- SET FIELDS %iGeneration, %gen0Name260 DEALLOCATE(had, hadv_inca, vad, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)261 END IF262 !---------------------------------------------------------------------------------------------------------------------------263 ELSE !=== OTHER CASES (OLD OR NEW FORMAT, NO INCA MODULE)264 !---------------------------------------------------------------------------------------------------------------------------265 nqo =COUNT(delPhase(tracers(:)%name) == 'H2O' &266 205 CASE('coag') 206 IF (.NOT. CPPKEY_STRATAER) THEN 207 CALL abort_gcm(modname, 'You must add cpp key StratAer and compile with StratAer code', 1) 208 END IF 209 END SELECT 210 211 nqCO2 = COUNT([type_trac == 'inco', type_trac == 'co2i']) 212 213 !============================================================================================================================== 214 ! 1) Get the numbers of: true (first order only) tracers "nqtrue", water tracers "nqo" (vapor/liquid/solid) 215 !============================================================================================================================== 216 texp = type_trac !=== EXPANDED VERSION OF "type_trac", WITH "|" SEPARATOR 217 IF(texp == 'inco') texp = 'co2i|inca' 218 IF(texp /= 'lmdz') texp = 'lmdz|' // TRIM(texp) 219 220 !=== DETERMINE THE TYPE OF THE INPUT TRACERS DESCRIPTION FILE 221 IF(testTracersFiles(modname, texp, fType, .TRUE.)) CALL abort_gcm(modname, 'problem with tracers file(s)', 1) 222 ttp = type_trac; IF(fType /= 1) ttp = texp 223 224 IF(readTracersFiles(ttp, lRepr = type_trac=='repr')) CALL abort_gcm(modname, 'problem with tracers file(s)', 1) 225 !--------------------------------------------------------------------------------------------------------------------------- 226 IF(fType == 0) CALL abort_gcm(modname, 'Missing tracers file: "traceur.def", "tracer.def" or "tracer_<keyword>.def file.', 1) 227 !--------------------------------------------------------------------------------------------------------------------------- 228 IF(fType == 1 .AND. ANY(['inca', 'inco']==type_trac)) THEN !=== FOUND OLD STYLE INCA "traceur.def" 229 !--------------------------------------------------------------------------------------------------------------------------- 230 IF (CPPKEY_INCA) THEN 231 nqo = SIZE(tracers) - nqCO2 232 CALL Init_chem_inca_trac(nqINCA) !--- Get nqINCA from INCA 233 nbtr = nqINCA + nqCO2 !--- Number of tracers passed to phytrac 234 nqtrue = nbtr + nqo !--- Total number of "true" tracers 235 IF(ALL([2, 3] /= nqo)) CALL abort_gcm(modname, 'Only 2 or 3 water phases allowed ; found nqo=' // TRIM(int2str(nqo)), 1) 236 ALLOCATE(hadv(nqtrue), hadv_inca(nqINCA), conv_flg_inca(nqINCA), solsym_inca(nqINCA)) 237 ALLOCATE(vadv(nqtrue), vadv_inca(nqINCA), pbl_flg_inca(nqINCA)) 238 CALL init_transport(solsym_inca, conv_flg_inca, pbl_flg_inca, hadv_inca, vadv_inca) 239 ALLOCATE(ttr(nqtrue)) 240 ttr(1:nqo + nqCO2) = tracers 241 ttr(1:nqo)%component = 'lmdz' 242 ttr(1 + nqo:nqCO2 + nqo)%component = 'co2i' 243 ttr(1 + nqo + nqCO2:nqtrue)%component = 'inca' 244 ttr(1 + nqo:nqtrue)%name = [('CO2 ', iq = 1, nqCO2), solsym_inca] 245 ttr(1 + nqo + nqCO2:nqtrue)%parent = tran0 246 ttr(1 + nqo + nqCO2:nqtrue)%phase = 'g' 247 lerr = getKey('hadv', had, ky = tracers(:)%keys) 248 lerr = getKey('vadv', vad, ky = tracers(:)%keys) 249 hadv(1:nqo + nqCO2) = had(:); hadv(1 + nqo + nqCO2:nqtrue) = hadv_inca 250 vadv(1:nqo + nqCO2) = vad(:); vadv(1 + nqo + nqCO2:nqtrue) = vadv_inca 251 CALL MOVE_ALLOC(FROM = ttr, TO = tracers) 252 DO iq = 1, nqtrue 253 t1 => tracers(iq) 254 CALL addKey('name', t1%name, t1%keys) 255 CALL addKey('component', t1%component, t1%keys) 256 CALL addKey('parent', t1%parent, t1%keys) 257 CALL addKey('phase', t1%phase, t1%keys) 258 END DO 259 IF(setGeneration(tracers)) CALL abort_gcm(modname, 'See above', 1) !- SET FIELDS %iGeneration, %gen0Name 260 DEALLOCATE(had, hadv_inca, vad, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca) 261 END IF 262 !--------------------------------------------------------------------------------------------------------------------------- 263 ELSE !=== OTHER CASES (OLD OR NEW FORMAT, NO INCA MODULE) 264 !--------------------------------------------------------------------------------------------------------------------------- 265 nqo = COUNT(delPhase(tracers(:)%name) == 'H2O' & 266 .AND. tracers(:)%component == 'lmdz') !--- Number of water phases 267 267 nqtrue = SIZE(tracers) !--- Total number of "true" tracers 268 nbtr = nqtrue-COUNT(delPhase(tracers(:)%gen0Name) == 'H2O' &269 270 IF (CPPKEY_INCA) THEN271 nqINCA = COUNT(tracers(:)%component == 'inca')272 END IF273 lerr = getKey('hadv', hadv, ky =tracers(:)%keys)274 lerr = getKey('vadv', vadv, ky =tracers(:)%keys)275 !---------------------------------------------------------------------------------------------------------------------------276 END IF277 !---------------------------------------------------------------------------------------------------------------------------268 nbtr = nqtrue - COUNT(delPhase(tracers(:)%gen0Name) == 'H2O' & 269 .AND. tracers(:)%component == 'lmdz') !--- Number of tracers passed to phytrac 270 IF (CPPKEY_INCA) THEN 271 nqINCA = COUNT(tracers(:)%component == 'inca') 272 END IF 273 lerr = getKey('hadv', hadv, ky = tracers(:)%keys) 274 lerr = getKey('vadv', vadv, ky = tracers(:)%keys) 275 !--------------------------------------------------------------------------------------------------------------------------- 276 END IF 277 !--------------------------------------------------------------------------------------------------------------------------- 278 278 279 279 #ifdef REPROBUS … … 282 282 283 283 #endif 284 !==============================================================================================================================285 ! 2) Calculate nqtot, number of tracers needed (greater if advection schemes 20 or 30 have been chosen).286 !==============================================================================================================================287 DO iq = 1, nqtrue288 IF( hadv(iq)<20 .OR. (ANY(hadv(iq)==[20,30]) .AND. hadv(iq)==vadv(iq))) CYCLE289 WRITE(msg1, '("The choice hadv=",i0,", vadv=",i0,a)')hadv(iq),vadv(iq),' for "'//TRIM(tracers(iq)%name)//'" is not available'284 !============================================================================================================================== 285 ! 2) Calculate nqtot, number of tracers needed (greater if advection schemes 20 or 30 have been chosen). 286 !============================================================================================================================== 287 DO iq = 1, nqtrue 288 IF(hadv(iq)<20 .OR. (ANY(hadv(iq)==[20, 30]) .AND. hadv(iq)==vadv(iq))) CYCLE 289 WRITE(msg1, '("The choice hadv=",i0,", vadv=",i0,a)')hadv(iq), vadv(iq), ' for "' // TRIM(tracers(iq)%name) // '" is not available' 290 290 CALL abort_gcm(modname, TRIM(msg1), 1) 291 END DO292 nqtot = COUNT( hadv< 20 .AND. vadv< 20) & !--- No additional tracer293 + 4*COUNT( hadv==20 .AND. vadv==20) & !--- 3 additional tracers294 + 10*COUNT( hadv==30 .AND. vadv==30) !--- 9 additional tracers295 296 !--- More tracers due to the choice of advection scheme => assign total number of tracers297 IF( nqtot /= nqtrue) THEN291 END DO 292 nqtot = COUNT(hadv< 20 .AND. vadv< 20) & !--- No additional tracer 293 + 4 * COUNT(hadv==20 .AND. vadv==20) & !--- 3 additional tracers 294 + 10 * COUNT(hadv==30 .AND. vadv==30) !--- 9 additional tracers 295 296 !--- More tracers due to the choice of advection scheme => assign total number of tracers 297 IF(nqtot /= nqtrue) THEN 298 298 CALL msg('The choice of advection scheme for one or more tracers makes it necessary to add tracers') 299 CALL msg('The number of true tracers is ' //TRIM(int2str(nqtrue)))300 CALL msg('The total number of tracers needed is ' //TRIM(int2str(nqtot)))301 END IF302 303 !==============================================================================================================================304 ! 3) Determine the advection scheme choice for water and tracers "iadv" and the fields long name, isAdvected.305 ! iadv = 1 "LMDZ-specific humidity transport" (for H2O vapour) LMV306 ! iadv = 2 backward (for H2O liquid) BAK307 ! iadv = 14 Van-Leer + specific humidity, modified by Francis Codron VLH308 ! iadv = 10 Van-Leer (chosen for vapour and liquid water) VL1309 ! iadv = 11 Van-Leer for hadv and PPM version (Monotonic) for vadv VLP310 ! iadv = 12 Frederic Hourdin I FH1311 ! iadv = 13 Frederic Hourdin II FH2312 ! iadv = 16 Monotonic PPM (Collela & Woodward 1984) PPM313 ! iadv = 17 Semi-monotonic PPM (overshoots allowed) PPS314 ! iadv = 18 Definite positive PPM (overshoots and undershoots allowed) PPP315 ! iadv = 20 Slopes SLP316 ! iadv = 30 Prather PRA317 !318 ! In array q(ij,l,iq) : iq = 1/2[/3] for vapour/liquid[/ice] water319 ! And optionaly: iq = 3[4],nqtot for other tracers320 !==============================================================================================================================321 ALLOCATE(ttr(nqtot))322 jq = nqtrue+1; tracers(:)%iadv = -1323 DO iq = 1, nqtrue299 CALL msg('The number of true tracers is ' // TRIM(int2str(nqtrue))) 300 CALL msg('The total number of tracers needed is ' // TRIM(int2str(nqtot))) 301 END IF 302 303 !============================================================================================================================== 304 ! 3) Determine the advection scheme choice for water and tracers "iadv" and the fields long name, isAdvected. 305 ! iadv = 1 "LMDZ-specific humidity transport" (for H2O vapour) LMV 306 ! iadv = 2 backward (for H2O liquid) BAK 307 ! iadv = 14 Van-Leer + specific humidity, modified by Francis Codron VLH 308 ! iadv = 10 Van-Leer (chosen for vapour and liquid water) VL1 309 ! iadv = 11 Van-Leer for hadv and PPM version (Monotonic) for vadv VLP 310 ! iadv = 12 Frederic Hourdin I FH1 311 ! iadv = 13 Frederic Hourdin II FH2 312 ! iadv = 16 Monotonic PPM (Collela & Woodward 1984) PPM 313 ! iadv = 17 Semi-monotonic PPM (overshoots allowed) PPS 314 ! iadv = 18 Definite positive PPM (overshoots and undershoots allowed) PPP 315 ! iadv = 20 Slopes SLP 316 ! iadv = 30 Prather PRA 317 ! 318 ! In array q(ij,l,iq) : iq = 1/2[/3] for vapour/liquid[/ice] water 319 ! And optionaly: iq = 3[4],nqtot for other tracers 320 !============================================================================================================================== 321 ALLOCATE(ttr(nqtot)) 322 jq = nqtrue + 1; tracers(:)%iadv = -1 323 DO iq = 1, nqtrue 324 324 t1 => tracers(iq) 325 325 326 326 !--- VERIFY THE CHOICE OF ADVECTION SCHEME 327 327 iad = -1 328 IF(hadv(iq) == vadv(iq) 328 IF(hadv(iq) == vadv(iq)) iad = hadv(iq) 329 329 IF(hadv(iq)==10 .AND. vadv(iq)==16) iad = 11 330 WRITE(msg1, '("Bad choice of advection scheme for ",a,": hadv = ",i0,", vadv = ",i0)')TRIM(t1%name), hadv(iq), vadv(iq)330 WRITE(msg1, '("Bad choice of advection scheme for ",a,": hadv = ",i0,", vadv = ",i0)')TRIM(t1%name), hadv(iq), vadv(iq) 331 331 IF(iad == -1) CALL abort_gcm(modname, msg1, 1) 332 332 333 333 !--- SET FIELDS %longName, %iadv, %isAdvected, %isInPhysics 334 t1%longName = t1%name; IF(iad > 0) t1%longName=TRIM(t1%name)//descrq(iad)335 t1%iadv 334 t1%longName = t1%name; IF(iad > 0) t1%longName = TRIM(t1%name) // descrq(iad) 335 t1%iadv = iad 336 336 t1%isAdvected = iad >= 0 337 t1%isInPhysics = delPhase(t1%gen0Name) /= 'H2O' &338 339 ttr(iq) 337 t1%isInPhysics = delPhase(t1%gen0Name) /= 'H2O' & 338 .OR. t1%component /= 'lmdz' !=== OTHER EXCEPTIONS TO BE ADDED: CO2i, SURSATURATED WATER CLOUD... 339 ttr(iq) = t1 340 340 341 341 !--- DEFINE THE HIGHER ORDER TRACERS, IF ANY … … 344 344 IF(iad == 30) nm = 9 !--- 3rd order scheme 345 345 IF(nm == 0) CYCLE !--- No higher moments 346 ttr(jq +1:jq+nm)= t1347 ttr(jq +1:jq+nm)%name = [ (TRIM(t1%name) //'-'//TRIM(suff(im)), im=1, nm) ]348 ttr(jq +1:jq+nm)%parent = [ (TRIM(t1%parent) //'-'//TRIM(suff(im)), im=1, nm) ]349 ttr(jq +1:jq+nm)%longName = [ (TRIM(t1%longName)//'-'//TRIM(suff(im)), im=1, nm) ]350 ttr(jq +1:jq+nm)%iadv = [ (-iad, im=1, nm) ]351 ttr(jq +1:jq+nm)%isAdvected = [ (.FALSE., im=1, nm) ]346 ttr(jq + 1:jq + nm) = t1 347 ttr(jq + 1:jq + nm)%name = [ (TRIM(t1%name) // '-' // TRIM(suff(im)), im = 1, nm) ] 348 ttr(jq + 1:jq + nm)%parent = [ (TRIM(t1%parent) // '-' // TRIM(suff(im)), im = 1, nm) ] 349 ttr(jq + 1:jq + nm)%longName = [ (TRIM(t1%longName) // '-' // TRIM(suff(im)), im = 1, nm) ] 350 ttr(jq + 1:jq + nm)%iadv = [ (-iad, im = 1, nm) ] 351 ttr(jq + 1:jq + nm)%isAdvected = [ (.FALSE., im = 1, nm) ] 352 352 jq = jq + nm 353 END DO354 DEALLOCATE(hadv, vadv)355 CALL MOVE_ALLOC(FROM=ttr, TO=tracers)356 357 !--- SET FIELDS %iqParent, %nqChildren, %iGeneration, %iqDescen, %nqDescen358 IF(indexUpdate(tracers)) CALL abort_gcm(modname, 'problem with tracers indices update', 1)359 360 !=== TEST ADVECTION SCHEME361 DO iq=1,nqtot ; t1 => tracers(iq); iad = t1%iadv362 363 364 IF(ALL([10,14,0] /= iad)) &365 CALL abort_gcm(modname, 'Not tested for iadv='//TRIM(int2str(iad))//' ; 10 or 14 only are allowed !', 1)366 367 368 IF(ALL([10,14] /= iad) .AND. t1%iGeneration == 1 .AND. ANY(tracers(:)%iGeneration > 1)) &369 CALL abort_gcm(modname, 'iadv='//TRIM(int2str(iad))//' not implemented for parents ; 10 or 14 only are allowed !', 1)370 371 372 IF(fmsg('WARNING ! iadv='//TRIM(int2str(iad))//' not implemented for childs. Setting iadv=10 for "'//TRIM(t1%name)//'"',&373 modname, iad /= 10 .AND. t1%iGeneration > 1)) t1%iadv = 10374 375 376 ll = t1%name /= addPhase('H2O','g')377 IF(fmsg('WARNING ! iadv=14 is valid for water vapour only. Setting iadv=10 for "'//TRIM(t1%name)//'".', &378 modname, iad == 14 .AND. ll)) t1%iadv = 10379 END DO380 381 !=== READ PHYSICAL PARAMETERS FOR ISOTOPES ; DONE HERE BECAUSE dynetat0 AND iniacademic NEED "tnat" AND "alpha_ideal"382 niso = 0; nzone = 0; nphas = nqo; ntiso = 0; isoCheck = .FALSE.383 IF(processIsotopes()) CALL abort_gcm(modname, 'problem when processing isotopes parameters', 1)384 385 !--- Convection / boundary layer activation for all tracers386 ALLOCATE(conv_flg(nbtr)); conv_flg(1:nbtr) = 1387 ALLOCATE(pbl_flg(nbtr)); pbl_flg(1:nbtr) = 1388 389 !--- Note: nqtottr can differ from nbtr when nmom/=0390 nqtottr = nqtot - COUNT(delPhase(tracers%gen0Name) == 'H2O' .AND. tracers%component == 'lmdz')391 IF(COUNT(tracers%iso_iName == 0) - COUNT(delPhase(tracers%name) == 'H2O' .AND. tracers%component == 'lmdz') /= nqtottr) &392 CALL abort_gcm(modname, 'problem with the computation of nqtottr', 1)393 394 !=== DISPLAY THE RESULTS395 CALL msg('nqo = '//TRIM(int2str(nqo)),modname)396 CALL msg('nbtr = '//TRIM(int2str(nbtr)),modname)397 CALL msg('nqtrue = '//TRIM(int2str(nqtrue)), modname)398 CALL msg('nqtot = '//TRIM(int2str(nqtot)),modname)399 CALL msg('niso = '//TRIM(int2str(niso)),modname)400 CALL msg('ntiso = '//TRIM(int2str(ntiso)),modname)401 IF (CPPKEY_INCA) THEN402 CALL msg('nqCO2 = ' //TRIM(int2str(nqCO2)),modname)403 CALL msg('nqINCA = ' //TRIM(int2str(nqINCA)), modname)404 END IF405 t => tracers406 CALL msg('Information stored in infotrac :', modname)407 408 IF(dispTable('isssssssssiiiiiiiii', ['iq ', 'name', 'lNam', 'g0Nm', 'prnt', 'type', 'phas', 'comp',&409 'isPh', 'isAd', 'iadv', 'iGen', 'iqPr', 'nqDe', 'nqCh', 'iGrp', 'iNam', 'iZon', 'iPha'],&410 cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, t%component, bool2str(t%isInPhysics), &411 412 cat([(iq, iq=1, nqtot)], t%iadv, t%iGeneration, t%iqParent, t%nqDescen, t%nqChildren, t%iso_iGroup,&413 t%iso_iName, t%iso_iZone, t%iso_iPhase), nColMax=maxTableWidth, nHead=2, sub=modname)) &414 CALL abort_gcm(modname, "problem with the tracers table content", 1)415 IF(niso > 0) THEN416 CALL msg('Where, for isotopes family "' //TRIM(isotope%parent)//'":', modname)417 CALL msg(' isoKeys%name = ' //strStack(isoKeys%name), modname)418 CALL msg(' isoName = ' //strStack(isoName),modname)419 CALL msg(' isoZone = ' //strStack(isoZone),modname)420 CALL msg(' isoPhas = ' //TRIM(isoPhas),modname)421 ELSE353 END DO 354 DEALLOCATE(hadv, vadv) 355 CALL MOVE_ALLOC(FROM = ttr, TO = tracers) 356 357 !--- SET FIELDS %iqParent, %nqChildren, %iGeneration, %iqDescen, %nqDescen 358 IF(indexUpdate(tracers)) CALL abort_gcm(modname, 'problem with tracers indices update', 1) 359 360 !=== TEST ADVECTION SCHEME 361 DO iq = 1, nqtot ; t1 => tracers(iq); iad = t1%iadv 362 363 !--- ONLY TESTED VALUES FOR TRACERS FOR NOW: iadv = 14, 10 (and 0 for non-transported tracers) 364 IF(ALL([10, 14, 0] /= iad)) & 365 CALL abort_gcm(modname, 'Not tested for iadv=' // TRIM(int2str(iad)) // ' ; 10 or 14 only are allowed !', 1) 366 367 !--- ONLY TESTED VALUES FOR PARENTS HAVING CHILDS FOR NOW: iadv = 14, 10 (PARENTS: TRACERS OF GENERATION 1) 368 IF(ALL([10, 14] /= iad) .AND. t1%iGeneration == 1 .AND. ANY(tracers(:)%iGeneration > 1)) & 369 CALL abort_gcm(modname, 'iadv=' // TRIM(int2str(iad)) // ' not implemented for parents ; 10 or 14 only are allowed !', 1) 370 371 !--- ONLY TESTED VALUES FOR CHILDS FOR NOW: iadv = 10 (CHILDS: TRACERS OF GENERATION GREATER THAN 1) 372 IF(fmsg('WARNING ! iadv=' // TRIM(int2str(iad)) // ' not implemented for childs. Setting iadv=10 for "' // TRIM(t1%name) // '"', & 373 modname, iad /= 10 .AND. t1%iGeneration > 1)) t1%iadv = 10 374 375 !--- ONLY VALID SCHEME NUMBER FOR WATER VAPOUR: iadv = 14 376 ll = t1%name /= addPhase('H2O', 'g') 377 IF(fmsg('WARNING ! iadv=14 is valid for water vapour only. Setting iadv=10 for "' // TRIM(t1%name) // '".', & 378 modname, iad == 14 .AND. ll)) t1%iadv = 10 379 END DO 380 381 !=== READ PHYSICAL PARAMETERS FOR ISOTOPES ; DONE HERE BECAUSE dynetat0 AND iniacademic NEED "tnat" AND "alpha_ideal" 382 niso = 0; nzone = 0; nphas = nqo; ntiso = 0; isoCheck = .FALSE. 383 IF(processIsotopes()) CALL abort_gcm(modname, 'problem when processing isotopes parameters', 1) 384 385 !--- Convection / boundary layer activation for all tracers 386 ALLOCATE(conv_flg(nbtr)); conv_flg(1:nbtr) = 1 387 ALLOCATE(pbl_flg(nbtr)); pbl_flg(1:nbtr) = 1 388 389 !--- Note: nqtottr can differ from nbtr when nmom/=0 390 nqtottr = nqtot - COUNT(delPhase(tracers%gen0Name) == 'H2O' .AND. tracers%component == 'lmdz') 391 IF(COUNT(tracers%iso_iName == 0) - COUNT(delPhase(tracers%name) == 'H2O' .AND. tracers%component == 'lmdz') /= nqtottr) & 392 CALL abort_gcm(modname, 'problem with the computation of nqtottr', 1) 393 394 !=== DISPLAY THE RESULTS 395 CALL msg('nqo = ' // TRIM(int2str(nqo)), modname) 396 CALL msg('nbtr = ' // TRIM(int2str(nbtr)), modname) 397 CALL msg('nqtrue = ' // TRIM(int2str(nqtrue)), modname) 398 CALL msg('nqtot = ' // TRIM(int2str(nqtot)), modname) 399 CALL msg('niso = ' // TRIM(int2str(niso)), modname) 400 CALL msg('ntiso = ' // TRIM(int2str(ntiso)), modname) 401 IF (CPPKEY_INCA) THEN 402 CALL msg('nqCO2 = ' // TRIM(int2str(nqCO2)), modname) 403 CALL msg('nqINCA = ' // TRIM(int2str(nqINCA)), modname) 404 END IF 405 t => tracers 406 CALL msg('Information stored in infotrac :', modname) 407 408 IF(dispTable('isssssssssiiiiiiiii', ['iq ', 'name', 'lNam', 'g0Nm', 'prnt', 'type', 'phas', 'comp', & 409 'isPh', 'isAd', 'iadv', 'iGen', 'iqPr', 'nqDe', 'nqCh', 'iGrp', 'iNam', 'iZon', 'iPha'], & 410 cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, t%component, bool2str(t%isInPhysics), & 411 bool2str(t%isAdvected)), & 412 cat([(iq, iq = 1, nqtot)], t%iadv, t%iGeneration, t%iqParent, t%nqDescen, t%nqChildren, t%iso_iGroup, & 413 t%iso_iName, t%iso_iZone, t%iso_iPhase), nColMax = maxTableWidth, nHead = 2, sub = modname)) & 414 CALL abort_gcm(modname, "problem with the tracers table content", 1) 415 IF(niso > 0) THEN 416 CALL msg('Where, for isotopes family "' // TRIM(isotope%parent) // '":', modname) 417 CALL msg(' isoKeys%name = ' // strStack(isoKeys%name), modname) 418 CALL msg(' isoName = ' // strStack(isoName), modname) 419 CALL msg(' isoZone = ' // strStack(isoZone), modname) 420 CALL msg(' isoPhas = ' // TRIM(isoPhas), modname) 421 ELSE 422 422 CALL msg('No isotopes identified.', modname) 423 END IF424 CALL msg('end', modname)425 426 END SUBROUTINE init_infotrac423 END IF 424 CALL msg('end', modname) 425 426 END SUBROUTINE init_infotrac 427 427 428 428 END MODULE infotrac -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limx.F
r5082 r5098 43 43 save first 44 44 45 REAL SSUM ,CVMGP,CVMGT45 REAL SSUM 46 46 integer ismax,ismin 47 47 EXTERNAL SSUM, ismin,ismax -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limz.F
r5082 r5098 43 43 save first 44 44 45 REAL SSUM ,CVMGP,CVMGT45 REAL SSUM 46 46 integer ismax,ismin 47 47 EXTERNAL SSUM, ismin,ismax -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlsplt_loc.F
r5082 r5098 4 4 RECURSIVE SUBROUTINE vlx_loc(q,pente_max,masse,u_m,ijb_x,ije_x,iq) 5 5 6 c Auteurs: P.Le Van, F.Hourdin, F.Forget 6 c Auteurs: P.Le Van, F.Hourdin, F.Forget 7 7 c 8 8 c ******************************************************************** … … 28 28 REAL u_m( ijb_u:ije_u,llm),pbarv( iip1,jjb_v:jje_v,llm) 29 29 REAL q(ijb_u:ije_u,llm,nqtot) ! CRisi: ajout dimension nqtot 30 REAL w(ijb_u:ije_u,llm) 30 REAL w(ijb_u:ije_u,llm) 31 31 INTEGER iq ! CRisi 32 32 c 33 c Local 33 c Local 34 34 c --------- 35 35 c … … 49 49 50 50 REAL SSUM 51 EXTERNAL SSUM52 51 53 52 REAL z1,z2,z3 54 53 55 54 INTEGER ijb,ije,ijb_x,ije_x 56 55 57 56 !write(*,*) 'vlsplt 58: entree dans vlx_loc, iq,ijb_x=', 58 57 ! & iq,ijb_x … … 61 60 ijb=ijb_x 62 61 ije=ije_x 63 62 64 63 if (pole_nord.and.ijb==1) ijb=ijb+iip1 65 64 if (pole_sud.and.ije==ip1jmp1) ije=ije-iip1 66 65 67 66 IF (pente_max>-1.e-5) THEN 68 67 c IF (pente_max.gt.10) THEN … … 72 71 ! on a besoin de q entre ijb et ije 73 72 c calcul de la pente aux points u 74 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 73 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 75 74 DO l = 1, llm 76 75 77 76 DO ij=ijb,ije-1 78 77 dxqu(ij)=q(ij+1,l,iq)-q(ij,l,iq) … … 96 95 c limitation subtile 97 96 c , min(adxqu(ij-1)/sigu(ij-1),adxqu(ij)/(1.-sigu(ij))) 98 97 99 98 100 99 ENDDO … … 105 104 106 105 DO ij=ijb+1,ije 107 #ifdef CRAY108 dxq(ij,l)=109 , cvmgp(dxqu(ij-1)+dxqu(ij),0.,dxqu(ij-1)*dxqu(ij))110 #else111 106 IF(dxqu(ij-1)*dxqu(ij)>0) THEN 112 107 dxq(ij,l)=dxqu(ij-1)+dxqu(ij) … … 115 110 dxq(ij,l)=0. 116 111 ENDIF 117 #endif118 112 dxq(ij,l)=0.5*dxq(ij,l) 119 113 dxq(ij,l)= … … 172 166 c calcul des flux a gauche et a droite 173 167 174 #ifdef CRAY 175 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 176 DO l=1,llm 177 DO ij=ijb,ije-1 178 zdum(ij,l)=cvmgp(1.-u_m(ij,l)/masse(ij,l,iq), 179 , 1.+u_m(ij,l)/masse(ij+1,l,iq), 180 , u_m(ij,l,iq)) 181 zdum(ij,l)=0.5*zdum(ij,l) 182 u_mq(ij,l)=cvmgp( 183 , q(ij,l,iq)+zdum(ij,l)*dxq(ij,l), 184 , q(ij+1,l,iq)-zdum(ij,l)*dxq(ij+1,l), 185 , u_m(ij,l)) 186 u_mq(ij,l)=u_m(ij,l)*u_mq(ij,l) 187 ENDDO 188 ENDDO 189 c$OMP END DO NOWAIT 190 #else 168 191 169 c on cumule le flux correspondant a toutes les mailles dont la masse 192 170 c au travers de la paroi pENDant le pas de temps. … … 209 187 ENDDO 210 188 c$OMP END DO NOWAIT 211 #endif 212 213 c go to 9999 189 214 190 c detection des points ou on advecte plus que la masse de la 215 191 c maille … … 234 210 c$OMP END DO NOWAIT 235 211 c print*,'Ok test 2' 236 212 237 213 238 214 c traitement special pour le cas ou on advecte en longitude plus que le … … 313 289 ENDDO 314 290 c$OMP END DO NOWAIT 315 cym ENDIF ! n0.gt.0 316 9999 continue 291 cym ENDIF ! n0.gt.0 317 292 318 293 c bouclage en latitude … … 346 321 Ratio(ij,l,iq2)=min_ratio 347 322 endif 348 enddo 323 enddo 349 324 enddo 350 325 c$OMP END DO NOWAIT … … 377 352 378 353 ! retablir les fils en rapport de melange par rapport a l'air: 379 ! On calcule q entre ijb+1 et ije -> on fait pareil pour ratio 354 ! On calcule q entre ijb+1 et ije -> on fait pareil pour ratio 380 355 ! puis on boucle en longitude 381 356 do ifils=1,tracers(iq)%nqDescen 382 357 iq2=tracers(iq)%iqDescen(ifils) 383 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 358 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 384 359 DO l=1,llm 385 360 DO ij=ijb+1,ije 386 q(ij,l,iq2)=q(ij,l,iq)*Ratio(ij,l,iq2) 361 q(ij,l,iq2)=q(ij,l,iq)*Ratio(ij,l,iq2) 387 362 enddo 388 363 DO ij=ijb+iip1-1,ije,iip1 … … 404 379 RECURSIVE SUBROUTINE vly_loc(q,pente_max,masse,masse_adv_v,iq) 405 380 c 406 c Auteurs: P.Le Van, F.Hourdin, F.Forget 381 c Auteurs: P.Le Van, F.Hourdin, F.Forget 407 382 c 408 383 c ******************************************************************** … … 416 391 USE parallel_lmdz 417 392 USE infotrac, ONLY : nqtot,tracers, ! CRisi & 418 & min_qParent,min_qMass,min_ratio ! MVals et CRisi 393 & min_qParent,min_qMass,min_ratio ! MVals et CRisi 419 394 USE comconst_mod, ONLY: pi 420 395 IMPLICIT NONE … … 432 407 INTEGER iq ! CRisi 433 408 c 434 c Local 409 c Local 435 410 c --------- 436 411 c … … 444 419 REAL qpns,qpsn,appn,apps,dyn1,dys1,dyn2,dys2,newmasse,fn,fs 445 420 c REAL newq,oldmasse 446 Logical extremum,first ,testcpu421 Logical extremum,first 447 422 REAL temps0,temps1,temps2,temps3,temps4,temps5,second 448 423 SAVE temps0,temps1,temps2,temps3,temps4,temps5 449 424 c$OMP THREADPRIVATE(temps0,temps1,temps2,temps3,temps4,temps5) 450 SAVE first ,testcpu451 c$OMP THREADPRIVATE(first ,testcpu)425 SAVE first 426 c$OMP THREADPRIVATE(first) 452 427 453 428 REAL convpn,convps,convmpn,convmps … … 467 442 EXTERNAL SSUM 468 443 469 DATA first ,testcpu/.true.,.false./444 DATA first/.true./ 470 445 DATA temps0,temps1,temps2,temps3,temps4,temps5/0.,0.,0.,0.,0.,0./ 471 446 INTEGER ijb,ije … … 473 448 474 449 ijb=ij_begin-2*iip1 475 ije=ij_end+2*iip1 450 ije=ij_end+2*iip1 476 451 if (pole_nord) ijb=ij_begin 477 452 if (pole_sud) ije=ij_end … … 491 466 sinlondlon(1)=sinlondlon(iip1) 492 467 airej2 = SSUM( iim, aire(iip2), 1 ) 493 airejjm= SSUM( iim, aire(ip1jm -iim), 1 ) 468 airejjm= SSUM( iim, aire(ip1jm -iim), 1 ) 494 469 ENDIF 495 470 … … 497 472 c PRINT*,'CALCUL EN LATITUDE' 498 473 499 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 474 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 500 475 DO l = 1, llm 501 476 c … … 507 482 c de latitude autour du pole (qpns pour le pole nord et qpsn pour 508 483 c le pole nord) qui sera utilisee pour evaluer les pentes au pole. 509 484 510 485 if (pole_nord) then 511 486 DO i = 1, iim … … 514 489 qpns = SSUM( iim, airescb ,1 ) / airej2 515 490 endif 516 491 517 492 if (pole_sud) then 518 493 DO i = 1, iim … … 521 496 qpsn = SSUM( iim, airesch ,1 ) / airejjm 522 497 endif 523 498 524 499 c calcul des pentes aux points v 525 500 … … 528 503 if (pole_nord) ijb=ij_begin 529 504 if (pole_sud) ije=ij_end-iip1 530 505 531 506 ! on a besoin de q entre ij_begin-2*iip1 et ij_end+2*iip1 532 507 ! Si pole sud, entre ij_begin-2*iip1 et ij_end … … 536 511 adyqv(ij)=abs(dyqv(ij)) 537 512 ENDDO 538 513 539 514 540 515 c calcul des pentes aux points scalaires … … 543 518 if (pole_nord) ijb=ij_begin+iip1 544 519 if (pole_sud) ije=ij_end-iip1 545 520 546 521 DO ij=ijb,ije 547 522 dyq(ij,l)=.5*(dyqv(ij-iip1)+dyqv(ij)) … … 555 530 dyq(ij,l)=qpns-q(ij+iip1,l,iq) 556 531 ENDDO 557 532 558 533 dyn1=0. 559 534 dyn2=0. … … 565 540 dyq(ij,l)=dyn1*sinlon(ij)+dyn2*coslon(ij) 566 541 ENDDO 567 542 568 543 DO ij=1,iip1 569 544 dyq(ij,l)=0. … … 571 546 c ym tout cela ne sert pas a grand chose 572 547 ENDIF 573 548 574 549 IF (pole_sud) THEN 575 550 … … 589 564 dyq(ip1jm+ij,l)=dys1*sinlon(ij)+dys2*coslon(ij) 590 565 ENDDO 591 566 592 567 DO ij=1,iip1 593 568 dyq(ip1jm+ij,l)=0. … … 619 594 620 595 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 621 C En memoire de dIFferents tests sur la 596 C En memoire de dIFferents tests sur la 622 597 C limitation des pentes aux poles. 623 598 CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC … … 732 707 ijem=ij_end+iip1 733 708 if (pole_nord) ijb=ij_begin 734 if (pole_sud) ije=ij_end 709 if (pole_sud) ije=ij_end 735 710 if (pole_nord) ijbm=ij_begin 736 711 if (pole_sud) ijem=ij_end … … 738 713 do ifils=1,tracers(iq)%nqDescen 739 714 iq2=tracers(iq)%iqDescen(ifils) 740 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 715 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 741 716 DO l=1,llm 742 717 ! modif des bornes: CRisi 16 nov 2020 743 718 ! d'abord masse avec bornes corrigées 744 DO ij=ijbm,ijem 719 DO ij=ijbm,ijem 745 720 !MVals: veiller a ce qu'on n'ait pas de denominateur nul 746 721 masse(ij,l,iq2)=max(masse(ij,l,iq)*q(ij,l,iq),min_qMass) … … 753 728 Ratio(ij,l,iq2)=q(ij,l,iq2)/q(ij,l,iq) 754 729 else 755 Ratio(ij,l,iq2)=min_ratio 756 endif 757 enddo !DO ij=ijbm,ijem 730 Ratio(ij,l,iq2)=min_ratio 731 endif 732 enddo !DO ij=ijbm,ijem 758 733 enddo !DO l=1,llm 759 734 c$OMP END DO NOWAIT … … 765 740 enddo 766 741 ! end CRisi 767 742 768 743 ijb=ij_begin 769 744 ije=ij_end 770 745 if (pole_nord) ijb=ij_begin+iip1 771 746 if (pole_sud) ije=ij_end-iip1 772 773 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 747 748 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 774 749 DO l=1,llm 775 750 DO ij=ijb,ije … … 801 776 enddo 802 777 endif 803 778 804 779 c convps=-SSUM(iim,qbyv(ip1jm-iim,l),1)/apols 805 780 c convmps=-ssum(iim,masse_adv_v(ip1jm-iim,l),1)/apols 806 781 807 782 if (pole_sud) then 808 783 809 784 convps=-SSUM(iim,qbyv(ip1jm-iim,l),1) 810 785 convmps=-ssum(iim,masse_adv_v(ip1jm-iim,l),1) … … 854 829 do ifils=1,tracers(iq)%nqDescen 855 830 iq2=tracers(iq)%iqDescen(ifils) 856 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 831 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 857 832 DO l=1,llm 858 833 DO ij=ijb,ije 859 q(ij,l,iq2)=q(ij,l,iq)*Ratio(ij,l,iq2) 834 q(ij,l,iq2)=q(ij,l,iq)*Ratio(ij,l,iq2) 860 835 enddo 861 836 enddo … … 866 841 RETURN 867 842 END 868 869 870 843 844 845 871 846 RECURSIVE SUBROUTINE vlz_loc(q,pente_max,masse,w,ijb_x,ije_x,iq) 872 847 c 873 c Auteurs: P.Le Van, F.Hourdin, F.Forget 848 c Auteurs: P.Le Van, F.Hourdin, F.Forget 874 849 c 875 850 c ******************************************************************** … … 885 860 USE infotrac, ONLY : nqtot,tracers, ! CRisi & 886 861 & min_qParent,min_qMass,min_ratio ! MVals et CRisi 887 862 888 863 IMPLICIT NONE 889 864 c … … 900 875 INTEGER iq 901 876 c 902 c Local 877 c Local 903 878 c --------- 904 879 c … … 915 890 REAL sigw 916 891 917 LOGICAL testcpu918 SAVE testcpu919 c$OMP THREADPRIVATE(testcpu)920 892 REAL temps0,temps1,temps2,temps3,temps4,temps5,second 921 893 SAVE temps0,temps1,temps2,temps3,temps4,temps5 … … 923 895 924 896 REAL SSUM 925 EXTERNAL SSUM 926 927 DATA testcpu/.false./ 897 928 898 DATA temps0,temps1,temps2,temps3,temps4,temps5/0.,0.,0.,0.,0.,0./ 929 899 INTEGER ijb,ije,ijb_x,ije_x … … 933 903 !REAL masseq(ijb_u:ije_u,llm,nqtot),Ratio(ijb_u:ije_u,llm,nqtot) ! CRisi 934 904 ! Ces varibles doivent être déclarées en pointer et en save dans 935 ! vlz_loc si on veut qu'elles soient vues par tous les threads. 905 ! vlz_loc si on veut qu'elles soient vues par tous les threads. 936 906 INTEGER ifils,iq2 ! CRisi 937 907 … … 939 909 IF (first) THEN 940 910 first=.FALSE. 941 ENDIF 911 ENDIF 942 912 c On oriente tout dans le sens de la pression c'est a dire dans le 943 913 c sens de W 944 914 945 915 !write(*,*) 'vlsplt 926: entree dans vlz_loc, iq=',iq 946 #ifdef BIDON947 IF(testcpu) THEN948 temps0=second(0.)949 ENDIF950 #endif951 916 952 917 ijb=ijb_x 953 918 ije=ije_x 954 919 955 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 920 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 956 921 DO l=2,llm 957 922 DO ij=ijb,ije … … 965 930 DO l=2,llm-1 966 931 DO ij=ijb,ije 967 #ifdef CRAY968 dzq(ij,l)=0.5*969 , cvmgp(dzqw(ij,l)+dzqw(ij,l+1),0.,dzqw(ij,l)*dzqw(ij,l+1))970 #else971 932 IF(dzqw(ij,l)*dzqw(ij,l+1)>0.) THEN 972 933 dzq(ij,l)=0.5*(dzqw(ij,l)+dzqw(ij,l+1)) … … 974 935 dzq(ij,l)=0. 975 936 ENDIF 976 #endif977 937 dzqmax=pente_max*min(adzqw(ij,l),adzqw(ij,l+1)) 978 938 dzq(ij,l)=sign(min(abs(dzq(ij,l)),dzqmax),dzq(ij,l)) … … 988 948 c$OMP END MASTER 989 949 c$OMP BARRIER 990 #ifdef BIDON991 IF(testcpu) THEN992 temps1=temps1+second(0.)-temps0993 ENDIF994 #endif995 950 996 951 !-------------------------------------------------------- … … 1008 963 ENDDO 1009 964 ENDDO 1010 c$OMP END DO NOWAIT 965 c$OMP END DO NOWAIT 1011 966 1012 967 c --------------------------------------------------------------- … … 1041 996 ENDDO 1042 997 ENDDO 1043 c$OMP END DO NOWAIT 1044 !write(*,*) 'vlz 1001' 998 c$OMP END DO NOWAIT 999 !write(*,*) 'vlz 1001' 1045 1000 1046 1001 ELSE ! countcfl>=1 … … 1079 1034 c on itère jusqu'à ce que tous les poins satisfassent 1080 1035 c le critère 1081 DO WHILE (countcfl>=1) 1036 DO WHILE (countcfl>=1) 1082 1037 IF (prt_level>9) THEN 1083 1038 WRITE(lunout,*)'On viole le CFL Vertical sur ',countcfl,' pts' … … 1130 1085 ENDDO 1131 1086 ENDDO 1132 c$OMP END DO NOWAIT 1087 c$OMP END DO NOWAIT 1133 1088 1134 1089 … … 1162 1117 !wq(ij,l,iq2)=wq(ij,l,iq) ! correction bug le 15mai2015 1163 1118 w(ij,l,iq2)=wq(ij,l,iq) 1164 enddo 1119 enddo 1165 1120 enddo 1166 1121 c$OMP END DO NOWAIT … … 1172 1127 call vlz_loc(Ratio,pente_max,masse,w,ijb_x,ije_x,iq2) 1173 1128 enddo 1174 ! end CRisi 1129 ! end CRisi 1175 1130 1176 1131 ! CRisi: On rajoute ici une barrière car on veut être sur que tous les … … 1190 1145 c$OMP END DO NOWAIT 1191 1146 1192 1147 1193 1148 ! retablir les fils en rapport de melange par rapport a l'air: 1194 1149 do ifils=1,tracers(iq)%nqDescen 1195 1150 iq2=tracers(iq)%iqDescen(ifils) 1196 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 1151 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 1197 1152 DO l=1,llm 1198 1153 DO ij=ijb,ije 1199 q(ij,l,iq2)=q(ij,l,iq)*Ratio(ij,l,iq2) 1154 q(ij,l,iq2)=q(ij,l,iq)*Ratio(ij,l,iq2) 1200 1155 enddo 1201 1156 enddo -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltqs_loc.F
r5081 r5098 13 13 USE parallel_lmdz 14 14 USE infotrac, ONLY : nqtot,tracers, ! CRisi & 15 & min_qParent,min_qMass,min_ratio ! MVals et CRisi 15 & min_qParent,min_qMass,min_ratio ! MVals et CRisi7 16 16 IMPLICIT NONE 17 17 c … … 91 91 c limitation subtile 92 92 c , min(adxqu(ij-1)/sigu(ij-1),adxqu(ij)/(1.-sigu(ij))) 93 93 94 94 95 95 ENDDO … … 100 100 101 101 DO ij=ijb+1,ije 102 #ifdef CRAY103 dxq(ij,l)=104 , cvmgp(dxqu(ij-1)+dxqu(ij),0.,dxqu(ij-1)*dxqu(ij))105 #else106 102 IF(dxqu(ij-1)*dxqu(ij)>0) THEN 107 103 dxq(ij,l)=dxqu(ij-1)+dxqu(ij) … … 110 106 dxq(ij,l)=0. 111 107 ENDIF 112 #endif113 108 dxq(ij,l)=0.5*dxq(ij,l) 114 109 dxq(ij,l)= … … 179 174 180 175 c calcul des flux a gauche et a droite 181 182 #ifdef CRAY183 c--pas encore modification sur Qsat184 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)185 DO l=1,llm186 DO ij=ijb,ije-1187 zdum(ij,l)=cvmgp(1.-u_m(ij,l)/masse(ij,l,iq),188 , 1.+u_m(ij,l)/masse(ij+1,l,iq),189 , u_m(ij,l))190 zdum(ij,l)=0.5*zdum(ij,l)191 u_mq(ij,l)=cvmgp(192 , q(ij,l,iq)+zdum(ij,l)*dxq(ij,l),193 , q(ij+1,l,iq)-zdum(ij,l)*dxq(ij+1,l),194 , u_m(ij,l))195 u_mq(ij,l)=u_m(ij,l)*u_mq(ij,l)196 ENDDO197 ENDDO198 c$OMP END DO NOWAIT199 200 #else201 176 c on cumule le flux correspondant a toutes les mailles dont la masse 202 177 c au travers de la paroi pENDant le pas de temps. … … 217 192 ENDDO 218 193 c$OMP END DO NOWAIT 219 #endif220 194 221 195 … … 466 440 INTEGER ifils,iq2 ! CRisi 467 441 468 REAL SSUM469 470 442 DATA first/.true./ 471 443 INTEGER ijb,ije 472 444 INTEGER ijbm,ijem 445 446 REAL ssum 473 447 474 448 ijb=ij_begin-2*iip1 -
LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90
r5091 r5098 17 17 USE vertical_layers_mod, ONLY : init_vertical_layers 18 18 USE infotrac, ONLY: nbtr, type_trac 19 #ifdef CPP_StratAer20 USE infotrac_phy, ONLY: nbtr_bin, nbtr_sulgas, id_OCS_strat, &21 id_SO2_strat, id_H2SO4_strat, id_BIN01_strat22 19 23 #endif24 20 #ifdef REPROBUS 25 21 USE CHEM_REP, ONLY : Init_chem_rep_phys -
LMDZ6/branches/Amaury_dev/libf/filtrez/filtreg_mod.F90
r5082 r5098 43 43 LOGICAL, SAVE :: first_call_inifilr = .TRUE. 44 44 45 #ifdef CRAY46 45 INTEGER ISMIN 47 46 EXTERNAL ISMIN 48 47 INTEGER iymin 49 48 INTEGER ixmineq 50 #endif51 49 ! 52 50 ! ------------------------------------------------------------ … … 104 102 ENDDO 105 103 ! 106 #ifdef CRAY 107 iymin = ISMIN( jjm, dlatu, 1 ) 108 ixmineq = ISMIN( iim, dlonu, 1 ) 109 dymin = dlatu( iymin ) 110 dxmin = dlonu( ixmineq ) 111 #else 104 112 105 dxmin = dlonu(1) 113 106 DO i = 2, iim … … 118 111 dymin = MIN( dymin,dlatu(j) ) 119 112 ENDDO 120 #endif121 113 ! 122 114 ! For a regular grid, we want the filter to start at latitudes … … 372 364 ENDDO 373 365 ENDDO ! of DO i=1,iim 374 #ifdef CRAY 375 CALL MXM( eignfnv,iim,eignft,iim,matriceun(1,1,j),iim ) 376 #else 366 377 367 #ifdef BLAS 378 368 CALL SGEMM ('N', 'N', iim, iim, iim, 1.0, & … … 389 379 ENDDO ! of DO k = 1, iim 390 380 #endif 391 #endif392 381 393 382 ENDDO ! of DO j = 2, jfiltnu … … 402 391 ENDDO 403 392 ENDDO ! of DO i=1,iim 404 #ifdef CRAY405 CALL MXM(eignfnv,iim,eignft,iim,matriceus(1,1,j-jfiltsu+1),iim)406 #else407 393 #ifdef BLAS 408 394 CALL SGEMM ('N', 'N', iim, iim, iim, 1.0, & … … 420 406 ENDDO ! of DO k = 1, iim 421 407 #endif 422 #endif423 408 424 409 ENDDO ! of DO j = jfiltsu, jjm … … 439 424 ENDDO 440 425 ENDDO 441 #ifdef CRAY 442 CALL MXM( eignfnu,iim,eignft,iim,matricevn(1,1,j),iim ) 443 #else 426 444 427 #ifdef BLAS 445 428 CALL SGEMM ('N', 'N', iim, iim, iim, 1.0, & … … 456 439 ENDDO 457 440 #endif 458 #endif459 441 460 442 ENDDO ! of DO j = 1, jfiltnv … … 469 451 ENDDO 470 452 ENDDO 471 #ifdef CRAY 472 CALL MXM(eignfnu,iim,eignft,iim,matricevs(1,1,j-jfiltsv+1),iim) 473 #else 453 474 454 #ifdef BLAS 475 455 CALL SGEMM ('N', 'N', iim, iim, iim, 1.0, & … … 487 467 ENDDO 488 468 #endif 489 #endif490 469 491 470 ENDDO ! of DO j = jfiltsv, jjm … … 506 485 ENDDO 507 486 ENDDO 508 #ifdef CRAY 509 CALL MXM( eignfnv,iim,eignft,iim,matrinvn(1,1,j),iim ) 510 #else 487 511 488 #ifdef BLAS 512 489 CALL SGEMM ('N', 'N', iim, iim, iim, 1.0, & … … 523 500 ENDDO 524 501 #endif 525 #endif526 502 527 503 ENDDO ! of DO j = 2, jfiltnu … … 536 512 ENDDO 537 513 ENDDO 538 #ifdef CRAY539 CALL MXM(eignfnv,iim,eignft,iim,matrinvs(1,1,j-jfiltsu+1),iim)540 #else541 514 #ifdef BLAS 542 515 CALL SGEMM ('N', 'N', iim, iim, iim, 1.0, & … … 553 526 ENDDO 554 527 #endif 555 #endif556 528 557 529 ENDDO ! of DO j = jfiltsu, jjm … … 569 541 ! 570 542 334 FORMAT(1x,24i3) 571 755 FORMAT(1x,6f10.3,i3) 572 573 RETURN 543 574 544 END SUBROUTINE inifilr 575 545 -
LMDZ6/branches/Amaury_dev/libf/filtrez/inifgn.F
r5079 r5098 67 67 END DO 68 68 c 69 #ifdef CRAY70 CALL MXM(eignfnu,iim,eignfnv,iim,vec ,iim)71 CALL MXM(eignfnv,iim,eignfnu,iim,vec1,iim)72 #else73 69 DO j = 1, iim 74 70 DO i = 1, iim … … 81 77 ENDDO 82 78 ENDDO 83 #endif84 79 85 80 c -
LMDZ6/branches/Amaury_dev/libf/misc/lmdz_TO_MOVE_ssum_scopy.f90
r5097 r5098 1 ! 2 ! $Header$ 3 ! 4 #ifdef CRAY 5 SUBROUTINE riencray 6 END 7 #else 8 subroutine scopy(n,sx,incx,sy,incy) 9 c 10 IMPLICIT NONE 11 c 12 integer n,incx,incy,ix,iy,i 13 real sx((n-1)*incx+1),sy((n-1)*incy+1) 14 c 15 iy=1 16 ix=1 17 DO i=1,n 18 sy(iy)=sx(ix) 19 ix=ix+incx 20 iy=iy+incy 21 END DO 22 c 23 return 24 end 1 ! TO MOVE SOMEWHERE ELSE !! (Amaury - 07/2024) 2 ! Move with other vector/math functions 3 ! Those are old legacy CRAY replacement functions, that are now used in several parts of the code. 25 4 26 function ssum(n,sx,incx) 27 c 28 IMPLICIT NONE 29 c 30 integer n,incx,i,ix 31 real ssum,sx((n-1)*incx+1) 32 c 33 ssum=0. 34 ix=1 35 do i=1,n 36 ssum=ssum+sx(ix) 37 ix=ix+incx 38 END DO 39 c 40 return 41 end 42 #endif 5 subroutine scopy(n, sx, incx, sy, incy) 6 7 IMPLICIT NONE 8 9 integer n, incx, incy, ix, iy, i 10 real sx((n - 1) * incx + 1), sy((n - 1) * incy + 1) 11 12 iy = 1 13 ix = 1 14 DO i = 1, n 15 sy(iy) = sx(ix) 16 ix = ix + incx 17 iy = iy + incy 18 END DO 19 20 end 21 22 function ssum(n, sx, incx) 23 24 IMPLICIT NONE 25 26 integer n, incx, i, ix 27 real ssum, sx((n - 1) * incx + 1) 28 29 ssum = 0. 30 ix = 1 31 do i = 1, n 32 ssum = ssum + sx(ix) 33 ix = ix + incx 34 END DO 35 36 end 37 -
LMDZ6/branches/Amaury_dev/libf/misc/lmdz_cppkeys_wrapper.F90
r5091 r5098 2 2 ! This file is part of an effort to replace most uses of preprocessor CPP keys by fortran variables, 3 3 ! to improve readability, compilation coverage, and linting. 4 ! CPP keys used here should ONLY be used here ,4 ! CPP keys used here should ONLY be used here (unless specified explicitely), 5 5 ! and imported through USE ..., ONLY: ... elsewhere 6 6 ! CPP keys supported (key -> fortran variables associated): … … 8 8 ! CPP_PHYS -> CPPKEY_PHYS 9 9 ! INCA -> CPPKEY_INCA 10 ! CPP_StratAer-> CPPKEY_STRATAER 10 11 ! --------------------------------------------- 11 12 … … 14 15 USE netcdf, ONLY: nf90_float, nf90_double 15 16 IMPLICIT NONE; PRIVATE 16 PUBLIC nf90_format, CPPKEY_PHYS, CPPKEY_INCA 17 PUBLIC nf90_format, CPPKEY_PHYS, CPPKEY_INCA, CPPKEY_STRATAER 17 18 18 19 #ifdef NC_DOUBLE … … 34 35 #endif 35 36 37 #ifdef CPP_StratAer 38 LOGICAL, PARAMETER :: CPPKEY_STRATAER = .TRUE. 39 #else 40 LOGICAL, PARAMETER :: CPPKEY_STRATAER = .FALSE. 41 #endif 42 36 43 END MODULE lmdz_cppkeys_wrapper -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/aer_sedimnt.F90
r5087 r5098 22 22 USE infotrac_phy 23 23 USE aerophys 24 USE YOMCST24 USE lmdz_yomcst 25 25 26 26 IMPLICIT NONE -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/calcaerosolstrato_rrtm.F90
r5082 r5098 9 9 USE dimphy 10 10 USE temps_mod 11 USE YOMCST11 USE lmdz_yomcst 12 12 13 13 IMPLICIT NONE -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/coagulate.F90
r5087 r5098 28 28 USE phys_local_var_mod, ONLY: DENSO4, DENSO4B, f_r_wet, f_r_wetB 29 29 USE strataer_local_var_mod, ONLY: flag_new_strat_compo 30 USE lmdz_yomcst 30 31 31 32 IMPLICIT NONE … … 83 84 REAL :: EvdW 84 85 85 include "YOMCST.h"86 87 86 ! ff(i,j,k): Volume fraction of Vi,j that is partitioned to each model bin k 88 87 ! just need to be calculated in model initialization because mdw(:) size is fixed -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/cond_evap_tstep_mod.F90
r5087 r5098 28 28 USE aerophys 29 29 USE infotrac_phy 30 USE YOMCST, ONLY : RPI30 USE lmdz_yomcst, ONLY : RPI 31 31 USE sulfate_aer_mod, ONLY : wph2so4, surftension, solh2so4, rpmvh2so4 32 32 USE strataer_local_var_mod, ONLY : ALPH2SO4, RRSI 33 33 34 34 IMPLICIT NONE 35 35 36 36 REAL, PARAMETER :: third=1./3. 37 37 … … 177 177 USE aerophys 178 178 USE infotrac_phy 179 USE YOMCST, ONLY : RPI179 USE lmdz_yomcst, ONLY : RPI 180 180 USE strataer_local_var_mod, ONLY : ALPH2SO4, RRSI 181 181 … … 290 290 USE aerophys 291 291 USE infotrac_phy 292 USE YOMCST, ONLY : RPI292 USE lmdz_yomcst, ONLY : RPI 293 293 USE strataer_local_var_mod, ONLY : RRSI,Vbin 294 294 -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/interp_sulf_input.F90
r5088 r5098 18 18 USE infotrac_phy 19 19 USE aerophys 20 USE YOMCST20 USE lmdz_yomcst 21 21 USE strataer_local_var_mod, ONLY : flag_newclim_file,flag_verbose_strataer 22 22 -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/micphy_tstep.F90
r5087 r5098 13 13 USE cond_evap_tstep_mod 14 14 USE sulfate_aer_mod, ONLY : STRAACT 15 USE YOMCST, ONLY : RPI, RD, RG15 USE lmdz_yomcst, ONLY : RPI, RD, RG 16 16 USE print_control_mod, ONLY: lunout 17 17 USE strataer_local_var_mod ! contains also RRSI and Vbin -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/miecalc_aer.F90
r5087 r5098 20 20 USE infotrac_phy, ONLY : nbtr, nbtr_bin, nbtr_sulgas, id_SO2_strat 21 21 USE dimphy 22 USE YOMCST, ONLY : RG, RPI22 USE lmdz_yomcst , ONLY : RG, RPI 23 23 USE mod_phys_lmdz_para, only: gather, scatter, bcast 24 24 USE mod_grid_phy_lmdz, ONLY : klon_glo -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/nucleation_tstep_mod.F90
r5087 r5098 11 11 USE infotrac_phy 12 12 USE strataer_local_var_mod, ONLY : flag_new_nucl 13 USE lmdz_yomcst 13 14 14 15 IMPLICIT NONE … … 37 38 REAL airn ! Air molecule concentration in (cm-3) NOT IN USE 38 39 REAL ipr ! Ion pair production rate (cm-3 s-1) NOT IN USE 39 40 include "YOMCST.h"41 40 42 41 ! call nucleation routine … … 332 331 333 332 USE aerophys 333 USE lmdz_yomcst 334 334 335 335 IMPLICIT NONE … … 385 385 DOUBLE PRECISION :: xloss ! Ion loss rate 386 386 DOUBLE PRECISION :: recomb ! Ion-ion recombination rate 387 388 include "YOMCST.h"389 387 390 388 !--- 0) Initializations: -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/ocs_to_so2.F90
r5082 r5098 7 7 USE aerophys 8 8 USE infotrac_phy 9 USE YOMCST, ONLY : RG9 USE lmdz_yomcst, ONLY : RG 10 10 USE phys_local_var_mod, ONLY : OCS_lifetime, budg_3D_ocs_to_so2, budg_ocs_to_so2 11 11 USE strataer_local_var_mod, ONLY : flag_min_rreduce -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/so2_to_h2so4.F90
r5087 r5098 7 7 USE aerophys 8 8 USE infotrac_phy 9 USE YOMCST, ONLY : RG, RD9 USE lmdz_yomcst, ONLY : RG, RD 10 10 ! lifetime (sec) et O3_clim (VMR) 11 11 USE phys_local_var_mod, ONLY : SO2_lifetime, H2SO4_lifetime, O3_clim, budg_3D_so2_to_h2so4, budg_so2_to_h2so4 -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratH2O_methox.F90
r5088 r5098 19 19 USE infotrac_phy 20 20 USE aerophys 21 USE YOMCST21 USE lmdz_yomcst 22 22 USE strataer_local_var_mod, ONLY : flag_newclim_file 23 23 24 24 IMPLICIT NONE 25 25 26 26 include "dimensions.h" 27 27 -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/strataer_emiss_mod.F90
r5082 r5098 219 219 USE print_control_mod, ONLY : lunout 220 220 USE strataer_local_var_mod 221 222 INCLUDE "YOMCST.h" !--RPI 221 USE lmdz_yomcst, ONLY: RPI 223 222 224 223 ! local var -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/strataer_local_var_mod.F90
r5082 r5098 1 1 MODULE strataer_local_var_mod 2 ! This module contains strato microphysic model parameters & variables3 2 ! This module contains strato microphysic model parameters & variables 3 4 4 IMPLICIT NONE 5 5 6 6 !============= GENERAL PARAMS ============= 7 7 !flag for type emission scenario: (0) background aer ; (1) volcanic eruption with Sulfur ; 8 8 !(2,3) strato aer injections (SAI) ; (4) volcanic eruption chimistry; (5) rocket 9 INTEGER, SAVE :: flag_emit9 INTEGER, SAVE :: flag_emit 10 10 !$OMP THREADPRIVATE(flag_emit) 11 11 12 12 ! flag for emission altitude distribution: (0) gaussian; (1) uniform 13 INTEGER, SAVE :: flag_emit_distrib13 INTEGER, SAVE :: flag_emit_distrib 14 14 !$OMP THREADPRIVATE(flag_emit_distrib) 15 15 16 16 ! flag to choose nucleation nucleation method 17 LOGICAL, SAVE :: flag_new_nucl ! T=new routine from A. Maattanen (LATMOS), F=older routine from H. Vehkamäki (FMI)17 LOGICAL, SAVE :: flag_new_nucl ! T=new routine from A. Maattanen (LATMOS), F=older routine from H. Vehkamäki (FMI) 18 18 !$OMP THREADPRIVATE(flag_new_nucl) 19 19 20 20 ! Use relative humidity from 2D model stratospheric H2O because LMDz is too dry in the stratosphere 21 21 ! (no CH4 oxidation) 22 LOGICAL, SAVE :: flag_H2O2d_nucleation22 LOGICAL, SAVE :: flag_H2O2d_nucleation 23 23 !$OMP THREADPRIVATE(flag_H2O2d_nucleation) 24 24 25 25 ! OH reduction from SO2. OH is reduced when its reaction with SO2 competes sufficiently with its reaction 26 26 ! with O3 (Bekki, 1995). As a result, SO2 lifetime is extended. 2D model O3 climatologies are needed. 27 LOGICAL, SAVE :: flag_OH_reduced27 LOGICAL, SAVE :: flag_OH_reduced 28 28 !$OMP THREADPRIVATE(flag_OH_reduced) 29 29 30 30 ! H2SO4 photolysis: H2SO4 is converted into SO2 by complex photolytic processes. Here simplified approach 31 31 ! by setting H2SO4 cross-sections = 0.3*HCl cross-sections (Rinsland et al., 1995) 32 LOGICAL, SAVE :: flag_H2SO4_photolysis32 LOGICAL, SAVE :: flag_H2SO4_photolysis 33 33 !$OMP THREADPRIVATE(flag_H2SO4_photolysis) 34 34 35 35 ! flag for minimum lifetime (=1.5 pdt phys) 36 LOGICAL, SAVE :: flag_min_rreduce36 LOGICAL, SAVE :: flag_min_rreduce 37 37 !$OMP THREADPRIVATE(flag_min_rreduce) 38 38 39 39 ! flag to read new climato (O3, H2O & H2SO4_LIFET) 40 LOGICAL, SAVE :: flag_newclim_file40 LOGICAL, SAVE :: flag_newclim_file 41 41 !$OMP THREADPRIVATE(flag_newclim_file) 42 42 43 43 ! flag to choose new H2SO4 density and weight percent from Tabazadeh et al. (1994). 44 LOGICAL, SAVE :: flag_new_strat_compo44 LOGICAL, SAVE :: flag_new_strat_compo 45 45 !$OMP THREADPRIVATE(flag_new_strat_compo) 46 46 47 47 ! Verbose mode to get more print info 48 48 LOGICAL, SAVE :: flag_verbose_strataer 49 49 !$OMP THREADPRIVATE(flag_verbose_strataer) 50 51 50 51 52 52 !============= NUCLEATION VARS ============= 53 53 ! MOLECULAR ACCOMODATION OF H2SO4 (Raes and Van Dingen) 54 REAL, SAVE:: ALPH2SO4 ! H2SO4 accommodation coefficient [condensation/evaporation]54 REAL, SAVE :: ALPH2SO4 ! H2SO4 accommodation coefficient [condensation/evaporation] 55 55 !$OMP THREADPRIVATE(ALPH2SO4) 56 56 57 57 ! flag to constraint nucleation rate in a lat/pres box 58 LOGICAL, SAVE :: flag_nuc_rate_box ! Nucleation rate limit or not to a lat/pres58 LOGICAL, SAVE :: flag_nuc_rate_box ! Nucleation rate limit or not to a lat/pres 59 59 !$OMP THREADPRIVATE(flag_nuc_rate_box) 60 REAL, SAVE:: nuclat_min ! min lat to activate nuc rate61 REAL, SAVE:: nuclat_max ! max lat to activate nuc rate62 REAL, SAVE:: nucpres_min ! min pres to activate nuc rate63 REAL, SAVE:: nucpres_max ! max pres to activate nuc rate60 REAL, SAVE :: nuclat_min ! min lat to activate nuc rate 61 REAL, SAVE :: nuclat_max ! max lat to activate nuc rate 62 REAL, SAVE :: nucpres_min ! min pres to activate nuc rate 63 REAL, SAVE :: nucpres_max ! max pres to activate nuc rate 64 64 !$OMP THREADPRIVATE(nuclat_min, nuclat_max, nucpres_min, nucpres_max) 65 65 66 LOGICAL, SAVE :: ok_qemiss66 LOGICAL, SAVE :: ok_qemiss 67 67 !$OMP THREADPRIVATE(ok_qemiss) 68 INTEGER, SAVE :: flh2o ! ds stratemit : flh2o =0 (tr_seri), flh2o=1 (dq)68 INTEGER, SAVE :: flh2o ! ds stratemit : flh2o =0 (tr_seri), flh2o=1 (dq) 69 69 !$OMP THREADPRIVATE(flh2o) 70 71 REAL, ALLOCATABLE,SAVE :: budg_emi(:,:) !DIMENSION(klon,n)70 71 REAL, ALLOCATABLE, SAVE :: budg_emi(:, :) !DIMENSION(klon,n) 72 72 !$OMP THREADPRIVATE(budg_emi) 73 74 73 74 75 75 !============= EMISSION VARS ============= 76 76 !--flag_emit=1 OR == 4 -- Volcanic eruption(s) 77 INTEGER, SAVE:: nErupt ! number of eruptions specs78 REAL, SAVE:: injdur ! volcanic injection duration77 INTEGER, SAVE :: nErupt ! number of eruptions specs 78 REAL, SAVE :: injdur ! volcanic injection duration 79 79 !$OMP THREADPRIVATE(nErupt, injdur) 80 INTEGER, ALLOCATABLE,SAVE :: year_emit_vol(:) ! year of emission date81 INTEGER, ALLOCATABLE,SAVE :: mth_emit_vol(:) ! month of emission date82 INTEGER, ALLOCATABLE,SAVE :: day_emit_vol(:) ! day of emission date80 INTEGER, ALLOCATABLE, SAVE :: year_emit_vol(:) ! year of emission date 81 INTEGER, ALLOCATABLE, SAVE :: mth_emit_vol(:) ! month of emission date 82 INTEGER, ALLOCATABLE, SAVE :: day_emit_vol(:) ! day of emission date 83 83 !$OMP THREADPRIVATE(year_emit_vol, mth_emit_vol, day_emit_vol) 84 REAL, ALLOCATABLE,SAVE:: altemiss_vol(:) ! emission altitude in m85 REAL, ALLOCATABLE,SAVE:: sigma_alt_vol(:) ! standard deviation of emission altitude in m84 REAL, ALLOCATABLE, SAVE :: altemiss_vol(:) ! emission altitude in m 85 REAL, ALLOCATABLE, SAVE :: sigma_alt_vol(:) ! standard deviation of emission altitude in m 86 86 !$OMP THREADPRIVATE(altemiss_vol, sigma_alt_vol) 87 INTEGER, ALLOCATABLE,SAVE :: ponde_lonlat_vol(:) ! lon/lat ponderation factor88 REAL, ALLOCATABLE,SAVE:: xlat_min_vol(:) ! min latitude of volcano in degree89 REAL, ALLOCATABLE,SAVE:: xlat_max_vol(:) ! max latitude of volcano in degree90 REAL, ALLOCATABLE,SAVE:: xlon_min_vol(:) ! min longitude of volcano in degree91 REAL, ALLOCATABLE,SAVE:: xlon_max_vol(:) ! max longitude of volcano in degree87 INTEGER, ALLOCATABLE, SAVE :: ponde_lonlat_vol(:) ! lon/lat ponderation factor 88 REAL, ALLOCATABLE, SAVE :: xlat_min_vol(:) ! min latitude of volcano in degree 89 REAL, ALLOCATABLE, SAVE :: xlat_max_vol(:) ! max latitude of volcano in degree 90 REAL, ALLOCATABLE, SAVE :: xlon_min_vol(:) ! min longitude of volcano in degree 91 REAL, ALLOCATABLE, SAVE :: xlon_max_vol(:) ! max longitude of volcano in degree 92 92 !$OMP THREADPRIVATE(ponde_lonlat_vol, xlat_min_vol, xlat_max_vol, xlon_min_vol, xlon_max_vol) 93 93 94 94 !--flag_emit=1 95 INTEGER, SAVE :: nAerErupt ! number Aerosol95 INTEGER, SAVE :: nAerErupt ! number Aerosol 96 96 !$OMP THREADPRIVATE(nAerErupt) 97 REAL, ALLOCATABLE,SAVE:: m_sulf_emiss_vol(:) ! emitted sulfur mass in kgS, e.g. 7Tg(S)=14Tg(SO2)98 REAL, ALLOCATABLE,SAVE :: m_aer_emiss_vol(:,:)97 REAL, ALLOCATABLE, SAVE :: m_sulf_emiss_vol(:) ! emitted sulfur mass in kgS, e.g. 7Tg(S)=14Tg(SO2) 98 REAL, ALLOCATABLE, SAVE :: m_aer_emiss_vol(:, :) 99 99 !$OMP THREADPRIVATE(m_sulf_emiss_vol,m_aer_emiss_vol) 100 100 101 101 !--flag_emit=2 --SAI 102 REAL, SAVE:: m_aer_emiss_sai ! emitted sulfur mass in kgS, eg 1e9=1TgS, 1e10=10TgS103 REAL, SAVE:: altemiss_sai ! emission altitude in m104 REAL, SAVE:: sigma_alt_sai ! standard deviation of emission altitude in m102 REAL, SAVE :: m_aer_emiss_sai ! emitted sulfur mass in kgS, eg 1e9=1TgS, 1e10=10TgS 103 REAL, SAVE :: altemiss_sai ! emission altitude in m 104 REAL, SAVE :: sigma_alt_sai ! standard deviation of emission altitude in m 105 105 !$OMP THREADPRIVATE(m_aer_emiss_sai, altemiss_sai, sigma_alt_sai) 106 INTEGER, SAVE:: year_emit_sai_start107 INTEGER, SAVE:: year_emit_sai_end108 INTEGER, SAVE:: mth_emit_sai_start109 INTEGER, SAVE:: mth_emit_sai_end110 INTEGER, SAVE:: day_emit_sai_start111 INTEGER, SAVE:: day_emit_sai_end106 INTEGER, SAVE :: year_emit_sai_start 107 INTEGER, SAVE :: year_emit_sai_end 108 INTEGER, SAVE :: mth_emit_sai_start 109 INTEGER, SAVE :: mth_emit_sai_end 110 INTEGER, SAVE :: day_emit_sai_start 111 INTEGER, SAVE :: day_emit_sai_end 112 112 !$OMP THREADPRIVATE(year_emit_sai_start, year_emit_sai_end) 113 113 !$OMP THREADPRIVATE(mth_emit_sai_start, mth_emit_sai_end) 114 114 !$OMP THREADPRIVATE(day_emit_sai_start, day_emit_sai_end) 115 REAL, SAVE:: xlat_sai ! latitude of SAI in degree116 REAL, SAVE:: xlon_sai ! longitude of SAI in degree115 REAL, SAVE :: xlat_sai ! latitude of SAI in degree 116 REAL, SAVE :: xlon_sai ! longitude of SAI in degree 117 117 !$OMP THREADPRIVATE(xlat_sai, xlon_sai) 118 118 119 119 !--flag_emit=3 -- SAI 120 REAL, SAVE:: xlat_max_sai ! maximum latitude of SAI in degrees121 REAL, SAVE:: xlat_min_sai ! minimum latitude of SAI in degrees120 REAL, SAVE :: xlat_max_sai ! maximum latitude of SAI in degrees 121 REAL, SAVE :: xlat_min_sai ! minimum latitude of SAI in degrees 122 122 !$OMP THREADPRIVATE(xlat_min_sai,xlat_max_sai) 123 123 124 124 !--flag_emit=4 -- volc species 125 INTEGER, SAVE:: nSpeciesErupt ! number of species Repr126 INTEGER, ALLOCATABLE,SAVE :: id_species(:) ! indice species Repr127 REAL, ALLOCATABLE,SAVE :: m_species_emiss_vol(:,:) ! emitted species125 INTEGER, SAVE :: nSpeciesErupt ! number of species Repr 126 INTEGER, ALLOCATABLE, SAVE :: id_species(:) ! indice species Repr 127 REAL, ALLOCATABLE, SAVE :: m_species_emiss_vol(:, :) ! emitted species 128 128 !$OMP THREADPRIVATE(nSpeciesErupt,id_species,m_species_emiss_vol) 129 INTEGER, ALLOCATABLE,SAVE :: id_HCl130 INTEGER, ALLOCATABLE,SAVE :: id_HBr131 INTEGER, ALLOCATABLE,SAVE :: id_NOx132 INTEGER, ALLOCATABLE,SAVE :: id_H2O129 INTEGER, ALLOCATABLE, SAVE :: id_HCl 130 INTEGER, ALLOCATABLE, SAVE :: id_HBr 131 INTEGER, ALLOCATABLE, SAVE :: id_NOx 132 INTEGER, ALLOCATABLE, SAVE :: id_H2O 133 133 !$OMP THREADPRIVATE(id_HCl,id_HBr,id_NOx,id_H2O) 134 REAL, ALLOCATABLE,SAVE :: m_Chlore_emiss_vol(:) ! emitted Chlore mass135 REAL, ALLOCATABLE,SAVE:: m_Brome_emiss_vol(:) ! emitted Brome mass136 REAL, ALLOCATABLE,SAVE:: m_NOx_emiss_vol(:) ! emitted NOx mass137 REAL, ALLOCATABLE,SAVE:: m_H2O_emiss_vol(:) ! emitted H2O mass138 REAL, ALLOCATABLE,SAVE:: m_H2O_emiss_vol_daily(:)134 REAL, ALLOCATABLE, SAVE :: m_Chlore_emiss_vol(:) ! emitted Chlore mass 135 REAL, ALLOCATABLE, SAVE :: m_Brome_emiss_vol(:) ! emitted Brome mass 136 REAL, ALLOCATABLE, SAVE :: m_NOx_emiss_vol(:) ! emitted NOx mass 137 REAL, ALLOCATABLE, SAVE :: m_H2O_emiss_vol(:) ! emitted H2O mass 138 REAL, ALLOCATABLE, SAVE :: m_H2O_emiss_vol_daily(:) 139 139 !$OMP THREADPRIVATE(m_Chlore_emiss_vol,m_Brome_emiss_vol,m_NOx_emiss_vol,m_H2O_emiss_vol) 140 140 !$OMP THREADPRIVATE(m_H2O_emiss_vol_daily) 141 141 142 142 !--flag_emit=5 -- Rockets Emitted 143 INTEGER, SAVE 143 INTEGER, SAVE :: ifreqroc ! frequence (=2 ex: tous les 2 mois) 144 144 !$OMP THREADPRIVATE(ifreqroc) 145 INTEGER, ALLOCATABLE,SAVE :: day_emit_roc(:) ! day of emission date145 INTEGER, ALLOCATABLE, SAVE :: day_emit_roc(:) ! day of emission date 146 146 !$OMP THREADPRIVATE(day_emit_roc) 147 148 REAL, ALLOCATABLE,SAVE:: RRSI(:) ! radius [cm] for each aerosol size149 REAL, ALLOCATABLE,SAVE :: Vbin(:) ! volume [m3] for each aerosol size147 148 REAL, ALLOCATABLE, SAVE :: RRSI(:) ! radius [cm] for each aerosol size 149 REAL, ALLOCATABLE, SAVE :: Vbin(:) ! volume [m3] for each aerosol size 150 150 !$OMP THREADPRIVATE(RRSI, Vbin) 151 REAL, SAVE:: dlat, dlon ! delta latitude and d longitude of grid in degree151 REAL, SAVE :: dlat, dlon ! delta latitude and d longitude of grid in degree 152 152 !$OMP THREADPRIVATE(dlat, dlon) 153 153 154 154 CONTAINS 155 155 156 156 SUBROUTINE strataer_init() 157 USE ioipsl_getin_p_mod, ONLY 158 USE print_control_mod, ONLY 159 USE mod_phys_lmdz_para, ONLY 160 USE infotrac_phy, ONLY: id_OCS_strat, id_SO2_strat,id_H2SO4_strat,nbtr_sulgas,nbtr_bin161 USE phys_local_var_mod, ONLY 157 USE ioipsl_getin_p_mod, ONLY: getin_p 158 USE print_control_mod, ONLY: lunout 159 USE mod_phys_lmdz_para, ONLY: is_master 160 USE infotrac_phy, ONLY: id_OCS_strat, id_SO2_strat, id_H2SO4_strat, nbtr_sulgas, nbtr_bin 161 USE phys_local_var_mod, ONLY: mdw 162 162 USE aerophys, ONLY: mdwmin, V_rat 163 USE YOMCST , ONLY: RPI164 163 USE lmdz_yomcst, ONLY: RPI 164 165 165 INTEGER :: it 166 167 WRITE(lunout, *) 'IN STRATAER_LOCAL_VAR INIT WELCOME!'168 166 167 WRITE(lunout, *) 'IN STRATAER_LOCAL_VAR INIT WELCOME!' 168 169 169 !============= Check Sulfur aerosols ID ============= 170 WRITE(lunout, *) 'STRATAER_LOCAL_VAR INIT: id_OCS_strat=',id_OCS_strat,' id_SO2_strat=',id_SO2_strat,' id_H2SO4_strat=',id_H2SO4_strat171 170 WRITE(lunout, *) 'STRATAER_LOCAL_VAR INIT: id_OCS_strat=', id_OCS_strat, ' id_SO2_strat=', id_SO2_strat, ' id_H2SO4_strat=', id_H2SO4_strat 171 172 172 IF(id_OCS_strat < 0 .OR. id_OCS_strat > nbtr_sulgas) THEN 173 WRITE(lunout,*) 'ERROR : OCS index id_OCS_strat=',id_OCS_strat,' is negative or superior than the total sulfur gases !'174 CALL abort_physic('strataer_local_var_mod','Wrong OCS index, check your tracer.def file.',1)173 WRITE(lunout, *) 'ERROR : OCS index id_OCS_strat=', id_OCS_strat, ' is negative or superior than the total sulfur gases !' 174 CALL abort_physic('strataer_local_var_mod', 'Wrong OCS index, check your tracer.def file.', 1) 175 175 ELSEIF(id_SO2_strat < 0 .OR. id_SO2_strat > nbtr_sulgas) THEN 176 WRITE(lunout,*) 'ERROR : SO2 index id_SO2_strat=',id_SO2_strat,' is negative or superior than the total sulfur gases !'177 CALL abort_physic('strataer_local_var_mod','Wrong SO2 index, check your tracer.def file.',1)176 WRITE(lunout, *) 'ERROR : SO2 index id_SO2_strat=', id_SO2_strat, ' is negative or superior than the total sulfur gases !' 177 CALL abort_physic('strataer_local_var_mod', 'Wrong SO2 index, check your tracer.def file.', 1) 178 178 ELSEIF(id_H2SO4_strat < 0 .OR. id_H2SO4_strat > nbtr_sulgas) THEN 179 WRITE(lunout,*) 'ERROR : H2SO4 index id_H2SO4_strat=',id_H2SO4_strat,' is negative or superior than the total sulfur gases !'180 CALL abort_physic('strataer_local_var_mod','Wrong H2SO4 index, check your tracer.def file.',1)181 ENDIF 182 179 WRITE(lunout, *) 'ERROR : H2SO4 index id_H2SO4_strat=', id_H2SO4_strat, ' is negative or superior than the total sulfur gases !' 180 CALL abort_physic('strataer_local_var_mod', 'Wrong H2SO4 index, check your tracer.def file.', 1) 181 ENDIF 182 183 183 !============= Init params ============= 184 184 flag_emit = 0 ! Background (default) … … 191 191 flag_H2SO4_photolysis = .FALSE. ! H2SO4 photolysis (default: No) 192 192 flag_min_rreduce = .TRUE. ! Minimum lifetime=1.5 pdt phys (default: Yes) 193 flag_new_strat_compo = .TRUE. ! H2SO4/H2O weight percent & density routine (default: S. Bekki)193 flag_new_strat_compo = .TRUE. ! H2SO4/H2O weight percent & density routine (default: S. Bekki) 194 194 ok_qemiss = .FALSE. ! H2O emission flag 195 195 196 196 ! nuc init 197 197 ALPH2SO4 = 0.1 198 198 flag_nuc_rate_box = .FALSE. 199 nuclat_min =0 ; nuclat_max=0200 nucpres_min =0 ; nucpres_max=0201 199 nuclat_min = 0 ; nuclat_max = 0 200 nucpres_min = 0 ; nucpres_max = 0 201 202 202 ! emiss init 203 203 nErupt = 0 ! eruption number 204 204 injdur = 0 ! init injection duration 205 205 nAerErupt = 1 ; nSpeciesErupt = 1 206 ifreqroc =2 ; flh2o=0207 206 ifreqroc = 2 ; flh2o = 0 207 208 208 !============= Read params ============= 209 CALL getin_p('flag_emit', flag_emit)210 CALL getin_p('flag_emit_distrib', flag_emit_distrib)211 CALL getin_p('flag_verbose_strataer', flag_verbose_strataer)212 CALL getin_p('flag_new_nucl', flag_new_nucl)213 CALL getin_p('flag_newclim_file', flag_newclim_file)214 CALL getin_p('flag_H2O2d_nucleation', flag_H2O2d_nucleation)215 CALL getin_p('flag_OH_reduced', flag_OH_reduced)216 CALL getin_p('flag_H2SO4_photolysis', flag_H2SO4_photolysis)217 CALL getin_p('flag_min_rreduce', flag_min_rreduce)218 CALL getin_p('flag_new_strat_compo', flag_new_strat_compo)219 CALL getin_p('ok_qemiss', ok_qemiss)220 209 CALL getin_p('flag_emit', flag_emit) 210 CALL getin_p('flag_emit_distrib', flag_emit_distrib) 211 CALL getin_p('flag_verbose_strataer', flag_verbose_strataer) 212 CALL getin_p('flag_new_nucl', flag_new_nucl) 213 CALL getin_p('flag_newclim_file', flag_newclim_file) 214 CALL getin_p('flag_H2O2d_nucleation', flag_H2O2d_nucleation) 215 CALL getin_p('flag_OH_reduced', flag_OH_reduced) 216 CALL getin_p('flag_H2SO4_photolysis', flag_H2SO4_photolysis) 217 CALL getin_p('flag_min_rreduce', flag_min_rreduce) 218 CALL getin_p('flag_new_strat_compo', flag_new_strat_compo) 219 CALL getin_p('ok_qemiss', ok_qemiss) 220 221 221 !============= Test flag coherence ============= 222 222 IF (.NOT. flag_newclim_file) THEN 223 224 WRITE(lunout,*) 'ERROR : flag_newclim_file=',flag_newclim_file, &225 ' whereas flag_H2SO4_photolysis=',flag_H2SO4_photolysis,', flag_OH_reduced=',flag_OH_reduced, &226 ' and flag_H2O2d_nucleation=',flag_H2O2d_nucleation227 CALL abort_physic('strataer_local_var_mod','Incompatible options in physiq_def file !',1)228 229 230 WRITE(lunout,*) 'Warning : flag_min_rreduce will be ignored with old climato file !'231 232 ENDIF 233 223 IF (flag_H2SO4_photolysis .OR. flag_OH_reduced .OR. flag_H2O2d_nucleation) THEN 224 WRITE(lunout, *) 'ERROR : flag_newclim_file=', flag_newclim_file, & 225 ' whereas flag_H2SO4_photolysis=', flag_H2SO4_photolysis, ', flag_OH_reduced=', flag_OH_reduced, & 226 ' and flag_H2O2d_nucleation=', flag_H2O2d_nucleation 227 CALL abort_physic('strataer_local_var_mod', 'Incompatible options in physiq_def file !', 1) 228 ENDIF 229 IF(flag_min_rreduce) THEN 230 WRITE(lunout, *) 'Warning : flag_min_rreduce will be ignored with old climato file !' 231 ENDIF 232 ENDIF 233 234 234 !============= Print params ============= 235 235 IF (is_master) THEN 236 WRITE(lunout,*) 'flag_emit = ',flag_emit237 WRITE(lunout,*) 'IN STRATAER : flag_new_nucl = ',flag_new_nucl238 WRITE(lunout,*) 'IN STRATAER : flag_newclim_file = ',flag_newclim_file239 WRITE(lunout,*) 'IN STRATAER : flag_emit_distrib = ',flag_emit_distrib240 WRITE(lunout,*) 'IN STRATAER : flag_verbose_strataer = ',flag_verbose_strataer241 242 WRITE(lunout,*) 'IN STRATAER : flag_H2O2d_nucleation = ',flag_H2O2d_nucleation243 WRITE(lunout,*) 'IN STRATAER : flag_OH_reduced = ',flag_OH_reduced244 WRITE(lunout,*) 'IN STRATAER : flag_H2SO4_photolysis = ',flag_H2SO4_photolysis245 WRITE(lunout,*) 'IN STRATAER : flag_min_rreduce = ',flag_min_rreduce246 WRITE(lunout,*) 'IN STRATAER : flag_new_strat_compo = ',flag_new_strat_compo247 WRITE(lunout,*) 'IN STRATAER : ok_qemiss = ',ok_qemiss248 236 WRITE(lunout, *) 'flag_emit = ', flag_emit 237 WRITE(lunout, *) 'IN STRATAER : flag_new_nucl = ', flag_new_nucl 238 WRITE(lunout, *) 'IN STRATAER : flag_newclim_file = ', flag_newclim_file 239 WRITE(lunout, *) 'IN STRATAER : flag_emit_distrib = ', flag_emit_distrib 240 WRITE(lunout, *) 'IN STRATAER : flag_verbose_strataer = ', flag_verbose_strataer 241 IF (flag_emit == 1 .OR. flag_emit == 4) THEN 242 WRITE(lunout, *) 'IN STRATAER : flag_H2O2d_nucleation = ', flag_H2O2d_nucleation 243 WRITE(lunout, *) 'IN STRATAER : flag_OH_reduced = ', flag_OH_reduced 244 WRITE(lunout, *) 'IN STRATAER : flag_H2SO4_photolysis = ', flag_H2SO4_photolysis 245 WRITE(lunout, *) 'IN STRATAER : flag_min_rreduce = ', flag_min_rreduce 246 WRITE(lunout, *) 'IN STRATAER : flag_new_strat_compo = ', flag_new_strat_compo 247 WRITE(lunout, *) 'IN STRATAER : ok_qemiss = ', ok_qemiss 248 ENDIF 249 249 ENDIF ! if master 250 250 251 251 !--initialising dry diameters to geometrically spaced mass/volume (see Jacobson 1994) 252 mdw(1) =mdwmin252 mdw(1) = mdwmin 253 253 IF (V_rat<1.62) THEN ! compensate for dip in second bin for lower volume ratio 254 mdw(2)=mdw(1)*2.**(1./3.)255 DO it=3, nbtr_bin256 mdw(it)=mdw(it-1)*V_rat**(1./3.)257 254 mdw(2) = mdw(1) * 2.**(1. / 3.) 255 DO it = 3, nbtr_bin 256 mdw(it) = mdw(it - 1) * V_rat**(1. / 3.) 257 ENDDO 258 258 ELSE 259 DO it=2, nbtr_bin260 mdw(it)=mdw(it-1)*V_rat**(1./3.)261 262 ENDIF 263 IF (is_master) WRITE(lunout, *) 'init mdw=', mdw264 259 DO it = 2, nbtr_bin 260 mdw(it) = mdw(it - 1) * V_rat**(1. / 3.) 261 ENDDO 262 ENDIF 263 IF (is_master) WRITE(lunout, *) 'init mdw=', mdw 264 265 265 ! compute particle radius RRSI [cm] and volume Vbin [m3] from diameter mdw [m] 266 266 ALLOCATE(RRSI(nbtr_bin), Vbin(nbtr_bin)) 267 268 DO it =1,nbtr_bin269 270 RRSI(it)=mdw(it)/2.*100.271 272 Vbin(it)=4.0*RPI*((mdw(it)/2.)**3)/3.0267 268 DO it = 1, nbtr_bin 269 ! [cm] 270 RRSI(it) = mdw(it) / 2. * 100. 271 ! [m3] 272 Vbin(it) = 4.0 * RPI * ((mdw(it) / 2.)**3) / 3.0 273 273 ENDDO 274 274 275 275 IF (is_master) THEN 276 WRITE(lunout,*) 'init RRSI=', RRSI277 WRITE(lunout,*) 'init Vbin=', Vbin278 ENDIF 279 280 WRITE(lunout, *) 'IN STRATAER INIT END'281 276 WRITE(lunout, *) 'init RRSI=', RRSI 277 WRITE(lunout, *) 'init Vbin=', Vbin 278 ENDIF 279 280 WRITE(lunout, *) 'IN STRATAER INIT END' 281 282 282 END SUBROUTINE strataer_init 283 283 284 284 END MODULE strataer_local_var_mod -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratdistrib.F90
r5087 r5098 6 6 USE dimphy, ONLY : klon,klev 7 7 USE strataer_local_var_mod 8 USE YOMCST, only : RPI8 USE lmdz_yomcst, only : RPI 9 9 10 10 IMPLICIT NONE -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/stratemit.F90
r5087 r5098 10 10 USE phys_cal_mod 11 11 USE phys_local_var_mod, ONLY: d_q_emiss 12 USE YOMCST, only : RD, RPI, RG12 USE lmdz_yomcst, only : RD, RPI, RG 13 13 USE geometry_mod, ONLY : cell_area, boundslat 14 14 USE aerophys -
LMDZ6/branches/Amaury_dev/libf/phylmd/StratAer/traccoag_mod.F90
r5087 r5098 24 24 USE sulfate_aer_mod 25 25 USE phys_local_var_mod, ONLY: stratomask 26 USE YOMCST26 USE lmdz_yomcst 27 27 USE print_control_mod, ONLY: lunout 28 28 USE strataer_local_var_mod -
LMDZ6/branches/Amaury_dev/libf/phylmd/coare30_flux_cnrm_mod.F90
r5061 r5098 147 147 ! 148 148 149 !INCLUDE "YOMCST.h"150 !INCLUDE "clesphys.h"151 152 149 !* 0.2 declarations of local variables 153 150 ! -
LMDZ6/branches/Amaury_dev/libf/phylmd/conf_phys_m.F90
r5081 r5098 11 11 12 12 SUBROUTINE conf_phys(ok_journe, ok_mensuel, ok_instan, ok_hf, & 13 ok_LES,&14 callstats,&15 solarlong0,seuil_inversion, &16 fact_cldcon, facttemps,ok_newmicro,iflag_radia,&17 iflag_cld_th, &18 ratqsbas,ratqshaut,tau_ratqs, &19 ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, flag_volc_surfstrat, aerosol_couple, &20 chemistry_couple, flag_aerosol, flag_aerosol_strat, flag_aer_feedback, &21 flag_bc_internal_mixture, bl95_b0, bl95_b1,&22 read_climoz, &23 alp_offset)13 ok_LES, & 14 callstats, & 15 solarlong0, seuil_inversion, & 16 fact_cldcon, facttemps, ok_newmicro, iflag_radia, & 17 iflag_cld_th, & 18 ratqsbas, ratqshaut, tau_ratqs, & 19 ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, flag_volc_surfstrat, aerosol_couple, & 20 chemistry_couple, flag_aerosol, flag_aerosol_strat, flag_aer_feedback, & 21 flag_bc_internal_mixture, bl95_b0, bl95_b1, & 22 read_climoz, & 23 alp_offset) 24 24 25 25 USE IOIPSL 26 26 USE surface_data 27 27 USE phys_cal_mod 28 USE carbon_cycle_mod, ONLY: carbon_cycle_tr, carbon_cycle_cpl, carbon_cycle_rad, level_coupling_esm 29 USE carbon_cycle_mod, ONLY: read_fco2_ocean_cor,var_fco2_ocean_cor 30 USE carbon_cycle_mod, ONLY: read_fco2_land_cor,var_fco2_land_cor 31 USE chemistry_cycle_mod, ONLY: dms_cycle_cpl, n2o_cycle_cpl 32 USE mod_grid_phy_lmdz, ONLY: klon_glo 33 USE print_control_mod, ONLY: lunout 34 use config_ocean_skin_m, only: config_ocean_skin 35 USE phys_state_var_mod, ONLY: phys_tstep 36 USE infotrac_phy, ONLY: type_trac 28 USE carbon_cycle_mod, ONLY : carbon_cycle_tr, carbon_cycle_cpl, carbon_cycle_rad, level_coupling_esm 29 USE carbon_cycle_mod, ONLY : read_fco2_ocean_cor, var_fco2_ocean_cor 30 USE carbon_cycle_mod, ONLY : read_fco2_land_cor, var_fco2_land_cor 31 USE chemistry_cycle_mod, ONLY : dms_cycle_cpl, n2o_cycle_cpl 32 USE mod_grid_phy_lmdz, ONLY : klon_glo 33 USE print_control_mod, ONLY : lunout 34 use config_ocean_skin_m, only : config_ocean_skin 35 USE phys_state_var_mod, ONLY : phys_tstep 36 USE infotrac_phy, ONLY : type_trac 37 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER 37 38 38 39 INCLUDE "conema3.h" … … 72 73 73 74 ! Sortie: 74 LOGICAL :: ok_newmicro 75 INTEGER :: iflag_radia 76 LOGICAL :: ok_journe, ok_mensuel, ok_instan, ok_hf 77 LOGICAL :: ok_LES 78 LOGICAL :: callstats 79 LOGICAL :: ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan 80 LOGICAL :: aerosol_couple, chemistry_couple 81 INTEGER :: flag_aerosol 82 INTEGER :: flag_aerosol_strat 83 INTEGER :: flag_volc_surfstrat 84 LOGICAL :: flag_aer_feedback 85 LOGICAL :: flag_bc_internal_mixture 86 REAL :: bl95_b0, bl95_b1 87 REAL :: fact_cldcon, facttemps,ratqsbas,ratqshaut,tau_ratqs 88 INTEGER :: iflag_cld_th 89 90 91 CHARACTER (len = 6), SAVE :: type_ocean_omp, version_ocean_omp, ocean_omp 92 CHARACTER (len = 10),SAVE :: type_veget_omp 93 CHARACTER (len = 8), SAVE :: aer_type_omp 94 INTEGER, SAVE :: landice_opt_omp 95 INTEGER, SAVE :: iflag_tsurf_inlandsis_omp,iflag_temp_inlandsis_omp 96 INTEGER, SAVE :: iflag_albcalc_omp,iflag_z0m_snow_omp 97 LOGICAL, SAVE :: SnoMod_omp,BloMod_omp,ok_outfor_omp,ok_zsn_ii_omp 98 LOGICAL, SAVE :: discret_xf_omp,opt_runoff_ac_omp 99 LOGICAL, SAVE :: is_ok_slush_omp,is_ok_z0h_rn_omp,is_ok_density_kotlyakov_omp 100 REAL, SAVE :: prescribed_z0m_snow_omp,correc_alb_omp 101 REAL, SAVE :: buf_sph_pol_omp,buf_siz_pol_omp 102 LOGICAL, SAVE :: ok_newmicro_omp 103 LOGICAL, SAVE :: ok_all_xml_omp 104 LOGICAL, SAVE :: ok_lwoff_omp 105 LOGICAL, SAVE :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp 106 LOGICAL, SAVE :: ok_LES_omp 107 LOGICAL, SAVE :: callstats_omp 108 LOGICAL, SAVE :: ok_ade_omp, ok_aie_omp, ok_alw_omp, ok_cdnc_omp, ok_volcan_omp 109 LOGICAL, SAVE :: aerosol_couple_omp, chemistry_couple_omp 110 INTEGER, SAVE :: flag_aerosol_omp 111 INTEGER, SAVE :: flag_aerosol_strat_omp 112 INTEGER, SAVE :: flag_volc_surfstrat_omp 113 LOGICAL, SAVE :: flag_aer_feedback_omp 114 LOGICAL, SAVE :: flag_bc_internal_mixture_omp 115 REAL,SAVE :: bl95_b0_omp, bl95_b1_omp 116 REAL,SAVE :: freq_ISCCP_omp, ecrit_ISCCP_omp 117 REAL,SAVE :: freq_COSP_omp, freq_AIRS_omp 118 REAL,SAVE :: fact_cldcon_omp, facttemps_omp,ratqsbas_omp 119 REAL,SAVE :: tau_cld_cv_omp, coefw_cld_cv_omp 120 INTEGER, SAVE :: iflag_cld_cv_omp 121 122 REAL, SAVE :: ratqshaut_omp 123 REAL, SAVE :: tau_ratqs_omp 124 REAL, SAVE :: t_coupl_omp 125 INTEGER, SAVE :: iflag_radia_omp 126 INTEGER, SAVE :: iflag_rrtm_omp 127 INTEGER, SAVE :: iflag_albedo_omp !albedo SB 128 LOGICAL, SAVE :: ok_chlorophyll_omp ! albedo SB 129 INTEGER, SAVE :: NSW_omp 130 INTEGER, SAVE :: iflag_cld_th_omp, ip_ebil_phy_omp 131 INTEGER, SAVE :: iflag_ratqs_omp 132 133 REAL, SAVE :: f_cdrag_ter_omp,f_cdrag_oce_omp 134 REAL, SAVE :: f_rugoro_omp , z0min_omp 135 REAL, SAVE :: z0m_seaice_omp,z0h_seaice_omp 136 REAL, SAVE :: z0m_landice_omp,z0h_landice_omp 137 REAL, SAVE :: min_wind_speed_omp,f_gust_wk_omp,f_gust_bl_omp,f_qsat_oce_omp, f_z0qh_oce_omp 138 INTEGER, SAVE :: iflag_gusts_omp,iflag_z0_oce_omp 75 LOGICAL :: ok_newmicro 76 INTEGER :: iflag_radia 77 LOGICAL :: ok_journe, ok_mensuel, ok_instan, ok_hf 78 LOGICAL :: ok_LES 79 LOGICAL :: callstats 80 LOGICAL :: ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan 81 LOGICAL :: aerosol_couple, chemistry_couple 82 INTEGER :: flag_aerosol 83 INTEGER :: flag_aerosol_strat 84 INTEGER :: flag_volc_surfstrat 85 LOGICAL :: flag_aer_feedback 86 LOGICAL :: flag_bc_internal_mixture 87 REAL :: bl95_b0, bl95_b1 88 REAL :: fact_cldcon, facttemps, ratqsbas, ratqshaut, tau_ratqs 89 INTEGER :: iflag_cld_th 90 91 CHARACTER (len = 6), SAVE :: type_ocean_omp, version_ocean_omp, ocean_omp 92 CHARACTER (len = 10), SAVE :: type_veget_omp 93 CHARACTER (len = 8), SAVE :: aer_type_omp 94 INTEGER, SAVE :: landice_opt_omp 95 INTEGER, SAVE :: iflag_tsurf_inlandsis_omp, iflag_temp_inlandsis_omp 96 INTEGER, SAVE :: iflag_albcalc_omp, iflag_z0m_snow_omp 97 LOGICAL, SAVE :: SnoMod_omp, BloMod_omp, ok_outfor_omp, ok_zsn_ii_omp 98 LOGICAL, SAVE :: discret_xf_omp, opt_runoff_ac_omp 99 LOGICAL, SAVE :: is_ok_slush_omp, is_ok_z0h_rn_omp, is_ok_density_kotlyakov_omp 100 REAL, SAVE :: prescribed_z0m_snow_omp, correc_alb_omp 101 REAL, SAVE :: buf_sph_pol_omp, buf_siz_pol_omp 102 LOGICAL, SAVE :: ok_newmicro_omp 103 LOGICAL, SAVE :: ok_all_xml_omp 104 LOGICAL, SAVE :: ok_lwoff_omp 105 LOGICAL, SAVE :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp 106 LOGICAL, SAVE :: ok_LES_omp 107 LOGICAL, SAVE :: callstats_omp 108 LOGICAL, SAVE :: ok_ade_omp, ok_aie_omp, ok_alw_omp, ok_cdnc_omp, ok_volcan_omp 109 LOGICAL, SAVE :: aerosol_couple_omp, chemistry_couple_omp 110 INTEGER, SAVE :: flag_aerosol_omp 111 INTEGER, SAVE :: flag_aerosol_strat_omp 112 INTEGER, SAVE :: flag_volc_surfstrat_omp 113 LOGICAL, SAVE :: flag_aer_feedback_omp 114 LOGICAL, SAVE :: flag_bc_internal_mixture_omp 115 REAL, SAVE :: bl95_b0_omp, bl95_b1_omp 116 REAL, SAVE :: freq_ISCCP_omp, ecrit_ISCCP_omp 117 REAL, SAVE :: freq_COSP_omp, freq_AIRS_omp 118 REAL, SAVE :: fact_cldcon_omp, facttemps_omp, ratqsbas_omp 119 REAL, SAVE :: tau_cld_cv_omp, coefw_cld_cv_omp 120 INTEGER, SAVE :: iflag_cld_cv_omp 121 122 REAL, SAVE :: ratqshaut_omp 123 REAL, SAVE :: tau_ratqs_omp 124 REAL, SAVE :: t_coupl_omp 125 INTEGER, SAVE :: iflag_radia_omp 126 INTEGER, SAVE :: iflag_rrtm_omp 127 INTEGER, SAVE :: iflag_albedo_omp !albedo SB 128 LOGICAL, SAVE :: ok_chlorophyll_omp ! albedo SB 129 INTEGER, SAVE :: NSW_omp 130 INTEGER, SAVE :: iflag_cld_th_omp, ip_ebil_phy_omp 131 INTEGER, SAVE :: iflag_ratqs_omp 132 133 REAL, SAVE :: f_cdrag_ter_omp, f_cdrag_oce_omp 134 REAL, SAVE :: f_rugoro_omp, z0min_omp 135 REAL, SAVE :: z0m_seaice_omp, z0h_seaice_omp 136 REAL, SAVE :: z0m_landice_omp, z0h_landice_omp 137 REAL, SAVE :: min_wind_speed_omp, f_gust_wk_omp, f_gust_bl_omp, f_qsat_oce_omp, f_z0qh_oce_omp 138 INTEGER, SAVE :: iflag_gusts_omp, iflag_z0_oce_omp 139 139 140 140 REAL :: seuil_inversion 141 REAL, SAVE :: seuil_inversion_omp142 143 INTEGER, SAVE :: iflag_thermals_omp,nsplit_thermals_omp144 REAL, SAVE :: tau_thermals_omp,alp_bl_k_omp141 REAL, SAVE :: seuil_inversion_omp 142 143 INTEGER, SAVE :: iflag_thermals_omp, nsplit_thermals_omp 144 REAL, SAVE :: tau_thermals_omp, alp_bl_k_omp 145 145 ! nrlmd le 10/04/2012 146 INTEGER, SAVE :: iflag_trig_bl_omp,iflag_clos_bl_omp,iflag_strig_omp147 INTEGER, SAVE :: tau_trig_shallow_omp,tau_trig_deep_omp148 REAL, SAVE :: s_trig_omp,h_trig_omp146 INTEGER, SAVE :: iflag_trig_bl_omp, iflag_clos_bl_omp, iflag_strig_omp 147 INTEGER, SAVE :: tau_trig_shallow_omp, tau_trig_deep_omp 148 REAL, SAVE :: s_trig_omp, h_trig_omp 149 149 ! fin nrlmd le 10/04/2012 150 150 REAL :: alp_offset 151 151 REAL, SAVE :: alp_offset_omp 152 INTEGER, SAVE :: iflag_coupl_omp,iflag_clos_omp,iflag_wake_omp153 INTEGER, SAVE :: iflag_cvl_sigd_omp152 INTEGER, SAVE :: iflag_coupl_omp, iflag_clos_omp, iflag_wake_omp 153 INTEGER, SAVE :: iflag_cvl_sigd_omp 154 154 REAL, SAVE :: coef_clos_ls_omp 155 155 REAL, SAVE :: supcrit1_omp, supcrit2_omp … … 159 159 REAL, SAVE :: tmax_fonte_cv_omp 160 160 161 REAL, SAVE :: R_ecc_omp,R_peri_omp,R_incl_omp,solaire_omp162 REAL, SAVE :: solaire_omp_init163 LOGICAL, SAVE :: ok_suntime_rrtm_omp164 REAL, SAVE :: co2_ppm_omp, RCO2_omp, co2_ppm_per_omp, RCO2_per_omp165 REAL, SAVE :: co2_ppm0_omp166 REAL, SAVE :: CH4_ppb_omp, RCH4_omp, CH4_ppb_per_omp, RCH4_per_omp167 REAL, SAVE :: N2O_ppb_omp, RN2O_omp, N2O_ppb_per_omp, RN2O_per_omp168 REAL, SAVE :: CFC11_ppt_omp,RCFC11_omp,CFC11_ppt_per_omp,RCFC11_per_omp169 REAL, SAVE :: CFC12_ppt_omp,RCFC12_omp,CFC12_ppt_per_omp,RCFC12_per_omp170 REAL, SAVE :: epmax_omp171 REAL, SAVE :: coef_epmax_cape_omp172 LOGICAL, SAVE :: ok_adj_ema_omp173 INTEGER, SAVE :: iflag_clw_omp174 INTEGER, SAVE :: iflag_ice_thermo_omp175 LOGICAL, SAVE :: ok_ice_sursat_omp176 LOGICAL, SAVE :: ok_plane_h2o_omp, ok_plane_contrail_omp177 REAL, SAVE :: rad_froid_omp, rad_chau1_omp, rad_chau2_omp178 INTEGER, SAVE :: iflag_sic_omp, iflag_inertie_omp179 REAL, SAVE :: inertie_sol_omp,inertie_sno_omp,inertie_sic_omp180 REAL, SAVE :: inertie_lic_omp181 REAL, SAVE :: qsol0_omp182 REAL, SAVE :: evap0_omp183 REAL, SAVE :: albsno0_omp184 REAL 185 REAL, SAVE :: solarlong0_omp186 INTEGER, SAVE :: top_height_omp,overlap_omp187 REAL, SAVE :: cdmmax_omp,cdhmax_omp,ksta_omp,ksta_ter_omp,f_ri_cd_min_omp188 LOGICAL, SAVE :: ok_kzmin_omp189 REAL, SAVE :: 190 INTEGER, SAVE :: iflag_pbl_omp,lev_histhf_omp,lev_histday_omp,lev_histmth_omp191 INTEGER, SAVE :: iflag_pbl_split_omp,iflag_physiq_omp192 !FC193 INTEGER, SAVE :: ifl_pbltree_omp194 REAL, SAVE :: Cd_frein_omp195 !FC196 INTEGER, SAVE :: iflag_order2_sollw_omp197 INTEGER, SAVE :: lev_histins_omp, lev_histLES_omp 161 REAL, SAVE :: R_ecc_omp, R_peri_omp, R_incl_omp, solaire_omp 162 REAL, SAVE :: solaire_omp_init 163 LOGICAL, SAVE :: ok_suntime_rrtm_omp 164 REAL, SAVE :: co2_ppm_omp, RCO2_omp, co2_ppm_per_omp, RCO2_per_omp 165 REAL, SAVE :: co2_ppm0_omp 166 REAL, SAVE :: CH4_ppb_omp, RCH4_omp, CH4_ppb_per_omp, RCH4_per_omp 167 REAL, SAVE :: N2O_ppb_omp, RN2O_omp, N2O_ppb_per_omp, RN2O_per_omp 168 REAL, SAVE :: CFC11_ppt_omp, RCFC11_omp, CFC11_ppt_per_omp, RCFC11_per_omp 169 REAL, SAVE :: CFC12_ppt_omp, RCFC12_omp, CFC12_ppt_per_omp, RCFC12_per_omp 170 REAL, SAVE :: epmax_omp 171 REAL, SAVE :: coef_epmax_cape_omp 172 LOGICAL, SAVE :: ok_adj_ema_omp 173 INTEGER, SAVE :: iflag_clw_omp 174 INTEGER, SAVE :: iflag_ice_thermo_omp 175 LOGICAL, SAVE :: ok_ice_sursat_omp 176 LOGICAL, SAVE :: ok_plane_h2o_omp, ok_plane_contrail_omp 177 REAL, SAVE :: rad_froid_omp, rad_chau1_omp, rad_chau2_omp 178 INTEGER, SAVE :: iflag_sic_omp, iflag_inertie_omp 179 REAL, SAVE :: inertie_sol_omp, inertie_sno_omp, inertie_sic_omp 180 REAL, SAVE :: inertie_lic_omp 181 REAL, SAVE :: qsol0_omp 182 REAL, SAVE :: evap0_omp 183 REAL, SAVE :: albsno0_omp 184 REAL :: solarlong0 185 REAL, SAVE :: solarlong0_omp 186 INTEGER, SAVE :: top_height_omp, overlap_omp 187 REAL, SAVE :: cdmmax_omp, cdhmax_omp, ksta_omp, ksta_ter_omp, f_ri_cd_min_omp 188 LOGICAL, SAVE :: ok_kzmin_omp 189 REAL, SAVE :: fmagic_omp, pmagic_omp 190 INTEGER, SAVE :: iflag_pbl_omp, lev_histhf_omp, lev_histday_omp, lev_histmth_omp 191 INTEGER, SAVE :: iflag_pbl_split_omp, iflag_physiq_omp 192 !FC 193 INTEGER, SAVE :: ifl_pbltree_omp 194 REAL, SAVE :: Cd_frein_omp 195 !FC 196 INTEGER, SAVE :: iflag_order2_sollw_omp 197 INTEGER, SAVE :: lev_histins_omp, lev_histLES_omp 198 198 INTEGER, SAVE :: lev_histdayNMC_omp 199 199 INTEGER, SAVE :: levout_histNMC_omp(3) 200 200 LOGICAL, SAVE :: ok_histNMC_omp(3) 201 REAL, SAVE 201 REAL, SAVE :: freq_outNMC_omp(3), freq_calNMC_omp(3) 202 202 CHARACTER*4, SAVE :: type_run_omp 203 203 LOGICAL, SAVE :: ok_cosp_omp, ok_airs_omp 204 LOGICAL, SAVE :: ok_mensuelCOSP_omp, ok_journeCOSP_omp,ok_hfCOSP_omp205 REAL, SAVE 206 REAL, SAVE 207 REAL, SAVE 208 REAL, SAVE 209 REAL, SAVE 210 REAL, SAVE 211 REAL, SAVE 212 REAL, SAVE 204 LOGICAL, SAVE :: ok_mensuelCOSP_omp, ok_journeCOSP_omp, ok_hfCOSP_omp 205 REAL, SAVE :: lonmin_ins_omp, lonmax_ins_omp, latmin_ins_omp, latmax_ins_omp 206 REAL, SAVE :: ecrit_hf_omp, ecrit_day_omp, ecrit_mth_omp, ecrit_reg_omp 207 REAL, SAVE :: ecrit_ins_omp 208 REAL, SAVE :: ecrit_LES_omp 209 REAL, SAVE :: ecrit_tra_omp 210 REAL, SAVE :: cvl_comp_threshold_omp 211 REAL, SAVE :: cvl_sig2feed_omp 212 REAL, SAVE :: cvl_corr_omp 213 213 LOGICAL, SAVE :: ok_lic_melt_omp 214 214 LOGICAL, SAVE :: ok_lic_cond_omp 215 215 ! 216 REAL, SAVE 217 REAL, SAVE 216 REAL, SAVE :: zrel_oro_t_omp, zstd_orodr_t_omp 217 REAL, SAVE :: zpmm_orodr_t_omp, zpmm_orolf_t_omp 218 218 INTEGER, SAVE :: iflag_cycle_diurne_omp 219 LOGICAL, SAVE :: soil_model_omp, new_oliq_omp219 LOGICAL, SAVE :: soil_model_omp, new_oliq_omp 220 220 LOGICAL, SAVE :: ok_orodr_omp, ok_orolf_omp, ok_limitvrai_omp 221 221 INTEGER, SAVE :: nbapp_rad_omp, iflag_con_omp … … 223 223 INTEGER, SAVE :: iflag_ener_conserv_omp 224 224 LOGICAL, SAVE :: ok_conserv_q_omp 225 LOGICAL, SAVE:: ok_strato_omp226 LOGICAL, SAVE:: ok_hines_omp, ok_gwd_rando_omp227 REAL, SAVE 228 REAL, SAVE 229 REAL, SAVE :: sso_gkdrag_omp,sso_grahil_omp,sso_grcrit_omp230 REAL, SAVE :: sso_gfrcri_omp,sso_gkwake_omp,sso_gklift_omp225 LOGICAL, SAVE :: ok_strato_omp 226 LOGICAL, SAVE :: ok_hines_omp, ok_gwd_rando_omp 227 REAL, SAVE :: gwd_rando_ruwmax_omp, gwd_rando_sat_omp 228 REAL, SAVE :: gwd_front_ruwmax_omp, gwd_front_sat_omp 229 REAL, SAVE :: sso_gkdrag_omp, sso_grahil_omp, sso_grcrit_omp 230 REAL, SAVE :: sso_gfrcri_omp, sso_gkwake_omp, sso_gklift_omp 231 231 LOGICAL, SAVE :: ok_qch4_omp 232 232 LOGICAL, SAVE :: carbon_cycle_tr_omp … … 236 236 INTEGER, SAVE :: level_coupling_esm_omp 237 237 LOGICAL, SAVE :: read_fco2_ocean_cor_omp 238 REAL, SAVE 238 REAL, SAVE :: var_fco2_ocean_cor_omp 239 239 LOGICAL, SAVE :: read_fco2_land_cor_omp 240 REAL, SAVE 240 REAL, SAVE :: var_fco2_land_cor_omp 241 241 LOGICAL, SAVE :: adjust_tropopause_omp 242 242 LOGICAL, SAVE :: ok_daily_climoz_omp … … 244 244 LOGICAL, SAVE :: ok_icefra_lscp_omp 245 245 !rajout de choix_bulk et nit_bulk par Olivier Torres 246 INTEGER, SAVE:: choix_bulk_omp247 INTEGER, SAVE:: nit_bulk_omp248 INTEGER, SAVE:: kz0_omp246 INTEGER, SAVE :: choix_bulk_omp 247 INTEGER, SAVE :: nit_bulk_omp 248 INTEGER, SAVE :: kz0_omp 249 249 LOGICAL, SAVE :: ok_bs_omp, ok_rad_bs_omp 250 250 251 252 INTEGER, INTENT(OUT):: read_climoz ! read ozone climatology, OpenMP shared 251 INTEGER, INTENT(OUT) :: read_climoz ! read ozone climatology, OpenMP shared 253 252 ! Allowed values are 0, 1 and 2 254 253 ! 0: do not read an ozone climatology … … 259 258 !----------------------------------------------------------------- 260 259 261 print*, 'CONFPHYS ENTREE'260 print*, 'CONFPHYS ENTREE' 262 261 !$OMP MASTER 263 262 !Config Key = type_ocean … … 285 284 CALL getin('OCEAN', ocean_omp) 286 285 IF (ocean_omp /= 'yyyyyy') THEN 287 WRITE(lunout,*)'ERROR! Old variable name OCEAN used in parmeter file.'288 WRITE(lunout,*)'Variable OCEAN has been replaced by the variable type_ocean.'289 WRITE(lunout,*)'You have to update your parameter file physiq.def to succed running'290 CALL abort_physic('conf_phys','Variable OCEAN no longer existing, use variable name type_ocean',1)286 WRITE(lunout, *)'ERROR! Old variable name OCEAN used in parmeter file.' 287 WRITE(lunout, *)'Variable OCEAN has been replaced by the variable type_ocean.' 288 WRITE(lunout, *)'You have to update your parameter file physiq.def to succed running' 289 CALL abort_physic('conf_phys', 'Variable OCEAN no longer existing, use variable name type_ocean', 1) 291 290 ENDIF 292 291 … … 299 298 CALL getin('t_coupl', t_coupl_omp) 300 299 IF (t_coupl_omp == 0) THEN 301 WRITE(lunout,*)'ERROR! Timestep of coupling between atmosphere and ocean'302 WRITE(lunout,*)'cannot be zero.'303 CALL abort_physic('conf_phys','t_coupl = 0.',1)300 WRITE(lunout, *)'ERROR! Timestep of coupling between atmosphere and ocean' 301 WRITE(lunout, *)'cannot be zero.' 302 CALL abort_physic('conf_phys', 't_coupl = 0.', 1) 304 303 ENDIF 305 304 … … 329 328 !Config Help = Type de modele de vegetation utilise 330 329 ! 331 type_veget_omp = 'orchidee'330 type_veget_omp = 'orchidee' 332 331 CALL getin('VEGET', type_veget_omp) 333 332 ! … … 454 453 !Config Desc = correction term for albedo 455 454 !Config Def = 1.01 456 correc_alb_omp =1.01455 correc_alb_omp = 1.01 457 456 CALL getin('correc_alb', correc_alb_omp) 458 457 … … 462 461 !Config Desc = sphericity of buffer layer in polar regions 463 462 !Config Def = 99. 464 buf_sph_pol_omp =99.463 buf_sph_pol_omp = 99. 465 464 CALL getin('buf_sph_pol', buf_sph_pol_omp) 466 465 … … 469 468 !Config Desc = grain size of buffer layer in polar regions in e-4m 470 469 !Config Def = 4. 471 buf_siz_pol_omp =4.470 buf_siz_pol_omp = 4. 472 471 CALL getin('buf_siz_pol', buf_siz_pol_omp) 473 472 474 473 !================================================================== 475 474 476 475 !Config Key = OK_journe 477 476 !Config Desc = Pour des sorties journalieres … … 561 560 ! 562 561 flag_volc_surfstrat_omp = 0 ! NL: SURFSTRAT 563 CALL getin('flag_volc_surfstrat', flag_volc_surfstrat_omp) 562 CALL getin('flag_volc_surfstrat', flag_volc_surfstrat_omp) 564 563 565 564 ! … … 570 569 ! 571 570 aerosol_couple_omp = .FALSE. 572 CALL getin('aerosol_couple', aerosol_couple_omp)571 CALL getin('aerosol_couple', aerosol_couple_omp) 573 572 ! 574 573 !Config Key = chemistry_couple … … 578 577 ! 579 578 chemistry_couple_omp = .FALSE. 580 CALL getin('chemistry_couple', chemistry_couple_omp)579 CALL getin('chemistry_couple', chemistry_couple_omp) 581 580 ! 582 581 !Config Key = flag_aerosol … … 596 595 597 596 flag_aerosol_omp = 0 598 CALL getin('flag_aerosol', flag_aerosol_omp)597 CALL getin('flag_aerosol', flag_aerosol_omp) 599 598 600 599 ! … … 607 606 ! 608 607 flag_bc_internal_mixture_omp = .FALSE. 609 CALL getin('flag_bc_internal_mixture', flag_bc_internal_mixture_omp)608 CALL getin('flag_bc_internal_mixture', flag_bc_internal_mixture_omp) 610 609 611 610 ! … … 615 614 !Config Help = Used in readaerosol.F90 616 615 ! 617 aer_type_omp = 'scenario' 618 CALL getin('aer_type', aer_type_omp) 616 aer_type_omp = 'scenario' 617 CALL getin('aer_type', aer_type_omp) 619 618 620 619 ! … … 681 680 CALL getin('ip_ebil_phy', ip_ebil_phy_omp) 682 681 IF (ip_ebil_phy_omp/=0) THEN 683 CALL abort_physic('conf_phys','ip_ebil_phy_omp doit etre 0 sur cette version',1)682 CALL abort_physic('conf_phys', 'ip_ebil_phy_omp doit etre 0 sur cette version', 1) 684 683 ENDIF 685 684 … … 784 783 ! 785 784 CFC11_ppt_omp = 280. 786 CALL getin('CFC11_ppt', CFC11_ppt_omp)785 CALL getin('CFC11_ppt', CFC11_ppt_omp) 787 786 !conversion en rapport de mélange massique 788 RCFC11_omp =CFC11_ppt_omp* 1.0E-12 * RMCFC11 / RMD787 RCFC11_omp = CFC11_ppt_omp * 1.0E-12 * RMCFC11 / RMD 789 788 ! 790 789 !Config Key = RCFC12 … … 794 793 ! 795 794 CFC12_ppt_omp = 484. 796 CALL getin('CFC12_ppt', CFC12_ppt_omp)795 CALL getin('CFC12_ppt', CFC12_ppt_omp) 797 796 !conversion en rapport de mélange massique 798 797 RCFC12_omp = CFC12_ppt_omp * 1.0E-12 * RMCFC12 / RMD … … 835 834 ! 836 835 CFC11_ppt_per_omp = CFC11_ppt_omp 837 CALL getin('CFC11_ppt_per', CFC11_ppt_per_omp)836 CALL getin('CFC11_ppt_per', CFC11_ppt_per_omp) 838 837 !conversion en rapport de mélange massique 839 RCFC11_per_omp =CFC11_ppt_per_omp* 1.0E-12 * RMCFC11 / RMD838 RCFC11_per_omp = CFC11_ppt_per_omp * 1.0E-12 * RMCFC11 / RMD 840 839 ! 841 840 !Config Key = RCFC12_per … … 845 844 ! 846 845 CFC12_ppt_per_omp = CFC12_ppt_omp 847 CALL getin('CFC12_ppt_per', CFC12_ppt_per_omp)846 CALL getin('CFC12_ppt_per', CFC12_ppt_per_omp) 848 847 !conversion en rapport de mélange massique 849 848 RCFC12_per_omp = CFC12_ppt_per_omp * 1.0E-12 * RMCFC12 / RMD … … 859 858 !Config Peut etre util pour accelerer le code ! 860 859 iflag_cycle_diurne_omp = 1 861 CALL getin('iflag_cycle_diurne', iflag_cycle_diurne_omp)860 CALL getin('iflag_cycle_diurne', iflag_cycle_diurne_omp) 862 861 863 862 !Config Key = soil_model … … 868 867 !Config plus de choix ! Ou meme une liste d'options ! 869 868 soil_model_omp = .TRUE. 870 CALL getin('soil_model', soil_model_omp)869 CALL getin('soil_model', soil_model_omp) 871 870 872 871 !Config Key = new_oliq … … 876 875 !Config nouvelle parametrisation de l'eau liquide ! 877 876 new_oliq_omp = .TRUE. 878 CALL getin('new_oliq', new_oliq_omp)877 CALL getin('new_oliq', new_oliq_omp) 879 878 880 879 !Config Key = ok_orodr … … 884 883 !Config 885 884 ok_orodr_omp = .TRUE. 886 CALL getin('ok_orodr', ok_orodr_omp)885 CALL getin('ok_orodr', ok_orodr_omp) 887 886 888 887 !Config Key = ok_orolf … … 931 930 !Config idee, pourquoi ne pas mettre toujours a y ??? 932 931 ok_limitvrai_omp = .FALSE. 933 CALL getin('ok_limitvrai', ok_limitvrai_omp)932 CALL getin('ok_limitvrai', ok_limitvrai_omp) 934 933 935 934 !Config Key = nbapp_rad … … 939 938 !Config par jour. 940 939 nbapp_rad_omp = 12 941 CALL getin('nbapp_rad', nbapp_rad_omp)940 CALL getin('nbapp_rad', nbapp_rad_omp) 942 941 943 942 !rajout Olivier Torres … … 950 949 !Config 3 -> CORE-"mixte" (avec z_0 et C_T^N donnees par Smith 88) 951 950 choix_bulk_omp = 0 952 CALL getin('choix_bulk', choix_bulk_omp)951 CALL getin('choix_bulk', choix_bulk_omp) 953 952 954 953 !Config Key = nit_bulk … … 956 955 !Config Def = 5 957 956 nit_bulk_omp = 1 958 CALL getin('nit_bulk', nit_bulk_omp)957 CALL getin('nit_bulk', nit_bulk_omp) 959 958 960 959 !Config Key = kz0 … … 965 964 !Config 2 -> Direct computation using the stability functions 966 965 kz0_omp = 0 967 CALL getin('kz0', kz0_omp)966 CALL getin('kz0', kz0_omp) 968 967 969 968 … … 976 975 !Config 3 pour CCM(NCAR) 977 976 iflag_con_omp = 2 978 CALL getin('iflag_con', iflag_con_omp)977 CALL getin('iflag_con', iflag_con_omp) 979 978 980 979 !Config Key = nbapp_cv … … 984 983 !Config par jour. Si =0, appel a chaque pas de temps physique. 985 984 nbapp_cv_omp = 0 986 CALL getin('nbapp_cv', nbapp_cv_omp)985 CALL getin('nbapp_cv', nbapp_cv_omp) 987 986 988 987 !Config Key = nbapp_wk … … 992 991 !Config par jour. Si =0, appel a chaque pas de temps physique. 993 992 nbapp_wk_omp = 0 994 CALL getin('nbapp_wk', nbapp_wk_omp)993 CALL getin('nbapp_wk', nbapp_wk_omp) 995 994 996 995 !Config Key = iflag_ener_conserv … … 1001 1000 !Config 1 conservation kinetic and enthalpy 1002 1001 iflag_ener_conserv_omp = -1 1003 CALL getin('iflag_ener_conserv', iflag_ener_conserv_omp)1002 CALL getin('iflag_ener_conserv', iflag_ener_conserv_omp) 1004 1003 1005 1004 !Config Key = ok_conserv_q … … 1010 1009 !Config n -> conformite avec versions anterieures au 1/4/2014 1011 1010 ok_conserv_q_omp = .FALSE. 1012 CALL getin('ok_conserv_q', ok_conserv_q_omp)1011 CALL getin('ok_conserv_q', ok_conserv_q_omp) 1013 1012 1014 1013 ! … … 1052 1051 CALL getin('epmax', epmax_omp) 1053 1052 1054 coef_epmax_cape_omp = 0.0 1055 CALL getin('coef_epmax_cape', coef_epmax_cape_omp) 1053 coef_epmax_cape_omp = 0.0 1054 CALL getin('coef_epmax_cape', coef_epmax_cape_omp) 1056 1055 ! 1057 1056 !Config Key = ok_adj_ema … … 1061 1060 ! 1062 1061 ok_adj_ema_omp = .FALSE. 1063 CALL getin('ok_adj_ema', ok_adj_ema_omp)1062 CALL getin('ok_adj_ema', ok_adj_ema_omp) 1064 1063 ! 1065 1064 !Config Key = iflag_clw … … 1069 1068 ! 1070 1069 iflag_clw_omp = 0 1071 CALL getin('iflag_clw', iflag_clw_omp)1072 1070 CALL getin('iflag_clw', iflag_clw_omp) 1071 1073 1072 1074 1073 !Config Key = iflag_ratqs … … 1078 1077 ! 1079 1078 iflag_ratqs_omp = 1 1080 CALL getin('iflag_ratqs', iflag_ratqs_omp)1079 CALL getin('iflag_ratqs', iflag_ratqs_omp) 1081 1080 1082 1081 ! … … 1087 1086 ! 1088 1087 iflag_radia_omp = 1 1089 CALL getin('iflag_radia', iflag_radia_omp)1088 CALL getin('iflag_radia', iflag_radia_omp) 1090 1089 1091 1090 ! … … 1096 1095 ! 1097 1096 iflag_rrtm_omp = 0 1098 CALL getin('iflag_rrtm', iflag_rrtm_omp)1097 CALL getin('iflag_rrtm', iflag_rrtm_omp) 1099 1098 1100 1099 ! … … 1105 1104 ! 1106 1105 NSW_omp = 2 1107 CALL getin('NSW', NSW_omp)1106 CALL getin('NSW', NSW_omp) 1108 1107 !albedo SB >>> 1109 1108 iflag_albedo_omp = 0 1110 CALL getin('iflag_albedo', iflag_albedo_omp)1111 1112 ok_chlorophyll_omp =.FALSE.1113 CALL getin('ok_chlorophyll', ok_chlorophyll_omp)1109 CALL getin('iflag_albedo', iflag_albedo_omp) 1110 1111 ok_chlorophyll_omp = .FALSE. 1112 CALL getin('ok_chlorophyll', ok_chlorophyll_omp) 1114 1113 !albedo SB <<< 1115 1114 ! … … 1123 1122 ok_suntime_rrtm_omp = .FALSE. 1124 1123 IF (iflag_rrtm_omp==1) THEN 1125 CALL getin('ok_suntime_rrtm', ok_suntime_rrtm_omp)1124 CALL getin('ok_suntime_rrtm', ok_suntime_rrtm_omp) 1126 1125 ENDIF 1127 1126 1128 1127 !Config Key = flag_aerosol_strat 1129 1128 !Config Desc = use stratospheric aerosols 0, 1, 2 … … 1136 1135 ! 1137 1136 flag_aerosol_strat_omp = 0 1138 CALL getin('flag_aerosol_strat', flag_aerosol_strat_omp)1137 CALL getin('flag_aerosol_strat', flag_aerosol_strat_omp) 1139 1138 1140 1139 !Config Key = flag_aer_feedback … … 1145 1144 !Config Help = Used in physiq.F 1146 1145 ! 1147 flag_aer_feedback_omp = .TRUE. 1146 flag_aer_feedback_omp = .TRUE. 1148 1147 IF (iflag_rrtm_omp==1) THEN 1149 CALL getin('flag_aer_feedback',flag_aer_feedback_omp)1148 CALL getin('flag_aer_feedback', flag_aer_feedback_omp) 1150 1149 ENDIF 1151 1150 … … 1159 1158 ! pour assurer une retrocompatiblite. 1160 1159 ! A abandonner un jour 1161 CALL getin('iflag_cldcon', iflag_cld_th_omp)1162 CALL getin('iflag_cld_th', iflag_cld_th_omp)1163 iflag_cld_cv_omp = 0 1164 CALL getin('iflag_cld_cv', iflag_cld_cv_omp)1160 CALL getin('iflag_cldcon', iflag_cld_th_omp) 1161 CALL getin('iflag_cld_th', iflag_cld_th_omp) 1162 iflag_cld_cv_omp = 0 1163 CALL getin('iflag_cld_cv', iflag_cld_cv_omp) 1165 1164 1166 1165 ! … … 1171 1170 ! 1172 1171 tau_cld_cv_omp = 10. 1173 CALL getin('tau_cld_cv', tau_cld_cv_omp)1172 CALL getin('tau_cld_cv', tau_cld_cv_omp) 1174 1173 1175 1174 ! … … 1180 1179 ! 1181 1180 coefw_cld_cv_omp = 0.1 1182 CALL getin('coefw_cld_cv', coefw_cld_cv_omp)1181 CALL getin('coefw_cld_cv', coefw_cld_cv_omp) 1183 1182 1184 1183 … … 1192 1191 ! 1193 1192 fact_cldcon_omp = 0.375 1194 CALL getin('fact_cldcon', fact_cldcon_omp)1193 CALL getin('fact_cldcon', fact_cldcon_omp) 1195 1194 1196 1195 ! … … 1201 1200 ! 1202 1201 facttemps_omp = 1.e-4 1203 CALL getin('facttemps', facttemps_omp)1202 CALL getin('facttemps', facttemps_omp) 1204 1203 1205 1204 ! … … 1210 1209 ! 1211 1210 ok_newmicro_omp = .TRUE. 1212 CALL getin('ok_newmicro', ok_newmicro_omp)1211 CALL getin('ok_newmicro', ok_newmicro_omp) 1213 1212 ! 1214 1213 !Config Key = ratqsbas … … 1218 1217 ! 1219 1218 ratqsbas_omp = 0.01 1220 CALL getin('ratqsbas', ratqsbas_omp)1219 CALL getin('ratqsbas', ratqsbas_omp) 1221 1220 ! 1222 1221 !Config Key = ratqshaut … … 1226 1225 ! 1227 1226 ratqshaut_omp = 0.3 1228 CALL getin('ratqshaut', ratqshaut_omp)1227 CALL getin('ratqshaut', ratqshaut_omp) 1229 1228 1230 1229 !Config Key = tau_ratqs … … 1234 1233 ! 1235 1234 tau_ratqs_omp = 1800. 1236 CALL getin('tau_ratqs', tau_ratqs_omp)1235 CALL getin('tau_ratqs', tau_ratqs_omp) 1237 1236 1238 1237 ! … … 1246 1245 ! 1247 1246 solarlong0_omp = -999.999 1248 CALL getin('solarlong0', solarlong0_omp)1247 CALL getin('solarlong0', solarlong0_omp) 1249 1248 ! 1250 1249 !----------------------------------------------------------------------- … … 1253 1252 ! Default value -1 to activate the full computation 1254 1253 qsol0_omp = -1. 1255 CALL getin('qsol0', qsol0_omp)1254 CALL getin('qsol0', qsol0_omp) 1256 1255 evap0_omp = -1. 1257 CALL getin('evap0', evap0_omp)1256 CALL getin('evap0', evap0_omp) 1258 1257 albsno0_omp = -1. 1259 CALL getin('albsno0', albsno0_omp)1258 CALL getin('albsno0', albsno0_omp) 1260 1259 ! 1261 1260 !----------------------------------------------------------------------- … … 1267 1266 ! 1268 1267 iflag_sic_omp = 0 1269 CALL getin('iflag_sic', iflag_sic_omp)1268 CALL getin('iflag_sic', iflag_sic_omp) 1270 1269 ! 1271 1270 !Config Key = iflag_inertie … … 1275 1274 ! 1276 1275 iflag_inertie_omp = 0 1277 CALL getin('iflag_inertie', iflag_inertie_omp)1276 CALL getin('iflag_inertie', iflag_inertie_omp) 1278 1277 ! 1279 1278 !Config Key = inertie_sic … … 1283 1282 ! 1284 1283 inertie_sic_omp = 2000. 1285 CALL getin('inertie_sic', inertie_sic_omp)1284 CALL getin('inertie_sic', inertie_sic_omp) 1286 1285 ! 1287 1286 !Config Key = inertie_lic … … 1291 1290 ! 1292 1291 inertie_lic_omp = 2000. 1293 CALL getin('inertie_lic', inertie_lic_omp)1292 CALL getin('inertie_lic', inertie_lic_omp) 1294 1293 ! 1295 1294 !Config Key = inertie_sno … … 1299 1298 ! 1300 1299 inertie_sno_omp = 2000. 1301 CALL getin('inertie_sno', inertie_sno_omp)1300 CALL getin('inertie_sno', inertie_sno_omp) 1302 1301 ! 1303 1302 !Config Key = inertie_sol … … 1307 1306 ! 1308 1307 inertie_sol_omp = 2000. 1309 CALL getin('inertie_sol', inertie_sol_omp)1308 CALL getin('inertie_sol', inertie_sol_omp) 1310 1309 1311 1310 ! … … 1316 1315 ! 1317 1316 rad_froid_omp = 35.0 1318 CALL getin('rad_froid', rad_froid_omp)1317 CALL getin('rad_froid', rad_froid_omp) 1319 1318 1320 1319 ! … … 1325 1324 ! 1326 1325 rad_chau1_omp = 13.0 1327 CALL getin('rad_chau1', rad_chau1_omp)1326 CALL getin('rad_chau1', rad_chau1_omp) 1328 1327 1329 1328 ! … … 1334 1333 ! 1335 1334 rad_chau2_omp = 9.0 1336 CALL getin('rad_chau2', rad_chau2_omp)1335 CALL getin('rad_chau2', rad_chau2_omp) 1337 1336 1338 1337 … … 1344 1343 ! 1345 1344 iflag_ice_thermo_omp = 0 1346 CALL getin('iflag_ice_thermo', iflag_ice_thermo_omp)1345 CALL getin('iflag_ice_thermo', iflag_ice_thermo_omp) 1347 1346 1348 1347 ! … … 1353 1352 ! 1354 1353 ok_ice_sursat_omp = .FALSE. 1355 CALL getin('ok_ice_sursat', ok_ice_sursat_omp)1354 CALL getin('ok_ice_sursat', ok_ice_sursat_omp) 1356 1355 1357 1356 !Config Key = ok_plane_h2o … … 1361 1360 ! 1362 1361 ok_plane_h2o_omp = .FALSE. 1363 CALL getin('ok_plane_h2o', ok_plane_h2o_omp)1362 CALL getin('ok_plane_h2o', ok_plane_h2o_omp) 1364 1363 1365 1364 !Config Key = ok_plane_contrail … … 1369 1368 ! 1370 1369 ok_plane_contrail_omp = .FALSE. 1371 CALL getin('ok_plane_contrail', ok_plane_contrail_omp)1370 CALL getin('ok_plane_contrail', ok_plane_contrail_omp) 1372 1371 1373 1372 ! … … 1378 1377 ! 1379 1378 top_height_omp = 3 1380 CALL getin('top_height', top_height_omp)1379 CALL getin('top_height', top_height_omp) 1381 1380 1382 1381 ! … … 1387 1386 ! 1388 1387 overlap_omp = 3 1389 CALL getin('overlap', overlap_omp)1388 CALL getin('overlap', overlap_omp) 1390 1389 1391 1390 ! … … 1396 1395 ! 1397 1396 cdmmax_omp = 1.3E-3 1398 CALL getin('cdmmax', cdmmax_omp)1397 CALL getin('cdmmax', cdmmax_omp) 1399 1398 1400 1399 ! … … 1405 1404 ! 1406 1405 cdhmax_omp = 1.1E-3 1407 CALL getin('cdhmax', cdhmax_omp)1406 CALL getin('cdhmax', cdhmax_omp) 1408 1407 1409 1408 !261103 … … 1415 1414 ! 1416 1415 ksta_omp = 1.0e-10 1417 CALL getin('ksta', ksta_omp)1416 CALL getin('ksta', ksta_omp) 1418 1417 1419 1418 ! … … 1424 1423 ! 1425 1424 ksta_ter_omp = 1.0e-10 1426 CALL getin('ksta_ter', ksta_ter_omp)1425 CALL getin('ksta_ter', ksta_ter_omp) 1427 1426 1428 1427 !Config Key = f_ri_cd_min … … 1432 1431 ! 1433 1432 f_ri_cd_min_omp = 0.1 1434 CALL getin('f_ri_cd_min', f_ri_cd_min_omp)1433 CALL getin('f_ri_cd_min', f_ri_cd_min_omp) 1435 1434 1436 1435 ! … … 1441 1440 ! 1442 1441 ok_kzmin_omp = .TRUE. 1443 CALL getin('ok_kzmin', ok_kzmin_omp)1442 CALL getin('ok_kzmin', ok_kzmin_omp) 1444 1443 1445 1444 ! … … 1450 1449 ! 1451 1450 fmagic_omp = 1. 1452 CALL getin('fmagic', fmagic_omp)1451 CALL getin('fmagic', fmagic_omp) 1453 1452 1454 1453 ! … … 1459 1458 ! 1460 1459 pmagic_omp = 0. 1461 CALL getin('pmagic', pmagic_omp)1460 CALL getin('pmagic', pmagic_omp) 1462 1461 1463 1462 … … 1487 1486 ! 1488 1487 iflag_pbl_omp = 1 1489 CALL getin('iflag_pbl', iflag_pbl_omp)1488 CALL getin('iflag_pbl', iflag_pbl_omp) 1490 1489 1491 1490 iflag_physiq_omp = 0 ! 0: std, 1: with physiqex output, 2: for physiqex 1492 CALL getin('iflag_physiq', iflag_physiq_omp)1493 1494 !FC1491 CALL getin('iflag_physiq', iflag_physiq_omp) 1492 1493 !FC 1495 1494 !Config Key = ifl_pbltree 1496 1495 !Config Desc = drag from trees 0 no activated … … 1499 1498 ! 1500 1499 ifl_pbltree_omp = 0 1501 CALL getin('ifl_pbltree', ifl_pbltree_omp)1502 !FC1500 CALL getin('ifl_pbltree', ifl_pbltree_omp) 1501 !FC 1503 1502 !Config Key = Cd_frein 1504 1503 !Config Desc = drag from trees … … 1507 1506 ! 1508 1507 Cd_frein_omp = 7.5E-02 1509 CALL getin('Cd_frein', Cd_frein_omp)1508 CALL getin('Cd_frein', Cd_frein_omp) 1510 1509 1511 1510 ! … … 1516 1515 ! 1517 1516 iflag_pbl_split_omp = 0 1518 call getin('iflag_pbl_split', iflag_pbl_split_omp)1517 call getin('iflag_pbl_split', iflag_pbl_split_omp) 1519 1518 ! 1520 1519 !Config Key = iflag_order2_sollw … … 1524 1523 ! 1525 1524 iflag_order2_sollw_omp = 0 1526 CALL getin('iflag_order2_sollw', iflag_order2_sollw_omp)1525 CALL getin('iflag_order2_sollw', iflag_order2_sollw_omp) 1527 1526 ! 1528 1527 !Config Key = iflag_thermals … … 1532 1531 ! 1533 1532 iflag_thermals_omp = 0 1534 CALL getin('iflag_thermals', iflag_thermals_omp)1533 CALL getin('iflag_thermals', iflag_thermals_omp) 1535 1534 ! 1536 1535 !Config Key = nsplit_thermals … … 1540 1539 ! 1541 1540 nsplit_thermals_omp = 1 1542 CALL getin('nsplit_thermals', nsplit_thermals_omp)1541 CALL getin('nsplit_thermals', nsplit_thermals_omp) 1543 1542 ! 1544 1543 !Config Key = nsplit_thermals … … 1547 1546 !Config Help = 1548 1547 alp_bl_k_omp = 1. 1549 CALL getin('alp_bl_k', alp_bl_k_omp)1548 CALL getin('alp_bl_k', alp_bl_k_omp) 1550 1549 1551 1550 ! nrlmd le 10/04/2012 … … 1557 1556 ! 1558 1557 iflag_trig_bl_omp = 0 1559 CALL getin('iflag_trig_bl', iflag_trig_bl_omp)1558 CALL getin('iflag_trig_bl', iflag_trig_bl_omp) 1560 1559 1561 1560 !Config Key = iflag_strig … … 1565 1564 ! 1566 1565 iflag_strig_omp = 0 1567 CALL getin('iflag_strig', iflag_strig_omp)1566 CALL getin('iflag_strig', iflag_strig_omp) 1568 1567 1569 1568 !Config Key = s_trig_bl … … 1573 1572 ! 1574 1573 s_trig_omp = 2e7 1575 CALL getin('s_trig', s_trig_omp)1574 CALL getin('s_trig', s_trig_omp) 1576 1575 1577 1576 !Config Key = h_trig … … 1581 1580 ! 1582 1581 h_trig_omp = 6000. 1583 CALL getin('h_trig', h_trig_omp)1582 CALL getin('h_trig', h_trig_omp) 1584 1583 1585 1584 !Config Key = tau_trig_shallow … … 1589 1588 ! 1590 1589 tau_trig_shallow_omp = 600 1591 CALL getin('tau_trig_shallow', tau_trig_shallow_omp)1590 CALL getin('tau_trig_shallow', tau_trig_shallow_omp) 1592 1591 1593 1592 !Config Key = tau_trig_deep … … 1597 1596 ! 1598 1597 tau_trig_deep_omp = 1800 1599 CALL getin('tau_trig_deep', tau_trig_deep_omp)1598 CALL getin('tau_trig_deep', tau_trig_deep_omp) 1600 1599 1601 1600 !Config Key = iflag_clos_bl … … 1605 1604 ! 1606 1605 iflag_clos_bl_omp = 0 1607 CALL getin('iflag_clos_bl', iflag_clos_bl_omp)1606 CALL getin('iflag_clos_bl', iflag_clos_bl_omp) 1608 1607 1609 1608 ! fin nrlmd le 10/04/2012 … … 1616 1615 ! 1617 1616 tau_thermals_omp = 0. 1618 CALL getin('tau_thermals', tau_thermals_omp)1617 CALL getin('tau_thermals', tau_thermals_omp) 1619 1618 1620 1619 ! … … 1625 1624 ! 1626 1625 iflag_coupl_omp = 0 1627 CALL getin('iflag_coupl', iflag_coupl_omp)1626 CALL getin('iflag_coupl', iflag_coupl_omp) 1628 1627 1629 1628 ! … … 1634 1633 ! 1635 1634 iflag_clos_omp = 1 1636 CALL getin('iflag_clos', iflag_clos_omp)1635 CALL getin('iflag_clos', iflag_clos_omp) 1637 1636 ! 1638 1637 !Config Key = coef_clos_ls … … 1642 1641 ! 1643 1642 coef_clos_ls_omp = 0. 1644 CALL getin('coef_clos_ls', coef_clos_ls_omp)1643 CALL getin('coef_clos_ls', coef_clos_ls_omp) 1645 1644 1646 1645 ! … … 1651 1650 ! 1652 1651 iflag_cvl_sigd_omp = 0 1653 CALL getin('iflag_cvl_sigd', iflag_cvl_sigd_omp)1652 CALL getin('iflag_cvl_sigd', iflag_cvl_sigd_omp) 1654 1653 1655 1654 !Config Key = iflag_wake … … 1659 1658 ! 1660 1659 iflag_wake_omp = 0 1661 CALL getin('iflag_wake', iflag_wake_omp)1660 CALL getin('iflag_wake', iflag_wake_omp) 1662 1661 1663 1662 !Config Key = alp_offset … … 1667 1666 ! 1668 1667 alp_offset_omp = 0. 1669 CALL getin('alp_offset', alp_offset_omp)1668 CALL getin('alp_offset', alp_offset_omp) 1670 1669 1671 1670 ! … … 1676 1675 ! 1677 1676 lev_histhf_omp = 1 1678 CALL getin('lev_histhf', lev_histhf_omp)1677 CALL getin('lev_histhf', lev_histhf_omp) 1679 1678 1680 1679 ! … … 1685 1684 ! 1686 1685 lev_histday_omp = 1 1687 CALL getin('lev_histday', lev_histday_omp)1686 CALL getin('lev_histday', lev_histday_omp) 1688 1687 1689 1688 ! … … 1694 1693 ! 1695 1694 lev_histmth_omp = 2 1696 CALL getin('lev_histmth', lev_histmth_omp)1695 CALL getin('lev_histmth', lev_histmth_omp) 1697 1696 ! 1698 1697 !Config Key = lev_histins … … 1702 1701 ! 1703 1702 lev_histins_omp = 1 1704 CALL getin('lev_histins', lev_histins_omp)1703 CALL getin('lev_histins', lev_histins_omp) 1705 1704 ! 1706 1705 !Config Key = lev_histLES … … 1710 1709 ! 1711 1710 lev_histLES_omp = 1 1712 CALL getin('lev_histLES', lev_histLES_omp)1711 CALL getin('lev_histLES', lev_histLES_omp) 1713 1712 ! 1714 1713 !Config Key = lev_histdayNMC … … 1718 1717 ! 1719 1718 lev_histdayNMC_omp = 8 1720 CALL getin('lev_histdayNMC', lev_histdayNMC_omp)1719 CALL getin('lev_histdayNMC', lev_histdayNMC_omp) 1721 1720 ! 1722 1721 !Config Key = levout_histNMC … … 1728 1727 levout_histNMC_omp(2) = 5 1729 1728 levout_histNMC_omp(3) = 5 1730 CALL getin('levout_histNMC', levout_histNMC_omp)1729 CALL getin('levout_histNMC', levout_histNMC_omp) 1731 1730 ! 1732 1731 !histNMC BEG … … 1741 1740 ok_histNMC_omp(2) = .FALSE. 1742 1741 ok_histNMC_omp(3) = .FALSE. 1743 CALL getin('ok_histNMC', ok_histNMC_omp)1742 CALL getin('ok_histNMC', ok_histNMC_omp) 1744 1743 ! 1745 1744 !Config Key = freq_outNMC … … 1752 1751 freq_outNMC_omp(1) = mth_len 1753 1752 freq_outNMC_omp(2) = 1. 1754 freq_outNMC_omp(3) = 1. /4.1755 CALL getin('freq_outNMC', freq_outNMC_omp)1753 freq_outNMC_omp(3) = 1. / 4. 1754 CALL getin('freq_outNMC', freq_outNMC_omp) 1756 1755 ! 1757 1756 !Config Key = freq_calNMC … … 1765 1764 freq_calNMC_omp(2) = phys_tstep 1766 1765 freq_calNMC_omp(3) = phys_tstep 1767 CALL getin('freq_calNMC', freq_calNMC_omp)1766 CALL getin('freq_calNMC', freq_calNMC_omp) 1768 1767 ! 1769 1768 !Config Key = type_run … … 1773 1772 ! 1774 1773 type_run_omp = 'AMIP' 1775 CALL getin('type_run', type_run_omp)1774 CALL getin('type_run', type_run_omp) 1776 1775 1777 1776 ! … … 1782 1781 ! 1783 1782 ok_cosp_omp = .FALSE. 1784 CALL getin('ok_cosp', ok_cosp_omp)1783 CALL getin('ok_cosp', ok_cosp_omp) 1785 1784 1786 1785 ! … … 1791 1790 ! 1792 1791 ok_airs_omp = .FALSE. 1793 CALL getin('ok_airs', ok_airs_omp)1792 CALL getin('ok_airs', ok_airs_omp) 1794 1793 1795 1794 ! … … 1800 1799 ! 1801 1800 ok_mensuelCOSP_omp = .TRUE. 1802 CALL getin('ok_mensuelCOSP', ok_mensuelCOSP_omp)1801 CALL getin('ok_mensuelCOSP', ok_mensuelCOSP_omp) 1803 1802 1804 1803 ! … … 1809 1808 ! 1810 1809 ok_journeCOSP_omp = .TRUE. 1811 CALL getin('ok_journeCOSP', ok_journeCOSP_omp)1810 CALL getin('ok_journeCOSP', ok_journeCOSP_omp) 1812 1811 1813 1812 ! … … 1818 1817 ! 1819 1818 ok_hfCOSP_omp = .FALSE. 1820 CALL getin('ok_hfCOSP', ok_hfCOSP_omp)1819 CALL getin('ok_hfCOSP', ok_hfCOSP_omp) 1821 1820 1822 1821 ! … … 1830 1829 ! 1831 1830 lonmin_ins_omp = 100. 1832 CALL getin('lonmin_ins', lonmin_ins_omp)1831 CALL getin('lonmin_ins', lonmin_ins_omp) 1833 1832 ! 1834 1833 !Config Key = lonmax_ins … … 1838 1837 ! 1839 1838 lonmax_ins_omp = 130. 1840 CALL getin('lonmax_ins', lonmax_ins_omp)1839 CALL getin('lonmax_ins', lonmax_ins_omp) 1841 1840 ! 1842 1841 !Config Key = latmin_ins … … 1846 1845 ! 1847 1846 latmin_ins_omp = -20. 1848 CALL getin('latmin_ins', latmin_ins_omp)1847 CALL getin('latmin_ins', latmin_ins_omp) 1849 1848 ! 1850 1849 !Config Key = latmax_ins … … 1854 1853 ! 1855 1854 latmax_ins_omp = 20. 1856 CALL getin('latmax_ins', latmax_ins_omp)1855 CALL getin('latmax_ins', latmax_ins_omp) 1857 1856 ! 1858 1857 !Config Key = ecrit_hf … … 1861 1860 !Config Help = 1862 1861 ! 1863 ecrit_hf_omp = 1. /8.1864 CALL getin('ecrit_hf', ecrit_hf_omp)1862 ecrit_hf_omp = 1. / 8. 1863 CALL getin('ecrit_hf', ecrit_hf_omp) 1865 1864 ! 1866 1865 !Config Key = ecrit_ins … … 1869 1868 !Config Help = 1870 1869 ! 1871 ecrit_ins_omp = 1. /48.1872 CALL getin('ecrit_ins', ecrit_ins_omp)1870 ecrit_ins_omp = 1. / 48. 1871 CALL getin('ecrit_ins', ecrit_ins_omp) 1873 1872 ! 1874 1873 !Config Key = ecrit_day … … 1878 1877 ! 1879 1878 ecrit_day_omp = 1.0 1880 CALL getin('ecrit_day', ecrit_day_omp)1879 CALL getin('ecrit_day', ecrit_day_omp) 1881 1880 ! 1882 1881 !Config Key = ecrit_mth … … 1886 1885 ! 1887 1886 ecrit_mth_omp = 30. 1888 CALL getin('ecrit_mth', ecrit_mth_omp)1887 CALL getin('ecrit_mth', ecrit_mth_omp) 1889 1888 ! 1890 1889 !Config Key = ecrit_tra … … 1894 1893 ! 1895 1894 ecrit_tra_omp = 0. 1896 CALL getin('ecrit_tra', ecrit_tra_omp)1895 CALL getin('ecrit_tra', ecrit_tra_omp) 1897 1896 ! 1898 1897 !Config Key = ecrit_reg … … 1902 1901 ! 1903 1902 ecrit_reg_omp = 0.25 !4 fois par jour 1904 CALL getin('ecrit_reg', ecrit_reg_omp)1905 ! 1906 ! 1907 print*, 'CONFPHYS OOK avant drag_ter'1903 CALL getin('ecrit_reg', ecrit_reg_omp) 1904 ! 1905 ! 1906 print*, 'CONFPHYS OOK avant drag_ter' 1908 1907 ! 1909 1908 ! PARAMETRES CDRAG 1910 1909 ! 1911 1910 f_cdrag_ter_omp = 0.8 1912 CALL getin('f_cdrag_ter', f_cdrag_ter_omp)1911 CALL getin('f_cdrag_ter', f_cdrag_ter_omp) 1913 1912 ! 1914 1913 f_cdrag_oce_omp = 0.8 1915 CALL getin('f_cdrag_oce', f_cdrag_oce_omp)1914 CALL getin('f_cdrag_oce', f_cdrag_oce_omp) 1916 1915 ! 1917 1916 1918 1917 ! Gustiness flags 1919 1918 f_z0qh_oce_omp = 1. 1920 CALL getin('f_z0qh_oce', f_z0qh_oce_omp)1919 CALL getin('f_z0qh_oce', f_z0qh_oce_omp) 1921 1920 ! 1922 1921 f_qsat_oce_omp = 1. 1923 CALL getin('f_qsat_oce', f_qsat_oce_omp)1922 CALL getin('f_qsat_oce', f_qsat_oce_omp) 1924 1923 ! 1925 1924 f_gust_bl_omp = 0. 1926 CALL getin('f_gust_bl', f_gust_bl_omp)1925 CALL getin('f_gust_bl', f_gust_bl_omp) 1927 1926 ! 1928 1927 f_gust_wk_omp = 0. 1929 CALL getin('f_gust_wk', f_gust_wk_omp)1928 CALL getin('f_gust_wk', f_gust_wk_omp) 1930 1929 ! 1931 1930 !Config Key = iflag_z0_oce … … 1934 1933 !Config Help = 1935 1934 ! 1936 iflag_z0_oce_omp =01937 CALL getin('iflag_z0_oce', iflag_z0_oce_omp)1938 ! 1939 iflag_gusts_omp =01940 CALL getin('iflag_gusts', iflag_gusts_omp)1935 iflag_z0_oce_omp = 0 1936 CALL getin('iflag_z0_oce', iflag_z0_oce_omp) 1937 ! 1938 iflag_gusts_omp = 0 1939 CALL getin('iflag_gusts', iflag_gusts_omp) 1941 1940 ! 1942 1941 min_wind_speed_omp = 1. 1943 CALL getin('min_wind_speed',min_wind_speed_omp) 1944 1945 z0m_seaice_omp = 0.002 ; CALL getin('z0m_seaice',z0m_seaice_omp) 1946 z0h_seaice_omp = 0.002 ; CALL getin('z0h_seaice',z0h_seaice_omp) 1947 1948 1949 z0m_landice_omp = 0.001 ; CALL getin('z0m_landice',z0m_landice_omp) 1950 z0h_landice_omp = 0.001 ; CALL getin('z0h_landice',z0h_landice_omp) 1942 CALL getin('min_wind_speed', min_wind_speed_omp) 1943 1944 z0m_seaice_omp = 0.002 ; CALL getin('z0m_seaice', z0m_seaice_omp) 1945 z0h_seaice_omp = 0.002 ; CALL getin('z0h_seaice', z0h_seaice_omp) 1946 1947 z0m_landice_omp = 0.001 ; CALL getin('z0m_landice', z0m_landice_omp) 1948 z0h_landice_omp = 0.001 ; CALL getin('z0h_landice', z0h_landice_omp) 1951 1949 1952 1950 f_rugoro_omp = 0. 1953 CALL getin('f_rugoro', f_rugoro_omp)1951 CALL getin('f_rugoro', f_rugoro_omp) 1954 1952 1955 1953 z0min_omp = 0.000015 1956 CALL getin('z0min', z0min_omp)1954 CALL getin('z0min', z0min_omp) 1957 1955 1958 1956 … … 1965 1963 ! 1966 1964 supcrit1_omp = .540 1967 CALL getin('supcrit1', supcrit1_omp)1965 CALL getin('supcrit1', supcrit1_omp) 1968 1966 1969 1967 ! … … 1974 1972 ! 1975 1973 supcrit2_omp = .600 1976 CALL getin('supcrit2', supcrit2_omp)1974 CALL getin('supcrit2', supcrit2_omp) 1977 1975 1978 1976 ! … … 1989 1987 ! 1990 1988 iflag_mix_omp = 1 1991 CALL getin('iflag_mix', iflag_mix_omp)1992 1993 !1989 CALL getin('iflag_mix', iflag_mix_omp) 1990 1991 ! 1994 1992 ! PARAMETERS FOR THE EROSION OF THE ADIABATIC ASCENTS 1995 1993 ! iflag_mix_adiab: 0=OLD, … … 2003 2001 ! 2004 2002 iflag_mix_adiab_omp = 0 2005 CALL getin('iflag_mix_adiab', iflag_mix_adiab_omp)2003 CALL getin('iflag_mix_adiab', iflag_mix_adiab_omp) 2006 2004 2007 2005 ! … … 2012 2010 ! 2013 2011 scut_omp = 0.95 2014 CALL getin('scut', scut_omp)2012 CALL getin('scut', scut_omp) 2015 2013 2016 2014 ! … … 2021 2019 ! 2022 2020 qqa1_omp = 1.0 2023 CALL getin('qqa1', qqa1_omp)2021 CALL getin('qqa1', qqa1_omp) 2024 2022 2025 2023 ! … … 2030 2028 ! 2031 2029 qqa2_omp = 0.0 2032 CALL getin('qqa2', qqa2_omp)2030 CALL getin('qqa2', qqa2_omp) 2033 2031 2034 2032 ! … … 2039 2037 ! 2040 2038 gammas_omp = 0.05 2041 CALL getin('gammas', gammas_omp)2039 CALL getin('gammas', gammas_omp) 2042 2040 2043 2041 ! … … 2048 2046 ! 2049 2047 Fmax_omp = 0.65 2050 CALL getin('Fmax', Fmax_omp)2048 CALL getin('Fmax', Fmax_omp) 2051 2049 2052 2050 ! … … 2057 2055 ! 2058 2056 tmax_fonte_cv_omp = 275.15 2059 CALL getin('tmax_fonte_cv', tmax_fonte_cv_omp)2057 CALL getin('tmax_fonte_cv', tmax_fonte_cv_omp) 2060 2058 2061 2059 ! … … 2066 2064 ! 2067 2065 alphas_omp = -5. 2068 CALL getin('alphas', alphas_omp)2066 CALL getin('alphas', alphas_omp) 2069 2067 2070 2068 !Config key = ok_strato … … 2074 2072 ! Et la sponge layer (Runs Stratospheriques) 2075 2073 2076 ok_strato_omp =.FALSE.2077 CALL getin('ok_strato', ok_strato_omp)2074 ok_strato_omp = .FALSE. 2075 CALL getin('ok_strato', ok_strato_omp) 2078 2076 2079 2077 !Config key = ok_hines … … 2082 2080 !Config Help = Clefs controlant la parametrization de Hines 2083 2081 2084 ok_hines_omp =.FALSE.2085 CALL getin('ok_hines', ok_hines_omp)2082 ok_hines_omp = .FALSE. 2083 CALL getin('ok_hines', ok_hines_omp) 2086 2084 2087 2085 ! Parametres pour les ondes de gravite … … 2092 2090 CALL getin('sso_gkdrag', sso_gkdrag_omp) 2093 2091 2094 sso_grahil_omp =merge(0.1,1.,ok_strato_omp)2092 sso_grahil_omp = merge(0.1, 1., ok_strato_omp) 2095 2093 CALL getin('sso_grahil', sso_grahil_omp) 2096 2094 2097 sso_grcrit_omp = merge(1.,0.01,ok_strato_omp)2095 sso_grcrit_omp = merge(1., 0.01, ok_strato_omp) 2098 2096 CALL getin('sso_grcrit', sso_grcrit_omp) 2099 2097 … … 2104 2102 CALL getin('sso_gkwake', sso_gkwake_omp) 2105 2103 2106 sso_gklift_omp = merge(0.25, 0.50,ok_strato_omp)2104 sso_gklift_omp = merge(0.25, 0.50, ok_strato_omp) 2107 2105 CALL getin('sso_gklift', sso_gklift_omp) 2108 2106 … … 2110 2108 2111 2109 ok_gwd_rando_omp = .FALSE. 2112 IF ( klon_glo == 1) THEN2113 print*,'La parametrisation des ondes de gravites non orographiques'2114 print*,'ne fonctionne pas en 1D'2110 IF (klon_glo == 1) THEN 2111 print*, 'La parametrisation des ondes de gravites non orographiques' 2112 print*, 'ne fonctionne pas en 1D' 2115 2113 ELSE 2116 2114 CALL getin('ok_gwd_rando', ok_gwd_rando_omp) 2117 2115 ENDIF 2118 2116 … … 2136 2134 ! de l'humidite due a oxydation+photolyse du methane strato 2137 2135 2138 ok_qch4_omp =.FALSE.2139 CALL getin('ok_qch4', ok_qch4_omp)2136 ok_qch4_omp = .FALSE. 2137 CALL getin('ok_qch4', ok_qch4_omp) 2140 2138 2141 2139 !Config Key = OK_LES … … 2145 2143 ! LES 2146 2144 ! 2147 ok_LES_omp = .FALSE. 2148 CALL getin('OK_LES', ok_LES_omp) 2145 ok_LES_omp = .FALSE. 2146 CALL getin('OK_LES', ok_LES_omp) 2149 2147 2150 2148 !Config Key = callstats … … 2154 2152 ! stats 2155 2153 ! 2156 callstats_omp = .FALSE. 2157 CALL getin('callstats', callstats_omp) 2154 callstats_omp = .FALSE. 2155 CALL getin('callstats', callstats_omp) 2158 2156 ! 2159 2157 !Config Key = ecrit_LES … … 2183 2181 !Config Help = .FALSE. ensure much fewer (no calendar dependency) 2184 2182 ! and lighter monthly climoz files, inetrpolated in time at gcm run time. 2185 2183 2186 2184 ok_new_lscp_omp = .FALSE. 2187 2185 CALL getin('ok_new_lscp', ok_new_lscp_omp) … … 2192 2190 !Config Help = ... 2193 2191 2194 2195 2196 2192 ok_icefra_lscp_omp = .FALSE. 2197 2193 CALL getin('ok_icefra_lscp', ok_icefra_lscp_omp) … … 2202 2198 !Config Help = ... 2203 2199 2204 2205 2206 2200 ok_bs_omp = .FALSE. 2207 2201 CALL getin('ok_bs', ok_bs_omp) … … 2212 2206 !Config Help = ... 2213 2207 2214 2215 2208 ok_rad_bs_omp = .FALSE. 2216 2209 CALL getin('ok_rad_bs', ok_rad_bs_omp) … … 2221 2214 !Config Help = ... 2222 2215 2223 ecrit_LES_omp = 1. /8.2216 ecrit_LES_omp = 1. / 8. 2224 2217 CALL getin('ecrit_LES', ecrit_LES_omp) 2225 2218 ! … … 2227 2220 CALL getin('read_climoz', read_climoz) 2228 2221 2229 carbon_cycle_tr_omp =.FALSE.2230 CALL getin('carbon_cycle_tr', carbon_cycle_tr_omp)2231 2232 carbon_cycle_cpl_omp =.FALSE.2233 CALL getin('carbon_cycle_cpl', carbon_cycle_cpl_omp)2234 2235 carbon_cycle_rad_omp =.FALSE.2236 CALL getin('carbon_cycle_rad', carbon_cycle_rad_omp)2237 2238 read_fco2_ocean_cor_omp =.FALSE.2239 CALL getin('read_fco2_ocean_cor', read_fco2_ocean_cor_omp)2240 2241 var_fco2_ocean_cor_omp =0. ! default value2242 CALL getin('var_fco2_ocean_cor', var_fco2_ocean_cor_omp)2243 2244 read_fco2_land_cor_omp =.FALSE.2245 CALL getin('read_fco2_land_cor', read_fco2_land_cor_omp)2246 2247 var_fco2_land_cor_omp =0. ! default value2248 CALL getin('var_fco2_land_cor', var_fco2_land_cor_omp)2222 carbon_cycle_tr_omp = .FALSE. 2223 CALL getin('carbon_cycle_tr', carbon_cycle_tr_omp) 2224 2225 carbon_cycle_cpl_omp = .FALSE. 2226 CALL getin('carbon_cycle_cpl', carbon_cycle_cpl_omp) 2227 2228 carbon_cycle_rad_omp = .FALSE. 2229 CALL getin('carbon_cycle_rad', carbon_cycle_rad_omp) 2230 2231 read_fco2_ocean_cor_omp = .FALSE. 2232 CALL getin('read_fco2_ocean_cor', read_fco2_ocean_cor_omp) 2233 2234 var_fco2_ocean_cor_omp = 0. ! default value 2235 CALL getin('var_fco2_ocean_cor', var_fco2_ocean_cor_omp) 2236 2237 read_fco2_land_cor_omp = .FALSE. 2238 CALL getin('read_fco2_land_cor', read_fco2_land_cor_omp) 2239 2240 var_fco2_land_cor_omp = 0. ! default value 2241 CALL getin('var_fco2_land_cor', var_fco2_land_cor_omp) 2249 2242 2250 2243 ! level_coupling_esm : level of coupling of the biogeochemical fields between LMDZ, ORCHIDEE and NEMO … … 2258 2251 ! level_coupling_esm = 3 ! Field exchange between LMDZ and ORCHIDEE models 2259 2252 ! ! Field exchange between LMDZ and NEMO models 2260 level_coupling_esm_omp=0 ! default value 2261 CALL getin('level_coupling_esm',level_coupling_esm_omp) 2262 2263 2264 dms_cycle_cpl_omp=.FALSE. 2265 CALL getin('transm_dms_oa',dms_cycle_cpl_omp) 2253 level_coupling_esm_omp = 0 ! default value 2254 CALL getin('level_coupling_esm', level_coupling_esm_omp) 2255 2256 dms_cycle_cpl_omp = .FALSE. 2257 CALL getin('transm_dms_oa', dms_cycle_cpl_omp) 2266 2258 ! 2267 2259 !Config Key = dms_cycle_cpl … … 2270 2262 !Config Help = can be activated only if lmdz use inca for the atmospheric chemistry 2271 2263 2272 n2o_cycle_cpl_omp =.FALSE.2273 CALL getin('transm_n2o_oa', n2o_cycle_cpl_omp)2264 n2o_cycle_cpl_omp = .FALSE. 2265 CALL getin('transm_n2o_oa', n2o_cycle_cpl_omp) 2274 2266 ! 2275 2267 !Config Key = n2o_cycle_cpl … … 2277 2269 !Config Def = .FALSE. 2278 2270 !Config Help = can be activated only if lmdz use inca for the atmospheric chemistry 2279 2280 2271 2272 2281 2273 !$OMP END MASTER 2282 2274 !$OMP BARRIER … … 2314 2306 ok_orodr = ok_orodr_omp 2315 2307 ok_orolf = ok_orolf_omp 2316 zrel_oro_t =zrel_oro_t_omp2317 zstd_orodr_t =zstd_orodr_t_omp2318 zpmm_orodr_t =zpmm_orodr_t_omp2319 zpmm_orolf_t =zpmm_orolf_t_omp2308 zrel_oro_t = zrel_oro_t_omp 2309 zstd_orodr_t = zstd_orodr_t_omp 2310 zpmm_orodr_t = zpmm_orodr_t_omp 2311 zpmm_orolf_t = zpmm_orolf_t_omp 2320 2312 ok_limitvrai = ok_limitvrai_omp 2321 2313 nbapp_rad = nbapp_rad_omp … … 2340 2332 inertie_sno = inertie_sno_omp 2341 2333 ok_bs = ok_bs_omp 2342 ok_rad_bs =ok_rad_bs_omp2334 ok_rad_bs = ok_rad_bs_omp 2343 2335 rad_froid = rad_froid_omp 2344 2336 rad_chau1 = rad_chau1_omp … … 2361 2353 iflag_physiq = iflag_physiq_omp 2362 2354 iflag_pbl_split = iflag_pbl_split_omp 2363 !FC2355 !FC 2364 2356 ifl_pbltree = ifl_pbltree_omp 2365 Cd_frein =Cd_frein_omp2357 Cd_frein = Cd_frein_omp 2366 2358 iflag_order2_sollw = iflag_order2_sollw_omp 2367 2359 lev_histhf = lev_histhf_omp … … 2380 2372 t_coupl = t_coupl_omp 2381 2373 2382 ok_veget =.TRUE.2383 type_veget =type_veget_omp2374 ok_veget = .TRUE. 2375 type_veget = type_veget_omp 2384 2376 IF (type_veget=='n' .or. type_veget=='bucket' .or. type_veget=='betaclim') THEN 2385 ok_veget=.FALSE.2377 ok_veget = .FALSE. 2386 2378 ENDIF 2387 2379 ! INLANDSIS … … 2391 2383 iflag_temp_inlandsis = iflag_temp_inlandsis_omp 2392 2384 iflag_albcalc = iflag_albcalc_omp 2393 SnoMod =SnoMod_omp2394 BloMod =BloMod_omp2395 ok_outfor =ok_outfor_omp2396 is_ok_slush =is_ok_slush_omp2397 opt_runoff_ac =opt_runoff_ac_omp2398 is_ok_z0h_rn =is_ok_z0h_rn_omp2399 is_ok_density_kotlyakov =is_ok_density_kotlyakov_omp2400 prescribed_z0m_snow =prescribed_z0m_snow_omp2401 correc_alb =correc_alb_omp2402 iflag_z0m_snow =iflag_z0m_snow_omp2403 ok_zsn_ii =ok_zsn_ii_omp2404 discret_xf =discret_xf_omp2405 buf_sph_pol =buf_sph_pol_omp2406 buf_siz_pol =buf_siz_pol_omp2385 SnoMod = SnoMod_omp 2386 BloMod = BloMod_omp 2387 ok_outfor = ok_outfor_omp 2388 is_ok_slush = is_ok_slush_omp 2389 opt_runoff_ac = opt_runoff_ac_omp 2390 is_ok_z0h_rn = is_ok_z0h_rn_omp 2391 is_ok_density_kotlyakov = is_ok_density_kotlyakov_omp 2392 prescribed_z0m_snow = prescribed_z0m_snow_omp 2393 correc_alb = correc_alb_omp 2394 iflag_z0m_snow = iflag_z0m_snow_omp 2395 ok_zsn_ii = ok_zsn_ii_omp 2396 discret_xf = discret_xf_omp 2397 buf_sph_pol = buf_sph_pol_omp 2398 buf_siz_pol = buf_siz_pol_omp 2407 2399 !================================================= 2408 2400 ok_all_xml = ok_all_xml_omp … … 2428 2420 flag_aerosol_strat = flag_aerosol_strat_omp 2429 2421 flag_aer_feedback = flag_aer_feedback_omp 2430 flag_bc_internal_mixture =flag_bc_internal_mixture_omp2422 flag_bc_internal_mixture = flag_bc_internal_mixture_omp 2431 2423 aer_type = aer_type_omp 2432 2424 bl95_b0 = bl95_b0_omp … … 2475 2467 ok_journeCOSP = ok_journeCOSP_omp 2476 2468 ok_hfCOSP = ok_hfCOSP_omp 2477 seuil_inversion =seuil_inversion_omp2469 seuil_inversion = seuil_inversion_omp 2478 2470 lonmin_ins = lonmin_ins_omp 2479 2471 lonmax_ins = lonmax_ins_omp 2480 2472 latmin_ins = latmin_ins_omp 2481 2473 latmax_ins = latmax_ins_omp 2482 ecrit_hf 2483 ecrit_ins 2474 ecrit_hf = ecrit_hf_omp 2475 ecrit_ins = ecrit_ins_omp 2484 2476 ecrit_day = ecrit_day_omp 2485 2477 ecrit_mth = ecrit_mth_omp … … 2491 2483 ok_lic_melt = ok_lic_melt_omp 2492 2484 ok_lic_cond = ok_lic_cond_omp 2493 f_cdrag_ter =f_cdrag_ter_omp2494 f_cdrag_oce =f_cdrag_oce_omp2495 2496 f_gust_wk =f_gust_wk_omp2497 f_gust_bl =f_gust_bl_omp2498 f_qsat_oce =f_qsat_oce_omp2499 f_z0qh_oce =f_z0qh_oce_omp2500 min_wind_speed =min_wind_speed_omp2501 iflag_gusts =iflag_gusts_omp2502 iflag_z0_oce =iflag_z0_oce_omp2503 2504 z0m_seaice =z0m_seaice_omp2505 z0h_seaice =z0h_seaice_omp2506 z0m_landice =z0m_landice_omp2507 z0h_landice =z0h_landice_omp2508 2509 f_rugoro =f_rugoro_omp2510 2511 z0min =z0min_omp2485 f_cdrag_ter = f_cdrag_ter_omp 2486 f_cdrag_oce = f_cdrag_oce_omp 2487 2488 f_gust_wk = f_gust_wk_omp 2489 f_gust_bl = f_gust_bl_omp 2490 f_qsat_oce = f_qsat_oce_omp 2491 f_z0qh_oce = f_z0qh_oce_omp 2492 min_wind_speed = min_wind_speed_omp 2493 iflag_gusts = iflag_gusts_omp 2494 iflag_z0_oce = iflag_z0_oce_omp 2495 2496 z0m_seaice = z0m_seaice_omp 2497 z0h_seaice = z0h_seaice_omp 2498 z0m_landice = z0m_landice_omp 2499 z0h_landice = z0h_landice_omp 2500 2501 f_rugoro = f_rugoro_omp 2502 2503 z0min = z0min_omp 2512 2504 supcrit1 = supcrit1_omp 2513 2505 supcrit2 = supcrit2_omp … … 2522 2514 alphas = alphas_omp 2523 2515 2524 gkdrag =sso_gkdrag_omp2525 grahilo =sso_grahil_omp2526 grcrit =sso_grcrit_omp2527 gfrcrit =sso_gfrcri_omp2528 gkwake =sso_gkwake_omp2529 gklift =sso_gklift_omp2516 gkdrag = sso_gkdrag_omp 2517 grahilo = sso_grahil_omp 2518 grcrit = sso_grcrit_omp 2519 gfrcrit = sso_gfrcri_omp 2520 gkwake = sso_gkwake_omp 2521 gklift = sso_gklift_omp 2530 2522 2531 2523 ok_strato = ok_strato_omp … … 2547 2539 level_coupling_esm = level_coupling_esm_omp 2548 2540 ok_new_lscp = ok_new_lscp_omp 2549 ok_icefra_lscp =ok_icefra_lscp_omp2541 ok_icefra_lscp = ok_icefra_lscp_omp 2550 2542 read_fco2_ocean_cor = read_fco2_ocean_cor_omp 2551 2543 var_fco2_ocean_cor = var_fco2_ocean_cor_omp … … 2555 2547 n2o_cycle_cpl = n2o_cycle_cpl_omp 2556 2548 !rajout Olivier Torres 2557 kz0 =kz0_omp2549 kz0 = kz0_omp 2558 2550 choix_bulk = choix_bulk_omp 2559 2551 nit_bulk = nit_bulk_omp 2560 2552 2561 2553 ! Test of coherence between type_ocean and version_ocean 2562 IF (type_ocean=='couple' .AND. (version_ocean/='opa8' .AND. version_ocean/='nemo') 2563 WRITE(lunout,*)' ERROR version_ocean=',version_ocean,' not valid in coupled configuration'2564 CALL abort_physic('conf_phys','version_ocean not valid',1)2554 IF (type_ocean=='couple' .AND. (version_ocean/='opa8' .AND. version_ocean/='nemo')) THEN 2555 WRITE(lunout, *)' ERROR version_ocean=', version_ocean, ' not valid in coupled configuration' 2556 CALL abort_physic('conf_phys', 'version_ocean not valid', 1) 2565 2557 ENDIF 2566 2558 2567 2559 IF (type_ocean=='slab' .AND. version_ocean=='xxxxxx') THEN 2568 version_ocean='sicOBS'2560 version_ocean = 'sicOBS' 2569 2561 ELSE IF (type_ocean=='slab' .AND. version_ocean/='sicOBS' & 2570 .AND. version_ocean/='sicINT' .AND. version_ocean/='sicNO') THEN2571 WRITE(lunout,*)' ERROR version_ocean=',version_ocean,' not valid with slab ocean'2572 CALL abort_physic('conf_phys','version_ocean not valid',1)2562 .AND. version_ocean/='sicINT' .AND. version_ocean/='sicNO') THEN 2563 WRITE(lunout, *)' ERROR version_ocean=', version_ocean, ' not valid with slab ocean' 2564 CALL abort_physic('conf_phys', 'version_ocean not valid', 1) 2573 2565 ENDIF 2574 2566 … … 2576 2568 IF (iflag_rrtm == 0) THEN 2577 2569 IF (NSW/=2) THEN 2578 WRITE(lunout, *) ' ERROR iflag_rrtm=0 and NSW<>2 not possible'2579 CALL abort_physic('conf_phys', 'choice NSW not valid',1)2570 WRITE(lunout, *) ' ERROR iflag_rrtm=0 and NSW<>2 not possible' 2571 CALL abort_physic('conf_phys', 'choice NSW not valid', 1) 2580 2572 ENDIF 2581 2573 ELSE IF (iflag_rrtm == 1) THEN 2582 2574 IF (NSW/=2.AND.NSW/=4.AND.NSW/=6) THEN 2583 WRITE(lunout, *) ' ERROR iflag_rrtm=1 and NSW<>2,4,6 not possible'2584 CALL abort_physic('conf_phys', 'choice NSW not valid',1)2575 WRITE(lunout, *) ' ERROR iflag_rrtm=1 and NSW<>2,4,6 not possible' 2576 CALL abort_physic('conf_phys', 'choice NSW not valid', 1) 2585 2577 ENDIF 2586 ELSE IF (iflag_rrtm == 2) THEN2578 ELSE IF (iflag_rrtm == 2) THEN 2587 2579 IF (NSW/=2.AND.NSW/=4.AND.NSW/=6) THEN 2588 WRITE(lunout, *) ' ERROR iflag_rrtm=1 and NSW<>2,4,6 not possible'2589 CALL abort_physic('conf_phys', 'choice NSW not valid',1)2580 WRITE(lunout, *) ' ERROR iflag_rrtm=1 and NSW<>2,4,6 not possible' 2581 CALL abort_physic('conf_phys', 'choice NSW not valid', 1) 2590 2582 ENDIF 2591 ELSE 2592 WRITE(lunout,*) ' ERROR iflag_rrtm<>0,1'2593 CALL abort_physic('conf_phys','choice iflag_rrtm not valid',1)2583 ELSE 2584 WRITE(lunout, *) ' ERROR iflag_rrtm<>0,1' 2585 CALL abort_physic('conf_phys', 'choice iflag_rrtm not valid', 1) 2594 2586 ENDIF 2595 2587 !--here we test that solaire has not been changed if ok_suntime_rrtm is activated 2596 ! IF (ok_suntime_rrtm.AND.ABS(solaire-solaire_omp_init).GT.1.E-7) THEN 2597 ! WRITE(lunout,*) ' ERROR ok_suntime_rrtm=y and solaire is provided in def file'2598 ! CALL abort_physic('conf_phys','ok_suntime_rrtm=y and solaire is provided',1)2599 ! ENDIF2600 #ifdef CPP_StratAer 2601 IF (iflag_rrtm .NE. 1) THEN2602 WRITE(lunout,*) ' ERROR iflag_rrtm<>1 but StratAer activated'2603 CALL abort_physic('conf_phys','iflag_rrtm not valid for StratAer',1)2604 ENDIF2605 IF (NSW .NE. 6) THEN2606 WRITE(lunout,*) ' ERROR NSW<>6 but StratAer activated'2607 CALL abort_physic('conf_phys','NSW not valid for StratAer',1)2608 ENDIF2609 #endif 2588 ! IF (ok_suntime_rrtm.AND.ABS(solaire-solaire_omp_init).GT.1.E-7) THEN 2589 ! WRITE(lunout,*) ' ERROR ok_suntime_rrtm=y and solaire is provided in def file' 2590 ! CALL abort_physic('conf_phys','ok_suntime_rrtm=y and solaire is provided',1) 2591 ! ENDIF 2592 IF (CPPKEY_STRATAER) THEN 2593 IF (iflag_rrtm /= 1) THEN 2594 WRITE(lunout, *) ' ERROR iflag_rrtm<>1 but StratAer activated' 2595 CALL abort_physic('conf_phys', 'iflag_rrtm not valid for StratAer', 1) 2596 ENDIF 2597 IF (NSW /= 6) THEN 2598 WRITE(lunout, *) ' ERROR NSW<>6 but StratAer activated' 2599 CALL abort_physic('conf_phys', 'NSW not valid for StratAer', 1) 2600 ENDIF 2601 END IF 2610 2602 2611 2603 !--test on ocean surface albedo 2612 2604 IF (iflag_albedo<0.OR.iflag_albedo>2) THEN 2613 WRITE(lunout,*) ' ERROR iflag_albedo<>0,1'2614 CALL abort_physic('conf_phys','choice iflag_albedo not valid',1)2605 WRITE(lunout, *) ' ERROR iflag_albedo<>0,1' 2606 CALL abort_physic('conf_phys', 'choice iflag_albedo not valid', 1) 2615 2607 ENDIF 2616 2608 2617 2609 ! Flag_aerosol cannot be set to zero if aerosol direct effect (ade) or aerosol indirect effect (aie) are activated 2618 IF (ok_ade .OR. ok_aie) THEN 2619 IF ( flag_aerosol == 0) THEN2620 CALL abort_physic('conf_phys','flag_aerosol=0 not compatible avec ok_ade ou ok_aie=.TRUE.',1)2621 2610 IF (ok_ade .OR. ok_aie) THEN 2611 IF (flag_aerosol == 0) THEN 2612 CALL abort_physic('conf_phys', 'flag_aerosol=0 not compatible avec ok_ade ou ok_aie=.TRUE.', 1) 2613 ENDIF 2622 2614 ENDIF 2623 2615 2624 2616 ! Flag_aerosol cannot be set to zero if we are in coupled mode for aerosol 2625 IF (aerosol_couple .AND. flag_aerosol == 0 2626 2617 IF (aerosol_couple .AND. flag_aerosol == 0) THEN 2618 CALL abort_physic('conf_phys', 'flag_aerosol cannot be to zero if aerosol_couple=y ', 1) 2627 2619 ENDIF 2628 2620 2629 2621 ! Read_climoz needs to be set zero if we are in couple mode for chemistry 2630 2622 IF (chemistry_couple .AND. read_climoz /= 0) THEN 2631 CALL abort_physic('conf_phys', 'read_climoz need to be to zero if chemistry_couple=y ', 1)2623 CALL abort_physic('conf_phys', 'read_climoz need to be to zero if chemistry_couple=y ', 1) 2632 2624 ENDIF 2633 2625 2634 2626 ! flag_aerosol need to be different to zero if ok_cdnc is activated 2635 2627 IF (ok_cdnc .AND. flag_aerosol == 0) THEN 2636 2628 CALL abort_physic('conf_phys', 'flag_aerosol cannot be to zero if ok_cdnc is activated ', 1) 2637 2629 ENDIF 2638 2630 2639 2631 ! ok_cdnc must be set to y if ok_aie is activated 2640 2632 IF (ok_aie .AND. .NOT. ok_cdnc) THEN 2641 CALL abort_physic('conf_phys', 'ok_cdnc must be set to y if ok_aie is activated',1)2633 CALL abort_physic('conf_phys', 'ok_cdnc must be set to y if ok_aie is activated', 1) 2642 2634 ENDIF 2643 2635 2644 2636 ! flag_aerosol=7 => MACv2SP climatology 2645 2637 IF (flag_aerosol==7.AND. iflag_rrtm/=1) THEN 2646 CALL abort_physic('conf_phys', 'flag_aerosol=7 (MACv2SP) can only be activated with RRTM',1)2638 CALL abort_physic('conf_phys', 'flag_aerosol=7 (MACv2SP) can only be activated with RRTM', 1) 2647 2639 ENDIF 2648 2640 IF (flag_aerosol==7.AND. NSW/=6) THEN 2649 CALL abort_physic('conf_phys', 'flag_aerosol=7 (MACv2SP) can only be activated with NSW=6',1)2641 CALL abort_physic('conf_phys', 'flag_aerosol=7 (MACv2SP) can only be activated with NSW=6', 1) 2650 2642 ENDIF 2651 2643 2652 2644 ! BC internal mixture is only possible with RRTM & NSW=6 & flag_aerosol=6 or aerosol_couple 2653 2645 IF (flag_bc_internal_mixture .AND. NSW/=6) THEN 2654 CALL abort_physic('conf_phys', 'flag_bc_internal_mixture can only be activated with NSW=6',1)2646 CALL abort_physic('conf_phys', 'flag_bc_internal_mixture can only be activated with NSW=6', 1) 2655 2647 ENDIF 2656 2648 IF (flag_bc_internal_mixture .AND. iflag_rrtm/=1) THEN 2657 CALL abort_physic('conf_phys', 'flag_bc_internal_mixture can only be activated with RRTM',1)2649 CALL abort_physic('conf_phys', 'flag_bc_internal_mixture can only be activated with RRTM', 1) 2658 2650 ENDIF 2659 2651 IF (flag_bc_internal_mixture .AND. flag_aerosol/=6) THEN 2660 CALL abort_physic('conf_phys', 'flag_bc_internal_mixture can only be activated with flag_aerosol=6',1)2652 CALL abort_physic('conf_phys', 'flag_bc_internal_mixture can only be activated with flag_aerosol=6', 1) 2661 2653 ENDIF 2662 2654 2663 2655 ! test sur flag_volc_surfstrat 2664 2656 IF (flag_volc_surfstrat<0.OR.flag_volc_surfstrat>2) THEN 2665 CALL abort_physic('conf_phys', 'flag_volc_surfstrat can only be 0 1 or 2',1)2666 ENDIF 2657 CALL abort_physic('conf_phys', 'flag_volc_surfstrat can only be 0 1 or 2', 1) 2658 ENDIF 2667 2659 IF ((.NOT.ok_volcan.OR..NOT.ok_ade.OR..NOT.ok_aie).AND.flag_volc_surfstrat>0) THEN 2668 CALL abort_physic('conf_phys', 'ok_ade, ok_aie, ok_volcan need to be activated if flag_volc_surfstrat is 1 or 2',1)2669 ENDIF 2660 CALL abort_physic('conf_phys', 'ok_ade, ok_aie, ok_volcan need to be activated if flag_volc_surfstrat is 1 or 2', 1) 2661 ENDIF 2670 2662 2671 2663 ! Test on carbon cycle 2672 2664 IF (carbon_cycle_tr .AND. .NOT. carbon_cycle_cpl) THEN 2673 CALL abort_physic('conf_phys', 'carbon_cycle_cpl has to be TRUE if carbon_cycle_tr is on',1)2665 CALL abort_physic('conf_phys', 'carbon_cycle_cpl has to be TRUE if carbon_cycle_tr is on', 1) 2674 2666 ENDIF 2675 2667 IF (carbon_cycle_rad .AND. .NOT. carbon_cycle_cpl) THEN 2676 CALL abort_physic('conf_phys', 'carbon_cycle_cpl has to be TRUE if carbon_cycle_rad is on',1)2668 CALL abort_physic('conf_phys', 'carbon_cycle_cpl has to be TRUE if carbon_cycle_rad is on', 1) 2677 2669 ENDIF 2678 2670 2679 2671 2680 2672 ! Test on chemistry cycle 2681 IF ((type_trac /= "inca" .AND. type_trac /= "inco") .AND. ( dms_cycle_cpl .OR. n2o_cycle_cpl)) THEN2682 CALL abort_physic('conf_phys', 'dms_cycle_cpl or n2o_cycle_cpl has to be TRUE only with INCA coupling model',1)2673 IF ((type_trac /= "inca" .AND. type_trac /= "inco") .AND. (dms_cycle_cpl .OR. n2o_cycle_cpl)) THEN 2674 CALL abort_physic('conf_phys', 'dms_cycle_cpl or n2o_cycle_cpl has to be TRUE only with INCA coupling model', 1) 2683 2675 ENDIF 2684 2676 2685 2677 ! ORCHIDEE must be activated for ifl_pbltree=1 2686 2678 IF (.NOT. ok_veget .AND. ifl_pbltree==1) THEN 2687 WRITE(lunout,*)'Warning: ORCHIDEE must be activated for ifl_pbltree=1'2688 WRITE(lunout,*)'ifl_pbltree is now changed to zero'2689 ifl_pbltree=02679 WRITE(lunout, *)'Warning: ORCHIDEE must be activated for ifl_pbltree=1' 2680 WRITE(lunout, *)'ifl_pbltree is now changed to zero' 2681 ifl_pbltree = 0 2690 2682 ENDIF 2691 2683 2692 2684 !$OMP MASTER 2693 2685 2694 WRITE(lunout, *) ' ##############################################'2695 WRITE(lunout, *) ' Configuration des parametres de la physique: '2696 WRITE(lunout, *) ' Type ocean = ', type_ocean2697 WRITE(lunout, *) ' Version ocean = ', version_ocean2698 WRITE(lunout, *) ' Config veget = ', ok_veget,type_veget2699 WRITE(lunout, *) ' Snow model landice : landice_opt = ', landice_opt2700 WRITE(lunout, *) ' Config xml pour XIOS : ok_all_xml = ', ok_all_xml2701 WRITE(lunout, *) ' Sortie journaliere = ', ok_journe2702 WRITE(lunout, *) ' Sortie haute frequence = ', ok_hf2703 WRITE(lunout, *) ' Sortie mensuelle = ', ok_mensuel2704 WRITE(lunout, *) ' Sortie instantanee = ', ok_instan2705 WRITE(lunout, *) ' Frequence appel simulateur ISCCP, freq_ISCCP =', freq_ISCCP2706 WRITE(lunout, *) ' Frequence appel simulateur ISCCP, ecrit_ISCCP =', ecrit_ISCCP2707 WRITE(lunout, *) ' Frequence appel simulateur COSP, freq_COSP =', freq_COSP2708 WRITE(lunout, *) ' Frequence appel simulateur AIRS, freq_AIRS =', freq_AIRS2709 WRITE(lunout, *) ' Sortie bilan d''energie, ip_ebil_phy =', ip_ebil_phy2710 WRITE(lunout, *) ' Excentricite = ',R_ecc2711 WRITE(lunout, *) ' Equinoxe = ',R_peri2712 WRITE(lunout, *) ' Inclinaison =',R_incl2713 WRITE(lunout, *) ' Constante solaire =',solaire2714 WRITE(lunout, *) ' ok_suntime_rrtm =',ok_suntime_rrtm2715 WRITE(lunout, *) ' co2_ppm =',co2_ppm2716 WRITE(lunout, *) ' co2_ppm0 =',co2_ppm02717 WRITE(lunout, *) ' RCO2_act = ',RCO2_act2718 WRITE(lunout, *) ' CH4_ppb =',CH4_ppb,' RCH4_act = ',RCH4_act2719 WRITE(lunout, *) ' N2O_ppb =',N2O_ppb,' RN2O_act= ',RN2O_act2720 WRITE(lunout, *) ' CFC11_ppt=',CFC11_ppt,' RCFC11_act= ',RCFC11_act2721 WRITE(lunout, *) ' CFC12_ppt=',CFC12_ppt,' RCFC12_act= ',RCFC12_act2722 WRITE(lunout, *) ' RCO2_per = ',RCO2_per,' RCH4_per = ', RCH4_per2723 WRITE(lunout, *) ' RN2O_per = ',RN2O_per,' RCFC11_per = ', RCFC11_per2724 WRITE(lunout, *) ' RCFC12_per = ',RCFC12_per2725 WRITE(lunout, *) ' cvl_comp_threshold=', cvl_comp_threshold2726 WRITE(lunout, *) ' cvl_sig2feed=', cvl_sig2feed2727 WRITE(lunout, *) ' cvl_corr=', cvl_corr2728 WRITE(lunout, *) ' ok_lic_melt=', ok_lic_melt2729 WRITE(lunout, *) ' ok_lic_cond=', ok_lic_cond2730 WRITE(lunout, *) ' iflag_cycle_diurne=',iflag_cycle_diurne2731 WRITE(lunout, *) ' soil_model=',soil_model2732 WRITE(lunout, *) ' new_oliq=',new_oliq2733 WRITE(lunout, *) ' ok_orodr=',ok_orodr2734 WRITE(lunout, *) ' ok_orolf=',ok_orolf2735 WRITE(lunout, *) ' zrel_oro_t=',zrel_oro_t2736 WRITE(lunout, *) ' zstd_orodr_t=',zstd_orodr_t2737 WRITE(lunout, *) ' zpmm_orodr_t=',zpmm_orodr_t2738 WRITE(lunout, *) ' zpmm_orolf_t=',zpmm_orolf_t2739 WRITE(lunout, *) ' ok_limitvrai=',ok_limitvrai2740 WRITE(lunout, *) ' nbapp_rad=',nbapp_rad2741 WRITE(lunout, *) ' iflag_con=',iflag_con2742 WRITE(lunout, *) ' nbapp_cv=',nbapp_cv2743 WRITE(lunout, *) ' nbapp_wk=',nbapp_wk2744 WRITE(lunout, *) ' iflag_ener_conserv=',iflag_ener_conserv2745 WRITE(lunout, *) ' ok_conserv_q=',ok_conserv_q2746 WRITE(lunout, *) ' epmax = ', epmax2747 WRITE(lunout, *) ' coef_epmax_cape = ', coef_epmax_cape2748 WRITE(lunout, *) ' ok_adj_ema = ', ok_adj_ema2749 WRITE(lunout, *) ' iflag_clw = ', iflag_clw2750 WRITE(lunout, *) ' iflag_cld_th = ', iflag_cld_th2751 WRITE(lunout, *) ' iflag_cld_cv = ', iflag_cld_cv2752 WRITE(lunout, *) ' tau_cld_cv = ', tau_cld_cv2753 WRITE(lunout, *) ' coefw_cld_cv = ', coefw_cld_cv2754 WRITE(lunout, *) ' iflag_radia = ', iflag_radia2755 WRITE(lunout, *) ' iflag_rrtm = ', iflag_rrtm2756 WRITE(lunout, *) ' NSW = ', NSW2757 WRITE(lunout, *) ' iflag_albedo = ', iflag_albedo !albedo SB2758 WRITE(lunout, *) ' ok_chlorophyll =',ok_chlorophyll ! albedo SB2759 WRITE(lunout, *) ' iflag_ratqs = ', iflag_ratqs2760 WRITE(lunout, *) ' seuil_inversion = ', seuil_inversion2761 WRITE(lunout, *) ' fact_cldcon = ', fact_cldcon2762 WRITE(lunout, *) ' facttemps = ', facttemps2763 WRITE(lunout, *) ' ok_newmicro = ',ok_newmicro2764 WRITE(lunout, *) ' ratqsbas = ',ratqsbas2765 WRITE(lunout, *) ' ratqshaut = ',ratqshaut2766 WRITE(lunout, *) ' tau_ratqs = ',tau_ratqs2767 WRITE(lunout, *) ' top_height = ',top_height2768 WRITE(lunout, *) ' rad_froid = ',rad_froid2769 WRITE(lunout, *) ' rad_chau1 = ',rad_chau12770 WRITE(lunout, *) ' rad_chau2 = ',rad_chau22771 WRITE(lunout, *) ' iflag_ice_thermo = ',iflag_ice_thermo2772 WRITE(lunout, *) ' ok_ice_sursat = ',ok_ice_sursat2773 WRITE(lunout, *) ' ok_plane_h2o = ',ok_plane_h2o2774 WRITE(lunout, *) ' ok_plane_contrail = ',ok_plane_contrail2775 WRITE(lunout, *) ' overlap = ',overlap2776 WRITE(lunout, *) ' cdmmax = ',cdmmax2777 WRITE(lunout, *) ' cdhmax = ',cdhmax2778 WRITE(lunout, *) ' ksta = ',ksta2779 WRITE(lunout, *) ' ksta_ter = ',ksta_ter2780 WRITE(lunout, *) ' f_ri_cd_min = ',f_ri_cd_min2781 WRITE(lunout, *) ' ok_kzmin = ',ok_kzmin2782 WRITE(lunout, *) ' fmagic = ',fmagic2783 WRITE(lunout, *) ' pmagic = ',pmagic2784 WRITE(lunout, *) ' ok_ade = ',ok_ade2785 WRITE(lunout, *) ' ok_volcan = ',ok_volcan2786 WRITE(lunout, *) ' flag_volc_surfstrat = ',flag_volc_surfstrat2787 WRITE(lunout, *) ' ok_aie = ',ok_aie2788 WRITE(lunout, *) ' ok_alw = ',ok_alw2789 WRITE(lunout, *) ' aerosol_couple = ', aerosol_couple2790 WRITE(lunout, *) ' chemistry_couple = ', chemistry_couple2791 WRITE(lunout, *) ' flag_aerosol = ', flag_aerosol2792 WRITE(lunout, *) ' flag_aerosol_strat= ', flag_aerosol_strat2793 WRITE(lunout, *) ' flag_aer_feedback= ', flag_aer_feedback2794 WRITE(lunout, *) ' aer_type = ',aer_type2795 WRITE(lunout, *) ' bl95_b0 = ',bl95_b02796 WRITE(lunout, *) ' bl95_b1 = ',bl95_b12797 WRITE(lunout, *) ' lev_histhf = ',lev_histhf2798 WRITE(lunout, *) ' lev_histday = ',lev_histday2799 WRITE(lunout, *) ' lev_histmth = ',lev_histmth2800 WRITE(lunout, *) ' lev_histins = ',lev_histins2801 WRITE(lunout, *) ' lev_histLES = ',lev_histLES2802 WRITE(lunout, *) ' lev_histdayNMC = ',lev_histdayNMC2803 WRITE(lunout, *) ' levout_histNMC = ',levout_histNMC2804 WRITE(lunout, *) ' ok_histNMC = ',ok_histNMC2805 WRITE(lunout, *) ' freq_outNMC = ',freq_outNMC2806 WRITE(lunout, *) ' freq_calNMC = ',freq_calNMC2807 WRITE(lunout, *) ' iflag_pbl = ', iflag_pbl2808 WRITE(lunout, *) ' iflag_physiq = ', iflag_physiq2809 !FC2810 WRITE(lunout, *) ' ifl_pbltree = ', ifl_pbltree2811 WRITE(lunout, *) ' Cd_frein = ', Cd_frein2812 WRITE(lunout, *) ' iflag_pbl_split = ', iflag_pbl_split2813 WRITE(lunout, *) ' iflag_order2_sollw = ', iflag_order2_sollw2814 WRITE(lunout, *) ' iflag_thermals = ', iflag_thermals2815 WRITE(lunout, *) ' iflag_clos = ', iflag_clos2816 WRITE(lunout, *) ' coef_clos_ls = ', coef_clos_ls2817 WRITE(lunout, *) ' type_run = ',type_run2818 WRITE(lunout, *) ' ok_cosp = ',ok_cosp2819 WRITE(lunout, *) ' ok_airs = ',ok_airs2820 2821 WRITE(lunout, *) ' ok_mensuelCOSP = ',ok_mensuelCOSP2822 WRITE(lunout, *) ' ok_journeCOSP = ',ok_journeCOSP2823 WRITE(lunout, *) ' ok_hfCOSP =',ok_hfCOSP2824 WRITE(lunout, *) ' solarlong0 = ', solarlong02825 WRITE(lunout, *) ' qsol0 = ', qsol02826 WRITE(lunout, *) ' evap0 = ', evap02827 WRITE(lunout, *) ' albsno0 = ', albsno02828 WRITE(lunout, *) ' iflag_sic = ', iflag_sic2829 WRITE(lunout, *) ' iflag_inertie = ', iflag_inertie2830 WRITE(lunout, *) ' inertie_sol = ', inertie_sol2831 WRITE(lunout, *) ' inertie_sic = ', inertie_sic2832 WRITE(lunout, *) ' inertie_lic = ', inertie_lic2833 WRITE(lunout, *) ' inertie_sno = ', inertie_sno2834 WRITE(lunout, *) ' ok_bs = ', ok_bs2835 WRITE(lunout, *) ' ok_rad_bs = ', ok_rad_bs2836 WRITE(lunout, *) ' f_cdrag_ter = ',f_cdrag_ter2837 WRITE(lunout, *) ' f_cdrag_oce = ',f_cdrag_oce2838 WRITE(lunout, *) ' f_rugoro = ',f_rugoro2839 WRITE(lunout, *) ' z0min = ',z0min2840 WRITE(lunout, *) ' supcrit1 = ', supcrit12841 WRITE(lunout, *) ' supcrit2 = ', supcrit22842 WRITE(lunout, *) ' iflag_mix = ', iflag_mix2843 WRITE(lunout, *) ' iflag_mix_adiab = ', iflag_mix_adiab2844 WRITE(lunout, *) ' scut = ', scut2845 WRITE(lunout, *) ' qqa1 = ', qqa12846 WRITE(lunout, *) ' qqa2 = ', qqa22847 WRITE(lunout, *) ' gammas = ', gammas2848 WRITE(lunout, *) ' Fmax = ', Fmax2849 WRITE(lunout, *) ' tmax_fonte_cv = ', tmax_fonte_cv2850 WRITE(lunout, *) ' alphas = ', alphas2851 WRITE(lunout, *) ' iflag_wake = ', iflag_wake2852 WRITE(lunout, *) ' alp_offset = ', alp_offset2686 WRITE(lunout, *) ' ##############################################' 2687 WRITE(lunout, *) ' Configuration des parametres de la physique: ' 2688 WRITE(lunout, *) ' Type ocean = ', type_ocean 2689 WRITE(lunout, *) ' Version ocean = ', version_ocean 2690 WRITE(lunout, *) ' Config veget = ', ok_veget, type_veget 2691 WRITE(lunout, *) ' Snow model landice : landice_opt = ', landice_opt 2692 WRITE(lunout, *) ' Config xml pour XIOS : ok_all_xml = ', ok_all_xml 2693 WRITE(lunout, *) ' Sortie journaliere = ', ok_journe 2694 WRITE(lunout, *) ' Sortie haute frequence = ', ok_hf 2695 WRITE(lunout, *) ' Sortie mensuelle = ', ok_mensuel 2696 WRITE(lunout, *) ' Sortie instantanee = ', ok_instan 2697 WRITE(lunout, *) ' Frequence appel simulateur ISCCP, freq_ISCCP =', freq_ISCCP 2698 WRITE(lunout, *) ' Frequence appel simulateur ISCCP, ecrit_ISCCP =', ecrit_ISCCP 2699 WRITE(lunout, *) ' Frequence appel simulateur COSP, freq_COSP =', freq_COSP 2700 WRITE(lunout, *) ' Frequence appel simulateur AIRS, freq_AIRS =', freq_AIRS 2701 WRITE(lunout, *) ' Sortie bilan d''energie, ip_ebil_phy =', ip_ebil_phy 2702 WRITE(lunout, *) ' Excentricite = ', R_ecc 2703 WRITE(lunout, *) ' Equinoxe = ', R_peri 2704 WRITE(lunout, *) ' Inclinaison =', R_incl 2705 WRITE(lunout, *) ' Constante solaire =', solaire 2706 WRITE(lunout, *) ' ok_suntime_rrtm =', ok_suntime_rrtm 2707 WRITE(lunout, *) ' co2_ppm =', co2_ppm 2708 WRITE(lunout, *) ' co2_ppm0 =', co2_ppm0 2709 WRITE(lunout, *) ' RCO2_act = ', RCO2_act 2710 WRITE(lunout, *) ' CH4_ppb =', CH4_ppb, ' RCH4_act = ', RCH4_act 2711 WRITE(lunout, *) ' N2O_ppb =', N2O_ppb, ' RN2O_act= ', RN2O_act 2712 WRITE(lunout, *) ' CFC11_ppt=', CFC11_ppt, ' RCFC11_act= ', RCFC11_act 2713 WRITE(lunout, *) ' CFC12_ppt=', CFC12_ppt, ' RCFC12_act= ', RCFC12_act 2714 WRITE(lunout, *) ' RCO2_per = ', RCO2_per, ' RCH4_per = ', RCH4_per 2715 WRITE(lunout, *) ' RN2O_per = ', RN2O_per, ' RCFC11_per = ', RCFC11_per 2716 WRITE(lunout, *) ' RCFC12_per = ', RCFC12_per 2717 WRITE(lunout, *) ' cvl_comp_threshold=', cvl_comp_threshold 2718 WRITE(lunout, *) ' cvl_sig2feed=', cvl_sig2feed 2719 WRITE(lunout, *) ' cvl_corr=', cvl_corr 2720 WRITE(lunout, *) ' ok_lic_melt=', ok_lic_melt 2721 WRITE(lunout, *) ' ok_lic_cond=', ok_lic_cond 2722 WRITE(lunout, *) ' iflag_cycle_diurne=', iflag_cycle_diurne 2723 WRITE(lunout, *) ' soil_model=', soil_model 2724 WRITE(lunout, *) ' new_oliq=', new_oliq 2725 WRITE(lunout, *) ' ok_orodr=', ok_orodr 2726 WRITE(lunout, *) ' ok_orolf=', ok_orolf 2727 WRITE(lunout, *) ' zrel_oro_t=', zrel_oro_t 2728 WRITE(lunout, *) ' zstd_orodr_t=', zstd_orodr_t 2729 WRITE(lunout, *) ' zpmm_orodr_t=', zpmm_orodr_t 2730 WRITE(lunout, *) ' zpmm_orolf_t=', zpmm_orolf_t 2731 WRITE(lunout, *) ' ok_limitvrai=', ok_limitvrai 2732 WRITE(lunout, *) ' nbapp_rad=', nbapp_rad 2733 WRITE(lunout, *) ' iflag_con=', iflag_con 2734 WRITE(lunout, *) ' nbapp_cv=', nbapp_cv 2735 WRITE(lunout, *) ' nbapp_wk=', nbapp_wk 2736 WRITE(lunout, *) ' iflag_ener_conserv=', iflag_ener_conserv 2737 WRITE(lunout, *) ' ok_conserv_q=', ok_conserv_q 2738 WRITE(lunout, *) ' epmax = ', epmax 2739 WRITE(lunout, *) ' coef_epmax_cape = ', coef_epmax_cape 2740 WRITE(lunout, *) ' ok_adj_ema = ', ok_adj_ema 2741 WRITE(lunout, *) ' iflag_clw = ', iflag_clw 2742 WRITE(lunout, *) ' iflag_cld_th = ', iflag_cld_th 2743 WRITE(lunout, *) ' iflag_cld_cv = ', iflag_cld_cv 2744 WRITE(lunout, *) ' tau_cld_cv = ', tau_cld_cv 2745 WRITE(lunout, *) ' coefw_cld_cv = ', coefw_cld_cv 2746 WRITE(lunout, *) ' iflag_radia = ', iflag_radia 2747 WRITE(lunout, *) ' iflag_rrtm = ', iflag_rrtm 2748 WRITE(lunout, *) ' NSW = ', NSW 2749 WRITE(lunout, *) ' iflag_albedo = ', iflag_albedo !albedo SB 2750 WRITE(lunout, *) ' ok_chlorophyll =', ok_chlorophyll ! albedo SB 2751 WRITE(lunout, *) ' iflag_ratqs = ', iflag_ratqs 2752 WRITE(lunout, *) ' seuil_inversion = ', seuil_inversion 2753 WRITE(lunout, *) ' fact_cldcon = ', fact_cldcon 2754 WRITE(lunout, *) ' facttemps = ', facttemps 2755 WRITE(lunout, *) ' ok_newmicro = ', ok_newmicro 2756 WRITE(lunout, *) ' ratqsbas = ', ratqsbas 2757 WRITE(lunout, *) ' ratqshaut = ', ratqshaut 2758 WRITE(lunout, *) ' tau_ratqs = ', tau_ratqs 2759 WRITE(lunout, *) ' top_height = ', top_height 2760 WRITE(lunout, *) ' rad_froid = ', rad_froid 2761 WRITE(lunout, *) ' rad_chau1 = ', rad_chau1 2762 WRITE(lunout, *) ' rad_chau2 = ', rad_chau2 2763 WRITE(lunout, *) ' iflag_ice_thermo = ', iflag_ice_thermo 2764 WRITE(lunout, *) ' ok_ice_sursat = ', ok_ice_sursat 2765 WRITE(lunout, *) ' ok_plane_h2o = ', ok_plane_h2o 2766 WRITE(lunout, *) ' ok_plane_contrail = ', ok_plane_contrail 2767 WRITE(lunout, *) ' overlap = ', overlap 2768 WRITE(lunout, *) ' cdmmax = ', cdmmax 2769 WRITE(lunout, *) ' cdhmax = ', cdhmax 2770 WRITE(lunout, *) ' ksta = ', ksta 2771 WRITE(lunout, *) ' ksta_ter = ', ksta_ter 2772 WRITE(lunout, *) ' f_ri_cd_min = ', f_ri_cd_min 2773 WRITE(lunout, *) ' ok_kzmin = ', ok_kzmin 2774 WRITE(lunout, *) ' fmagic = ', fmagic 2775 WRITE(lunout, *) ' pmagic = ', pmagic 2776 WRITE(lunout, *) ' ok_ade = ', ok_ade 2777 WRITE(lunout, *) ' ok_volcan = ', ok_volcan 2778 WRITE(lunout, *) ' flag_volc_surfstrat = ', flag_volc_surfstrat 2779 WRITE(lunout, *) ' ok_aie = ', ok_aie 2780 WRITE(lunout, *) ' ok_alw = ', ok_alw 2781 WRITE(lunout, *) ' aerosol_couple = ', aerosol_couple 2782 WRITE(lunout, *) ' chemistry_couple = ', chemistry_couple 2783 WRITE(lunout, *) ' flag_aerosol = ', flag_aerosol 2784 WRITE(lunout, *) ' flag_aerosol_strat= ', flag_aerosol_strat 2785 WRITE(lunout, *) ' flag_aer_feedback= ', flag_aer_feedback 2786 WRITE(lunout, *) ' aer_type = ', aer_type 2787 WRITE(lunout, *) ' bl95_b0 = ', bl95_b0 2788 WRITE(lunout, *) ' bl95_b1 = ', bl95_b1 2789 WRITE(lunout, *) ' lev_histhf = ', lev_histhf 2790 WRITE(lunout, *) ' lev_histday = ', lev_histday 2791 WRITE(lunout, *) ' lev_histmth = ', lev_histmth 2792 WRITE(lunout, *) ' lev_histins = ', lev_histins 2793 WRITE(lunout, *) ' lev_histLES = ', lev_histLES 2794 WRITE(lunout, *) ' lev_histdayNMC = ', lev_histdayNMC 2795 WRITE(lunout, *) ' levout_histNMC = ', levout_histNMC 2796 WRITE(lunout, *) ' ok_histNMC = ', ok_histNMC 2797 WRITE(lunout, *) ' freq_outNMC = ', freq_outNMC 2798 WRITE(lunout, *) ' freq_calNMC = ', freq_calNMC 2799 WRITE(lunout, *) ' iflag_pbl = ', iflag_pbl 2800 WRITE(lunout, *) ' iflag_physiq = ', iflag_physiq 2801 !FC 2802 WRITE(lunout, *) ' ifl_pbltree = ', ifl_pbltree 2803 WRITE(lunout, *) ' Cd_frein = ', Cd_frein 2804 WRITE(lunout, *) ' iflag_pbl_split = ', iflag_pbl_split 2805 WRITE(lunout, *) ' iflag_order2_sollw = ', iflag_order2_sollw 2806 WRITE(lunout, *) ' iflag_thermals = ', iflag_thermals 2807 WRITE(lunout, *) ' iflag_clos = ', iflag_clos 2808 WRITE(lunout, *) ' coef_clos_ls = ', coef_clos_ls 2809 WRITE(lunout, *) ' type_run = ', type_run 2810 WRITE(lunout, *) ' ok_cosp = ', ok_cosp 2811 WRITE(lunout, *) ' ok_airs = ', ok_airs 2812 2813 WRITE(lunout, *) ' ok_mensuelCOSP = ', ok_mensuelCOSP 2814 WRITE(lunout, *) ' ok_journeCOSP = ', ok_journeCOSP 2815 WRITE(lunout, *) ' ok_hfCOSP =', ok_hfCOSP 2816 WRITE(lunout, *) ' solarlong0 = ', solarlong0 2817 WRITE(lunout, *) ' qsol0 = ', qsol0 2818 WRITE(lunout, *) ' evap0 = ', evap0 2819 WRITE(lunout, *) ' albsno0 = ', albsno0 2820 WRITE(lunout, *) ' iflag_sic = ', iflag_sic 2821 WRITE(lunout, *) ' iflag_inertie = ', iflag_inertie 2822 WRITE(lunout, *) ' inertie_sol = ', inertie_sol 2823 WRITE(lunout, *) ' inertie_sic = ', inertie_sic 2824 WRITE(lunout, *) ' inertie_lic = ', inertie_lic 2825 WRITE(lunout, *) ' inertie_sno = ', inertie_sno 2826 WRITE(lunout, *) ' ok_bs = ', ok_bs 2827 WRITE(lunout, *) ' ok_rad_bs = ', ok_rad_bs 2828 WRITE(lunout, *) ' f_cdrag_ter = ', f_cdrag_ter 2829 WRITE(lunout, *) ' f_cdrag_oce = ', f_cdrag_oce 2830 WRITE(lunout, *) ' f_rugoro = ', f_rugoro 2831 WRITE(lunout, *) ' z0min = ', z0min 2832 WRITE(lunout, *) ' supcrit1 = ', supcrit1 2833 WRITE(lunout, *) ' supcrit2 = ', supcrit2 2834 WRITE(lunout, *) ' iflag_mix = ', iflag_mix 2835 WRITE(lunout, *) ' iflag_mix_adiab = ', iflag_mix_adiab 2836 WRITE(lunout, *) ' scut = ', scut 2837 WRITE(lunout, *) ' qqa1 = ', qqa1 2838 WRITE(lunout, *) ' qqa2 = ', qqa2 2839 WRITE(lunout, *) ' gammas = ', gammas 2840 WRITE(lunout, *) ' Fmax = ', Fmax 2841 WRITE(lunout, *) ' tmax_fonte_cv = ', tmax_fonte_cv 2842 WRITE(lunout, *) ' alphas = ', alphas 2843 WRITE(lunout, *) ' iflag_wake = ', iflag_wake 2844 WRITE(lunout, *) ' alp_offset = ', alp_offset 2853 2845 ! nrlmd le 10/04/2012 2854 WRITE(lunout, *) ' iflag_trig_bl = ', iflag_trig_bl2855 WRITE(lunout, *) ' iflag_strig = ', iflag_strig2856 WRITE(lunout, *) ' s_trig = ', s_trig2857 WRITE(lunout, *) ' h_trig = ', h_trig2858 WRITE(lunout, *) ' tau_trig_shallow = ', tau_trig_shallow2859 WRITE(lunout, *) ' tau_trig_deep = ', tau_trig_deep2860 WRITE(lunout, *) ' iflag_clos_bl = ', iflag_clos_bl2846 WRITE(lunout, *) ' iflag_trig_bl = ', iflag_trig_bl 2847 WRITE(lunout, *) ' iflag_strig = ', iflag_strig 2848 WRITE(lunout, *) ' s_trig = ', s_trig 2849 WRITE(lunout, *) ' h_trig = ', h_trig 2850 WRITE(lunout, *) ' tau_trig_shallow = ', tau_trig_shallow 2851 WRITE(lunout, *) ' tau_trig_deep = ', tau_trig_deep 2852 WRITE(lunout, *) ' iflag_clos_bl = ', iflag_clos_bl 2861 2853 ! fin nrlmd le 10/04/2012 2862 2854 2863 WRITE(lunout, *) ' lonmin lonmax latmin latmax bilKP_ins =',&2864 lonmin_ins, lonmax_ins, latmin_ins, latmax_ins2865 WRITE(lunout, *) ' ecrit_ hf, ins, day, mth, reg, tra, ISCCP, LES',&2866 ecrit_hf, ecrit_ins, ecrit_day, ecrit_mth, ecrit_reg, ecrit_tra, ecrit_ISCCP, ecrit_LES2867 2868 WRITE(lunout, *) ' ok_strato = ', ok_strato2869 WRITE(lunout, *) ' ok_hines = ',ok_hines2870 WRITE(lunout, *) ' ok_gwd_rando = ',ok_gwd_rando2871 WRITE(lunout, *) ' ok_qch4 = ',ok_qch42872 WRITE(lunout, *) ' gwd_rando_ruwmax = ', gwd_rando_ruwmax2873 WRITE(lunout, *) ' gwd_rando_sat = ', gwd_rando_sat2874 WRITE(lunout, *) ' gwd_front_ruwmax = ', gwd_front_ruwmax2875 WRITE(lunout, *) ' gwd_front_sat = ', gwd_front_sat2876 WRITE(lunout, *) ' SSO gkdrag =',gkdrag2877 WRITE(lunout, *) ' SSO grahilo=',grahilo2878 WRITE(lunout, *) ' SSO grcrit=',grcrit2879 WRITE(lunout, *) ' SSO gfrcrit=',gfrcrit2880 WRITE(lunout, *) ' SSO gkwake=',gkwake2881 WRITE(lunout, *) ' SSO gklift=',gklift2882 WRITE(lunout, *) ' adjust_tropopause = ', adjust_tropopause2883 WRITE(lunout, *) ' ok_daily_climoz = ',ok_daily_climoz2884 WRITE(lunout, *) ' ok_new_lscp = ', ok_new_lscp2885 WRITE(lunout, *) ' ok_icefra_lscp = ', ok_icefra_lscp2886 WRITE(lunout, *) ' read_climoz = ', read_climoz2887 WRITE(lunout, *) ' carbon_cycle_tr = ', carbon_cycle_tr2888 WRITE(lunout, *) ' carbon_cycle_cpl = ', carbon_cycle_cpl2889 WRITE(lunout, *) ' carbon_cycle_rad = ', carbon_cycle_rad2890 WRITE(lunout, *) ' level_coupling_esm = ', level_coupling_esm2891 WRITE(lunout, *) ' read_fco2_ocean_cor = ', read_fco2_ocean_cor2892 WRITE(lunout, *) ' var_fco2_ocean_cor = ', var_fco2_ocean_cor2893 WRITE(lunout, *) ' read_fco2_land_cor = ', read_fco2_land_cor2894 WRITE(lunout, *) ' var_fco2_land_cor = ', var_fco2_land_cor2895 WRITE(lunout, *) ' dms_cycle_cpl = ', dms_cycle_cpl2896 WRITE(lunout, *) ' n2o_cycle_cpl = ', n2o_cycle_cpl2897 WRITE(lunout, *) ' iflag_tsurf_inlandsis = ', iflag_tsurf_inlandsis2898 WRITE(lunout, *) ' iflag_temp_inlandsis = ', iflag_temp_inlandsis2899 WRITE(lunout, *) ' iflag_albcalc = ', iflag_albcalc2900 WRITE(lunout, *) ' SnoMod = ', SnoMod2901 WRITE(lunout, *) ' BloMod = ', BloMod2902 WRITE(lunout, *) ' ok_outfor = ', ok_outfor2903 WRITE(lunout, *) ' is_ok_slush = ', is_ok_slush2904 WRITE(lunout, *) ' opt_runoff_ac = ', opt_runoff_ac2905 WRITE(lunout, *) ' is_ok_z0h_rn = ', is_ok_z0h_rn2906 WRITE(lunout, *) ' is_ok_density_kotlyakov = ', is_ok_density_kotlyakov2907 WRITE(lunout, *) ' prescribed_z0m_snow = ', prescribed_z0m_snow2908 WRITE(lunout, *) ' iflag_z0m_snow = ', iflag_z0m_snow2909 WRITE(lunout, *) ' ok_zsn_ii = ', ok_zsn_ii2910 WRITE(lunout, *) ' discret_xf = ', discret_xf2911 WRITE(lunout, *) ' correc_alb= ', correc_alb2912 WRITE(lunout, *) ' buf_sph_pol = ', buf_sph_pol2913 WRITE(lunout, *) ' buf_siz_pol= ', buf_siz_pol2855 WRITE(lunout, *) ' lonmin lonmax latmin latmax bilKP_ins =', & 2856 lonmin_ins, lonmax_ins, latmin_ins, latmax_ins 2857 WRITE(lunout, *) ' ecrit_ hf, ins, day, mth, reg, tra, ISCCP, LES', & 2858 ecrit_hf, ecrit_ins, ecrit_day, ecrit_mth, ecrit_reg, ecrit_tra, ecrit_ISCCP, ecrit_LES 2859 2860 WRITE(lunout, *) ' ok_strato = ', ok_strato 2861 WRITE(lunout, *) ' ok_hines = ', ok_hines 2862 WRITE(lunout, *) ' ok_gwd_rando = ', ok_gwd_rando 2863 WRITE(lunout, *) ' ok_qch4 = ', ok_qch4 2864 WRITE(lunout, *) ' gwd_rando_ruwmax = ', gwd_rando_ruwmax 2865 WRITE(lunout, *) ' gwd_rando_sat = ', gwd_rando_sat 2866 WRITE(lunout, *) ' gwd_front_ruwmax = ', gwd_front_ruwmax 2867 WRITE(lunout, *) ' gwd_front_sat = ', gwd_front_sat 2868 WRITE(lunout, *) ' SSO gkdrag =', gkdrag 2869 WRITE(lunout, *) ' SSO grahilo=', grahilo 2870 WRITE(lunout, *) ' SSO grcrit=', grcrit 2871 WRITE(lunout, *) ' SSO gfrcrit=', gfrcrit 2872 WRITE(lunout, *) ' SSO gkwake=', gkwake 2873 WRITE(lunout, *) ' SSO gklift=', gklift 2874 WRITE(lunout, *) ' adjust_tropopause = ', adjust_tropopause 2875 WRITE(lunout, *) ' ok_daily_climoz = ', ok_daily_climoz 2876 WRITE(lunout, *) ' ok_new_lscp = ', ok_new_lscp 2877 WRITE(lunout, *) ' ok_icefra_lscp = ', ok_icefra_lscp 2878 WRITE(lunout, *) ' read_climoz = ', read_climoz 2879 WRITE(lunout, *) ' carbon_cycle_tr = ', carbon_cycle_tr 2880 WRITE(lunout, *) ' carbon_cycle_cpl = ', carbon_cycle_cpl 2881 WRITE(lunout, *) ' carbon_cycle_rad = ', carbon_cycle_rad 2882 WRITE(lunout, *) ' level_coupling_esm = ', level_coupling_esm 2883 WRITE(lunout, *) ' read_fco2_ocean_cor = ', read_fco2_ocean_cor 2884 WRITE(lunout, *) ' var_fco2_ocean_cor = ', var_fco2_ocean_cor 2885 WRITE(lunout, *) ' read_fco2_land_cor = ', read_fco2_land_cor 2886 WRITE(lunout, *) ' var_fco2_land_cor = ', var_fco2_land_cor 2887 WRITE(lunout, *) ' dms_cycle_cpl = ', dms_cycle_cpl 2888 WRITE(lunout, *) ' n2o_cycle_cpl = ', n2o_cycle_cpl 2889 WRITE(lunout, *) ' iflag_tsurf_inlandsis = ', iflag_tsurf_inlandsis 2890 WRITE(lunout, *) ' iflag_temp_inlandsis = ', iflag_temp_inlandsis 2891 WRITE(lunout, *) ' iflag_albcalc = ', iflag_albcalc 2892 WRITE(lunout, *) ' SnoMod = ', SnoMod 2893 WRITE(lunout, *) ' BloMod = ', BloMod 2894 WRITE(lunout, *) ' ok_outfor = ', ok_outfor 2895 WRITE(lunout, *) ' is_ok_slush = ', is_ok_slush 2896 WRITE(lunout, *) ' opt_runoff_ac = ', opt_runoff_ac 2897 WRITE(lunout, *) ' is_ok_z0h_rn = ', is_ok_z0h_rn 2898 WRITE(lunout, *) ' is_ok_density_kotlyakov = ', is_ok_density_kotlyakov 2899 WRITE(lunout, *) ' prescribed_z0m_snow = ', prescribed_z0m_snow 2900 WRITE(lunout, *) ' iflag_z0m_snow = ', iflag_z0m_snow 2901 WRITE(lunout, *) ' ok_zsn_ii = ', ok_zsn_ii 2902 WRITE(lunout, *) ' discret_xf = ', discret_xf 2903 WRITE(lunout, *) ' correc_alb= ', correc_alb 2904 WRITE(lunout, *) ' buf_sph_pol = ', buf_sph_pol 2905 WRITE(lunout, *) ' buf_siz_pol= ', buf_siz_pol 2914 2906 !rajout Olivier Torres 2915 write(lunout, *) 'choix_bulk = ', choix_bulk2916 write(lunout, *) 'nit_bulk = ', nit_bulk2917 write(lunout, *) 'kz0 = ', kz02907 write(lunout, *) 'choix_bulk = ', choix_bulk 2908 write(lunout, *) 'nit_bulk = ', nit_bulk 2909 write(lunout, *) 'kz0 = ', kz0 2918 2910 2919 2911 !$OMP END MASTER … … 2930 2922 2931 2923 USE IOIPSL 2932 USE print_control_mod, ONLY : lunout2924 USE print_control_mod, ONLY : lunout 2933 2925 IMPLICIT NONE 2934 2926 ! Configuration de l'interace atm/surf … … 2936 2928 ! tau_calv: temps de relaxation pour la fonte des glaciers 2937 2929 ! 2938 REAL 2939 REAL, SAVE 2930 REAL :: tau_calv 2931 REAL, SAVE :: tau_calv_omp 2940 2932 ! 2941 2933 !Config Key = tau_calv … … 2944 2936 !Config Help = 2945 2937 ! 2946 tau_calv_omp = 360. *10.2938 tau_calv_omp = 360. * 10. 2947 2939 !$OMP MASTER 2948 CALL getin('tau_calv', tau_calv_omp)2940 CALL getin('tau_calv', tau_calv_omp) 2949 2941 !$OMP END MASTER 2950 2942 !$OMP BARRIER 2951 2943 ! 2952 tau_calv =tau_calv_omp2944 tau_calv = tau_calv_omp 2953 2945 ! 2954 2946 !$OMP MASTER 2955 WRITE(lunout, *)' ##############################################'2956 WRITE(lunout, *)' Configuration de l''interface atm/surfaces : '2957 WRITE(lunout, *)' tau_calv = ',tau_calv2947 WRITE(lunout, *)' ##############################################' 2948 WRITE(lunout, *)' Configuration de l''interface atm/surfaces : ' 2949 WRITE(lunout, *)' tau_calv = ', tau_calv 2958 2950 !$OMP END MASTER 2959 2951 ! -
LMDZ6/branches/Amaury_dev/libf/phylmd/hgardfou.F90
r2399 r5098 41 41 zt(i) = t(i, k) 42 42 END DO 43 #ifdef CRAY44 CALL whenfgt(klon, zt, 1, 370.0, jadrs, jbad)45 #else46 43 jbad = 0 47 44 DO i = 1, klon … … 51 48 END IF 52 49 END DO 53 #endif54 50 IF (jbad>0) THEN 55 51 ok = .FALSE. … … 60 56 END DO 61 57 END IF 62 #ifdef CRAY63 CALL whenflt(klon, zt, 1, 100.0, jadrs, jbad)64 #else65 58 jbad = 0 66 59 DO i = 1, klon … … 71 64 END IF 72 65 END DO 73 #endif74 66 IF (jbad>0) THEN 75 67 ok = .FALSE. … … 86 78 zt(i) = tsol(i, nsrf) 87 79 END DO 88 #ifdef CRAY89 CALL whenfgt(klon, zt, 1, 370.0, jadrs, jbad)90 #else91 80 jbad = 0 92 81 DO i = 1, klon … … 96 85 END IF 97 86 END DO 98 #endif99 87 IF (jbad>0) THEN 100 88 ok = .FALSE. … … 106 94 END DO 107 95 END IF 108 #ifdef CRAY109 CALL whenflt(klon, zt, 1, 100.0, jadrs, jbad)110 #else111 96 jbad = 0 112 97 DO i = 1, klon … … 117 102 END IF 118 103 END DO 119 #endif120 104 IF (jbad>0) THEN 121 105 ok = .FALSE. -
LMDZ6/branches/Amaury_dev/libf/phylmd/infotrac_phy.F90
r5091 r5098 3 3 MODULE infotrac_phy 4 4 5 USE strings_mod, ONLY: msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse, strIdx 6 USE readTracFiles_mod, ONLY: trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, & 7 delPhase, niso, getKey, isot_type, processIsotopes, isotope, maxTableWidth, iqIsoPha, nphas, ixIso, isoPhas, & 8 addPhase, iH2O, addKey, isoSelect, testTracersFiles, isoKeys, indexUpdate, iqWIsoPha, nbIso, ntiso, isoName, isoCheck 9 IMPLICIT NONE 10 11 PRIVATE 12 13 !=== FOR TRACERS: 14 PUBLIC :: init_infotrac_phy !--- Initialization of the tracers 15 PUBLIC :: tracers, type_trac !--- Full tracers database, tracers type keyword 16 PUBLIC :: nqtot, nbtr, nqo, nqCO2, nqtottr !--- Main dimensions 17 PUBLIC :: conv_flg, pbl_flg !--- Convection & boundary layer activation keys 18 #ifdef CPP_StratAer 19 PUBLIC :: nbtr_bin, nbtr_sulgas !--- Number of aerosols bins and sulfur gases for StratAer model 20 PUBLIC :: id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat, id_TEST_strat 21 #endif 22 23 !=== FOR WATER 24 PUBLIC :: ivap, iliq, isol 25 !=== FOR ISOTOPES: General 26 PUBLIC :: isot_type, nbIso !--- Derived type, full isotopes families database + nb of families 27 PUBLIC :: isoSelect, ixIso !--- Isotopes family selection tool + selected family index 28 !=== FOR ISOTOPES: Specific to water 29 PUBLIC :: iH2O !--- H2O isotopes class index 30 !=== FOR ISOTOPES: Depending on the selected isotopes family 31 PUBLIC :: isotope, isoKeys !--- Selected isotopes database + associated keys (cf. getKey) 32 PUBLIC :: isoName, isoZone, isoPhas !--- Isotopes and tagging zones names, phases 33 PUBLIC :: niso, nzone, nphas, ntiso !--- " " numbers + isotopes & tagging tracers number 34 PUBLIC :: itZonIso !--- idx "it" (in "isoName(1:niso)") = function(tagging idx, isotope idx) 35 PUBLIC :: iqIsoPha !--- idx "iq" (in "qx") = function(isotope idx, phase idx) + aliases 36 PUBLIC :: iqWIsoPha !--- Same as iqIsoPha but with normal water phases 37 38 PUBLIC :: isoCheck !--- Run isotopes checking routines 39 !=== FOR BOTH TRACERS AND ISOTOPES 40 PUBLIC :: getKey !--- Get a key from "tracers" or "isotope" 41 42 !=== CONVENTIONS FOR TRACERS NUMBERS: 43 ! |--------------------+-----------------------+-----------------+---------------+----------------------------| 44 ! | water in different | water tagging | water isotopes | other tracers | additional tracers moments | 45 ! | phases: H2O_[gls] | isotopes | | | for higher order schemes | 46 ! |--------------------+-----------------------+-----------------+---------------+----------------------------| 47 ! | | | | | | 48 ! |<-- nqo -->|<-- nqo*niso* nzone -->|<-- nqo*niso -->|<-- nbtr -->|<-- (nmom) -->| 49 ! | | | | 50 ! | |<-- nqo*niso*(nzone+1) = nqo*ntiso -->|<-- nqtottr = nbtr + nmom -->| 51 ! | = nqtot - nqo*(ntiso+1) | 52 ! | | 53 ! |<-- nqtrue = nbtr + nqo*(ntiso+1) -->| | 54 ! | | 55 ! |<-- nqtot = nqtrue + nmom -->| 56 ! | | 57 ! |-----------------------------------------------------------------------------------------------------------| 58 ! NOTES FOR THIS TABLE: 59 ! * Used "niso", "nzone" and "ntiso" are components of "isotopes(ip)" for water (isotopes(ip)%parent == 'H2O'), 60 ! since water is so far the sole tracers family, except passive CO2, removed from the main tracers table. 61 ! * For water, "nqo" is equal to the more general field "isotopes(ip)%nphas". 62 ! * "niso", "nzone", "ntiso", "nphas" are defined for other isotopic tracers families, if any. 63 ! 64 !=== DERIVED TYPE EMBEDDING MOST OF THE TRACERS-RELATED QUANTITIES (LENGTH: nqtot) 65 ! Each entry is accessible using "%" sign. 66 ! |-------------+------------------------------------------------------+-------------+------------------------+ 67 ! | entry | Meaning | Former name | Possible values | 68 ! |-------------+------------------------------------------------------+-------------+------------------------+ 69 ! | name | Name (short) | tname | | 70 ! | gen0Name | Name of the 1st generation ancestor | / | | 71 ! | parent | Name of the parent | / | | 72 ! | longName | Long name (with adv. scheme suffix) for outputs | ttext | | 73 ! | type | Type (so far: tracer or tag) | / | tracer,tag | 74 ! | phase | Phases list ("g"as / "l"iquid / "s"olid) | / | [g][l][s] | 75 ! | component | Name(s) of the merged/cumulated section(s) | / | coma-separated names | 76 ! | iGeneration | Generation (>=1) | / | | 77 ! | iqParent | Index of the parent tracer | iqpere | 1:nqtot | 78 ! | iqDescen | Indexes of the childs (all generations) | iqfils | 1:nqtot | 79 ! | nqDescen | Number of the descendants (all generations) | nqdesc | 1:nqtot | 80 ! | nqChildren | Number of childs (1st generation only) | nqfils | 1:nqtot | 81 ! | keys | key/val pairs accessible with "getKey" routine | / | | 82 ! | isAdvected | advected tracers flag (.TRUE. if iadv >= 0) | / | nqtrue .TRUE. values | 83 ! | isInPhysics | tracers not extracted from the main table in physics | / | nqtottr .TRUE. values | 84 ! | iso_iGroup | Isotopes group index in isotopes(:) | / | 1:nbIso | 85 ! | iso_iName | Isotope name index in isotopes(iso_iGroup)%trac(:) | iso_indnum | 1:niso | 86 ! | iso_iZone | Isotope zone index in isotopes(iso_iGroup)%zone(:) | zone_num | 1:nzone | 87 ! | iso_iPhas | Isotope phase index in isotopes(iso_iGroup)%phas(:) | phase_num | 1:nphas | 88 ! +-------------+------------------------------------------------------+-------------+------------------------+ 89 ! 90 !=== DERIVED TYPE EMBEDDING MOST OF THE ISOTOPES-RELATED QUANTITIES (LENGTH: nbIso, NUMBER OF ISOTOPES FAMILIES) 91 ! Each entry is accessible using "%" sign. 92 ! |-----------------+--------------------------------------------------+--------------------+-----------------+ 93 ! | entry | length | Meaning | Former name | Possible values | 94 ! |-----------------+--------------------------------------------------+--------------------+-----------------+ 95 ! | parent | Parent tracer (isotopes family name) | | | 96 ! | keys | niso | Isotopes keys/values pairs list + number | | | 97 ! | trac | ntiso | Isotopes + tagging tracers list + number | / | ntraciso | | 98 ! | zone | nzone | Geographic tagging zones list + number | / | ntraceurs_zone | | 99 ! | phase | nphas | Phases list + number | | [g][l][s], 1:3 | 100 ! | iqIsoPha | Index in "qx" = f(name(1:ntiso)),phas) | iqiso | 1:nqtot | 101 ! | iqWIsoPha | Index in "qx" = f(name(1:ntiso)),phas) | iqiso | 1:nqtot | 102 ! | itZonIso | Index in "trac(1:ntiso)"= f(zone, name(1:niso)) | index_trac | 1:ntiso | 103 ! +-----------------+--------------------------------------------------+--------------------+-----------------+ 104 105 !=== DIMENSIONS OF THE TRACERS TABLES AND OTHER SCALAR VARIABLES 106 INTEGER, SAVE :: nqtot, & !--- Tracers nb in dynamics (incl. higher moments + H2O) 107 nbtr, & !--- Tracers nb in physics (excl. higher moments + H2O) 108 nqo, & !--- Number of water phases 109 nqtottr, & !--- Number of tracers passed to phytrac (TO BE DELETED ?) 110 nqCO2 !--- Number of tracers of CO2 (ThL) 111 CHARACTER(LEN=maxlen), SAVE :: type_trac !--- Keyword for tracers type(s) 112 !$OMP THREADPRIVATE(nqtot, nbtr, nqo, nqtottr, nqCO2, type_trac) 113 114 !=== INDICES OF WATER 115 INTEGER, SAVE :: ivap,iliq,isol ! Indices for vap, liq and ice 116 !$OMP THREADPRIVATE(ivap,iliq,isol) 117 118 !=== VARIABLES FOR INCA 119 INTEGER, SAVE, ALLOCATABLE :: conv_flg(:), & !--- Convection activation ; needed for INCA (nbtr) 120 pbl_flg(:) !--- Boundary layer activation ; needed for INCA (nbtr) 121 !$OMP THREADPRIVATE(conv_flg, pbl_flg) 122 123 #ifdef CPP_StratAer 5 USE strings_mod, ONLY : msg, fmsg, maxlen, cat, dispTable, int2str, bool2str, strStack, strParse, strIdx 6 USE readTracFiles_mod, ONLY : trac_type, readTracersFiles, tracers, setGeneration, itZonIso, nzone, tran0, isoZone, & 7 delPhase, niso, getKey, isot_type, processIsotopes, isotope, maxTableWidth, iqIsoPha, nphas, ixIso, isoPhas, & 8 addPhase, iH2O, addKey, isoSelect, testTracersFiles, isoKeys, indexUpdate, iqWIsoPha, nbIso, ntiso, isoName, isoCheck 9 IMPLICIT NONE 10 11 PRIVATE 12 13 !=== FOR TRACERS: 14 PUBLIC :: init_infotrac_phy !--- Initialization of the tracers 15 PUBLIC :: tracers, type_trac !--- Full tracers database, tracers type keyword 16 PUBLIC :: nqtot, nbtr, nqo, nqCO2, nqtottr !--- Main dimensions 17 PUBLIC :: conv_flg, pbl_flg !--- Convection & boundary layer activation keys 18 PUBLIC :: nbtr_bin, nbtr_sulgas !--- Number of aerosols bins and sulfur gases for StratAer model 19 PUBLIC :: id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat, id_TEST_strat 20 21 !=== FOR WATER 22 PUBLIC :: ivap, iliq, isol 23 !=== FOR ISOTOPES: General 24 PUBLIC :: isot_type, nbIso !--- Derived type, full isotopes families database + nb of families 25 PUBLIC :: isoSelect, ixIso !--- Isotopes family selection tool + selected family index 26 !=== FOR ISOTOPES: Specific to water 27 PUBLIC :: iH2O !--- H2O isotopes class index 28 !=== FOR ISOTOPES: Depending on the selected isotopes family 29 PUBLIC :: isotope, isoKeys !--- Selected isotopes database + associated keys (cf. getKey) 30 PUBLIC :: isoName, isoZone, isoPhas !--- Isotopes and tagging zones names, phases 31 PUBLIC :: niso, nzone, nphas, ntiso !--- " " numbers + isotopes & tagging tracers number 32 PUBLIC :: itZonIso !--- idx "it" (in "isoName(1:niso)") = function(tagging idx, isotope idx) 33 PUBLIC :: iqIsoPha !--- idx "iq" (in "qx") = function(isotope idx, phase idx) + aliases 34 PUBLIC :: iqWIsoPha !--- Same as iqIsoPha but with normal water phases 35 36 PUBLIC :: isoCheck !--- Run isotopes checking routines 37 !=== FOR BOTH TRACERS AND ISOTOPES 38 PUBLIC :: getKey !--- Get a key from "tracers" or "isotope" 39 40 !=== CONVENTIONS FOR TRACERS NUMBERS: 41 ! |--------------------+-----------------------+-----------------+---------------+----------------------------| 42 ! | water in different | water tagging | water isotopes | other tracers | additional tracers moments | 43 ! | phases: H2O_[gls] | isotopes | | | for higher order schemes | 44 ! |--------------------+-----------------------+-----------------+---------------+----------------------------| 45 ! | | | | | | 46 ! |<-- nqo -->|<-- nqo*niso* nzone -->|<-- nqo*niso -->|<-- nbtr -->|<-- (nmom) -->| 47 ! | | | | 48 ! | |<-- nqo*niso*(nzone+1) = nqo*ntiso -->|<-- nqtottr = nbtr + nmom -->| 49 ! | = nqtot - nqo*(ntiso+1) | 50 ! | | 51 ! |<-- nqtrue = nbtr + nqo*(ntiso+1) -->| | 52 ! | | 53 ! |<-- nqtot = nqtrue + nmom -->| 54 ! | | 55 ! |-----------------------------------------------------------------------------------------------------------| 56 ! NOTES FOR THIS TABLE: 57 ! * Used "niso", "nzone" and "ntiso" are components of "isotopes(ip)" for water (isotopes(ip)%parent == 'H2O'), 58 ! since water is so far the sole tracers family, except passive CO2, removed from the main tracers table. 59 ! * For water, "nqo" is equal to the more general field "isotopes(ip)%nphas". 60 ! * "niso", "nzone", "ntiso", "nphas" are defined for other isotopic tracers families, if any. 61 ! 62 !=== DERIVED TYPE EMBEDDING MOST OF THE TRACERS-RELATED QUANTITIES (LENGTH: nqtot) 63 ! Each entry is accessible using "%" sign. 64 ! |-------------+------------------------------------------------------+-------------+------------------------+ 65 ! | entry | Meaning | Former name | Possible values | 66 ! |-------------+------------------------------------------------------+-------------+------------------------+ 67 ! | name | Name (short) | tname | | 68 ! | gen0Name | Name of the 1st generation ancestor | / | | 69 ! | parent | Name of the parent | / | | 70 ! | longName | Long name (with adv. scheme suffix) for outputs | ttext | | 71 ! | type | Type (so far: tracer or tag) | / | tracer,tag | 72 ! | phase | Phases list ("g"as / "l"iquid / "s"olid) | / | [g][l][s] | 73 ! | component | Name(s) of the merged/cumulated section(s) | / | coma-separated names | 74 ! | iGeneration | Generation (>=1) | / | | 75 ! | iqParent | Index of the parent tracer | iqpere | 1:nqtot | 76 ! | iqDescen | Indexes of the childs (all generations) | iqfils | 1:nqtot | 77 ! | nqDescen | Number of the descendants (all generations) | nqdesc | 1:nqtot | 78 ! | nqChildren | Number of childs (1st generation only) | nqfils | 1:nqtot | 79 ! | keys | key/val pairs accessible with "getKey" routine | / | | 80 ! | isAdvected | advected tracers flag (.TRUE. if iadv >= 0) | / | nqtrue .TRUE. values | 81 ! | isInPhysics | tracers not extracted from the main table in physics | / | nqtottr .TRUE. values | 82 ! | iso_iGroup | Isotopes group index in isotopes(:) | / | 1:nbIso | 83 ! | iso_iName | Isotope name index in isotopes(iso_iGroup)%trac(:) | iso_indnum | 1:niso | 84 ! | iso_iZone | Isotope zone index in isotopes(iso_iGroup)%zone(:) | zone_num | 1:nzone | 85 ! | iso_iPhas | Isotope phase index in isotopes(iso_iGroup)%phas(:) | phase_num | 1:nphas | 86 ! +-------------+------------------------------------------------------+-------------+------------------------+ 87 ! 88 !=== DERIVED TYPE EMBEDDING MOST OF THE ISOTOPES-RELATED QUANTITIES (LENGTH: nbIso, NUMBER OF ISOTOPES FAMILIES) 89 ! Each entry is accessible using "%" sign. 90 ! |-----------------+--------------------------------------------------+--------------------+-----------------+ 91 ! | entry | length | Meaning | Former name | Possible values | 92 ! |-----------------+--------------------------------------------------+--------------------+-----------------+ 93 ! | parent | Parent tracer (isotopes family name) | | | 94 ! | keys | niso | Isotopes keys/values pairs list + number | | | 95 ! | trac | ntiso | Isotopes + tagging tracers list + number | / | ntraciso | | 96 ! | zone | nzone | Geographic tagging zones list + number | / | ntraceurs_zone | | 97 ! | phase | nphas | Phases list + number | | [g][l][s], 1:3 | 98 ! | iqIsoPha | Index in "qx" = f(name(1:ntiso)),phas) | iqiso | 1:nqtot | 99 ! | iqWIsoPha | Index in "qx" = f(name(1:ntiso)),phas) | iqiso | 1:nqtot | 100 ! | itZonIso | Index in "trac(1:ntiso)"= f(zone, name(1:niso)) | index_trac | 1:ntiso | 101 ! +-----------------+--------------------------------------------------+--------------------+-----------------+ 102 103 !=== DIMENSIONS OF THE TRACERS TABLES AND OTHER SCALAR VARIABLES 104 INTEGER, SAVE :: nqtot, & !--- Tracers nb in dynamics (incl. higher moments + H2O) 105 nbtr, & !--- Tracers nb in physics (excl. higher moments + H2O) 106 nqo, & !--- Number of water phases 107 nqtottr, & !--- Number of tracers passed to phytrac (TO BE DELETED ?) 108 nqCO2 !--- Number of tracers of CO2 (ThL) 109 CHARACTER(LEN = maxlen), SAVE :: type_trac !--- Keyword for tracers type(s) 110 !$OMP THREADPRIVATE(nqtot, nbtr, nqo, nqtottr, nqCO2, type_trac) 111 112 !=== INDICES OF WATER 113 INTEGER, SAVE :: ivap, iliq, isol ! Indices for vap, liq and ice 114 !$OMP THREADPRIVATE(ivap,iliq,isol) 115 116 !=== VARIABLES FOR INCA 117 INTEGER, SAVE, ALLOCATABLE :: conv_flg(:), & !--- Convection activation ; needed for INCA (nbtr) 118 pbl_flg(:) !--- Boundary layer activation ; needed for INCA (nbtr) 119 !$OMP THREADPRIVATE(conv_flg, pbl_flg) 120 124 121 !=== SPECIFIC TO STRATOSPHERIC AEROSOLS (CK/OB) 125 INTEGER, SAVE :: nbtr_bin, nbtr_sulgas !--- number of aerosols bins and sulfur gases for StratAer model 126 !$OMP THREADPRIVATE(nbtr_bin, nbtr_sulgas) 127 INTEGER, SAVE :: id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat, id_TEST_strat 128 !$OMP THREADPRIVATE(id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat, id_TEST_strat) 129 #endif 122 INTEGER, SAVE :: nbtr_bin, nbtr_sulgas !--- number of aerosols bins and sulfur gases for StratAer model 123 !$OMP THREADPRIVATE(nbtr_bin, nbtr_sulgas) 124 INTEGER, SAVE :: id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat, id_TEST_strat 125 !$OMP THREADPRIVATE(id_OCS_strat, id_SO2_strat, id_H2SO4_strat, id_BIN01_strat, id_TEST_strat) 130 126 131 127 CONTAINS 132 128 133 SUBROUTINE init_infotrac_phy134 USE ioipsl_getin_p_mod, ONLY: getin_p129 SUBROUTINE init_infotrac_phy 130 USE ioipsl_getin_p_mod, ONLY : getin_p 135 131 #ifdef REPROBUS 136 132 USE CHEM_REP, ONLY: Init_chem_rep_trac 137 133 #endif 138 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA 139 IMPLICIT NONE 140 !============================================================================================================================== 141 ! 142 ! Auteur: P. Le Van /L. Fairhead/F.Hourdin 143 ! ------- 144 ! 145 ! Modifications: 146 ! -------------- 147 ! 05/94: F.Forget Modif special traceur 148 ! 02/02: M-A Filiberti Lecture de traceur.def 149 ! 01/22: D. Cugnet Nouveaux tracer.def et tracer_*.def + encapsulation (types trac_type et isot_type) 150 ! 151 ! Objet: 152 ! ------ 153 ! GCM LMD nouvelle grille 154 ! 155 !============================================================================================================================== 156 ! ... modification de l'integration de q ( 26/04/94 ) .... 157 !------------------------------------------------------------------------------------------------------------------------------ 158 ! Declarations: 159 INCLUDE "dimensions.h" 160 INCLUDE "iniprint.h" 161 162 !------------------------------------------------------------------------------------------------------------------------------ 163 ! Local variables 164 INTEGER, ALLOCATABLE :: hadv(:), vadv(:) !--- Horizontal/vertical transport scheme number 165 INTEGER, ALLOCATABLE :: had (:), hadv_inca(:), conv_flg_inca(:), &!--- Variables specific to INCA 166 vad (:), vadv_inca(:), pbl_flg_inca(:) 167 CHARACTER(LEN=8), ALLOCATABLE :: solsym_inca(:) !--- Tracers names for INCA 168 INTEGER :: nqINCA 169 #ifdef CPP_StratAer 170 CHARACTER(LEN=maxlen), ALLOCATABLE :: tnames(:) 171 #endif 172 CHARACTER(LEN=2) :: suff(9) !--- Suffixes for schemes of order 3 or 4 (Prather) 173 CHARACTER(LEN=3) :: descrq(30) !--- Advection scheme description tags 174 CHARACTER(LEN=maxlen) :: msg1, texp, ttp !--- String for messages and expanded tracers type 175 INTEGER :: fType !--- Tracers description file type ; 0: none 176 !--- 1/2/3: "traceur.def"/"tracer.def"/"tracer_*.def" 177 INTEGER :: nqtrue !--- Tracers nb from tracer.def (no higher order moments) 178 INTEGER :: iad !--- Advection scheme number 179 INTEGER :: iq, jq, nt, im, nm, k !--- Indexes and temporary variables 180 LOGICAL :: lerr, lInit 181 TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:) 182 TYPE(trac_type), POINTER :: t1, t(:) 183 CHARACTER(LEN=maxlen), ALLOCATABLE :: types_trac(:) !--- Keyword for tracers type(s), parsed version 184 185 CHARACTER(LEN=*), PARAMETER :: modname="init_infotrac_phy" 186 !------------------------------------------------------------------------------------------------------------------------------ 187 ! Initialization : 188 !------------------------------------------------------------------------------------------------------------------------------ 189 suff = ['x ','y ','z ','xx','xy','xz','yy','yz','zz'] 190 descrq( 1:30) = ' ' 191 descrq( 1: 2) = ['LMV','BAK'] 192 descrq(10:20) = ['VL1','VLP','FH1','FH2','VLH',' ','PPM','PPS','PPP',' ','SLP'] 193 descrq(30) = 'PRA' 194 195 CALL getin_p('type_trac',type_trac) 196 197 lerr=strParse(type_trac, '|', types_trac, n=nt) 198 IF (nt > 1) THEN 134 USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_INCA, CPPKEY_STRATAER 135 IMPLICIT NONE 136 !============================================================================================================================== 137 ! 138 ! Auteur: P. Le Van /L. Fairhead/F.Hourdin 139 ! ------- 140 ! 141 ! Modifications: 142 ! -------------- 143 ! 05/94: F.Forget Modif special traceur 144 ! 02/02: M-A Filiberti Lecture de traceur.def 145 ! 01/22: D. Cugnet Nouveaux tracer.def et tracer_*.def + encapsulation (types trac_type et isot_type) 146 ! 147 ! Objet: 148 ! ------ 149 ! GCM LMD nouvelle grille 150 ! 151 !============================================================================================================================== 152 ! ... modification de l'integration de q ( 26/04/94 ) .... 153 !------------------------------------------------------------------------------------------------------------------------------ 154 ! Declarations: 155 INCLUDE "dimensions.h" 156 INCLUDE "iniprint.h" 157 158 !------------------------------------------------------------------------------------------------------------------------------ 159 ! Local variables 160 INTEGER, ALLOCATABLE :: hadv(:), vadv(:) !--- Horizontal/vertical transport scheme number 161 INTEGER, ALLOCATABLE :: had (:), hadv_inca(:), conv_flg_inca(:), &!--- Variables specific to INCA 162 vad (:), vadv_inca(:), pbl_flg_inca(:) 163 CHARACTER(LEN = 8), ALLOCATABLE :: solsym_inca(:) !--- Tracers names for INCA 164 INTEGER :: nqINCA 165 CHARACTER(LEN = maxlen), ALLOCATABLE :: tnames(:) 166 CHARACTER(LEN = 2) :: suff(9) !--- Suffixes for schemes of order 3 or 4 (Prather) 167 CHARACTER(LEN = 3) :: descrq(30) !--- Advection scheme description tags 168 CHARACTER(LEN = maxlen) :: msg1, texp, ttp !--- String for messages and expanded tracers type 169 INTEGER :: fType !--- Tracers description file type ; 0: none 170 !--- 1/2/3: "traceur.def"/"tracer.def"/"tracer_*.def" 171 INTEGER :: nqtrue !--- Tracers nb from tracer.def (no higher order moments) 172 INTEGER :: iad !--- Advection scheme number 173 INTEGER :: iq, jq, nt, im, nm, k !--- Indexes and temporary variables 174 LOGICAL :: lerr, lInit 175 TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:) 176 TYPE(trac_type), POINTER :: t1, t(:) 177 CHARACTER(LEN = maxlen), ALLOCATABLE :: types_trac(:) !--- Keyword for tracers type(s), parsed version 178 179 CHARACTER(LEN = *), PARAMETER :: modname = "init_infotrac_phy" 180 !------------------------------------------------------------------------------------------------------------------------------ 181 ! Initialization : 182 !------------------------------------------------------------------------------------------------------------------------------ 183 suff = ['x ', 'y ', 'z ', 'xx', 'xy', 'xz', 'yy', 'yz', 'zz'] 184 descrq(1:30) = ' ' 185 descrq(1:2) = ['LMV', 'BAK'] 186 descrq(10:20) = ['VL1', 'VLP', 'FH1', 'FH2', 'VLH', ' ', 'PPM', 'PPS', 'PPP', ' ', 'SLP'] 187 descrq(30) = 'PRA' 188 189 CALL getin_p('type_trac', type_trac) 190 191 lerr = strParse(type_trac, '|', types_trac, n = nt) 192 IF (nt > 1) THEN 199 193 IF (nt > 2) CALL abort_physic(modname, 'you need to modify type_trac, this version is not supported by lmdz', 1) 200 IF (nt == 2) type_trac=types_trac(2) 201 ENDIF 202 203 204 CALL msg('type_trac = "'//TRIM(type_trac)//'"', modname) 205 lInit = .NOT.ALLOCATED(tracers) 206 207 !############################################################################################################################## 208 IF(lInit) THEN !=== SKIPED IF ALREADY DONE IN dyn3d_common/infotrac #### 209 !############################################################################################################################## 210 !--- MESSAGE ABOUT THE CHOSEN CONFIGURATION 211 msg1 = 'For type_trac = "'//TRIM(type_trac)//'":' 212 SELECT CASE(type_trac) 213 CASE('inca'); CALL msg(TRIM(msg1)//' coupling with INCA chemistry model', modname) 214 CASE('inco'); CALL msg(TRIM(msg1)//' coupling jointly with INCA and CO2 cycle', modname) 215 CASE('repr'); CALL msg(TRIM(msg1)//' coupling with REPROBUS chemistry model', modname) 216 CASE('co2i'); CALL msg(TRIM(msg1)//' you have chosen to run with CO2 cycle', modname) 217 CASE('coag'); CALL msg(TRIM(msg1)//' tracers are treated for COAGULATION tests', modname) 218 CASE('lmdz'); CALL msg(TRIM(msg1)//' tracers are treated in LMDZ only', modname) 219 CASE DEFAULT; CALL abort_physic(modname,'type_trac='//TRIM(type_trac)//' not possible yet.',1) 220 END SELECT 221 222 !--- COHERENCE TEST BETWEEN "type_trac" AND PREPROCESSING KEYS 223 SELECT CASE(type_trac) 194 IF (nt == 2) type_trac = types_trac(2) 195 ENDIF 196 197 CALL msg('type_trac = "' // TRIM(type_trac) // '"', modname) 198 lInit = .NOT.ALLOCATED(tracers) 199 200 !############################################################################################################################## 201 IF(lInit) THEN !=== SKIPED IF ALREADY DONE IN dyn3d_common/infotrac #### 202 !############################################################################################################################## 203 !--- MESSAGE ABOUT THE CHOSEN CONFIGURATION 204 msg1 = 'For type_trac = "' // TRIM(type_trac) // '":' 205 SELECT CASE(type_trac) 206 CASE('inca'); CALL msg(TRIM(msg1) // ' coupling with INCA chemistry model', modname) 207 CASE('inco'); CALL msg(TRIM(msg1) // ' coupling jointly with INCA and CO2 cycle', modname) 208 CASE('repr'); CALL msg(TRIM(msg1) // ' coupling with REPROBUS chemistry model', modname) 209 CASE('co2i'); CALL msg(TRIM(msg1) // ' you have chosen to run with CO2 cycle', modname) 210 CASE('coag'); CALL msg(TRIM(msg1) // ' tracers are treated for COAGULATION tests', modname) 211 CASE('lmdz'); CALL msg(TRIM(msg1) // ' tracers are treated in LMDZ only', modname) 212 CASE DEFAULT; CALL abort_physic(modname, 'type_trac=' // TRIM(type_trac) // ' not possible yet.', 1) 213 END SELECT 214 215 !--- COHERENCE TEST BETWEEN "type_trac" AND PREPROCESSING KEYS 216 SELECT CASE(type_trac) 224 217 CASE('inca', 'inco') 225 IF (CPPKEY_INCA) THEN226 CALL abort_physic(modname, 'You must add cpp key INCA and compile with INCA code', 1)227 END IF218 IF (CPPKEY_INCA) THEN 219 CALL abort_physic(modname, 'You must add cpp key INCA and compile with INCA code', 1) 220 END IF 228 221 CASE('repr') 229 222 #ifndef REPROBUS 230 223 CALL abort_physic(modname, 'You must add cpp key REPROBUS and compile with REPROBUS code', 1) 231 224 #endif 232 225 CASE('coag') 233 #ifndef CPP_StratAer 234 CALL abort_physic(modname, 'You must add cpp key StratAer and compile with StratAer code', 1)235 #endif 236 END SELECT237 !##############################################################################################################################238 END IF239 !##############################################################################################################################240 241 nqCO2 = COUNT( [type_trac == 'inco', type_trac == 'co2i'])242 243 !==============================================================================================================================244 ! 1) Get the numbers of: true (first order only) tracers "nqtrue", water tracers "nqo" (vapor/liquid/solid)245 !==============================================================================================================================246 texp = type_trac !=== EXPANDED VERSION OF "type_trac", WITH "|" SEPARATOR247 IF(texp == 'inco') texp = 'co2i|inca'248 IF(texp /= 'lmdz') texp = 'lmdz|'//TRIM(texp)249 250 !=== DETERMINE THE TYPE OF THE INPUT TRACERS DESCRIPTION FILE251 IF(testTracersFiles(modname, texp, fType, lInit)) CALL abort_physic(modname, 'problem with tracers file(s)',1)252 253 ttp = type_trac; IF(fType /= 1) ttp = texp254 255 !##############################################################################################################################256 IF(lInit) THEN257 IF(readTracersFiles(ttp, lRepr =type_trac=='repr')) CALL abort_physic(modname, 'problem with tracers file(s)',1)258 ELSE226 IF (.NOT. CPPKEY_STRATAER) THEN 227 CALL abort_physic(modname, 'You must add cpp key StratAer and compile with StratAer code', 1) 228 END IF 229 END SELECT 230 !############################################################################################################################## 231 END IF 232 !############################################################################################################################## 233 234 nqCO2 = COUNT([type_trac == 'inco', type_trac == 'co2i']) 235 236 !============================================================================================================================== 237 ! 1) Get the numbers of: true (first order only) tracers "nqtrue", water tracers "nqo" (vapor/liquid/solid) 238 !============================================================================================================================== 239 texp = type_trac !=== EXPANDED VERSION OF "type_trac", WITH "|" SEPARATOR 240 IF(texp == 'inco') texp = 'co2i|inca' 241 IF(texp /= 'lmdz') texp = 'lmdz|' // TRIM(texp) 242 243 !=== DETERMINE THE TYPE OF THE INPUT TRACERS DESCRIPTION FILE 244 IF(testTracersFiles(modname, texp, fType, lInit)) CALL abort_physic(modname, 'problem with tracers file(s)', 1) 245 246 ttp = type_trac; IF(fType /= 1) ttp = texp 247 248 !############################################################################################################################## 249 IF(lInit) THEN 250 IF(readTracersFiles(ttp, lRepr = type_trac=='repr')) CALL abort_physic(modname, 'problem with tracers file(s)', 1) 251 ELSE 259 252 CALL msg('No tracers description file(s) reading needed: already done in the dynamics', modname) 260 END IF261 !##############################################################################################################################262 263 !---------------------------------------------------------------------------------------------------------------------------264 IF(fType == 0) CALL abort_physic(modname, 'Missing tracers file: "traceur.def", "tracer.def" or "tracer_<keyword>.def file.',1)265 !---------------------------------------------------------------------------------------------------------------------------266 IF(fType == 1 .AND. ANY(['inca','inco']==type_trac) .AND. lInit) THEN !=== FOUND OLD STYLE INCA "traceur.def"267 !---------------------------------------------------------------------------------------------------------------------------268 IF (CPPKEY_INCA) THEN269 nqo = SIZE(tracers) - nqCO2270 CALL Init_chem_inca_trac(nqINCA) !--- Get nqINCA from INCA271 nbtr = nqINCA + nqCO2 !--- Number of tracers passed to phytrac272 nqtrue = nbtr + nqo !--- Total number of "true" tracers273 IF(ALL([2,3] /= nqo)) CALL abort_physic(modname, 'Only 2 or 3 water phases allowed ; found nqo='//TRIM(int2str(nqo)), 1)274 ALLOCATE(hadv(nqtrue), hadv_inca(nqINCA), conv_flg_inca(nqINCA), solsym_inca(nqINCA))275 ALLOCATE(vadv(nqtrue), vadv_inca(nqINCA),pbl_flg_inca(nqINCA))276 CALL init_transport(solsym_inca, conv_flg_inca, pbl_flg_inca, hadv_inca, vadv_inca)277 ALLOCATE(ttr(nqtrue))278 ttr(1:nqo+nqCO2)= tracers279 ttr(1 : nqo)%component = 'lmdz'280 ttr(1+nqo:nqCO2+nqo)%component = 'co2i'281 ttr(1+nqo+nqCO2:nqtrue)%component = 'inca'282 ttr(1+nqo :nqtrue)%name = [('CO2 ', k=1, nqCO2), solsym_inca]283 ttr(1+nqo+nqCO2:nqtrue)%parent= tran0284 ttr(1+nqo+nqCO2:nqtrue)%phase= 'g'285 lerr = getKey('hadv', had, ky=tracers(:)%keys)286 lerr = getKey('vadv', vad, ky=tracers(:)%keys)287 hadv(1:nqo+nqCO2) = had(:); hadv(1+nqo+nqCO2:nqtrue) = hadv_inca288 vadv(1:nqo+nqCO2) = vad(:); vadv(1+nqo+nqCO2:nqtrue) = vadv_inca289 CALL MOVE_ALLOC(FROM=ttr, TO=tracers)290 DO iq = 1, nqtrue291 t1 => tracers(iq)292 CALL addKey('name', t1%name,t1%keys)293 CALL addKey('component', t1%component, t1%keys)294 CALL addKey('parent', t1%parent,t1%keys)295 CALL addKey('phase', t1%phase,t1%keys)296 END DO297 IF(setGeneration(tracers)) CALL abort_physic(modname,'See below',1) !- SET FIELDS %iGeneration, %gen0Name298 DEALLOCATE(had, hadv_inca, vad, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca)299 END IF300 !---------------------------------------------------------------------------------------------------------------------------301 ELSE !=== OTHER CASES (OLD OR NEW FORMAT, NO INCA MODULE)302 !---------------------------------------------------------------------------------------------------------------------------303 nqo =COUNT(delPhase(tracers(:)%name) == 'H2O' &304 253 END IF 254 !############################################################################################################################## 255 256 !--------------------------------------------------------------------------------------------------------------------------- 257 IF(fType == 0) CALL abort_physic(modname, 'Missing tracers file: "traceur.def", "tracer.def" or "tracer_<keyword>.def file.', 1) 258 !--------------------------------------------------------------------------------------------------------------------------- 259 IF(fType == 1 .AND. ANY(['inca', 'inco']==type_trac) .AND. lInit) THEN !=== FOUND OLD STYLE INCA "traceur.def" 260 !--------------------------------------------------------------------------------------------------------------------------- 261 IF (CPPKEY_INCA) THEN 262 nqo = SIZE(tracers) - nqCO2 263 CALL Init_chem_inca_trac(nqINCA) !--- Get nqINCA from INCA 264 nbtr = nqINCA + nqCO2 !--- Number of tracers passed to phytrac 265 nqtrue = nbtr + nqo !--- Total number of "true" tracers 266 IF(ALL([2, 3] /= nqo)) CALL abort_physic(modname, 'Only 2 or 3 water phases allowed ; found nqo=' // TRIM(int2str(nqo)), 1) 267 ALLOCATE(hadv(nqtrue), hadv_inca(nqINCA), conv_flg_inca(nqINCA), solsym_inca(nqINCA)) 268 ALLOCATE(vadv(nqtrue), vadv_inca(nqINCA), pbl_flg_inca(nqINCA)) 269 CALL init_transport(solsym_inca, conv_flg_inca, pbl_flg_inca, hadv_inca, vadv_inca) 270 ALLOCATE(ttr(nqtrue)) 271 ttr(1:nqo + nqCO2) = tracers 272 ttr(1:nqo)%component = 'lmdz' 273 ttr(1 + nqo:nqCO2 + nqo)%component = 'co2i' 274 ttr(1 + nqo + nqCO2:nqtrue)%component = 'inca' 275 ttr(1 + nqo:nqtrue)%name = [('CO2 ', k = 1, nqCO2), solsym_inca] 276 ttr(1 + nqo + nqCO2:nqtrue)%parent = tran0 277 ttr(1 + nqo + nqCO2:nqtrue)%phase = 'g' 278 lerr = getKey('hadv', had, ky = tracers(:)%keys) 279 lerr = getKey('vadv', vad, ky = tracers(:)%keys) 280 hadv(1:nqo + nqCO2) = had(:); hadv(1 + nqo + nqCO2:nqtrue) = hadv_inca 281 vadv(1:nqo + nqCO2) = vad(:); vadv(1 + nqo + nqCO2:nqtrue) = vadv_inca 282 CALL MOVE_ALLOC(FROM = ttr, TO = tracers) 283 DO iq = 1, nqtrue 284 t1 => tracers(iq) 285 CALL addKey('name', t1%name, t1%keys) 286 CALL addKey('component', t1%component, t1%keys) 287 CALL addKey('parent', t1%parent, t1%keys) 288 CALL addKey('phase', t1%phase, t1%keys) 289 END DO 290 IF(setGeneration(tracers)) CALL abort_physic(modname, 'See below', 1) !- SET FIELDS %iGeneration, %gen0Name 291 DEALLOCATE(had, hadv_inca, vad, vadv_inca, conv_flg_inca, pbl_flg_inca, solsym_inca) 292 END IF 293 !--------------------------------------------------------------------------------------------------------------------------- 294 ELSE !=== OTHER CASES (OLD OR NEW FORMAT, NO INCA MODULE) 295 !--------------------------------------------------------------------------------------------------------------------------- 296 nqo = COUNT(delPhase(tracers(:)%name) == 'H2O' & 297 .AND. tracers(:)%component == 'lmdz') !--- Number of water phases 305 298 nqtrue = SIZE(tracers) !--- Total number of "true" tracers 306 nbtr = nqtrue-COUNT(delPhase(tracers(:)%gen0Name) == 'H2O' &307 308 IF (CPPKEY_INCA) THEN309 nqINCA = COUNT(tracers(:)%component == 'inca')310 END IF311 lerr = getKey('hadv', hadv, ky =tracers(:)%keys)312 lerr = getKey('vadv', vadv, ky =tracers(:)%keys)313 !---------------------------------------------------------------------------------------------------------------------------314 END IF315 !---------------------------------------------------------------------------------------------------------------------------316 317 !--- Transfert the number of tracers to Reprobus299 nbtr = nqtrue - COUNT(delPhase(tracers(:)%gen0Name) == 'H2O' & 300 .AND. tracers(:)%component == 'lmdz') !--- Number of tracers passed to phytrac 301 IF (CPPKEY_INCA) THEN 302 nqINCA = COUNT(tracers(:)%component == 'inca') 303 END IF 304 lerr = getKey('hadv', hadv, ky = tracers(:)%keys) 305 lerr = getKey('vadv', vadv, ky = tracers(:)%keys) 306 !--------------------------------------------------------------------------------------------------------------------------- 307 END IF 308 !--------------------------------------------------------------------------------------------------------------------------- 309 310 !--- Transfert the number of tracers to Reprobus 318 311 #ifdef REPROBUS 319 312 CALL Init_chem_rep_trac(nbtr, nqo, tracers(:)%name) 320 313 #endif 321 314 322 !##############################################################################################################################323 IF(lInit) THEN !=== SKIPED IF ALREADY DONE IN dyn3d_common/infotrac ####324 !##############################################################################################################################325 326 !==============================================================================================================================327 ! 2) Calculate nqtot, number of tracers needed (greater if advection schemes 20 or 30 have been chosen).328 !==============================================================================================================================329 DO iq = 1, nqtrue330 IF( hadv(iq)<20 .OR. (ANY(hadv(iq)==[20,30]) .AND. hadv(iq)==vadv(iq))) CYCLE331 WRITE(msg1,'("The choice hadv=",i0,", vadv=",i0,a)')hadv(iq),vadv(iq),' for "'//TRIM(tracers(iq)%name)//'" is not available'332 CALL abort_physic(modname, TRIM(msg1), 1)333 END DO334 nqtot = COUNT( hadv< 20 .AND. vadv< 20) & !--- No additional tracer335 + 4*COUNT( hadv==20 .AND. vadv==20) & !--- 3 additional tracers336 + 10*COUNT( hadv==30 .AND. vadv==30) !--- 9 additional tracers337 338 !--- More tracers due to the choice of advection scheme => assign total number of tracers339 IF( nqtot /= nqtrue) THEN340 CALL msg('The choice of advection scheme for one or more tracers makes it necessary to add tracers')341 CALL msg('The number of true tracers is '//TRIM(int2str(nqtrue)))342 CALL msg('The total number of tracers needed is '//TRIM(int2str(nqtot)))343 END IF344 345 !==============================================================================================================================346 ! 3) Determine the advection scheme ; needed to compute the full tracers list, the long names, nqtot and %isAdvected347 !==============================================================================================================================348 ALLOCATE(ttr(nqtot))349 jq = nqtrue+1; tracers(:)%iadv = -1350 DO iq = 1, nqtrue351 t1 => tracers(iq)352 353 !--- VERIFY THE CHOICE OF ADVECTION SCHEME354 iad = -1355 IF(hadv(iq) == vadv(iq)) iad = hadv(iq)356 IF(hadv(iq)==10 .AND. vadv(iq)==16) iad = 11357 WRITE(msg1,'("Bad choice of advection scheme for ",a,": hadv = ",i0,", vadv = ",i0)')TRIM(t1%name), hadv(iq), vadv(iq)358 IF(iad == -1) CALL abort_physic(modname, msg1, 1)359 360 !--- SET FIELDS %longName, %isAdvected, %isInPhysics361 t1%longName = t1%name; IF(iad > 0) t1%longName=TRIM(t1%name)//descrq(iad)362 t1%isAdvected = iad >= 0363 t1%isInPhysics= delPhase(t1%gen0Name) /= 'H2O' &364 365 ttr(iq)= t1366 367 !--- DEFINE THE HIGHER ORDER TRACERS, IF ANY368 nm = 0369 IF(iad == 20) nm = 3 !--- 2nd order scheme370 IF(iad == 30) nm = 9 !--- 3rd order scheme371 IF(nm == 0) CYCLE !--- No higher moments372 ttr(jq+1:jq+nm)= t1373 ttr(jq+1:jq+nm)%name = [(TRIM(t1%name) //'-'//TRIM(suff(im)), im=1, nm) ]374 ttr(jq+1:jq+nm)%parent = [(TRIM(t1%parent) //'-'//TRIM(suff(im)), im=1, nm) ]375 ttr(jq+1:jq+nm)%longName = [(TRIM(t1%longName)//'-'//TRIM(suff(im)), im=1, nm) ]376 ttr(jq+1:jq+nm)%isAdvected = [(.FALSE., im=1, nm) ]377 jq = jq + nm378 END DO379 DEALLOCATE(hadv, vadv)380 CALL MOVE_ALLOC(FROM=ttr, TO=tracers)381 382 !--- SET FIELDS %iqParent, %nqChildren, %iGeneration, %iqDescen, %nqDescen383 IF(indexUpdate(tracers)) CALL abort_gcm(modname, 'problem when processing isotopes parameters', 1)384 385 !##############################################################################################################################386 END IF387 !##############################################################################################################################388 389 !##############################################################################################################################390 IF(.NOT.lInit) THEN391 !##############################################################################################################################392 nqtot = SIZE(tracers)393 !##############################################################################################################################394 ELSE395 !##############################################################################################################################396 397 !=== READ PHYSICAL PARAMETERS FOR ISOTOPES398 niso = 0; nzone = 0; nphas = nqo; ntiso = 0; isoCheck = .FALSE.399 IF(processIsotopes()) CALL abort_physic(modname, 'Problem when processing isotopes parameters', 1)400 401 !##############################################################################################################################402 END IF403 !##############################################################################################################################404 !--- Convection / boundary layer activation for all tracers405 IF (.NOT.ALLOCATED(conv_flg)) ALLOCATE(conv_flg(nbtr)); conv_flg(1:nbtr) = 1406 IF (.NOT.ALLOCATED(pbl_flg)) ALLOCATE(pbl_flg(nbtr)); pbl_flg(1:nbtr) = 1407 408 !--- Note: nqtottr can differ from nbtr when nmom/=0409 nqtottr = nqtot - COUNT(delPhase(tracers%gen0Name) == 'H2O' .AND. tracers%component == 'lmdz')410 IF(COUNT(tracers%iso_iName == 0) - COUNT(delPhase(tracers%name) == 'H2O' .AND. tracers%component == 'lmdz') /= nqtottr) &411 CALL abort_physic(modname, 'problem with the computation of nqtottr', 1)412 413 !=== DISPLAY THE RESULTS414 CALL msg('nqo = '//TRIM(int2str(nqo)),modname)415 CALL msg('nbtr = '//TRIM(int2str(nbtr)),modname)416 CALL msg('nqtrue = '//TRIM(int2str(nqtrue)), modname)417 CALL msg('nqtot = '//TRIM(int2str(nqtot)),modname)418 CALL msg('niso = '//TRIM(int2str(niso)),modname)419 CALL msg('ntiso = '//TRIM(int2str(ntiso)),modname)420 IF (CPPKEY_INCA) THEN421 CALL msg('nqCO2 = ' //TRIM(int2str(nqCO2)),modname)422 CALL msg('nqINCA = ' //TRIM(int2str(nqINCA)), modname)423 END IF424 t => tracers425 CALL msg('Information stored in infotrac_phy :', modname)426 IF(dispTable('issssssssiiiiiiii', ['iq ', 'name', 'lNam', 'g0Nm', 'prnt', 'type', 'phas', 'comp',&427 'isPh', 'iGen', 'iqPr', 'nqDe', 'nqCh', 'iGrp', 'iNam', 'iZon', 'iPha'],&428 cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, t%component, bool2str(t%isInPhysics)),&429 cat([(iq, iq=1, nqtot)], t%iGeneration, t%iqParent, t%nqDescen, t%nqChildren, t%iso_iGroup,&430 t%iso_iName, t%iso_iZone, t%iso_iPhase), nColMax=maxTableWidth, nHead=2, sub=modname)) &431 CALL abort_physic(modname, "problem with the tracers table content", 1)432 IF(niso > 0) THEN433 CALL msg('Where, for isotopes family "' //TRIM(isotope%parent)//'":', modname)434 CALL msg(' isoKeys%name = ' //strStack(isoKeys%name), modname)435 CALL msg(' isoName = ' //strStack(isoName),modname)436 CALL msg(' isoZone = ' //strStack(isoZone),modname)437 CALL msg(' isoPhas = ' //TRIM(isoPhas),modname)438 ELSE315 !############################################################################################################################## 316 IF(lInit) THEN !=== SKIPED IF ALREADY DONE IN dyn3d_common/infotrac #### 317 !############################################################################################################################## 318 319 !============================================================================================================================== 320 ! 2) Calculate nqtot, number of tracers needed (greater if advection schemes 20 or 30 have been chosen). 321 !============================================================================================================================== 322 DO iq = 1, nqtrue 323 IF(hadv(iq)<20 .OR. (ANY(hadv(iq)==[20, 30]) .AND. hadv(iq)==vadv(iq))) CYCLE 324 WRITE(msg1, '("The choice hadv=",i0,", vadv=",i0,a)')hadv(iq), vadv(iq), ' for "' // TRIM(tracers(iq)%name) // '" is not available' 325 CALL abort_physic(modname, TRIM(msg1), 1) 326 END DO 327 nqtot = COUNT(hadv< 20 .AND. vadv< 20) & !--- No additional tracer 328 + 4 * COUNT(hadv==20 .AND. vadv==20) & !--- 3 additional tracers 329 + 10 * COUNT(hadv==30 .AND. vadv==30) !--- 9 additional tracers 330 331 !--- More tracers due to the choice of advection scheme => assign total number of tracers 332 IF(nqtot /= nqtrue) THEN 333 CALL msg('The choice of advection scheme for one or more tracers makes it necessary to add tracers') 334 CALL msg('The number of true tracers is ' // TRIM(int2str(nqtrue))) 335 CALL msg('The total number of tracers needed is ' // TRIM(int2str(nqtot))) 336 END IF 337 338 !============================================================================================================================== 339 ! 3) Determine the advection scheme ; needed to compute the full tracers list, the long names, nqtot and %isAdvected 340 !============================================================================================================================== 341 ALLOCATE(ttr(nqtot)) 342 jq = nqtrue + 1; tracers(:)%iadv = -1 343 DO iq = 1, nqtrue 344 t1 => tracers(iq) 345 346 !--- VERIFY THE CHOICE OF ADVECTION SCHEME 347 iad = -1 348 IF(hadv(iq) == vadv(iq)) iad = hadv(iq) 349 IF(hadv(iq)==10 .AND. vadv(iq)==16) iad = 11 350 WRITE(msg1, '("Bad choice of advection scheme for ",a,": hadv = ",i0,", vadv = ",i0)')TRIM(t1%name), hadv(iq), vadv(iq) 351 IF(iad == -1) CALL abort_physic(modname, msg1, 1) 352 353 !--- SET FIELDS %longName, %isAdvected, %isInPhysics 354 t1%longName = t1%name; IF(iad > 0) t1%longName = TRIM(t1%name) // descrq(iad) 355 t1%isAdvected = iad >= 0 356 t1%isInPhysics = delPhase(t1%gen0Name) /= 'H2O' & 357 .OR. t1%component /= 'lmdz' !=== OTHER EXCEPTIONS TO BE ADDED: CO2i, SURSATURATED WATER CLOUD... 358 ttr(iq) = t1 359 360 !--- DEFINE THE HIGHER ORDER TRACERS, IF ANY 361 nm = 0 362 IF(iad == 20) nm = 3 !--- 2nd order scheme 363 IF(iad == 30) nm = 9 !--- 3rd order scheme 364 IF(nm == 0) CYCLE !--- No higher moments 365 ttr(jq + 1:jq + nm) = t1 366 ttr(jq + 1:jq + nm)%name = [(TRIM(t1%name) // '-' // TRIM(suff(im)), im = 1, nm) ] 367 ttr(jq + 1:jq + nm)%parent = [(TRIM(t1%parent) // '-' // TRIM(suff(im)), im = 1, nm) ] 368 ttr(jq + 1:jq + nm)%longName = [(TRIM(t1%longName) // '-' // TRIM(suff(im)), im = 1, nm) ] 369 ttr(jq + 1:jq + nm)%isAdvected = [(.FALSE., im = 1, nm) ] 370 jq = jq + nm 371 END DO 372 DEALLOCATE(hadv, vadv) 373 CALL MOVE_ALLOC(FROM = ttr, TO = tracers) 374 375 !--- SET FIELDS %iqParent, %nqChildren, %iGeneration, %iqDescen, %nqDescen 376 IF(indexUpdate(tracers)) CALL abort_gcm(modname, 'problem when processing isotopes parameters', 1) 377 378 !############################################################################################################################## 379 END IF 380 !############################################################################################################################## 381 382 !############################################################################################################################## 383 IF(.NOT.lInit) THEN 384 !############################################################################################################################## 385 nqtot = SIZE(tracers) 386 !############################################################################################################################## 387 ELSE 388 !############################################################################################################################## 389 390 !=== READ PHYSICAL PARAMETERS FOR ISOTOPES 391 niso = 0; nzone = 0; nphas = nqo; ntiso = 0; isoCheck = .FALSE. 392 IF(processIsotopes()) CALL abort_physic(modname, 'Problem when processing isotopes parameters', 1) 393 394 !############################################################################################################################## 395 END IF 396 !############################################################################################################################## 397 !--- Convection / boundary layer activation for all tracers 398 IF (.NOT.ALLOCATED(conv_flg)) ALLOCATE(conv_flg(nbtr)); conv_flg(1:nbtr) = 1 399 IF (.NOT.ALLOCATED(pbl_flg)) ALLOCATE(pbl_flg(nbtr)); pbl_flg(1:nbtr) = 1 400 401 !--- Note: nqtottr can differ from nbtr when nmom/=0 402 nqtottr = nqtot - COUNT(delPhase(tracers%gen0Name) == 'H2O' .AND. tracers%component == 'lmdz') 403 IF(COUNT(tracers%iso_iName == 0) - COUNT(delPhase(tracers%name) == 'H2O' .AND. tracers%component == 'lmdz') /= nqtottr) & 404 CALL abort_physic(modname, 'problem with the computation of nqtottr', 1) 405 406 !=== DISPLAY THE RESULTS 407 CALL msg('nqo = ' // TRIM(int2str(nqo)), modname) 408 CALL msg('nbtr = ' // TRIM(int2str(nbtr)), modname) 409 CALL msg('nqtrue = ' // TRIM(int2str(nqtrue)), modname) 410 CALL msg('nqtot = ' // TRIM(int2str(nqtot)), modname) 411 CALL msg('niso = ' // TRIM(int2str(niso)), modname) 412 CALL msg('ntiso = ' // TRIM(int2str(ntiso)), modname) 413 IF (CPPKEY_INCA) THEN 414 CALL msg('nqCO2 = ' // TRIM(int2str(nqCO2)), modname) 415 CALL msg('nqINCA = ' // TRIM(int2str(nqINCA)), modname) 416 END IF 417 t => tracers 418 CALL msg('Information stored in infotrac_phy :', modname) 419 IF(dispTable('issssssssiiiiiiii', ['iq ', 'name', 'lNam', 'g0Nm', 'prnt', 'type', 'phas', 'comp', & 420 'isPh', 'iGen', 'iqPr', 'nqDe', 'nqCh', 'iGrp', 'iNam', 'iZon', 'iPha'], & 421 cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, t%component, bool2str(t%isInPhysics)), & 422 cat([(iq, iq = 1, nqtot)], t%iGeneration, t%iqParent, t%nqDescen, t%nqChildren, t%iso_iGroup, & 423 t%iso_iName, t%iso_iZone, t%iso_iPhase), nColMax = maxTableWidth, nHead = 2, sub = modname)) & 424 CALL abort_physic(modname, "problem with the tracers table content", 1) 425 IF(niso > 0) THEN 426 CALL msg('Where, for isotopes family "' // TRIM(isotope%parent) // '":', modname) 427 CALL msg(' isoKeys%name = ' // strStack(isoKeys%name), modname) 428 CALL msg(' isoName = ' // strStack(isoName), modname) 429 CALL msg(' isoZone = ' // strStack(isoZone), modname) 430 CALL msg(' isoPhas = ' // TRIM(isoPhas), modname) 431 ELSE 439 432 CALL msg('No isotopes identified.', modname) 440 END IF433 END IF 441 434 442 435 #ifdef ISOVERIF 443 436 CALL msg('iso_iName = '//strStack(int2str(PACK(tracers(:)%iso_iName, MASK=tracers(:)%iso_iGroup==iH2O))), modname) 444 437 #endif 445 #ifdef CPP_StratAer 446 IF (type_trac == 'coag') THEN447 nbtr_bin = COUNT([(tracers(iq)%name(1:3)=='BIN', iq=1, nqtot)])448 nbtr_sulgas = COUNT([(tracers(iq)%name(1:3)=='GAS', iq=1, nqtot)])449 tnames = PACK(tracers(:)%name, MASK=tracers(:)%isInPhysics)450 id_BIN01_strat = strIdx(tnames, 'BIN01')451 id_OCS_strat = strIdx(tnames, 'GASOCS')452 id_SO2_strat = strIdx(tnames, 'GASSO2')453 id_H2SO4_strat = strIdx(tnames, 'GASH2SO4')454 id_TEST_strat = strIdx(tnames, 'GASTEST')455 CALL msg('nbtr_bin ='//TRIM(int2str(nbtr_bin)), modname)456 CALL msg('nbtr_sulgas ='//TRIM(int2str(nbtr_sulgas)), modname)457 CALL msg('id_BIN01_strat ='//TRIM(int2str(id_BIN01_strat)), modname)458 CALL msg('id_OCS_strat ='//TRIM(int2str(id_OCS_strat)), modname)459 CALL msg('id_SO2_strat ='//TRIM(int2str(id_SO2_strat)), modname)460 CALL msg('id_H2SO4_strat ='//TRIM(int2str(id_H2SO4_strat)), modname)461 CALL msg('id_TEST_strat ='//TRIM(int2str(id_TEST_strat)), modname)462 END IF463 #endif 464 CALL msg('end', modname)465 466 END SUBROUTINE init_infotrac_phy438 IF (CPPKEY_STRATAER) THEN 439 IF (type_trac == 'coag') THEN 440 nbtr_bin = COUNT([(tracers(iq)%name(1:3)=='BIN', iq = 1, nqtot)]) 441 nbtr_sulgas = COUNT([(tracers(iq)%name(1:3)=='GAS', iq = 1, nqtot)]) 442 tnames = PACK(tracers(:)%name, MASK = tracers(:)%isInPhysics) 443 id_BIN01_strat = strIdx(tnames, 'BIN01') 444 id_OCS_strat = strIdx(tnames, 'GASOCS') 445 id_SO2_strat = strIdx(tnames, 'GASSO2') 446 id_H2SO4_strat = strIdx(tnames, 'GASH2SO4') 447 id_TEST_strat = strIdx(tnames, 'GASTEST') 448 CALL msg('nbtr_bin =' // TRIM(int2str(nbtr_bin)), modname) 449 CALL msg('nbtr_sulgas =' // TRIM(int2str(nbtr_sulgas)), modname) 450 CALL msg('id_BIN01_strat =' // TRIM(int2str(id_BIN01_strat)), modname) 451 CALL msg('id_OCS_strat =' // TRIM(int2str(id_OCS_strat)), modname) 452 CALL msg('id_SO2_strat =' // TRIM(int2str(id_SO2_strat)), modname) 453 CALL msg('id_H2SO4_strat =' // TRIM(int2str(id_H2SO4_strat)), modname) 454 CALL msg('id_TEST_strat =' // TRIM(int2str(id_TEST_strat)), modname) 455 END IF 456 END IF 457 CALL msg('end', modname) 458 459 END SUBROUTINE init_infotrac_phy 467 460 468 461 END MODULE infotrac_phy -
LMDZ6/branches/Amaury_dev/libf/phylmd/ini_csts.F90
r4722 r5098 78 78 !IF (LHOOK) CALL DR_HOOK('INI_CSTS',0,ZHOOK_HANDLE) 79 79 80 !#ifdef SFX_MNH81 !#ifdef MNH_MPI_DOUBLE_PRECISION82 80 XSURF_TINY = 1.0e-80 83 81 !#else 84 !XSURF_TINY = TINY (XSURF_TINY )85 !#endif86 !#else87 82 XSURF_TINY = 1.0e-80 88 !#endif89 83 XSURF_TINY_12 = SQRT (XSURF_TINY ) 90 84 XSURF_EPSILON = EPSILON (XSURF_EPSILON ) * 10.0 -
LMDZ6/branches/Amaury_dev/libf/phylmd/lmdz_yomcst.f90
r5095 r5098 1 ! 2 ! $Header$ 3 ! 4 ! ATTENTION!!!!: ce fichier include est compatible format fixe/format libre 5 ! veillez à n'utiliser que des ! pour les commentaires 6 ! et à bien positionner les & des lignes de continuation 7 ! (les placer en colonne 6 et en colonne 73) 8 ! 9 ! 10 ! A1.0 Fundamental constants 11 REAL RPI,RCLUM,RHPLA,RKBOL,RNAVO 12 ! A1.1 Astronomical constants 13 REAL RDAY,REA,REPSM,RSIYEA,RSIDAY,ROMEGA 14 ! A1.1.bis Constantes concernant l'orbite de la Terre: 15 REAL R_ecc, R_peri, R_incl 16 ! A1.2 Geoide 17 REAL RA,RG,R1SA 18 ! A1.3 Radiation 19 ! REAL RSIGMA,RI0 20 REAL RSIGMA 21 ! A1.4 Thermodynamic gas phase 22 REAL RMO3,RMCO2,RMC,RMCH4,RMN2O,RMCFC11,RMCFC12 23 REAL R,RMD,RMV,RD,RV,RCPD,RCPV,RCVD,RCVV 24 REAL RKAPPA,RETV, eps_w 25 ! A1.5,6 Thermodynamic liquid,solid phases 26 REAL RCW,RCS 27 ! A1.7 Thermodynamic transition of phase 28 REAL RLVTT,RLSTT,RLMLT,RTT,RATM 29 ! A1.8 Curve of saturation 30 REAL RESTT,RALPW,RBETW,RGAMW,RALPS,RBETS,RGAMS 31 REAL RALPD,RBETD,RGAMD 32 ! 33 COMMON/YOMCST/RPI ,RCLUM ,RHPLA ,RKBOL ,RNAVO & 34 & ,RDAY ,REA ,REPSM ,RSIYEA,RSIDAY,ROMEGA & 35 & ,R_ecc, R_peri, R_incl & 36 & ,RA ,RG ,R1SA & 37 & ,RSIGMA & 38 & ,R ,RMD ,RMV ,RD ,RV ,RCPD & 39 & ,RMO3 ,RMCO2 ,RMC ,RMCH4 ,RMN2O ,RMCFC11 ,RMCFC12 & 40 & ,RCPV ,RCVD ,RCVV ,RKAPPA,RETV, eps_w & 41 & ,RCW ,RCS & 42 & ,RLVTT ,RLSTT ,RLMLT ,RTT ,RATM & 43 & ,RESTT ,RALPW ,RBETW ,RGAMW ,RALPS ,RBETS ,RGAMS & 44 & ,RALPD ,RBETD ,RGAMD 45 ! ------------------------------------------------------------------ 46 !$OMP THREADPRIVATE(/YOMCST/) 1 ! TODO: REPLACE YOMCST.h ONCE .F -> .f90 ! 2 3 module lmdz_yomcst 4 ! A1.0 Fundamental constants 5 REAL RPI, RCLUM, RHPLA, RKBOL, RNAVO 6 ! A1.1 Astronomical constants 7 REAL RDAY, REA, REPSM, RSIYEA, RSIDAY, ROMEGA 8 ! A1.1.bis Constantes concernant l'orbite de la Terre: 9 REAL R_ecc, R_peri, R_incl 10 ! A1.2 Geoide 11 REAL RA, RG, R1SA 12 ! A1.3 Radiation 13 ! REAL RSIGMA,RI0 14 REAL RSIGMA 15 ! A1.4 Thermodynamic gas phase 16 REAL RMO3, RMCO2, RMC, RMCH4, RMN2O, RMCFC11, RMCFC12 17 REAL R, RMD, RMV, RD, RV, RCPD, RCPV, RCVD, RCVV 18 REAL RKAPPA, RETV, eps_w 19 ! A1.5,6 Thermodynamic liquid,solid phases 20 REAL RCW, RCS 21 ! A1.7 Thermodynamic transition of phase 22 REAL RLVTT, RLSTT, RLMLT, RTT, RATM 23 ! A1.8 Curve of saturation 24 REAL RESTT, RALPW, RBETW, RGAMW, RALPS, RBETS, RGAMS 25 REAL RALPD, RBETD, RGAMD 26 27 COMMON/YOMCST/RPI, RCLUM, RHPLA, RKBOL, RNAVO & 28 , RDAY, REA, REPSM, RSIYEA, RSIDAY, ROMEGA & 29 , R_ecc, R_peri, R_incl & 30 , RA, RG, R1SA & 31 , RSIGMA & 32 , R, RMD, RMV, RD, RV, RCPD & 33 , RMO3, RMCO2, RMC, RMCH4, RMN2O, RMCFC11, RMCFC12 & 34 , RCPV, RCVD, RCVV, RKAPPA, RETV, eps_w & 35 , RCW, RCS & 36 , RLVTT, RLSTT, RLMLT, RTT, RATM & 37 , RESTT, RALPW, RBETW, RGAMW, RALPS, RBETS, RGAMS & 38 , RALPD, RBETD, RGAMD 39 !$OMP THREADPRIVATE(/YOMCST/) 40 41 end module lmdz_yomcst -
LMDZ6/branches/Amaury_dev/libf/phylmd/phys_local_var_mod.F90
r5066 r5098 2 2 ! $Id$ 3 3 ! 4 MODULE phys_local_var_mod 5 ! Variables locales pour effectuer les appels en serie 6 !====================================================================== 7 ! 8 ! 9 !====================================================================== 10 ! Declaration des variables 11 12 REAL, SAVE, ALLOCATABLE :: t_seri(:,:), q_seri(:,:) 13 !$OMP THREADPRIVATE(t_seri, q_seri) 14 REAL, SAVE, ALLOCATABLE :: ql_seri(:,:),qs_seri(:,:) 15 !$OMP THREADPRIVATE(ql_seri,qs_seri) 16 ! SN 15/07/2024 ISO 4D 17 REAL, SAVE, ALLOCATABLE :: qx_seri(:,:,:) 18 !$OMP THREADPRIVATE(qx_seri) 19 ! SN 20 REAL, SAVE, ALLOCATABLE :: qbs_seri(:,:) 21 !$OMP THREADPRIVATE(qbs_seri) 22 REAL, SAVE, ALLOCATABLE :: u_seri(:,:), v_seri(:,:) 23 !$OMP THREADPRIVATE(u_seri, v_seri) 24 REAL, SAVE, ALLOCATABLE :: rneb_seri(:,:) 25 !$OMP THREADPRIVATE(rneb_seri) 26 REAL, SAVE, ALLOCATABLE :: d_rneb_dyn(:,:) 27 !$OMP THREADPRIVATE(d_rneb_dyn) 28 REAL, SAVE, ALLOCATABLE :: l_mixmin(:,:,:),l_mix(:,:,:),wprime(:,:,:) 29 !$OMP THREADPRIVATE(l_mixmin, l_mix, wprime) 30 REAL, SAVE, ALLOCATABLE :: pbl_eps(:,:,:) 31 !$OMP THREADPRIVATE(pbl_eps) 32 REAL, SAVE, ALLOCATABLE :: tke_shear(:,:,:), tke_buoy(:,:,:), tke_trans(:,:,:) 33 !$OMP THREADPRIVATE(tke_shear,tke_buoy,tke_trans) 34 REAL, SAVE, ALLOCATABLE :: tr_seri(:,:,:) 35 !$OMP THREADPRIVATE(tr_seri) 36 REAL, SAVE, ALLOCATABLE :: rhcl(:,:) 37 !$OMP THREADPRIVATE(rhcl) 38 REAL, SAVE, ALLOCATABLE :: d_t_dyn(:,:), d_q_dyn(:,:) 39 !$OMP THREADPRIVATE(d_t_dyn, d_q_dyn) 40 REAL, SAVE, ALLOCATABLE :: d_ql_dyn(:,:), d_qs_dyn(:,:), d_qbs_dyn(:,:) 41 !$OMP THREADPRIVATE(d_ql_dyn, d_qs_dyn, d_qbs_dyn) 42 REAL, SAVE, ALLOCATABLE :: d_q_dyn2d(:), d_ql_dyn2d(:), d_qs_dyn2d(:), d_qbs_dyn2d(:) 43 !$OMP THREADPRIVATE(d_q_dyn2d, d_ql_dyn2d, d_qs_dyn2d, d_qbs_dyn2d) 44 REAL, SAVE, ALLOCATABLE :: d_u_dyn(:,:), d_v_dyn(:,:) 45 !$OMP THREADPRIVATE(d_u_dyn, d_v_dyn) 46 REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:,:,:) 47 !$OMP THREADPRIVATE(d_tr_dyn) 48 REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:),d_q_con_zmasse(:,:) 49 !$OMP THREADPRIVATE(d_t_con,d_q_con,d_q_con_zmasse) 50 REAL, SAVE, ALLOCATABLE :: d_u_con(:,:),d_v_con(:,:) 51 !$OMP THREADPRIVATE(d_u_con,d_v_con) 52 REAL, SAVE, ALLOCATABLE :: d_t_wake(:,:),d_q_wake(:,:) 53 !$OMP THREADPRIVATE( d_t_wake,d_q_wake) 54 REAL, SAVE, ALLOCATABLE :: d_t_lsc(:,:),d_q_lsc(:,:),d_ql_lsc(:,:),d_qi_lsc(:,:) 55 !$OMP THREADPRIVATE(d_t_lsc,d_q_lsc,d_ql_lsc,d_qi_lsc) 56 REAL, SAVE, ALLOCATABLE :: d_t_lwr(:,:),d_t_lw0(:,:),d_t_swr(:,:),d_t_sw0(:,:) 57 !$OMP THREADPRIVATE(d_t_lwr,d_t_lw0,d_t_swr,d_t_sw0) 58 REAL, SAVE, ALLOCATABLE :: d_t_ajsb(:,:), d_q_ajsb(:,:) 59 !$OMP THREADPRIVATE(d_t_ajsb, d_q_ajsb) 60 REAL, SAVE, ALLOCATABLE :: d_t_ajs(:,:), d_q_ajs(:,:) 61 !$OMP THREADPRIVATE(d_t_ajs, d_q_ajs) 62 REAL, SAVE, ALLOCATABLE :: d_u_ajs(:,:), d_v_ajs(:,:) 63 !$OMP THREADPRIVATE(d_u_ajs, d_v_ajs) 64 !nrlmd< 65 REAL, SAVE, ALLOCATABLE :: d_t_ajs_w(:,:), d_q_ajs_w(:,:) 66 !$OMP THREADPRIVATE(d_t_ajs_w, d_q_ajs_w) 67 REAL, SAVE, ALLOCATABLE :: d_t_ajs_x(:,:), d_q_ajs_x(:,:) 68 !$OMP THREADPRIVATE(d_t_ajs_x, d_q_ajs_x) 69 !>nrlmd 70 REAL, SAVE, ALLOCATABLE :: d_t_eva(:,:),d_q_eva(:,:),d_ql_eva(:,:),d_qi_eva(:,:) 71 !$OMP THREADPRIVATE(d_t_eva,d_q_eva,d_ql_eva,d_qi_eva) 72 ! SN 15/07/2024 ISO 4D 73 REAL, SAVE, ALLOCATABLE :: d_qx_eva(:,:,:) 74 !$OMP THREADPRIVATE(d_qx_eva) 75 ! SN 76 REAL, SAVE, ALLOCATABLE :: d_t_lscst(:,:),d_q_lscst(:,:) 77 !$OMP THREADPRIVATE(d_t_lscst,d_q_lscst) 78 REAL, SAVE, ALLOCATABLE :: d_t_lscth(:,:),d_q_lscth(:,:) 79 !$OMP THREADPRIVATE(d_t_lscth,d_q_lscth) 80 REAL, SAVE, ALLOCATABLE :: plul_th(:),plul_st(:) 81 !$OMP THREADPRIVATE(plul_th,plul_st) 82 !tendances dues a oro et lif 83 REAL, SAVE, ALLOCATABLE :: d_t_oli(:,:) 84 !$OMP THREADPRIVATE(d_t_oli) 85 REAL, SAVE, ALLOCATABLE :: d_u_oli(:,:), d_v_oli(:,:) 86 !$OMP THREADPRIVATE(d_u_oli, d_v_oli) 87 REAL, SAVE, ALLOCATABLE :: d_t_vdf(:,:), d_q_vdf(:,:), d_qbs_vdf(:,:), d_t_diss(:,:) 88 !$OMP THREADPRIVATE( d_t_vdf, d_q_vdf, d_qbs_vdf, d_t_diss) 89 REAL, SAVE, ALLOCATABLE :: d_u_vdf(:,:), d_v_vdf(:,:) 90 !$OMP THREADPRIVATE(d_u_vdf, d_v_vdf) 91 !nrlmd+jyg< 92 REAL, SAVE, ALLOCATABLE :: d_t_vdf_w(:,:), d_q_vdf_w(:,:) 93 !$OMP THREADPRIVATE( d_t_vdf_w, d_q_vdf_w) 94 REAL, SAVE, ALLOCATABLE :: d_t_vdf_x(:,:), d_q_vdf_x(:,:) 95 !$OMP THREADPRIVATE( d_t_vdf_x, d_q_vdf_x) 96 REAL, SAVE, ALLOCATABLE :: d_t_bsss(:,:), d_q_bsss(:,:), d_qbs_bsss(:,:) 97 !$OMP THREADPRIVATE( d_t_bsss,d_q_bsss, d_qbs_bsss) 98 !>nrlmd+jyg 99 REAL, SAVE, ALLOCATABLE :: d_t_oro(:,:) 100 !$OMP THREADPRIVATE(d_t_oro) 101 REAL, SAVE, ALLOCATABLE :: d_u_oro(:,:), d_v_oro(:,:) 102 !$OMP THREADPRIVATE(d_u_oro, d_v_oro) 103 REAL, SAVE, ALLOCATABLE :: d_t_oro_gw(:,:) 104 !$OMP THREADPRIVATE(d_t_oro_gw) 105 REAL, SAVE, ALLOCATABLE :: d_u_oro_gw(:,:), d_v_oro_gw(:,:) 106 !$OMP THREADPRIVATE(d_u_oro_gw, d_v_oro_gw) 107 REAL, SAVE, ALLOCATABLE :: d_t_lif(:,:) 108 !$OMP THREADPRIVATE(d_t_lif) 109 REAL, SAVE, ALLOCATABLE :: d_u_lif(:,:), d_v_lif(:,:) 110 !$OMP THREADPRIVATE(d_u_lif, d_v_lif) 111 ! Tendances Ondes de G non oro (runs strato). 112 REAL, SAVE, ALLOCATABLE :: du_gwd_hines(:,:) 113 !$OMP THREADPRIVATE(du_gwd_hines) 114 REAL, SAVE, ALLOCATABLE :: dv_gwd_hines(:,:) 115 !$OMP THREADPRIVATE(dv_gwd_hines) 116 REAL, SAVE, ALLOCATABLE :: dv_gwd_rando(:,:) 117 !$OMP THREADPRIVATE(dv_gwd_rando) 118 REAL, SAVE, ALLOCATABLE :: dv_gwd_front(:,:) 119 !$OMP THREADPRIVATE(dv_gwd_front) 120 REAL, SAVE, ALLOCATABLE :: east_gwstress(:,:) 121 !$OMP THREADPRIVATE(east_gwstress) 122 REAL, SAVE, ALLOCATABLE :: west_gwstress(:,:) 123 !$OMP THREADPRIVATE(west_gwstress) 124 REAL, SAVE, ALLOCATABLE :: d_t_hin(:,:) 125 !$OMP THREADPRIVATE(d_t_hin) 126 ! tendance due a l'oxydation du methane 127 REAL, SAVE, ALLOCATABLE :: d_q_ch4(:,:) 128 !$OMP THREADPRIVATE(d_q_ch4) 4 MODULE phys_local_var_mod 5 USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_STRATAER 6 ! Variables locales pour effectuer les appels en serie 7 !====================================================================== 8 ! 9 ! 10 !====================================================================== 11 ! Declaration des variables 12 13 REAL, SAVE, ALLOCATABLE :: t_seri(:, :), q_seri(:, :) 14 !$OMP THREADPRIVATE(t_seri, q_seri) 15 REAL, SAVE, ALLOCATABLE :: ql_seri(:, :), qs_seri(:, :) 16 !$OMP THREADPRIVATE(ql_seri,qs_seri) 17 ! SN 15/07/2024 ISO 4D 18 REAL, SAVE, ALLOCATABLE :: qx_seri(:, :, :) 19 !$OMP THREADPRIVATE(qx_seri) 20 ! SN 21 REAL, SAVE, ALLOCATABLE :: qbs_seri(:, :) 22 !$OMP THREADPRIVATE(qbs_seri) 23 REAL, SAVE, ALLOCATABLE :: u_seri(:, :), v_seri(:, :) 24 !$OMP THREADPRIVATE(u_seri, v_seri) 25 REAL, SAVE, ALLOCATABLE :: rneb_seri(:, :) 26 !$OMP THREADPRIVATE(rneb_seri) 27 REAL, SAVE, ALLOCATABLE :: d_rneb_dyn(:, :) 28 !$OMP THREADPRIVATE(d_rneb_dyn) 29 REAL, SAVE, ALLOCATABLE :: l_mixmin(:, :, :), l_mix(:, :, :), wprime(:, :, :) 30 !$OMP THREADPRIVATE(l_mixmin, l_mix, wprime) 31 REAL, SAVE, ALLOCATABLE :: pbl_eps(:, :, :) 32 !$OMP THREADPRIVATE(pbl_eps) 33 REAL, SAVE, ALLOCATABLE :: tke_shear(:, :, :), tke_buoy(:, :, :), tke_trans(:, :, :) 34 !$OMP THREADPRIVATE(tke_shear,tke_buoy,tke_trans) 35 REAL, SAVE, ALLOCATABLE :: tr_seri(:, :, :) 36 !$OMP THREADPRIVATE(tr_seri) 37 REAL, SAVE, ALLOCATABLE :: rhcl(:, :) 38 !$OMP THREADPRIVATE(rhcl) 39 REAL, SAVE, ALLOCATABLE :: d_t_dyn(:, :), d_q_dyn(:, :) 40 !$OMP THREADPRIVATE(d_t_dyn, d_q_dyn) 41 REAL, SAVE, ALLOCATABLE :: d_ql_dyn(:, :), d_qs_dyn(:, :), d_qbs_dyn(:, :) 42 !$OMP THREADPRIVATE(d_ql_dyn, d_qs_dyn, d_qbs_dyn) 43 REAL, SAVE, ALLOCATABLE :: d_q_dyn2d(:), d_ql_dyn2d(:), d_qs_dyn2d(:), d_qbs_dyn2d(:) 44 !$OMP THREADPRIVATE(d_q_dyn2d, d_ql_dyn2d, d_qs_dyn2d, d_qbs_dyn2d) 45 REAL, SAVE, ALLOCATABLE :: d_u_dyn(:, :), d_v_dyn(:, :) 46 !$OMP THREADPRIVATE(d_u_dyn, d_v_dyn) 47 REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:, :, :) 48 !$OMP THREADPRIVATE(d_tr_dyn) 49 REAL, SAVE, ALLOCATABLE :: d_t_con(:, :), d_q_con(:, :), d_q_con_zmasse(:, :) 50 !$OMP THREADPRIVATE(d_t_con,d_q_con,d_q_con_zmasse) 51 REAL, SAVE, ALLOCATABLE :: d_u_con(:, :), d_v_con(:, :) 52 !$OMP THREADPRIVATE(d_u_con,d_v_con) 53 REAL, SAVE, ALLOCATABLE :: d_t_wake(:, :), d_q_wake(:, :) 54 !$OMP THREADPRIVATE( d_t_wake,d_q_wake) 55 REAL, SAVE, ALLOCATABLE :: d_t_lsc(:, :), d_q_lsc(:, :), d_ql_lsc(:, :), d_qi_lsc(:, :) 56 !$OMP THREADPRIVATE(d_t_lsc,d_q_lsc,d_ql_lsc,d_qi_lsc) 57 REAL, SAVE, ALLOCATABLE :: d_t_lwr(:, :), d_t_lw0(:, :), d_t_swr(:, :), d_t_sw0(:, :) 58 !$OMP THREADPRIVATE(d_t_lwr,d_t_lw0,d_t_swr,d_t_sw0) 59 REAL, SAVE, ALLOCATABLE :: d_t_ajsb(:, :), d_q_ajsb(:, :) 60 !$OMP THREADPRIVATE(d_t_ajsb, d_q_ajsb) 61 REAL, SAVE, ALLOCATABLE :: d_t_ajs(:, :), d_q_ajs(:, :) 62 !$OMP THREADPRIVATE(d_t_ajs, d_q_ajs) 63 REAL, SAVE, ALLOCATABLE :: d_u_ajs(:, :), d_v_ajs(:, :) 64 !$OMP THREADPRIVATE(d_u_ajs, d_v_ajs) 65 !nrlmd< 66 REAL, SAVE, ALLOCATABLE :: d_t_ajs_w(:, :), d_q_ajs_w(:, :) 67 !$OMP THREADPRIVATE(d_t_ajs_w, d_q_ajs_w) 68 REAL, SAVE, ALLOCATABLE :: d_t_ajs_x(:, :), d_q_ajs_x(:, :) 69 !$OMP THREADPRIVATE(d_t_ajs_x, d_q_ajs_x) 70 !>nrlmd 71 REAL, SAVE, ALLOCATABLE :: d_t_eva(:, :), d_q_eva(:, :), d_ql_eva(:, :), d_qi_eva(:, :) 72 !$OMP THREADPRIVATE(d_t_eva,d_q_eva,d_ql_eva,d_qi_eva) 73 ! SN 15/07/2024 ISO 4D 74 REAL, SAVE, ALLOCATABLE :: d_qx_eva(:, :, :) 75 !$OMP THREADPRIVATE(d_qx_eva) 76 ! SN 77 REAL, SAVE, ALLOCATABLE :: d_t_lscst(:, :), d_q_lscst(:, :) 78 !$OMP THREADPRIVATE(d_t_lscst,d_q_lscst) 79 REAL, SAVE, ALLOCATABLE :: d_t_lscth(:, :), d_q_lscth(:, :) 80 !$OMP THREADPRIVATE(d_t_lscth,d_q_lscth) 81 REAL, SAVE, ALLOCATABLE :: plul_th(:), plul_st(:) 82 !$OMP THREADPRIVATE(plul_th,plul_st) 83 !tendances dues a oro et lif 84 REAL, SAVE, ALLOCATABLE :: d_t_oli(:, :) 85 !$OMP THREADPRIVATE(d_t_oli) 86 REAL, SAVE, ALLOCATABLE :: d_u_oli(:, :), d_v_oli(:, :) 87 !$OMP THREADPRIVATE(d_u_oli, d_v_oli) 88 REAL, SAVE, ALLOCATABLE :: d_t_vdf(:, :), d_q_vdf(:, :), d_qbs_vdf(:, :), d_t_diss(:, :) 89 !$OMP THREADPRIVATE( d_t_vdf, d_q_vdf, d_qbs_vdf, d_t_diss) 90 REAL, SAVE, ALLOCATABLE :: d_u_vdf(:, :), d_v_vdf(:, :) 91 !$OMP THREADPRIVATE(d_u_vdf, d_v_vdf) 92 !nrlmd+jyg< 93 REAL, SAVE, ALLOCATABLE :: d_t_vdf_w(:, :), d_q_vdf_w(:, :) 94 !$OMP THREADPRIVATE( d_t_vdf_w, d_q_vdf_w) 95 REAL, SAVE, ALLOCATABLE :: d_t_vdf_x(:, :), d_q_vdf_x(:, :) 96 !$OMP THREADPRIVATE( d_t_vdf_x, d_q_vdf_x) 97 REAL, SAVE, ALLOCATABLE :: d_t_bsss(:, :), d_q_bsss(:, :), d_qbs_bsss(:, :) 98 !$OMP THREADPRIVATE( d_t_bsss,d_q_bsss, d_qbs_bsss) 99 !>nrlmd+jyg 100 REAL, SAVE, ALLOCATABLE :: d_t_oro(:, :) 101 !$OMP THREADPRIVATE(d_t_oro) 102 REAL, SAVE, ALLOCATABLE :: d_u_oro(:, :), d_v_oro(:, :) 103 !$OMP THREADPRIVATE(d_u_oro, d_v_oro) 104 REAL, SAVE, ALLOCATABLE :: d_t_oro_gw(:, :) 105 !$OMP THREADPRIVATE(d_t_oro_gw) 106 REAL, SAVE, ALLOCATABLE :: d_u_oro_gw(:, :), d_v_oro_gw(:, :) 107 !$OMP THREADPRIVATE(d_u_oro_gw, d_v_oro_gw) 108 REAL, SAVE, ALLOCATABLE :: d_t_lif(:, :) 109 !$OMP THREADPRIVATE(d_t_lif) 110 REAL, SAVE, ALLOCATABLE :: d_u_lif(:, :), d_v_lif(:, :) 111 !$OMP THREADPRIVATE(d_u_lif, d_v_lif) 112 ! Tendances Ondes de G non oro (runs strato). 113 REAL, SAVE, ALLOCATABLE :: du_gwd_hines(:, :) 114 !$OMP THREADPRIVATE(du_gwd_hines) 115 REAL, SAVE, ALLOCATABLE :: dv_gwd_hines(:, :) 116 !$OMP THREADPRIVATE(dv_gwd_hines) 117 REAL, SAVE, ALLOCATABLE :: dv_gwd_rando(:, :) 118 !$OMP THREADPRIVATE(dv_gwd_rando) 119 REAL, SAVE, ALLOCATABLE :: dv_gwd_front(:, :) 120 !$OMP THREADPRIVATE(dv_gwd_front) 121 REAL, SAVE, ALLOCATABLE :: east_gwstress(:, :) 122 !$OMP THREADPRIVATE(east_gwstress) 123 REAL, SAVE, ALLOCATABLE :: west_gwstress(:, :) 124 !$OMP THREADPRIVATE(west_gwstress) 125 REAL, SAVE, ALLOCATABLE :: d_t_hin(:, :) 126 !$OMP THREADPRIVATE(d_t_hin) 127 ! tendance due a l'oxydation du methane 128 REAL, SAVE, ALLOCATABLE :: d_q_ch4(:, :) 129 !$OMP THREADPRIVATE(d_q_ch4) 129 130 #ifdef ISO 130 131 REAL, SAVE, ALLOCATABLE :: xt_seri(:,:,:) … … 172 173 #endif 173 174 174 ! tendance du a la conersion Ec -> E thermique175 REAL, SAVE, ALLOCATABLE :: d_t_ec(:,:)176 177 REAL, SAVE, ALLOCATABLE :: d_ts(:,:), d_tr(:,:,:)178 179 180 ! diagnostique pour le rayonnement181 REAL, SAVE, ALLOCATABLE :: topswad_aero(:),solswad_aero(:) ! diag182 183 REAL, SAVE, ALLOCATABLE :: topswai_aero(:),solswai_aero(:) ! diag184 185 186 187 REAL, SAVE, ALLOCATABLE :: topsw_aero(:,:), solsw_aero(:,:) ! diag188 189 REAL, SAVE, ALLOCATABLE :: topsw0_aero(:,:), solsw0_aero(:,:) ! diag190 191 REAL, SAVE, ALLOCATABLE :: topswcf_aero(:,:), solswcf_aero(:,:) ! diag192 193 ! LW radiation diagnostics CK194 REAL, SAVE, ALLOCATABLE :: toplwad_aero(:),sollwad_aero(:) ! diag195 196 REAL, SAVE, ALLOCATABLE :: toplwai_aero(:),sollwai_aero(:) ! diag197 198 199 200 ! Special RRTM201 REAL, SAVE, ALLOCATABLE :: ZLWFT0_i(:,:), ZSWFT0_i(:,:) ! diag202 203 REAL, SAVE, ALLOCATABLE :: ZFLDN0(:,:), ZFLUP0(:,:) ! diag204 205 REAL, SAVE, ALLOCATABLE :: ZFSDN0(:,:), ZFSUP0(:,:) ! diag206 207 !208 REAL, SAVE, ALLOCATABLE :: stratomask(:,:)209 !$OMP THREADPRIVATE(stratomask)210 REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:)211 !$OMP THREADPRIVATE(tausum_aero)212 REAL, SAVE, ALLOCATABLE :: drytausum_aero(:,:)213 !$OMP THREADPRIVATE(drytausum_aero)214 REAL, SAVE, ALLOCATABLE :: tau3d_aero(:,:,:,:)215 !$OMP THREADPRIVATE(tau3d_aero)216 REAL, SAVE, ALLOCATABLE :: dNovrN(:)217 !$OMP THREADPRIVATE(dNovrN)218 REAL, SAVE, ALLOCATABLE :: zfice(:,:)219 220 REAL, SAVE, ALLOCATABLE :: od443aer(:)221 !$OMP THREADPRIVATE(od443aer)222 REAL, SAVE, ALLOCATABLE :: od550aer(:)223 !$OMP THREADPRIVATE(od550aer)224 REAL, SAVE, ALLOCATABLE :: dryod550aer(:)225 !$OMP THREADPRIVATE(dryod550aer)226 REAL, SAVE, ALLOCATABLE :: abs550aer(:)227 !$OMP THREADPRIVATE(abs550aer)228 REAL, SAVE, ALLOCATABLE :: od865aer(:)229 !$OMP THREADPRIVATE(od865aer)230 REAL, SAVE, ALLOCATABLE :: ec550aer(:,:)231 !$OMP THREADPRIVATE(ec550aer)232 REAL, SAVE, ALLOCATABLE :: od550lt1aer(:)233 !$OMP THREADPRIVATE(od550lt1aer)234 REAL, SAVE, ALLOCATABLE :: sconcso4(:)235 !$OMP THREADPRIVATE(sconcso4)236 REAL, SAVE, ALLOCATABLE :: sconcno3(:)237 !$OMP THREADPRIVATE(sconcno3)238 REAL, SAVE, ALLOCATABLE :: sconcoa(:)239 !$OMP THREADPRIVATE(sconcoa)240 REAL, SAVE, ALLOCATABLE :: sconcbc(:)241 !$OMP THREADPRIVATE(sconcbc)242 REAL, SAVE, ALLOCATABLE :: sconcss(:)243 !$OMP THREADPRIVATE(sconcss)244 REAL, SAVE, ALLOCATABLE :: sconcdust(:)245 !$OMP THREADPRIVATE(sconcdust)246 REAL, SAVE, ALLOCATABLE :: concso4(:,:)247 !$OMP THREADPRIVATE(concso4)248 REAL, SAVE, ALLOCATABLE :: concno3(:,:)249 !$OMP THREADPRIVATE(concno3)250 REAL, SAVE, ALLOCATABLE :: concoa(:,:)251 !$OMP THREADPRIVATE(concoa)252 REAL, SAVE, ALLOCATABLE :: concbc(:,:)253 !$OMP THREADPRIVATE(concbc)254 REAL, SAVE, ALLOCATABLE :: concss(:,:)255 !$OMP THREADPRIVATE(concss)256 REAL, SAVE, ALLOCATABLE :: concdust(:,:)257 !$OMP THREADPRIVATE(concdust)258 REAL, SAVE, ALLOCATABLE :: loadso4(:)259 !$OMP THREADPRIVATE(loadso4)260 REAL, SAVE, ALLOCATABLE :: loadoa(:)261 !$OMP THREADPRIVATE(loadoa)262 REAL, SAVE, ALLOCATABLE :: loadbc(:)263 !$OMP THREADPRIVATE(loadbc)264 REAL, SAVE, ALLOCATABLE :: loadss(:)265 !$OMP THREADPRIVATE(loadss)266 REAL, SAVE, ALLOCATABLE :: loaddust(:)267 !$OMP THREADPRIVATE(loaddust)268 REAL, SAVE, ALLOCATABLE :: loadno3(:)269 !$OMP THREADPRIVATE(loadno3)270 271 !$OMP THREADPRIVATE(load_tmp1, load_tmp2)272 273 !$OMP THREADPRIVATE(load_tmp3, load_tmp4)274 275 !$OMP THREADPRIVATE(load_tmp5, load_tmp6)276 277 !$OMP THREADPRIVATE(load_tmp7, load_tmp8)278 279 !$OMP THREADPRIVATE(load_tmp9, load_tmp10)280 281 !IM ajout variables CFMIP2/CMIP5282 REAL,ALLOCATABLE,SAVE :: topswad_aerop(:), solswad_aerop(:)283 !$OMP THREADPRIVATE(topswad_aerop, solswad_aerop)284 REAL,ALLOCATABLE,SAVE :: topswai_aerop(:), solswai_aerop(:)285 !$OMP THREADPRIVATE(topswai_aerop, solswai_aerop)286 REAL,ALLOCATABLE,SAVE :: topswad0_aerop(:), solswad0_aerop(:)287 !$OMP THREADPRIVATE(topswad0_aerop, solswad0_aerop)288 REAL,ALLOCATABLE,SAVE :: topsw_aerop(:,:), topsw0_aerop(:,:)289 !$OMP THREADPRIVATE(topsw_aerop, topsw0_aerop)290 REAL,ALLOCATABLE,SAVE :: solsw_aerop(:,:), solsw0_aerop(:,:)291 !$OMP THREADPRIVATE(solsw_aerop, solsw0_aerop)292 REAL,ALLOCATABLE,SAVE :: topswcf_aerop(:,:), solswcf_aerop(:,:)293 !$OMP THREADPRIVATE(topswcf_aerop, solswcf_aerop)294 295 ! additional LW variables CK296 REAL,ALLOCATABLE,SAVE :: toplwad_aerop(:), sollwad_aerop(:)297 !$OMP THREADPRIVATE(toplwad_aerop, sollwad_aerop)298 REAL,ALLOCATABLE,SAVE :: toplwai_aerop(:), sollwai_aerop(:)299 !$OMP THREADPRIVATE(toplwai_aerop, sollwai_aerop)300 REAL,ALLOCATABLE,SAVE :: toplwad0_aerop(:), sollwad0_aerop(:)301 !$OMP THREADPRIVATE(toplwad0_aerop, sollwad0_aerop)302 303 !AI 08 2023 ajout pour Ecrad304 REAL,ALLOCATABLE,SAVE :: topswad_aero_s2(:), solswad_aero_s2(:)305 !$OMP THREADPRIVATE(topswad_aero_s2, solswad_aero_s2)306 REAL,ALLOCATABLE,SAVE :: topswai_aero_s2(:), solswai_aero_s2(:)307 !$OMP THREADPRIVATE(topswai_aero_s2, solswai_aero_s2)308 REAL,ALLOCATABLE,SAVE :: topswad0_aero_s2(:), solswad0_aero_s2(:)309 !$OMP THREADPRIVATE(topswad0_aero_s2, solswad0_aero_s2)310 REAL,ALLOCATABLE,SAVE :: topsw_aero_s2(:,:), topsw0_aero_s2(:,:)311 !$OMP THREADPRIVATE(topsw_aero_s2, topsw0_aero_s2)312 REAL,ALLOCATABLE,SAVE :: solsw_aero_s2(:,:), solsw0_aero_s2(:,:)313 !$OMP THREADPRIVATE(solsw_aero_s2, solsw0_aero_s2)314 REAL,ALLOCATABLE,SAVE :: topswcf_aero_s2(:,:), solswcf_aero_s2(:,:)315 !$OMP THREADPRIVATE(topswcf_aero_s2, solswcf_aero_s2)316 ! additional LW variables CK317 REAL,ALLOCATABLE,SAVE :: toplwad_aero_s2(:), sollwad_aero_s2(:)318 !$OMP THREADPRIVATE(toplwad_aero_s2, sollwad_aero_s2)319 REAL,ALLOCATABLE,SAVE :: toplwai_aero_s2(:), sollwai_aero_s2(:)320 !$OMP THREADPRIVATE(toplwai_aero_s2, sollwai_aero_s2)321 REAL,ALLOCATABLE,SAVE :: toplwad0_aero_s2(:), sollwad0_aero_s2(:)322 !$OMP THREADPRIVATE(toplwad0_aero_s2, sollwad0_aero_s2)323 324 !Ajout de celles n??cessaires au phys_output_write_mod325 326 !$OMP THREADPRIVATE(tal1, pal1, pab1, pab2)327 328 !$OMP THREADPRIVATE(ptstar, pt0, slp)329 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sens, flwp, fiwp330 !$OMP THREADPRIVATE(sens, flwp, fiwp)331 !!332 !FC 333 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zxfluxt, zxfluxq334 !$OMP THREADPRIVATE(zxfluxt, zxfluxq)335 !FC336 !! Wake variables337 REAL,ALLOCATABLE,SAVE,DIMENSION(:):: alp_wake338 !$OMP THREADPRIVATE(alp_wake) 339 !!jyg! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wake_h,wake_k340 REAL,ALLOCATABLE,SAVE,DIMENSION(:):: wake_h341 INTEGER,ALLOCATABLE,SAVE,DIMENSION(:):: wake_k342 !$OMP THREADPRIVATE(wake_h,wake_k) 343 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: wake_omg344 !$OMP THREADPRIVATE(wake_omg) 345 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:):: d_deltat_wk, d_deltaq_wk346 !$OMP THREADPRIVATE(d_deltat_wk, d_deltaq_wk)347 REAL,ALLOCATABLE,SAVE,DIMENSION(:):: d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk348 !$OMP THREADPRIVATE(d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk)349 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:):: d_deltat_wk_gw, d_deltaq_wk_gw350 !$OMP THREADPRIVATE(d_deltat_wk_gw, d_deltaq_wk_gw)351 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:):: d_deltat_vdf, d_deltaq_vdf352 !$OMP THREADPRIVATE(d_deltat_vdf, d_deltaq_vdf)353 !!! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: d_s_vdf, d_dens_vdf354 !!!$OMP THREADPRIVATE(d_s_vdf, d_dens_vdf)355 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:):: d_deltat_the, d_deltaq_the356 !$OMP THREADPRIVATE(d_deltat_the, d_deltaq_the)357 !!! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: d_s_the, d_dens_the358 !!!$OMP THREADPRIVATE(d_s_the, d_dens_the)359 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: d_deltat_ajs_cv, d_deltaq_ajs_cv360 !$OMP THREADPRIVATE(d_deltat_ajs_cv, d_deltaq_ajs_cv)175 ! tendance du a la conersion Ec -> E thermique 176 REAL, SAVE, ALLOCATABLE :: d_t_ec(:, :) 177 !$OMP THREADPRIVATE(d_t_ec) 178 REAL, SAVE, ALLOCATABLE :: d_ts(:, :), d_tr(:, :, :) 179 !$OMP THREADPRIVATE(d_ts, d_tr) 180 181 ! diagnostique pour le rayonnement 182 REAL, SAVE, ALLOCATABLE :: topswad_aero(:), solswad_aero(:) ! diag 183 !$OMP THREADPRIVATE(topswad_aero,solswad_aero) 184 REAL, SAVE, ALLOCATABLE :: topswai_aero(:), solswai_aero(:) ! diag 185 !$OMP THREADPRIVATE(topswai_aero,solswai_aero) 186 REAL, SAVE, ALLOCATABLE :: topswad0_aero(:), solswad0_aero(:) ! diag 187 !$OMP THREADPRIVATE(topswad0_aero,solswad0_aero) 188 REAL, SAVE, ALLOCATABLE :: topsw_aero(:, :), solsw_aero(:, :) ! diag 189 !$OMP THREADPRIVATE(topsw_aero,solsw_aero) 190 REAL, SAVE, ALLOCATABLE :: topsw0_aero(:, :), solsw0_aero(:, :) ! diag 191 !$OMP THREADPRIVATE(topsw0_aero,solsw0_aero) 192 REAL, SAVE, ALLOCATABLE :: topswcf_aero(:, :), solswcf_aero(:, :) ! diag 193 !$OMP THREADPRIVATE(topswcf_aero,solswcf_aero) 194 ! LW radiation diagnostics CK 195 REAL, SAVE, ALLOCATABLE :: toplwad_aero(:), sollwad_aero(:) ! diag 196 !$OMP THREADPRIVATE(toplwad_aero,sollwad_aero) 197 REAL, SAVE, ALLOCATABLE :: toplwai_aero(:), sollwai_aero(:) ! diag 198 !$OMP THREADPRIVATE(toplwai_aero,sollwai_aero) 199 REAL, SAVE, ALLOCATABLE :: toplwad0_aero(:), sollwad0_aero(:) ! diag 200 !$OMP THREADPRIVATE(toplwad0_aero,sollwad0_aero) 201 ! Special RRTM 202 REAL, SAVE, ALLOCATABLE :: ZLWFT0_i(:, :), ZSWFT0_i(:, :) ! diag 203 !$OMP THREADPRIVATE(ZLWFT0_i,ZSWFT0_i) 204 REAL, SAVE, ALLOCATABLE :: ZFLDN0(:, :), ZFLUP0(:, :) ! diag 205 !$OMP THREADPRIVATE(ZFLDN0,ZFLUP0) 206 REAL, SAVE, ALLOCATABLE :: ZFSDN0(:, :), ZFSUP0(:, :) ! diag 207 !$OMP THREADPRIVATE(ZFSDN0,ZFSUP0) 208 ! 209 REAL, SAVE, ALLOCATABLE :: stratomask(:, :) 210 !$OMP THREADPRIVATE(stratomask) 211 REAL, SAVE, ALLOCATABLE :: tausum_aero(:, :, :) 212 !$OMP THREADPRIVATE(tausum_aero) 213 REAL, SAVE, ALLOCATABLE :: drytausum_aero(:, :) 214 !$OMP THREADPRIVATE(drytausum_aero) 215 REAL, SAVE, ALLOCATABLE :: tau3d_aero(:, :, :, :) 216 !$OMP THREADPRIVATE(tau3d_aero) 217 REAL, SAVE, ALLOCATABLE :: dNovrN(:) 218 !$OMP THREADPRIVATE(dNovrN) 219 REAL, SAVE, ALLOCATABLE :: zfice(:, :) 220 !$OMP THREADPRIVATE(zfice) 221 REAL, SAVE, ALLOCATABLE :: od443aer(:) 222 !$OMP THREADPRIVATE(od443aer) 223 REAL, SAVE, ALLOCATABLE :: od550aer(:) 224 !$OMP THREADPRIVATE(od550aer) 225 REAL, SAVE, ALLOCATABLE :: dryod550aer(:) 226 !$OMP THREADPRIVATE(dryod550aer) 227 REAL, SAVE, ALLOCATABLE :: abs550aer(:) 228 !$OMP THREADPRIVATE(abs550aer) 229 REAL, SAVE, ALLOCATABLE :: od865aer(:) 230 !$OMP THREADPRIVATE(od865aer) 231 REAL, SAVE, ALLOCATABLE :: ec550aer(:, :) 232 !$OMP THREADPRIVATE(ec550aer) 233 REAL, SAVE, ALLOCATABLE :: od550lt1aer(:) 234 !$OMP THREADPRIVATE(od550lt1aer) 235 REAL, SAVE, ALLOCATABLE :: sconcso4(:) 236 !$OMP THREADPRIVATE(sconcso4) 237 REAL, SAVE, ALLOCATABLE :: sconcno3(:) 238 !$OMP THREADPRIVATE(sconcno3) 239 REAL, SAVE, ALLOCATABLE :: sconcoa(:) 240 !$OMP THREADPRIVATE(sconcoa) 241 REAL, SAVE, ALLOCATABLE :: sconcbc(:) 242 !$OMP THREADPRIVATE(sconcbc) 243 REAL, SAVE, ALLOCATABLE :: sconcss(:) 244 !$OMP THREADPRIVATE(sconcss) 245 REAL, SAVE, ALLOCATABLE :: sconcdust(:) 246 !$OMP THREADPRIVATE(sconcdust) 247 REAL, SAVE, ALLOCATABLE :: concso4(:, :) 248 !$OMP THREADPRIVATE(concso4) 249 REAL, SAVE, ALLOCATABLE :: concno3(:, :) 250 !$OMP THREADPRIVATE(concno3) 251 REAL, SAVE, ALLOCATABLE :: concoa(:, :) 252 !$OMP THREADPRIVATE(concoa) 253 REAL, SAVE, ALLOCATABLE :: concbc(:, :) 254 !$OMP THREADPRIVATE(concbc) 255 REAL, SAVE, ALLOCATABLE :: concss(:, :) 256 !$OMP THREADPRIVATE(concss) 257 REAL, SAVE, ALLOCATABLE :: concdust(:, :) 258 !$OMP THREADPRIVATE(concdust) 259 REAL, SAVE, ALLOCATABLE :: loadso4(:) 260 !$OMP THREADPRIVATE(loadso4) 261 REAL, SAVE, ALLOCATABLE :: loadoa(:) 262 !$OMP THREADPRIVATE(loadoa) 263 REAL, SAVE, ALLOCATABLE :: loadbc(:) 264 !$OMP THREADPRIVATE(loadbc) 265 REAL, SAVE, ALLOCATABLE :: loadss(:) 266 !$OMP THREADPRIVATE(loadss) 267 REAL, SAVE, ALLOCATABLE :: loaddust(:) 268 !$OMP THREADPRIVATE(loaddust) 269 REAL, SAVE, ALLOCATABLE :: loadno3(:) 270 !$OMP THREADPRIVATE(loadno3) 271 REAL, SAVE, ALLOCATABLE :: load_tmp1(:), load_tmp2(:) 272 !$OMP THREADPRIVATE(load_tmp1, load_tmp2) 273 REAL, SAVE, ALLOCATABLE :: load_tmp3(:), load_tmp4(:) 274 !$OMP THREADPRIVATE(load_tmp3, load_tmp4) 275 REAL, SAVE, ALLOCATABLE :: load_tmp5(:), load_tmp6(:) 276 !$OMP THREADPRIVATE(load_tmp5, load_tmp6) 277 REAL, SAVE, ALLOCATABLE :: load_tmp7(:), load_tmp8(:) 278 !$OMP THREADPRIVATE(load_tmp7, load_tmp8) 279 REAL, SAVE, ALLOCATABLE :: load_tmp9(:), load_tmp10(:) 280 !$OMP THREADPRIVATE(load_tmp9, load_tmp10) 281 282 !IM ajout variables CFMIP2/CMIP5 283 REAL, ALLOCATABLE, SAVE :: topswad_aerop(:), solswad_aerop(:) 284 !$OMP THREADPRIVATE(topswad_aerop, solswad_aerop) 285 REAL, ALLOCATABLE, SAVE :: topswai_aerop(:), solswai_aerop(:) 286 !$OMP THREADPRIVATE(topswai_aerop, solswai_aerop) 287 REAL, ALLOCATABLE, SAVE :: topswad0_aerop(:), solswad0_aerop(:) 288 !$OMP THREADPRIVATE(topswad0_aerop, solswad0_aerop) 289 REAL, ALLOCATABLE, SAVE :: topsw_aerop(:, :), topsw0_aerop(:, :) 290 !$OMP THREADPRIVATE(topsw_aerop, topsw0_aerop) 291 REAL, ALLOCATABLE, SAVE :: solsw_aerop(:, :), solsw0_aerop(:, :) 292 !$OMP THREADPRIVATE(solsw_aerop, solsw0_aerop) 293 REAL, ALLOCATABLE, SAVE :: topswcf_aerop(:, :), solswcf_aerop(:, :) 294 !$OMP THREADPRIVATE(topswcf_aerop, solswcf_aerop) 295 296 ! additional LW variables CK 297 REAL, ALLOCATABLE, SAVE :: toplwad_aerop(:), sollwad_aerop(:) 298 !$OMP THREADPRIVATE(toplwad_aerop, sollwad_aerop) 299 REAL, ALLOCATABLE, SAVE :: toplwai_aerop(:), sollwai_aerop(:) 300 !$OMP THREADPRIVATE(toplwai_aerop, sollwai_aerop) 301 REAL, ALLOCATABLE, SAVE :: toplwad0_aerop(:), sollwad0_aerop(:) 302 !$OMP THREADPRIVATE(toplwad0_aerop, sollwad0_aerop) 303 304 !AI 08 2023 ajout pour Ecrad 305 REAL, ALLOCATABLE, SAVE :: topswad_aero_s2(:), solswad_aero_s2(:) 306 !$OMP THREADPRIVATE(topswad_aero_s2, solswad_aero_s2) 307 REAL, ALLOCATABLE, SAVE :: topswai_aero_s2(:), solswai_aero_s2(:) 308 !$OMP THREADPRIVATE(topswai_aero_s2, solswai_aero_s2) 309 REAL, ALLOCATABLE, SAVE :: topswad0_aero_s2(:), solswad0_aero_s2(:) 310 !$OMP THREADPRIVATE(topswad0_aero_s2, solswad0_aero_s2) 311 REAL, ALLOCATABLE, SAVE :: topsw_aero_s2(:, :), topsw0_aero_s2(:, :) 312 !$OMP THREADPRIVATE(topsw_aero_s2, topsw0_aero_s2) 313 REAL, ALLOCATABLE, SAVE :: solsw_aero_s2(:, :), solsw0_aero_s2(:, :) 314 !$OMP THREADPRIVATE(solsw_aero_s2, solsw0_aero_s2) 315 REAL, ALLOCATABLE, SAVE :: topswcf_aero_s2(:, :), solswcf_aero_s2(:, :) 316 !$OMP THREADPRIVATE(topswcf_aero_s2, solswcf_aero_s2) 317 ! additional LW variables CK 318 REAL, ALLOCATABLE, SAVE :: toplwad_aero_s2(:), sollwad_aero_s2(:) 319 !$OMP THREADPRIVATE(toplwad_aero_s2, sollwad_aero_s2) 320 REAL, ALLOCATABLE, SAVE :: toplwai_aero_s2(:), sollwai_aero_s2(:) 321 !$OMP THREADPRIVATE(toplwai_aero_s2, sollwai_aero_s2) 322 REAL, ALLOCATABLE, SAVE :: toplwad0_aero_s2(:), sollwad0_aero_s2(:) 323 !$OMP THREADPRIVATE(toplwad0_aero_s2, sollwad0_aero_s2) 324 325 !Ajout de celles n??cessaires au phys_output_write_mod 326 REAL, SAVE, ALLOCATABLE :: tal1(:), pal1(:), pab1(:), pab2(:) 327 !$OMP THREADPRIVATE(tal1, pal1, pab1, pab2) 328 REAL, SAVE, ALLOCATABLE :: ptstar(:), pt0(:), slp(:) 329 !$OMP THREADPRIVATE(ptstar, pt0, slp) 330 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sens, flwp, fiwp 331 !$OMP THREADPRIVATE(sens, flwp, fiwp) 332 !! 333 !FC 334 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: zxfluxt, zxfluxq 335 !$OMP THREADPRIVATE(zxfluxt, zxfluxq) 336 !FC 337 !! Wake variables 338 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: alp_wake 339 !$OMP THREADPRIVATE(alp_wake) 340 !!jyg! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wake_h,wake_k 341 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: wake_h 342 INTEGER, ALLOCATABLE, SAVE, DIMENSION(:) :: wake_k 343 !$OMP THREADPRIVATE(wake_h,wake_k) 344 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: wake_omg 345 !$OMP THREADPRIVATE(wake_omg) 346 REAL, SAVE, ALLOCATABLE, DIMENSION(:, :) :: d_deltat_wk, d_deltaq_wk 347 !$OMP THREADPRIVATE(d_deltat_wk, d_deltaq_wk) 348 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk 349 !$OMP THREADPRIVATE(d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk) 350 REAL, SAVE, ALLOCATABLE, DIMENSION(:, :) :: d_deltat_wk_gw, d_deltaq_wk_gw 351 !$OMP THREADPRIVATE(d_deltat_wk_gw, d_deltaq_wk_gw) 352 REAL, SAVE, ALLOCATABLE, DIMENSION(:, :) :: d_deltat_vdf, d_deltaq_vdf 353 !$OMP THREADPRIVATE(d_deltat_vdf, d_deltaq_vdf) 354 !!! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: d_s_vdf, d_dens_vdf 355 !!!$OMP THREADPRIVATE(d_s_vdf, d_dens_vdf) 356 REAL, SAVE, ALLOCATABLE, DIMENSION(:, :) :: d_deltat_the, d_deltaq_the 357 !$OMP THREADPRIVATE(d_deltat_the, d_deltaq_the) 358 !!! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: d_s_the, d_dens_the 359 !!!$OMP THREADPRIVATE(d_s_the, d_dens_the) 360 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: d_deltat_ajs_cv, d_deltaq_ajs_cv 361 !$OMP THREADPRIVATE(d_deltat_ajs_cv, d_deltaq_ajs_cv) 361 362 #ifdef ISO 362 363 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:,:) :: d_deltaxt_wk … … 371 372 !$OMP THREADPRIVATE(d_deltaxt_ajs_cv) 372 373 #endif 373 !! End of Wake variables374 !!375 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: bils376 !$OMP THREADPRIVATE(bils)377 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragm, cdragh378 !$OMP THREADPRIVATE(cdragm, cdragh)379 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cldh, cldl, cldm, cldq, cldt, qsat2m380 !$OMP THREADPRIVATE(cldh, cldl, cldm, cldq, cldt, qsat2m)381 !AS: cldhjn, cldljn, cldmjn,cldtjn pas utilisés en tant que variables, juste noms de diagnostics382 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: JrNt383 !$OMP THREADPRIVATE(JrNt)384 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget385 !$OMP THREADPRIVATE(dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget)386 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zustar, zu10m, zv10m, rh2m387 !$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m)388 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_lcl, s_pblh, s_pblt, s_therm389 !$OMP THREADPRIVATE(s_lcl, s_pblh, s_pblt, s_therm)390 !391 !nrlmd+jyg<392 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_pblh_x, s_pblh_w393 !$OMP THREADPRIVATE(s_pblh_x, s_pblh_w)394 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_lcl_x, s_lcl_w395 !$OMP THREADPRIVATE(s_lcl_x, s_lcl_w)396 !>nrlmd+jyg397 !398 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: slab_wfbils399 !$OMP THREADPRIVATE(slab_wfbils)400 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte401 !$OMP THREADPRIVATE(tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte)402 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxustartlic, zxrhoslic, zxqsaltlic403 !$OMP THREADPRIVATE(zxustartlic, zxrhoslic, zxqsaltlic)404 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfqcalving405 !$OMP THREADPRIVATE(zxfqcalving)406 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat, zxtsol, snow_lsc, zxfqfonte407 !$OMP THREADPRIVATE(zxfluxlat, zxtsol, snow_lsc, zxfqfonte)408 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxrunofflic409 !$OMP THREADPRIVATE(zxrunofflic)410 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxqsurf, rain_lsc, rain_num411 !$OMP THREADPRIVATE(zxqsurf, rain_lsc, rain_num)374 !! End of Wake variables 375 !! 376 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: bils 377 !$OMP THREADPRIVATE(bils) 378 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: cdragm, cdragh 379 !$OMP THREADPRIVATE(cdragm, cdragh) 380 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: cldh, cldl, cldm, cldq, cldt, qsat2m 381 !$OMP THREADPRIVATE(cldh, cldl, cldm, cldq, cldt, qsat2m) 382 !AS: cldhjn, cldljn, cldmjn,cldtjn pas utilisés en tant que variables, juste noms de diagnostics 383 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: JrNt 384 !$OMP THREADPRIVATE(JrNt) 385 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget 386 !$OMP THREADPRIVATE(dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget) 387 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zustar, zu10m, zv10m, rh2m 388 !$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m) 389 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: s_lcl, s_pblh, s_pblt, s_therm 390 !$OMP THREADPRIVATE(s_lcl, s_pblh, s_pblt, s_therm) 391 ! 392 !nrlmd+jyg< 393 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: s_pblh_x, s_pblh_w 394 !$OMP THREADPRIVATE(s_pblh_x, s_pblh_w) 395 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: s_lcl_x, s_lcl_w 396 !$OMP THREADPRIVATE(s_lcl_x, s_lcl_w) 397 !>nrlmd+jyg 398 ! 399 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: slab_wfbils 400 !$OMP THREADPRIVATE(slab_wfbils) 401 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte 402 !$OMP THREADPRIVATE(tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte) 403 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxustartlic, zxrhoslic, zxqsaltlic 404 !$OMP THREADPRIVATE(zxustartlic, zxrhoslic, zxqsaltlic) 405 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxfqcalving 406 !$OMP THREADPRIVATE(zxfqcalving) 407 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxfluxlat, zxtsol, snow_lsc, zxfqfonte 408 !$OMP THREADPRIVATE(zxfluxlat, zxtsol, snow_lsc, zxfqfonte) 409 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxrunofflic 410 !$OMP THREADPRIVATE(zxrunofflic) 411 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxqsurf, rain_lsc, rain_num 412 !$OMP THREADPRIVATE(zxqsurf, rain_lsc, rain_num) 412 413 #ifdef ISO 413 414 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtevap,xtprw … … 425 426 !$OMP THREADPRIVATE(xtrain_lsc) 426 427 #endif 427 !428 !jyg+nrlmd<429 !!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc430 ! c431 ! Declarations liees a la couche limite differentiee w-x c432 ! c433 !!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc434 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sens_x, sens_w435 !$OMP THREADPRIVATE(sens_x, sens_w)436 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat_x, zxfluxlat_w437 !$OMP THREADPRIVATE(zxfluxlat_x, zxfluxlat_w)438 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: delta_qsurf439 !$OMP THREADPRIVATE(delta_qsurf)440 !jyg<441 !!! Entrees supplementaires couche-limite442 !! REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t_x, t_w443 !!!$OMP THREADPRIVATE(t_x, t_w)444 !! REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: q_x, q_w445 !!!$OMP THREADPRIVATE(q_x, q_w)446 !>jyg447 !!! Sorties ferret448 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dtvdf_x, dtvdf_w449 !$OMP THREADPRIVATE(dtvdf_x, dtvdf_w)450 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dqvdf_x, dqvdf_w451 !$OMP THREADPRIVATE(dqvdf_x, dqvdf_w)452 ! Variables supplementaires dans physiq.F relative au splitting de la surface453 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: pbl_tke_input454 !$OMP THREADPRIVATE(pbl_tke_input)455 ! Entree supplementaire Thermiques :456 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t_therm, q_therm, u_therm, v_therm457 !$OMP THREADPRIVATE(t_therm, q_therm, u_therm, v_therm)458 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragh_x, cdragh_w459 !$OMP THREADPRIVATE(cdragh_x, cdragh_w)460 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragm_x, cdragm_w461 !$OMP THREADPRIVATE(cdragm_x, cdragm_w)462 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: kh, kh_x, kh_w463 !$OMP THREADPRIVATE(kh, kh_x, kh_w)428 ! 429 !jyg+nrlmd< 430 !!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 431 ! c 432 ! Declarations liees a la couche limite differentiee w-x c 433 ! c 434 !!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 435 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sens_x, sens_w 436 !$OMP THREADPRIVATE(sens_x, sens_w) 437 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxfluxlat_x, zxfluxlat_w 438 !$OMP THREADPRIVATE(zxfluxlat_x, zxfluxlat_w) 439 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: delta_qsurf 440 !$OMP THREADPRIVATE(delta_qsurf) 441 !jyg< 442 !!! Entrees supplementaires couche-limite 443 !! REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t_x, t_w 444 !!!$OMP THREADPRIVATE(t_x, t_w) 445 !! REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: q_x, q_w 446 !!!$OMP THREADPRIVATE(q_x, q_w) 447 !>jyg 448 !!! Sorties ferret 449 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: dtvdf_x, dtvdf_w 450 !$OMP THREADPRIVATE(dtvdf_x, dtvdf_w) 451 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: dqvdf_x, dqvdf_w 452 !$OMP THREADPRIVATE(dqvdf_x, dqvdf_w) 453 ! Variables supplementaires dans physiq.F relative au splitting de la surface 454 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: pbl_tke_input 455 !$OMP THREADPRIVATE(pbl_tke_input) 456 ! Entree supplementaire Thermiques : 457 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: t_therm, q_therm, u_therm, v_therm 458 !$OMP THREADPRIVATE(t_therm, q_therm, u_therm, v_therm) 459 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: cdragh_x, cdragh_w 460 !$OMP THREADPRIVATE(cdragh_x, cdragh_w) 461 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: cdragm_x, cdragm_w 462 !$OMP THREADPRIVATE(cdragm_x, cdragm_w) 463 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: kh, kh_x, kh_w 464 !$OMP THREADPRIVATE(kh, kh_x, kh_w) 464 465 #ifdef ISO 465 466 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: dxtvdf_x, dxtvdf_w … … 468 469 !$OMP THREADPRIVATE(xt_therm) 469 470 #endif 470 !!!471 !!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc472 LOGICAL, SAVE, ALLOCATABLE :: ptconv(:,:)473 474 REAL, SAVE, ALLOCATABLE :: ratqsc(:,:)475 476 !>jyg+nrlmd471 !!! 472 !!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 473 LOGICAL, SAVE, ALLOCATABLE :: ptconv(:, :) 474 !$OMP THREADPRIVATE(ptconv) 475 REAL, SAVE, ALLOCATABLE :: ratqsc(:, :) 476 !$OMP THREADPRIVATE(ratqsc) 477 !>jyg+nrlmd 477 478 ! 478 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wbeff, convoccur, zmax_th, zq2m, zt2m479 !$OMP THREADPRIVATE(wbeff, convoccur, zmax_th, zq2m, zt2m)480 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zt2m_min_mon, zt2m_max_mon481 !$OMP THREADPRIVATE(zt2m_min_mon, zt2m_max_mon)482 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: t2m_min_mon, t2m_max_mon483 !$OMP THREADPRIVATE(t2m_min_mon, t2m_max_mon)484 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: weak_inversion485 !$OMP THREADPRIVATE(weak_inversion)486 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_conv,alp_bl_det487 !$OMP THREADPRIVATE(alp_bl_conv,alp_bl_det)488 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_fluct_m,alp_bl_fluct_tke489 !$OMP THREADPRIVATE(alp_bl_fluct_m,alp_bl_fluct_tke)490 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_stat, n2, s2, strig, zcong, zlcl_th491 !$OMP THREADPRIVATE(alp_bl_stat, n2, s2, strig, zcong, zlcl_th)492 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: proba_notrig, random_notrig493 !$OMP THREADPRIVATE(proba_notrig, random_notrig)494 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: fsolsw, wfbils495 !$OMP THREADPRIVATE(fsolsw, wfbils)496 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wfevap497 !$OMP THREADPRIVATE(wfevap)498 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t2m, fluxlat, fsollw,evap_pot499 !$OMP THREADPRIVATE(t2m, fluxlat, fsollw,evap_pot)500 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dnwd0, omega501 !$OMP THREADPRIVATE(dnwd0, omega)502 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: epmax_diag ! epmax_cape503 !$OMP THREADPRIVATE(epmax_diag)504 !505 ! Deep convective variables used in phytrac506 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: ep ! epmax_cape507 !$OMP THREADPRIVATE(ep)508 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: dnwd, upwd509 !$OMP THREADPRIVATE(dnwd, upwd)510 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: pmflxr, pmflxs511 !$OMP THREADPRIVATE(pmflxr, pmflxs)512 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: wdtrainA, wdtrainS, wdtrainM513 !$OMP THREADPRIVATE(wdtrainA, wdtrainS, wdtrainM)514 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: da, mp515 !$OMP THREADPRIVATE(da, mp)516 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: wght_cvfd517 !$OMP THREADPRIVATE(wght_cvfd)518 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:):: phi, phi2, elij, epmlmMm519 !$OMP THREADPRIVATE(phi, phi2, elij, epmlmMm)520 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: d1a, dam521 !$OMP THREADPRIVATE(d1a, dam)522 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: ev523 !$OMP THREADPRIVATE(ev)524 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: qtaa525 !$OMP THREADPRIVATE(qtaa)526 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: clw527 !$OMP THREADPRIVATE(clw)528 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: eplaMm529 !$OMP THREADPRIVATE(eplaMm)530 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:):: sij531 !$OMP THREADPRIVATE(sij)479 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: wbeff, convoccur, zmax_th, zq2m, zt2m 480 !$OMP THREADPRIVATE(wbeff, convoccur, zmax_th, zq2m, zt2m) 481 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zt2m_min_mon, zt2m_max_mon 482 !$OMP THREADPRIVATE(zt2m_min_mon, zt2m_max_mon) 483 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: t2m_min_mon, t2m_max_mon 484 !$OMP THREADPRIVATE(t2m_min_mon, t2m_max_mon) 485 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: weak_inversion 486 !$OMP THREADPRIVATE(weak_inversion) 487 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: alp_bl_conv, alp_bl_det 488 !$OMP THREADPRIVATE(alp_bl_conv,alp_bl_det) 489 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: alp_bl_fluct_m, alp_bl_fluct_tke 490 !$OMP THREADPRIVATE(alp_bl_fluct_m,alp_bl_fluct_tke) 491 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: alp_bl_stat, n2, s2, strig, zcong, zlcl_th 492 !$OMP THREADPRIVATE(alp_bl_stat, n2, s2, strig, zcong, zlcl_th) 493 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: proba_notrig, random_notrig 494 !$OMP THREADPRIVATE(proba_notrig, random_notrig) 495 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: fsolsw, wfbils 496 !$OMP THREADPRIVATE(fsolsw, wfbils) 497 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: wfevap 498 !$OMP THREADPRIVATE(wfevap) 499 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: t2m, fluxlat, fsollw, evap_pot 500 !$OMP THREADPRIVATE(t2m, fluxlat, fsollw,evap_pot) 501 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: dnwd0, omega 502 !$OMP THREADPRIVATE(dnwd0, omega) 503 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: epmax_diag ! epmax_cape 504 !$OMP THREADPRIVATE(epmax_diag) 505 ! 506 ! Deep convective variables used in phytrac 507 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: ep ! epmax_cape 508 !$OMP THREADPRIVATE(ep) 509 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: dnwd, upwd 510 !$OMP THREADPRIVATE(dnwd, upwd) 511 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: pmflxr, pmflxs 512 !$OMP THREADPRIVATE(pmflxr, pmflxs) 513 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: wdtrainA, wdtrainS, wdtrainM 514 !$OMP THREADPRIVATE(wdtrainA, wdtrainS, wdtrainM) 515 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: da, mp 516 !$OMP THREADPRIVATE(da, mp) 517 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: wght_cvfd 518 !$OMP THREADPRIVATE(wght_cvfd) 519 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: phi, phi2, elij, epmlmMm 520 !$OMP THREADPRIVATE(phi, phi2, elij, epmlmMm) 521 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: d1a, dam 522 !$OMP THREADPRIVATE(d1a, dam) 523 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: ev 524 !$OMP THREADPRIVATE(ev) 525 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: qtaa 526 !$OMP THREADPRIVATE(qtaa) 527 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: clw 528 !$OMP THREADPRIVATE(clw) 529 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: eplaMm 530 !$OMP THREADPRIVATE(eplaMm) 531 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: sij 532 !$OMP THREADPRIVATE(sij) 532 533 #ifdef ISO 533 534 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: xtwdtrainA … … 576 577 #endif 577 578 #endif 578 !579 ! REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: coefh, coefm, lambda_th580 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: lambda_th581 !$OMP THREADPRIVATE(lambda_th)582 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: cldemi, cldfra, cldtau, fiwc, fl, re, flwc583 !$OMP THREADPRIVATE(cldemi, cldfra, cldtau, fiwc, fl, re, flwc)584 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: qlth, qith, qsith, wiceth585 !$OMP THREADPRIVATE(qlth, qith, qsith, wiceth)586 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq, ref_ice, theta, zphi587 !$OMP THREADPRIVATE(ref_liq, ref_ice, theta, zphi)588 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq_pi, ref_ice_pi589 !$OMP THREADPRIVATE(ref_liq_pi, ref_ice_pi)590 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zx_rh, zx_rhl, zx_rhi591 !$OMP THREADPRIVATE(zx_rh, zx_rhl, zx_rhi)592 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: prfl, psfl, fraca, bsfl593 !$OMP THREADPRIVATE(prfl, psfl, fraca, bsfl)594 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: Vprecip, zw2595 !$OMP THREADPRIVATE(Vprecip, zw2)596 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: pmfd, pmfu597 !$OMP THREADPRIVATE(pmfd, pmfu)598 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: fluxt, fluxu, fluxv599 !$OMP THREADPRIVATE(fluxt, fluxu, fluxv)600 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: uwriteSTD, vwriteSTD, wwriteSTD601 !$OMP THREADPRIVATE(uwriteSTD, vwriteSTD, wwriteSTD)602 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD603 !$OMP THREADPRIVATE(phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD)604 605 606 ! ug et d'autres encore:607 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: beta_prec608 !$OMP THREADPRIVATE(beta_prec)609 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rneb,rnebjn,rneblsvol610 !$OMP THREADPRIVATE(rneb,rnebjn,rneblsvol)611 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: pfraclr,pfracld612 !$OMP THREADPRIVATE(pfraclr,pfracld)613 REAL, SAVE, ALLOCATABLE :: cldfraliq(:,:)614 !$OMP THREADPRIVATE(cldfraliq)615 REAL, SAVE, ALLOCATABLE ::mean_icefracturb(:,:)616 !$OMP THREADPRIVATE(mean_icefracturb)617 REAL, SAVE, ALLOCATABLE :: sigma2_icefracturb(:,:)618 !$OMP THREADPRIVATE(sigma2_icefracturb)619 620 ! variables de sorties MM621 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxsnow,snowhgt,qsnow,to_ice622 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sissnow,runoff,albsol3_lic623 !$OMP THREADPRIVATE(zxsnow,snowhgt,qsnow,to_ice)624 !$OMP THREADPRIVATE(sissnow,runoff,albsol3_lic)579 ! 580 ! REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: coefh, coefm, lambda_th 581 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: lambda_th 582 !$OMP THREADPRIVATE(lambda_th) 583 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: cldemi, cldfra, cldtau, fiwc, fl, re, flwc 584 !$OMP THREADPRIVATE(cldemi, cldfra, cldtau, fiwc, fl, re, flwc) 585 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: qlth, qith, qsith, wiceth 586 !$OMP THREADPRIVATE(qlth, qith, qsith, wiceth) 587 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: ref_liq, ref_ice, theta, zphi 588 !$OMP THREADPRIVATE(ref_liq, ref_ice, theta, zphi) 589 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: ref_liq_pi, ref_ice_pi 590 !$OMP THREADPRIVATE(ref_liq_pi, ref_ice_pi) 591 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: zx_rh, zx_rhl, zx_rhi 592 !$OMP THREADPRIVATE(zx_rh, zx_rhl, zx_rhi) 593 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: prfl, psfl, fraca, bsfl 594 !$OMP THREADPRIVATE(prfl, psfl, fraca, bsfl) 595 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: Vprecip, zw2 596 !$OMP THREADPRIVATE(Vprecip, zw2) 597 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: pmfd, pmfu 598 !$OMP THREADPRIVATE(pmfd, pmfu) 599 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: fluxt, fluxu, fluxv 600 !$OMP THREADPRIVATE(fluxt, fluxu, fluxv) 601 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: uwriteSTD, vwriteSTD, wwriteSTD 602 !$OMP THREADPRIVATE(uwriteSTD, vwriteSTD, wwriteSTD) 603 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD 604 !$OMP THREADPRIVATE(phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD) 605 606 607 ! ug et d'autres encore: 608 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: beta_prec 609 !$OMP THREADPRIVATE(beta_prec) 610 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: rneb, rnebjn, rneblsvol 611 !$OMP THREADPRIVATE(rneb,rnebjn,rneblsvol) 612 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: pfraclr, pfracld 613 !$OMP THREADPRIVATE(pfraclr,pfracld) 614 REAL, SAVE, ALLOCATABLE :: cldfraliq(:, :) 615 !$OMP THREADPRIVATE(cldfraliq) 616 REAL, SAVE, ALLOCATABLE :: mean_icefracturb(:, :) 617 !$OMP THREADPRIVATE(mean_icefracturb) 618 REAL, SAVE, ALLOCATABLE :: sigma2_icefracturb(:, :) 619 !$OMP THREADPRIVATE(sigma2_icefracturb) 620 621 ! variables de sorties MM 622 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxsnow, snowhgt, qsnow, to_ice 623 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sissnow, runoff, albsol3_lic 624 !$OMP THREADPRIVATE(zxsnow,snowhgt,qsnow,to_ice) 625 !$OMP THREADPRIVATE(sissnow,runoff,albsol3_lic) 625 626 #ifdef ISO 626 627 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: zxxtsnow … … 632 633 #endif 633 634 634 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: p_tropopause, z_tropopause, t_tropopause 635 !$OMP THREADPRIVATE(p_tropopause, z_tropopause, t_tropopause) 636 637 INTEGER,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zn2mout 638 !$OMP THREADPRIVATE(zn2mout) 639 640 REAL, SAVE, ALLOCATABLE :: qclr(:,:) 641 !$OMP THREADPRIVATE(qclr) 642 REAL, SAVE, ALLOCATABLE :: qcld(:,:) 643 !$OMP THREADPRIVATE(qcld) 644 REAL, SAVE, ALLOCATABLE :: qss(:,:) 645 !$OMP THREADPRIVATE(qss) 646 REAL, SAVE, ALLOCATABLE :: qvc(:,:) 647 !$OMP THREADPRIVATE(qvc) 648 REAL, SAVE, ALLOCATABLE :: rnebclr(:,:) 649 !$OMP THREADPRIVATE(rnebclr) 650 REAL, SAVE, ALLOCATABLE :: rnebss(:,:) 651 !$OMP THREADPRIVATE(rnebss) 652 REAL, SAVE, ALLOCATABLE :: gamma_ss(:,:) 653 !$OMP THREADPRIVATE(gamma_ss) 654 REAL, SAVE, ALLOCATABLE :: N1_ss(:,:) 655 !$OMP THREADPRIVATE(N1_ss) 656 REAL, SAVE, ALLOCATABLE :: N2_ss(:,:) 657 !$OMP THREADPRIVATE(N2_ss) 658 REAL, SAVE, ALLOCATABLE :: drneb_sub(:,:) 659 !$OMP THREADPRIVATE(drneb_sub) 660 REAL, SAVE, ALLOCATABLE :: drneb_con(:,:) 661 !$OMP THREADPRIVATE(drneb_con) 662 REAL, SAVE, ALLOCATABLE :: drneb_tur(:,:) 663 !$OMP THREADPRIVATE(drneb_tur) 664 REAL, SAVE, ALLOCATABLE :: drneb_avi(:,:) 665 !$OMP THREADPRIVATE(drneb_avi) 666 REAL, SAVE, ALLOCATABLE :: zqsatl(:,:) 667 !$OMP THREADPRIVATE(zqsatl) 668 REAL, SAVE, ALLOCATABLE :: zqsats(:,:) 669 !$OMP THREADPRIVATE(zqsats) 670 REAL, SAVE, ALLOCATABLE :: Tcontr(:,:) 671 !$OMP THREADPRIVATE(Tcontr) 672 REAL, SAVE, ALLOCATABLE :: qcontr(:,:) 673 !$OMP THREADPRIVATE(qcontr) 674 REAL, SAVE, ALLOCATABLE :: qcontr2(:,:) 675 !$OMP THREADPRIVATE(qcontr2) 676 REAL, SAVE, ALLOCATABLE :: fcontrN(:,:) 677 !$OMP THREADPRIVATE(fcontrN) 678 REAL, SAVE, ALLOCATABLE :: fcontrP(:,:) 679 !$OMP THREADPRIVATE(fcontrP) 680 REAL, SAVE, ALLOCATABLE :: distcltop(:,:) 681 !$OMP THREADPRIVATE(distcltop) 682 REAL, SAVE, ALLOCATABLE :: temp_cltop(:,:) 683 !$OMP THREADPRIVATE(temp_cltop) 684 685 686 !--POPRECIP variables 687 REAL, SAVE, ALLOCATABLE :: qraindiag(:,:) 688 !$OMP THREADPRIVATE(qraindiag) 689 REAL, SAVE, ALLOCATABLE :: qsnowdiag(:,:) 690 !$OMP THREADPRIVATE(qsnowdiag) 691 REAL, SAVE, ALLOCATABLE :: dqreva(:,:) 692 !$OMP THREADPRIVATE(dqreva) 693 REAL, SAVE, ALLOCATABLE :: dqrauto(:,:) 694 !$OMP THREADPRIVATE(dqrauto) 695 REAL, SAVE, ALLOCATABLE :: dqrcol(:,:) 696 !$OMP THREADPRIVATE(dqrcol) 697 REAL, SAVE, ALLOCATABLE :: dqrmelt(:,:) 698 !$OMP THREADPRIVATE(dqrmelt) 699 REAL, SAVE, ALLOCATABLE :: dqrfreez(:,:) 700 !$OMP THREADPRIVATE(dqrfreez) 701 REAL, SAVE, ALLOCATABLE :: dqssub(:,:) 702 !$OMP THREADPRIVATE(dqssub) 703 REAL, SAVE, ALLOCATABLE :: dqsauto(:,:) 704 !$OMP THREADPRIVATE(dqsauto) 705 REAL, SAVE, ALLOCATABLE :: dqsagg(:,:) 706 !$OMP THREADPRIVATE(dqsagg) 707 REAL, SAVE, ALLOCATABLE :: dqsrim(:,:) 708 !$OMP THREADPRIVATE(dqsrim) 709 REAL, SAVE, ALLOCATABLE :: dqsmelt(:,:) 710 !$OMP THREADPRIVATE(dqsmelt) 711 REAL, SAVE, ALLOCATABLE :: dqsfreez(:,:) 712 !$OMP THREADPRIVATE(dqsfreez) 713 714 715 716 717 718 #ifdef CPP_StratAer 719 ! 720 ! variables for stratospheric aerosol 721 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: d_q_emiss 722 !$OMP THREADPRIVATE(d_q_emiss) 723 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: R2SO4 724 !$OMP THREADPRIVATE(R2SO4) 725 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: R2SO4B 726 !$OMP THREADPRIVATE(R2SO4B) 727 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: DENSO4 728 !$OMP THREADPRIVATE(DENSO4) 729 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:, :) :: DENSO4B 730 !$OMP THREADPRIVATE(DENSO4B) 731 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: f_r_wet 732 !$OMP THREADPRIVATE(f_r_wet) 733 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:, :) :: f_r_wetB 734 !$OMP THREADPRIVATE(f_r_wetB) 735 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: decfluxaer 736 !$OMP THREADPRIVATE(decfluxaer) 737 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: mdw 738 !$OMP THREADPRIVATE(mdw) 739 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: OCS_lifetime 740 !$OMP THREADPRIVATE(OCS_lifetime) 741 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: SO2_lifetime 742 !$OMP THREADPRIVATE(SO2_lifetime) 743 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: H2SO4_lifetime 744 !$OMP THREADPRIVATE(H2SO4_lifetime) 745 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: O3_clim 746 !$OMP THREADPRIVATE(O3_clim) 747 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: alpha_bin 748 !$OMP THREADPRIVATE(alpha_bin) 749 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: piz_bin 750 !$OMP THREADPRIVATE(piz_bin) 751 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: cg_bin 752 !$OMP THREADPRIVATE(cg_bin) 753 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_550 754 !$OMP THREADPRIVATE(tau_strat_550) 755 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_1020 756 !$OMP THREADPRIVATE(tau_strat_1020) 757 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tausum_strat 758 !$OMP THREADPRIVATE(tausum_strat) 759 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: surf_PM25_sulf 760 !$OMP THREADPRIVATE(surf_PM25_sulf) 761 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vsed_aer 762 !$OMP THREADPRIVATE(vsed_aer) 763 ! Sulfate aerosol concentration (dry mixing ratio) (condensed H2SO4 mmr) 764 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulfmmr 765 !$OMP THREADPRIVATE(sulfmmr) 766 ! SAD all aerosols (cm2/cm3) 767 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: SAD_sulfate 768 !$OMP THREADPRIVATE(SAD_sulfate) 769 ! sulfate MMR in different modes (based on sulfmmr, it must be dry mmr) 770 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: sulfmmr_mode 771 !$OMP THREADPRIVATE(sulfmmr_mode) 772 ! particle concentration in different modes (part/m3) 773 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: nd_mode 774 !$OMP THREADPRIVATE(nd_mode) 775 ! 776 !---3D budget variables 777 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_nucl 778 !$OMP THREADPRIVATE(budg_3D_nucl) 779 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_cond_evap 780 !$OMP THREADPRIVATE(budg_3D_cond_evap) 781 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_ocs_to_so2 782 !$OMP THREADPRIVATE(budg_3D_ocs_to_so2) 783 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_so2_to_h2so4 784 !$OMP THREADPRIVATE(budg_3D_so2_to_h2so4) 785 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_backgr_ocs 786 !$OMP THREADPRIVATE(budg_3D_backgr_ocs) 787 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_backgr_so2 788 !$OMP THREADPRIVATE(budg_3D_backgr_so2) 789 ! 790 !---2D budget variables 791 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_ocs 792 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_so2 793 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_h2so4 794 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_part 795 !$OMP THREADPRIVATE(budg_dep_dry_ocs,budg_dep_dry_so2,budg_dep_dry_h2so4,budg_dep_dry_part) 796 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_ocs 797 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_so2 798 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_h2so4 799 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_part 800 !$OMP THREADPRIVATE(budg_dep_wet_ocs,budg_dep_wet_so2,budg_dep_wet_h2so4,budg_dep_wet_part) 801 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_ocs 802 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_so2 803 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_h2so4 804 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_part 805 !$OMP THREADPRIVATE(budg_emi_ocs,budg_emi_so2,budg_emi_h2so4,budg_emi_part) 806 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_ocs_to_so2 807 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_so2_to_h2so4 808 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_h2so4_to_part 809 !$OMP THREADPRIVATE(budg_ocs_to_so2,budg_so2_to_h2so4,budg_h2so4_to_part) 810 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_sed_part 811 !$OMP THREADPRIVATE(budg_sed_part) 812 #endif 635 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: p_tropopause, z_tropopause, t_tropopause 636 !$OMP THREADPRIVATE(p_tropopause, z_tropopause, t_tropopause) 637 638 INTEGER, ALLOCATABLE, SAVE, DIMENSION(:, :) :: zn2mout 639 !$OMP THREADPRIVATE(zn2mout) 640 641 REAL, SAVE, ALLOCATABLE :: qclr(:, :) 642 !$OMP THREADPRIVATE(qclr) 643 REAL, SAVE, ALLOCATABLE :: qcld(:, :) 644 !$OMP THREADPRIVATE(qcld) 645 REAL, SAVE, ALLOCATABLE :: qss(:, :) 646 !$OMP THREADPRIVATE(qss) 647 REAL, SAVE, ALLOCATABLE :: qvc(:, :) 648 !$OMP THREADPRIVATE(qvc) 649 REAL, SAVE, ALLOCATABLE :: rnebclr(:, :) 650 !$OMP THREADPRIVATE(rnebclr) 651 REAL, SAVE, ALLOCATABLE :: rnebss(:, :) 652 !$OMP THREADPRIVATE(rnebss) 653 REAL, SAVE, ALLOCATABLE :: gamma_ss(:, :) 654 !$OMP THREADPRIVATE(gamma_ss) 655 REAL, SAVE, ALLOCATABLE :: N1_ss(:, :) 656 !$OMP THREADPRIVATE(N1_ss) 657 REAL, SAVE, ALLOCATABLE :: N2_ss(:, :) 658 !$OMP THREADPRIVATE(N2_ss) 659 REAL, SAVE, ALLOCATABLE :: drneb_sub(:, :) 660 !$OMP THREADPRIVATE(drneb_sub) 661 REAL, SAVE, ALLOCATABLE :: drneb_con(:, :) 662 !$OMP THREADPRIVATE(drneb_con) 663 REAL, SAVE, ALLOCATABLE :: drneb_tur(:, :) 664 !$OMP THREADPRIVATE(drneb_tur) 665 REAL, SAVE, ALLOCATABLE :: drneb_avi(:, :) 666 !$OMP THREADPRIVATE(drneb_avi) 667 REAL, SAVE, ALLOCATABLE :: zqsatl(:, :) 668 !$OMP THREADPRIVATE(zqsatl) 669 REAL, SAVE, ALLOCATABLE :: zqsats(:, :) 670 !$OMP THREADPRIVATE(zqsats) 671 REAL, SAVE, ALLOCATABLE :: Tcontr(:, :) 672 !$OMP THREADPRIVATE(Tcontr) 673 REAL, SAVE, ALLOCATABLE :: qcontr(:, :) 674 !$OMP THREADPRIVATE(qcontr) 675 REAL, SAVE, ALLOCATABLE :: qcontr2(:, :) 676 !$OMP THREADPRIVATE(qcontr2) 677 REAL, SAVE, ALLOCATABLE :: fcontrN(:, :) 678 !$OMP THREADPRIVATE(fcontrN) 679 REAL, SAVE, ALLOCATABLE :: fcontrP(:, :) 680 !$OMP THREADPRIVATE(fcontrP) 681 REAL, SAVE, ALLOCATABLE :: distcltop(:, :) 682 !$OMP THREADPRIVATE(distcltop) 683 REAL, SAVE, ALLOCATABLE :: temp_cltop(:, :) 684 !$OMP THREADPRIVATE(temp_cltop) 685 686 687 !--POPRECIP variables 688 REAL, SAVE, ALLOCATABLE :: qraindiag(:, :) 689 !$OMP THREADPRIVATE(qraindiag) 690 REAL, SAVE, ALLOCATABLE :: qsnowdiag(:, :) 691 !$OMP THREADPRIVATE(qsnowdiag) 692 REAL, SAVE, ALLOCATABLE :: dqreva(:, :) 693 !$OMP THREADPRIVATE(dqreva) 694 REAL, SAVE, ALLOCATABLE :: dqrauto(:, :) 695 !$OMP THREADPRIVATE(dqrauto) 696 REAL, SAVE, ALLOCATABLE :: dqrcol(:, :) 697 !$OMP THREADPRIVATE(dqrcol) 698 REAL, SAVE, ALLOCATABLE :: dqrmelt(:, :) 699 !$OMP THREADPRIVATE(dqrmelt) 700 REAL, SAVE, ALLOCATABLE :: dqrfreez(:, :) 701 !$OMP THREADPRIVATE(dqrfreez) 702 REAL, SAVE, ALLOCATABLE :: dqssub(:, :) 703 !$OMP THREADPRIVATE(dqssub) 704 REAL, SAVE, ALLOCATABLE :: dqsauto(:, :) 705 !$OMP THREADPRIVATE(dqsauto) 706 REAL, SAVE, ALLOCATABLE :: dqsagg(:, :) 707 !$OMP THREADPRIVATE(dqsagg) 708 REAL, SAVE, ALLOCATABLE :: dqsrim(:, :) 709 !$OMP THREADPRIVATE(dqsrim) 710 REAL, SAVE, ALLOCATABLE :: dqsmelt(:, :) 711 !$OMP THREADPRIVATE(dqsmelt) 712 REAL, SAVE, ALLOCATABLE :: dqsfreez(:, :) 713 !$OMP THREADPRIVATE(dqsfreez) 714 715 716 717 718 719 ! 720 ! variables for stratospheric aerosol 721 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: d_q_emiss 722 !$OMP THREADPRIVATE(d_q_emiss) 723 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: R2SO4 724 !$OMP THREADPRIVATE(R2SO4) 725 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: R2SO4B 726 !$OMP THREADPRIVATE(R2SO4B) 727 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: DENSO4 728 !$OMP THREADPRIVATE(DENSO4) 729 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: DENSO4B 730 !$OMP THREADPRIVATE(DENSO4B) 731 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: f_r_wet 732 !$OMP THREADPRIVATE(f_r_wet) 733 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: f_r_wetB 734 !$OMP THREADPRIVATE(f_r_wetB) 735 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: decfluxaer 736 !$OMP THREADPRIVATE(decfluxaer) 737 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: mdw 738 !$OMP THREADPRIVATE(mdw) 739 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: OCS_lifetime 740 !$OMP THREADPRIVATE(OCS_lifetime) 741 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: SO2_lifetime 742 !$OMP THREADPRIVATE(SO2_lifetime) 743 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: H2SO4_lifetime 744 !$OMP THREADPRIVATE(H2SO4_lifetime) 745 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: O3_clim 746 !$OMP THREADPRIVATE(O3_clim) 747 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: alpha_bin 748 !$OMP THREADPRIVATE(alpha_bin) 749 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: piz_bin 750 !$OMP THREADPRIVATE(piz_bin) 751 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: cg_bin 752 !$OMP THREADPRIVATE(cg_bin) 753 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: tau_strat_550 754 !$OMP THREADPRIVATE(tau_strat_550) 755 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: tau_strat_1020 756 !$OMP THREADPRIVATE(tau_strat_1020) 757 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: tausum_strat 758 !$OMP THREADPRIVATE(tausum_strat) 759 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: surf_PM25_sulf 760 !$OMP THREADPRIVATE(surf_PM25_sulf) 761 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: vsed_aer 762 !$OMP THREADPRIVATE(vsed_aer) 763 ! Sulfate aerosol concentration (dry mixing ratio) (condensed H2SO4 mmr) 764 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: sulfmmr 765 !$OMP THREADPRIVATE(sulfmmr) 766 ! SAD all aerosols (cm2/cm3) 767 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: SAD_sulfate 768 !$OMP THREADPRIVATE(SAD_sulfate) 769 ! sulfate MMR in different modes (based on sulfmmr, it must be dry mmr) 770 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: sulfmmr_mode 771 !$OMP THREADPRIVATE(sulfmmr_mode) 772 ! particle concentration in different modes (part/m3) 773 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: nd_mode 774 !$OMP THREADPRIVATE(nd_mode) 775 ! 776 !---3D budget variables 777 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: budg_3D_nucl 778 !$OMP THREADPRIVATE(budg_3D_nucl) 779 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: budg_3D_cond_evap 780 !$OMP THREADPRIVATE(budg_3D_cond_evap) 781 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: budg_3D_ocs_to_so2 782 !$OMP THREADPRIVATE(budg_3D_ocs_to_so2) 783 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: budg_3D_so2_to_h2so4 784 !$OMP THREADPRIVATE(budg_3D_so2_to_h2so4) 785 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: budg_3D_backgr_ocs 786 !$OMP THREADPRIVATE(budg_3D_backgr_ocs) 787 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: budg_3D_backgr_so2 788 !$OMP THREADPRIVATE(budg_3D_backgr_so2) 789 ! 790 !---2D budget variables 791 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_ocs 792 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_so2 793 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_h2so4 794 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_part 795 !$OMP THREADPRIVATE(budg_dep_dry_ocs,budg_dep_dry_so2,budg_dep_dry_h2so4,budg_dep_dry_part) 796 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_ocs 797 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_so2 798 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_h2so4 799 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_part 800 !$OMP THREADPRIVATE(budg_dep_wet_ocs,budg_dep_wet_so2,budg_dep_wet_h2so4,budg_dep_wet_part) 801 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_ocs 802 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_so2 803 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_h2so4 804 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_part 805 !$OMP THREADPRIVATE(budg_emi_ocs,budg_emi_so2,budg_emi_h2so4,budg_emi_part) 806 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_ocs_to_so2 807 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_so2_to_h2so4 808 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_h2so4_to_part 809 !$OMP THREADPRIVATE(budg_ocs_to_so2,budg_so2_to_h2so4,budg_h2so4_to_part) 810 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_sed_part 811 !$OMP THREADPRIVATE(budg_sed_part) 813 812 #ifdef REPROBUS 814 813 REAL,SAVE,ALLOCATABLE :: d_q_emiss(:,:) … … 818 817 CONTAINS 819 818 820 !======================================================================821 SUBROUTINE phys_local_var_init822 USE dimphy823 USE infotrac_phy, ONLY : nbtr,nqtot819 !====================================================================== 820 SUBROUTINE phys_local_var_init 821 USE dimphy 822 USE infotrac_phy, ONLY : nbtr, nqtot 824 823 #ifdef ISO 825 824 USE infotrac_phy, ONLY : ntraciso=>ntiso,niso 826 825 #endif 827 USE aero_mod 828 USE indice_sol_mod 829 USE phys_output_var_mod 830 USE phys_state_var_mod 831 #ifdef CPP_StratAer 832 USE infotrac_phy, ONLY : nbtr_bin 833 #endif 834 835 IMPLICIT NONE 836 ALLOCATE(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev), qbs_seri(klon,klev)) 837 ! SN 4D ISO 838 ALLOCATE(qx_seri(klon,klev,nqtot)) 839 ! SN 840 ALLOCATE(u_seri(klon,klev),v_seri(klon,klev)) 841 ALLOCATE(l_mixmin(klon,klev+1,nbsrf),l_mix(klon,klev+1,nbsrf),wprime(klon,klev+1,nbsrf)) 842 ALLOCATE(pbl_eps(klon,klev+1,nbsrf+1)) 843 ALLOCATE(tke_shear(klon,klev+1,nbsrf), tke_buoy(klon,klev+1,nbsrf), tke_trans(klon,klev+1,nbsrf)) 844 pbl_eps(:,:,:)=0. 845 tke_shear(:,:,:)=0.; tke_buoy(:,:,:)=0.; tke_trans(:,:,:)=0. 846 l_mix(:,:,:)=0.;l_mixmin(:,:,:)=0.;wprime(:,:,:)=0. ! doit etre initialse car pas toujours remplis 847 ALLOCATE(rhcl(klon,klev)) 848 ALLOCATE(tr_seri(klon,klev,nbtr)) 849 ALLOCATE(d_t_dyn(klon,klev),d_q_dyn(klon,klev)) 850 ALLOCATE(d_ql_dyn(klon,klev),d_qs_dyn(klon,klev), d_qbs_dyn(klon,klev)) 851 ALLOCATE(d_q_dyn2d(klon),d_ql_dyn2d(klon),d_qs_dyn2d(klon), d_qbs_dyn2d(klon)) 852 ALLOCATE(d_u_dyn(klon,klev),d_v_dyn(klon,klev)) 853 ALLOCATE(d_tr_dyn(klon,klev,nbtr)) !RomP 854 ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev),d_q_con_zmasse(klon,klev)) 855 ALLOCATE(d_u_con(klon,klev),d_v_con(klon,klev)) 856 ALLOCATE(d_t_wake(klon,klev),d_q_wake(klon,klev)) 857 ALLOCATE(d_t_lsc(klon,klev),d_q_lsc(klon,klev)) 858 ALLOCATE(d_t_lwr(klon,klev),d_t_lw0(klon,klev)) 859 ALLOCATE(d_t_swr(klon,klev),d_t_sw0(klon,klev)) 860 ALLOCATE(d_ql_lsc(klon,klev),d_qi_lsc(klon,klev)) 861 ALLOCATE(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev)) 862 ALLOCATE(d_t_ajs(klon,klev),d_q_ajs(klon,klev)) 863 !nrlmd< 864 ALLOCATE(d_t_ajs_w(klon,klev),d_q_ajs_w(klon,klev)) 865 ALLOCATE(d_t_ajs_x(klon,klev),d_q_ajs_x(klon,klev)) 866 !>nrlmd 867 ALLOCATE(d_u_ajs(klon,klev),d_v_ajs(klon,klev)) 868 ALLOCATE(d_t_eva(klon,klev),d_q_eva(klon,klev)) 869 ! SN 4D ISO 870 ALLOCATE(d_qx_eva(klon,klev,nqtot)) 871 ! SN 872 ALLOCATE(d_ql_eva(klon,klev),d_qi_eva(klon,klev)) 873 ALLOCATE(d_t_lscst(klon,klev),d_q_lscst(klon,klev)) 874 ALLOCATE(d_t_lscth(klon,klev),d_q_lscth(klon,klev)) 875 ALLOCATE(plul_st(klon),plul_th(klon)) 876 ALLOCATE(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev)) 877 ALLOCATE (d_qbs_vdf(klon,klev)) 878 ALLOCATE(d_t_bsss(klon,klev),d_q_bsss(klon,klev),d_qbs_bsss(klon,klev)) 879 ALLOCATE(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev)) 880 ALLOCATE(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev)) 826 USE aero_mod 827 USE indice_sol_mod 828 USE phys_output_var_mod 829 USE phys_state_var_mod 830 USE infotrac_phy, ONLY : nbtr_bin 831 832 IMPLICIT NONE 833 ALLOCATE(t_seri(klon, klev), q_seri(klon, klev), ql_seri(klon, klev), qs_seri(klon, klev), qbs_seri(klon, klev)) 834 ! SN 4D ISO 835 ALLOCATE(qx_seri(klon, klev, nqtot)) 836 ! SN 837 ALLOCATE(u_seri(klon, klev), v_seri(klon, klev)) 838 ALLOCATE(l_mixmin(klon, klev + 1, nbsrf), l_mix(klon, klev + 1, nbsrf), wprime(klon, klev + 1, nbsrf)) 839 ALLOCATE(pbl_eps(klon, klev + 1, nbsrf + 1)) 840 ALLOCATE(tke_shear(klon, klev + 1, nbsrf), tke_buoy(klon, klev + 1, nbsrf), tke_trans(klon, klev + 1, nbsrf)) 841 pbl_eps(:, :, :) = 0. 842 tke_shear(:, :, :) = 0.; tke_buoy(:, :, :) = 0.; tke_trans(:, :, :) = 0. 843 l_mix(:, :, :) = 0.;l_mixmin(:, :, :) = 0.;wprime(:, :, :) = 0. ! doit etre initialse car pas toujours remplis 844 ALLOCATE(rhcl(klon, klev)) 845 ALLOCATE(tr_seri(klon, klev, nbtr)) 846 ALLOCATE(d_t_dyn(klon, klev), d_q_dyn(klon, klev)) 847 ALLOCATE(d_ql_dyn(klon, klev), d_qs_dyn(klon, klev), d_qbs_dyn(klon, klev)) 848 ALLOCATE(d_q_dyn2d(klon), d_ql_dyn2d(klon), d_qs_dyn2d(klon), d_qbs_dyn2d(klon)) 849 ALLOCATE(d_u_dyn(klon, klev), d_v_dyn(klon, klev)) 850 ALLOCATE(d_tr_dyn(klon, klev, nbtr)) !RomP 851 ALLOCATE(d_t_con(klon, klev), d_q_con(klon, klev), d_q_con_zmasse(klon, klev)) 852 ALLOCATE(d_u_con(klon, klev), d_v_con(klon, klev)) 853 ALLOCATE(d_t_wake(klon, klev), d_q_wake(klon, klev)) 854 ALLOCATE(d_t_lsc(klon, klev), d_q_lsc(klon, klev)) 855 ALLOCATE(d_t_lwr(klon, klev), d_t_lw0(klon, klev)) 856 ALLOCATE(d_t_swr(klon, klev), d_t_sw0(klon, klev)) 857 ALLOCATE(d_ql_lsc(klon, klev), d_qi_lsc(klon, klev)) 858 ALLOCATE(d_t_ajsb(klon, klev), d_q_ajsb(klon, klev)) 859 ALLOCATE(d_t_ajs(klon, klev), d_q_ajs(klon, klev)) 860 !nrlmd< 861 ALLOCATE(d_t_ajs_w(klon, klev), d_q_ajs_w(klon, klev)) 862 ALLOCATE(d_t_ajs_x(klon, klev), d_q_ajs_x(klon, klev)) 863 !>nrlmd 864 ALLOCATE(d_u_ajs(klon, klev), d_v_ajs(klon, klev)) 865 ALLOCATE(d_t_eva(klon, klev), d_q_eva(klon, klev)) 866 ! SN 4D ISO 867 ALLOCATE(d_qx_eva(klon, klev, nqtot)) 868 ! SN 869 ALLOCATE(d_ql_eva(klon, klev), d_qi_eva(klon, klev)) 870 ALLOCATE(d_t_lscst(klon, klev), d_q_lscst(klon, klev)) 871 ALLOCATE(d_t_lscth(klon, klev), d_q_lscth(klon, klev)) 872 ALLOCATE(plul_st(klon), plul_th(klon)) 873 ALLOCATE(d_t_vdf(klon, klev), d_q_vdf(klon, klev), d_t_diss(klon, klev)) 874 ALLOCATE (d_qbs_vdf(klon, klev)) 875 ALLOCATE(d_t_bsss(klon, klev), d_q_bsss(klon, klev), d_qbs_bsss(klon, klev)) 876 ALLOCATE(d_t_vdf_w(klon, klev), d_q_vdf_w(klon, klev)) 877 ALLOCATE(d_t_vdf_x(klon, klev), d_q_vdf_x(klon, klev)) 881 878 #ifdef ISO 882 879 allocate(xt_seri(ntraciso,klon,klev)) … … 909 906 #endif 910 907 911 ALLOCATE(d_u_vdf(klon,klev),d_v_vdf(klon,klev))912 ALLOCATE(d_t_oli(klon,klev),d_t_oro(klon,klev))913 ALLOCATE(d_u_oli(klon,klev),d_v_oli(klon,klev))914 ALLOCATE(d_u_oro(klon,klev),d_v_oro(klon,klev))915 ALLOCATE(d_u_oro_gw(klon,klev),d_v_oro_gw(klon,klev))916 ALLOCATE(d_t_oro_gw(klon,klev))917 ALLOCATE(d_t_lif(klon,klev),d_t_ec(klon,klev))918 ALLOCATE(d_u_lif(klon,klev),d_v_lif(klon,klev))919 ALLOCATE(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))920 921 ! Special RRTM922 ALLOCATE(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1))923 ZFLDN0= 0.924 ALLOCATE(ZFLUP0(klon,klev+1),ZFSDN0(klon,klev+1),ZFSUP0(klon,klev+1))925 !926 927 928 929 930 931 932 ALLOCATE(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))933 ALLOCATE(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))934 ALLOCATE(topswcf_aero(klon,3), solswcf_aero(klon,3))935 ALLOCATE(du_gwd_hines(klon,klev),dv_gwd_hines(klon,klev))936 ALLOCATE(dv_gwd_rando(klon,klev),dv_gwd_front(klon,klev))937 ALLOCATE(east_gwstress(klon,klev),west_gwstress(klon,klev))938 east_gwstress(:,:)=0 !ym missing init939 west_gwstress(:,:)=0 !ym missing init940 ALLOCATE(d_t_hin(klon,klev))941 ALLOCATE(d_q_ch4(klon,klev))942 ALLOCATE(stratomask(klon,klev))943 ALLOCATE(tausum_aero(klon,nwave,naero_tot))944 ALLOCATE(drytausum_aero(klon,naero_tot))945 ALLOCATE(tau3d_aero(klon,klev,nwave,naero_tot))946 947 948 949 950 951 952 953 954 955 ALLOCATE(ec550aer(klon,klev))956 957 958 959 960 961 962 963 ALLOCATE(concso4(klon,klev))964 ALLOCATE(concno3(klon,klev))965 ALLOCATE(concoa(klon,klev))966 ALLOCATE(concbc(klon,klev))967 ALLOCATE(concss(klon,klev))968 ALLOCATE(concdust(klon,klev))969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 !IM ajout variables CFMIP2/CMIP5987 988 989 990 ALLOCATE(topsw_aerop(klon,naero_grp), topsw0_aerop(klon,naero_grp))991 ALLOCATE(solsw_aerop(klon,naero_grp), solsw0_aerop(klon,naero_grp))992 ALLOCATE(topswcf_aerop(klon,naero_grp), solswcf_aerop(klon,naero_grp))993 994 ! additional LW variables CK995 996 997 998 999 !AI Ajout Ecrad (3Deffect)1000 1001 1002 1003 ALLOCATE(topsw_aero_s2(klon,naero_grp), topsw0_aero_s2(klon,naero_grp))1004 ALLOCATE(solsw_aero_s2(klon,naero_grp), solsw0_aero_s2(klon,naero_grp))1005 ALLOCATE(topswcf_aero_s2(klon,naero_grp), solswcf_aero_s2(klon,naero_grp))1006 ! additional LW variables CK1007 1008 1009 1010 1011 ! FH Ajout de celles necessaires au phys_output_write_mod1012 1013 1014 ALLOCATE(ptstar(klon),pt0(klon),slp(klon))1015 !!1016 !! Wake variables1017 1018 ALLOCATE(wake_h(klon),wake_k(klon))1019 1020 1021 1022 1023 1024 !! ALLOCATE( d_s_vdf(klon), d_dens_vdf(klon))1025 1026 !! ALLOCATE( d_s_the(klon), d_dens_the(klon))1027 908 ALLOCATE(d_u_vdf(klon, klev), d_v_vdf(klon, klev)) 909 ALLOCATE(d_t_oli(klon, klev), d_t_oro(klon, klev)) 910 ALLOCATE(d_u_oli(klon, klev), d_v_oli(klon, klev)) 911 ALLOCATE(d_u_oro(klon, klev), d_v_oro(klon, klev)) 912 ALLOCATE(d_u_oro_gw(klon, klev), d_v_oro_gw(klon, klev)) 913 ALLOCATE(d_t_oro_gw(klon, klev)) 914 ALLOCATE(d_t_lif(klon, klev), d_t_ec(klon, klev)) 915 ALLOCATE(d_u_lif(klon, klev), d_v_lif(klon, klev)) 916 ALLOCATE(d_ts(klon, nbsrf), d_tr(klon, klev, nbtr)) 917 918 ! Special RRTM 919 ALLOCATE(ZLWFT0_i(klon, klev + 1), ZSWFT0_i(klon, klev + 1), ZFLDN0(klon, klev + 1)) 920 ZFLDN0 = 0. 921 ALLOCATE(ZFLUP0(klon, klev + 1), ZFSDN0(klon, klev + 1), ZFSUP0(klon, klev + 1)) 922 ! 923 ALLOCATE(topswad_aero(klon), solswad_aero(klon)) 924 ALLOCATE(topswai_aero(klon), solswai_aero(klon)) 925 ALLOCATE(topswad0_aero(klon), solswad0_aero(klon)) 926 ALLOCATE(toplwad_aero(klon), sollwad_aero(klon)) 927 ALLOCATE(toplwai_aero(klon), sollwai_aero(klon)) 928 ALLOCATE(toplwad0_aero(klon), sollwad0_aero(klon)) 929 ALLOCATE(topsw_aero(klon, naero_grp), solsw_aero(klon, naero_grp)) 930 ALLOCATE(topsw0_aero(klon, naero_grp), solsw0_aero(klon, naero_grp)) 931 ALLOCATE(topswcf_aero(klon, 3), solswcf_aero(klon, 3)) 932 ALLOCATE(du_gwd_hines(klon, klev), dv_gwd_hines(klon, klev)) 933 ALLOCATE(dv_gwd_rando(klon, klev), dv_gwd_front(klon, klev)) 934 ALLOCATE(east_gwstress(klon, klev), west_gwstress(klon, klev)) 935 east_gwstress(:, :) = 0 !ym missing init 936 west_gwstress(:, :) = 0 !ym missing init 937 ALLOCATE(d_t_hin(klon, klev)) 938 ALLOCATE(d_q_ch4(klon, klev)) 939 ALLOCATE(stratomask(klon, klev)) 940 ALLOCATE(tausum_aero(klon, nwave, naero_tot)) 941 ALLOCATE(drytausum_aero(klon, naero_tot)) 942 ALLOCATE(tau3d_aero(klon, klev, nwave, naero_tot)) 943 ALLOCATE(dNovrN(klon)) 944 ALLOCATE(zfice(klon, klev)) 945 ALLOCATE(od443aer(klon)) 946 ALLOCATE(od550aer(klon)) 947 ALLOCATE(od865aer(klon)) 948 ALLOCATE(dryod550aer(klon)) 949 dryod550aer(:) = 0. 950 ALLOCATE(abs550aer(klon)) 951 abs550aer(:) = 0. 952 ALLOCATE(ec550aer(klon, klev)) 953 ALLOCATE(od550lt1aer(klon)) 954 ALLOCATE(sconcso4(klon)) 955 ALLOCATE(sconcno3(klon)) 956 ALLOCATE(sconcoa(klon)) 957 ALLOCATE(sconcbc(klon)) 958 ALLOCATE(sconcss(klon)) 959 ALLOCATE(sconcdust(klon)) 960 ALLOCATE(concso4(klon, klev)) 961 ALLOCATE(concno3(klon, klev)) 962 ALLOCATE(concoa(klon, klev)) 963 ALLOCATE(concbc(klon, klev)) 964 ALLOCATE(concss(klon, klev)) 965 ALLOCATE(concdust(klon, klev)) 966 ALLOCATE(loadso4(klon)) 967 ALLOCATE(loadoa(klon)) 968 ALLOCATE(loadbc(klon)) 969 ALLOCATE(loadss(klon)) 970 ALLOCATE(loaddust(klon)) 971 ALLOCATE(loadno3(klon)) 972 ALLOCATE(load_tmp1(klon)) 973 ALLOCATE(load_tmp2(klon)) 974 ALLOCATE(load_tmp3(klon)) 975 ALLOCATE(load_tmp4(klon)) 976 ALLOCATE(load_tmp5(klon)) 977 ALLOCATE(load_tmp6(klon)) 978 ALLOCATE(load_tmp7(klon)) 979 ALLOCATE(load_tmp8(klon)) 980 ALLOCATE(load_tmp9(klon)) 981 ALLOCATE(load_tmp10(klon)) 982 983 !IM ajout variables CFMIP2/CMIP5 984 ALLOCATE(topswad_aerop(klon), solswad_aerop(klon)) 985 ALLOCATE(topswai_aerop(klon), solswai_aerop(klon)) 986 ALLOCATE(topswad0_aerop(klon), solswad0_aerop(klon)) 987 ALLOCATE(topsw_aerop(klon, naero_grp), topsw0_aerop(klon, naero_grp)) 988 ALLOCATE(solsw_aerop(klon, naero_grp), solsw0_aerop(klon, naero_grp)) 989 ALLOCATE(topswcf_aerop(klon, naero_grp), solswcf_aerop(klon, naero_grp)) 990 991 ! additional LW variables CK 992 ALLOCATE(toplwad_aerop(klon), sollwad_aerop(klon)) 993 ALLOCATE(toplwai_aerop(klon), sollwai_aerop(klon)) 994 ALLOCATE(toplwad0_aerop(klon), sollwad0_aerop(klon)) 995 996 !AI Ajout Ecrad (3Deffect) 997 ALLOCATE(topswad_aero_s2(klon), solswad_aero_s2(klon)) 998 ALLOCATE(topswai_aero_s2(klon), solswai_aero_s2(klon)) 999 ALLOCATE(topswad0_aero_s2(klon), solswad0_aero_s2(klon)) 1000 ALLOCATE(topsw_aero_s2(klon, naero_grp), topsw0_aero_s2(klon, naero_grp)) 1001 ALLOCATE(solsw_aero_s2(klon, naero_grp), solsw0_aero_s2(klon, naero_grp)) 1002 ALLOCATE(topswcf_aero_s2(klon, naero_grp), solswcf_aero_s2(klon, naero_grp)) 1003 ! additional LW variables CK 1004 ALLOCATE(toplwad_aero_s2(klon), sollwad_aero_s2(klon)) 1005 ALLOCATE(toplwai_aero_s2(klon), sollwai_aero_s2(klon)) 1006 ALLOCATE(toplwad0_aero_s2(klon), sollwad0_aero_s2(klon)) 1007 1008 ! FH Ajout de celles necessaires au phys_output_write_mod 1009 1010 ALLOCATE(tal1(klon), pal1(klon), pab1(klon), pab2(klon)) 1011 ALLOCATE(ptstar(klon), pt0(klon), slp(klon)) 1012 !! 1013 !! Wake variables 1014 ALLOCATE(alp_wake(klon)) 1015 ALLOCATE(wake_h(klon), wake_k(klon)) 1016 ALLOCATE(wake_omg(klon, klev)) 1017 ALLOCATE(d_deltat_wk(klon, klev), d_deltaq_wk(klon, klev)) 1018 ALLOCATE(d_s_wk(klon), d_s_a_wk(klon), d_dens_wk(klon), d_dens_a_wk(klon)) 1019 ALLOCATE(d_deltat_wk_gw(klon, klev), d_deltaq_wk_gw(klon, klev)) 1020 ALLOCATE(d_deltat_vdf(klon, klev), d_deltaq_vdf(klon, klev)) 1021 !! ALLOCATE( d_s_vdf(klon), d_dens_vdf(klon)) 1022 ALLOCATE(d_deltat_the(klon, klev), d_deltaq_the(klon, klev)) 1023 !! ALLOCATE( d_s_the(klon), d_dens_the(klon)) 1024 ALLOCATE(d_deltat_ajs_cv(klon, klev), d_deltaq_ajs_cv(klon, klev)) 1028 1025 #ifdef ISO 1029 1026 ALLOCATE(d_deltaxt_wk(ntraciso,klon, klev)) … … 1033 1030 ALLOCATE(d_deltaxt_ajs_cv(ntraciso,klon, klev)) 1034 1031 #endif 1035 !! End of wake variables1036 !!1037 1038 1039 1040 1041 1042 1043 1044 1045 !1046 !nrlmd+jyg<1047 1048 1049 !>nrlmd+jyg1050 !1051 1052 1053 1054 1055 1056 1057 1058 zxustartlic(:)=0. ; zxrhoslic(:)=0. ; zxqsaltlic(:)=0.1059 1060 1061 ALLOCATE(qlth(klon,klev), qith(klon,klev), qsith(klon,klev), wiceth(klon,klev))1062 1032 !! End of wake variables 1033 !! 1034 ALLOCATE(bils(klon)) 1035 ALLOCATE(cdragm(klon), cdragh(klon), cldh(klon), cldl(klon)) 1036 ALLOCATE(cldm(klon), cldq(klon), cldt(klon), qsat2m(klon)) 1037 ALLOCATE(JrNt(klon)) 1038 ALLOCATE(dthmin(klon), evap(klon), snowerosion(klon), fder(klon), plcl(klon), plfc(klon)) 1039 ALLOCATE(prw(klon), prlw(klon), prsw(klon), prbsw(klon), water_budget(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon)) 1040 ALLOCATE(s_lcl(klon)) 1041 ALLOCATE(s_pblh(klon), s_pblt(klon), s_therm(klon)) 1042 ! 1043 !nrlmd+jyg< 1044 ALLOCATE(s_pblh_x(klon), s_pblh_w(klon)) 1045 ALLOCATE(s_lcl_x(klon), s_lcl_w(klon)) 1046 !>nrlmd+jyg 1047 ! 1048 ALLOCATE(slab_wfbils(klon), tpot(klon), tpote(klon), ue(klon)) 1049 ALLOCATE(uq(klon), ve(klon), vq(klon), zxffonte(klon)) 1050 ALLOCATE(uwat(klon), vwat(klon)) 1051 ALLOCATE(zxfqcalving(klon), zxfluxlat(klon)) 1052 ALLOCATE(zxtsol(klon), snow_lsc(klon), zxfqfonte(klon), zxqsurf(klon)) 1053 ALLOCATE(zxrunofflic(klon)) 1054 ALLOCATE(zxustartlic(klon), zxrhoslic(klon), zxqsaltlic(klon)) 1055 zxustartlic(:) = 0. ; zxrhoslic(:) = 0. ; zxqsaltlic(:) = 0. 1056 ALLOCATE(rain_lsc(klon)) 1057 ALLOCATE(rain_num(klon)) 1058 ALLOCATE(qlth(klon, klev), qith(klon, klev), qsith(klon, klev), wiceth(klon, klev)) 1059 ! 1063 1060 #ifdef ISO 1064 1061 ALLOCATE(xtevap(ntraciso,klon)) … … 1073 1070 runoff_diag(:)=0. ; xtrunoff_diag(:,:)=0. ! because variables are only given values on knon grid points 1074 1071 #endif 1075 ! 1076 ALLOCATE(sens_x(klon), sens_w(klon)) 1077 ALLOCATE(zxfluxlat_x(klon), zxfluxlat_w(klon)) 1078 ALLOCATE(delta_qsurf(klon)) 1079 !jyg< 1080 !! ALLOCATE(t_x(klon,klev), t_w(klon,klev)) 1081 !! ALLOCATE(q_x(klon,klev), q_w(klon,klev)) 1082 !>jyg 1083 ALLOCATE(dtvdf_x(klon,klev), dtvdf_w(klon,klev)) 1084 dtvdf_x = 0 ; dtvdf_w=0 ; !ym missing init 1085 ALLOCATE(dqvdf_x(klon,klev), dqvdf_w(klon,klev)) 1086 dqvdf_x = 0 ; dqvdf_w=0 ; !ym missing init 1087 ALLOCATE(pbl_tke_input(klon,klev+1,nbsrf)) 1088 ALLOCATE(t_therm(klon,klev), q_therm(klon,klev),u_therm(klon,klev), v_therm(klon,klev)) 1089 ALLOCATE(cdragh_x(klon), cdragh_w(klon)) 1090 ALLOCATE(cdragm_x(klon), cdragm_w(klon)) 1091 ALLOCATE(kh(klon), kh_x(klon), kh_w(klon)) 1072 ! 1073 ALLOCATE(sens_x(klon), sens_w(klon)) 1074 ALLOCATE(zxfluxlat_x(klon), zxfluxlat_w(klon)) 1075 ALLOCATE(delta_qsurf(klon)) 1076 !jyg< 1077 !! ALLOCATE(t_x(klon,klev), t_w(klon,klev)) 1078 !! ALLOCATE(q_x(klon,klev), q_w(klon,klev)) 1079 !>jyg 1080 ALLOCATE(dtvdf_x(klon, klev), dtvdf_w(klon, klev)) 1081 dtvdf_x = 0 ; dtvdf_w = 0 ; 1082 !ym missing init 1083 ALLOCATE(dqvdf_x(klon, klev), dqvdf_w(klon, klev)) 1084 dqvdf_x = 0 ; dqvdf_w = 0 ; 1085 !ym missing init 1086 ALLOCATE(pbl_tke_input(klon, klev + 1, nbsrf)) 1087 ALLOCATE(t_therm(klon, klev), q_therm(klon, klev), u_therm(klon, klev), v_therm(klon, klev)) 1088 ALLOCATE(cdragh_x(klon), cdragh_w(klon)) 1089 ALLOCATE(cdragm_x(klon), cdragm_w(klon)) 1090 ALLOCATE(kh(klon), kh_x(klon), kh_w(klon)) 1092 1091 #ifdef ISO 1093 1092 ALLOCATE(dxtvdf_x(ntraciso,klon,klev), dxtvdf_w(ntraciso,klon,klev)) 1094 1093 ALLOCATE(xt_therm(ntraciso,klon,klev)) 1095 1094 #endif 1096 !1097 ALLOCATE(ptconv(klon,klev))1098 ALLOCATE(ratqsc(klon,klev))1099 !1100 1101 1102 1103 1104 1105 1106 alp_bl_conv(:)=0 ; alp_bl_det(:)=01107 1108 alp_bl_fluct_m(:)=0 ; alp_bl_fluct_tke(:)= 0.1109 1110 alp_bl_stat(:)=01111 1112 1113 1114 ! ALLOCATE(upwd(klon, klev), omega(klon, klev), coefh(klon, klev))1115 1116 1117 ! ALLOCATE(coefm(klon, klev), lambda_th(klon, klev), cldemi(klon, klev))1118 1119 1120 1121 1122 1123 ALLOCATE(zphi(klon, klev), zx_rh(klon, klev), zx_rhl(klon,klev), zx_rhi(klon,klev))1124 zx_rhl(:,:)=0.; zx_rhi(:,:)=0. ! because not always defined1125 1126 1127 1128 1129 1130 1131 1132 ! FC 1133 ALLOCATE(zxfluxq(klon,klev),zxfluxt(klon,klev))1134 !1135 ! Deep convective variables used in phytrac1136 ALLOCATE(pmflxr(klon, klev+1), pmflxs(klon, klev+1))1137 ALLOCATE(wdtrainA(klon,klev),wdtrainS(klon,klev),wdtrainM(klon,klev))1138 1139 ALLOCATE(ep(klon,klev)) ! epmax_cape1140 ALLOCATE(da(klon,klev), mp(klon,klev))1141 ALLOCATE(phi(klon,klev,klev))1142 ALLOCATE(wght_cvfd(klon,klev))1143 ALLOCATE(phi2(klon,klev,klev))1144 ALLOCATE(d1a(klon,klev), dam(klon,klev))1145 ALLOCATE(ev(klon,klev))1146 ALLOCATE(elij(klon,klev,klev))1147 ALLOCATE(qtaa(klon,klev))1148 ALLOCATE(clw(klon,klev))1149 ALLOCATE(epmlmMm(klon,klev,klev), eplaMm(klon,klev))1150 ALLOCATE(sij(klon,klev,klev))1095 ! 1096 ALLOCATE(ptconv(klon, klev)) 1097 ALLOCATE(ratqsc(klon, klev)) 1098 ! 1099 ALLOCATE(wbeff(klon), convoccur(klon), zmax_th(klon)) 1100 ALLOCATE(zq2m(klon), zt2m(klon), weak_inversion(klon)) 1101 ALLOCATE(zt2m_min_mon(klon), zt2m_max_mon(klon)) 1102 ALLOCATE(t2m_min_mon(klon), t2m_max_mon(klon)) 1103 ALLOCATE(sens(klon), flwp(klon), fiwp(klon)) 1104 ALLOCATE(alp_bl_conv(klon), alp_bl_det(klon)) 1105 alp_bl_conv(:) = 0 ; alp_bl_det(:) = 0 1106 ALLOCATE(alp_bl_fluct_m(klon), alp_bl_fluct_tke(klon)) 1107 alp_bl_fluct_m(:) = 0 ; alp_bl_fluct_tke(:) = 0. 1108 ALLOCATE(alp_bl_stat(klon), n2(klon), s2(klon), strig(klon), zcong(klon), zlcl_th(klon)) 1109 alp_bl_stat(:) = 0 1110 ALLOCATE(proba_notrig(klon), random_notrig(klon)) 1111 1112 ALLOCATE(dnwd0(klon, klev)) 1113 ! ALLOCATE(upwd(klon, klev), omega(klon, klev), coefh(klon, klev)) 1114 ALLOCATE(omega(klon, klev)) 1115 ALLOCATE(epmax_diag(klon)) ! epmax_cape 1116 ! ALLOCATE(coefm(klon, klev), lambda_th(klon, klev), cldemi(klon, klev)) 1117 ALLOCATE(lambda_th(klon, klev), cldemi(klon, klev)) 1118 ALLOCATE(cldfra(klon, klev), cldtau(klon, klev), fiwc(klon, klev)) 1119 ALLOCATE(fl(klon, klev), re(klon, klev), flwc(klon, klev)) 1120 ALLOCATE(ref_liq(klon, klev), ref_ice(klon, klev), theta(klon, klev)) 1121 ALLOCATE(ref_liq_pi(klon, klev), ref_ice_pi(klon, klev)) 1122 ALLOCATE(zphi(klon, klev), zx_rh(klon, klev), zx_rhl(klon, klev), zx_rhi(klon, klev)) 1123 zx_rhl(:, :) = 0.; zx_rhi(:, :) = 0. ! because not always defined 1124 ALLOCATE(pmfd(klon, klev), pmfu(klon, klev)) 1125 1126 ALLOCATE(t2m(klon, nbsrf), fluxlat(klon, nbsrf)) 1127 ALLOCATE(fsollw(klon, nbsrf)) 1128 ALLOCATE(fsolsw(klon, nbsrf), wfbils(klon, nbsrf)) 1129 ALLOCATE(wfevap(klon, nbsrf)) 1130 ALLOCATE(evap_pot(klon, nbsrf)) 1131 ! FC 1132 ALLOCATE(zxfluxq(klon, klev), zxfluxt(klon, klev)) 1133 ! 1134 ! Deep convective variables used in phytrac 1135 ALLOCATE(pmflxr(klon, klev + 1), pmflxs(klon, klev + 1)) 1136 ALLOCATE(wdtrainA(klon, klev), wdtrainS(klon, klev), wdtrainM(klon, klev)) 1137 ALLOCATE(dnwd(klon, klev), upwd(klon, klev)) 1138 ALLOCATE(ep(klon, klev)) ! epmax_cape 1139 ALLOCATE(da(klon, klev), mp(klon, klev)) 1140 ALLOCATE(phi(klon, klev, klev)) 1141 ALLOCATE(wght_cvfd(klon, klev)) 1142 ALLOCATE(phi2(klon, klev, klev)) 1143 ALLOCATE(d1a(klon, klev), dam(klon, klev)) 1144 ALLOCATE(ev(klon, klev)) 1145 ALLOCATE(elij(klon, klev, klev)) 1146 ALLOCATE(qtaa(klon, klev)) 1147 ALLOCATE(clw(klon, klev)) 1148 ALLOCATE(epmlmMm(klon, klev, klev), eplaMm(klon, klev)) 1149 ALLOCATE(sij(klon, klev, klev)) 1151 1150 #ifdef ISO 1152 1151 ALLOCATE(xtwdtrainA(ntraciso,klon,klev)) … … 1173 1172 #endif 1174 1173 1175 ALLOCATE(prfl(klon, klev+1)) 1176 ALLOCATE(psfl(klon, klev+1), fraca(klon, klev+1), Vprecip(klon, klev+1)) 1177 ALLOCATE(bsfl(klon,klev+1)) 1178 ALLOCATE(zw2(klon, klev+1)) 1179 1180 ALLOCATE(fluxu(klon, klev, nbsrf), fluxv(klon, klev, nbsrf)) 1181 ALLOCATE(fluxt(klon, klev, nbsrf)) 1182 1183 ALLOCATE(uwriteSTD(klon,nlevSTD,nfiles), vwriteSTD(klon,nlevSTD,nfiles)) 1184 ALLOCATE(wwriteSTD(klon,nlevSTD,nfiles), phiwriteSTD(klon,nlevSTD,nfiles)) 1185 ALLOCATE(qwriteSTD(klon,nlevSTD,nfiles), twriteSTD(klon,nlevSTD,nfiles)) 1186 ALLOCATE(rhwriteSTD(klon,nlevSTD,nfiles)) 1187 1188 ! ug et d'autres encore: 1189 ALLOCATE(beta_prec(klon,klev)) 1190 ALLOCATE(rneb(klon,klev),rnebjn(klon,klev),rneblsvol(klon,klev)) 1191 ALLOCATE(pfraclr(klon,klev),pfracld(klon,klev)) 1192 pfraclr(:,:)=0. ; pfracld(:,:)=0. ! because not always defined 1193 ALLOCATE(cldfraliq(klon,klev)) 1194 ALLOCATE(sigma2_icefracturb(klon,klev)) 1195 ALLOCATE(mean_icefracturb(klon,klev)) 1196 ALLOCATE(distcltop(klon,klev)) 1197 ALLOCATE(temp_cltop(klon,klev)) 1198 1199 1200 ALLOCATE (zxsnow(klon),snowhgt(klon),qsnow(klon),to_ice(klon)) 1201 ALLOCATE (sissnow(klon),runoff(klon),albsol3_lic(klon)) 1174 ALLOCATE(prfl(klon, klev + 1)) 1175 ALLOCATE(psfl(klon, klev + 1), fraca(klon, klev + 1), Vprecip(klon, klev + 1)) 1176 ALLOCATE(bsfl(klon, klev + 1)) 1177 ALLOCATE(zw2(klon, klev + 1)) 1178 1179 ALLOCATE(fluxu(klon, klev, nbsrf), fluxv(klon, klev, nbsrf)) 1180 ALLOCATE(fluxt(klon, klev, nbsrf)) 1181 1182 ALLOCATE(uwriteSTD(klon, nlevSTD, nfiles), vwriteSTD(klon, nlevSTD, nfiles)) 1183 ALLOCATE(wwriteSTD(klon, nlevSTD, nfiles), phiwriteSTD(klon, nlevSTD, nfiles)) 1184 ALLOCATE(qwriteSTD(klon, nlevSTD, nfiles), twriteSTD(klon, nlevSTD, nfiles)) 1185 ALLOCATE(rhwriteSTD(klon, nlevSTD, nfiles)) 1186 1187 ! ug et d'autres encore: 1188 ALLOCATE(beta_prec(klon, klev)) 1189 ALLOCATE(rneb(klon, klev), rnebjn(klon, klev), rneblsvol(klon, klev)) 1190 ALLOCATE(pfraclr(klon, klev), pfracld(klon, klev)) 1191 pfraclr(:, :) = 0. ; pfracld(:, :) = 0. ! because not always defined 1192 ALLOCATE(cldfraliq(klon, klev)) 1193 ALLOCATE(sigma2_icefracturb(klon, klev)) 1194 ALLOCATE(mean_icefracturb(klon, klev)) 1195 ALLOCATE(distcltop(klon, klev)) 1196 ALLOCATE(temp_cltop(klon, klev)) 1197 1198 ALLOCATE (zxsnow(klon), snowhgt(klon), qsnow(klon), to_ice(klon)) 1199 ALLOCATE (sissnow(klon), runoff(klon), albsol3_lic(klon)) 1202 1200 #ifdef ISO 1203 1201 ALLOCATE (zxxtsnow(niso,klon)) … … 1206 1204 #endif 1207 1205 1208 1209 1210 1211 1212 ALLOCATE(zn2mout(klon,6))1213 1214 ! Supersaturation1215 ALLOCATE(rneb_seri(klon,klev))1216 ALLOCATE(d_rneb_dyn(klon,klev))1217 ALLOCATE(qclr(klon,klev), qcld(klon,klev), qss(klon,klev), qvc(klon,klev))1218 ALLOCATE(rnebclr(klon,klev), rnebss(klon,klev), gamma_ss(klon,klev))1219 ALLOCATE(N1_ss(klon,klev), N2_ss(klon,klev))1220 ALLOCATE(drneb_sub(klon,klev), drneb_con(klon,klev), drneb_tur(klon,klev), drneb_avi(klon,klev))1221 ALLOCATE(zqsatl(klon,klev), zqsats(klon,klev))1222 ALLOCATE(Tcontr(klon,klev), qcontr(klon,klev), qcontr2(klon,klev), fcontrN(klon,klev), fcontrP(klon,klev))1223 1224 !--POPRECIP variables1225 ALLOCATE(qraindiag(klon,klev), qsnowdiag(klon,klev))1226 ALLOCATE(dqreva(klon,klev), dqssub(klon,klev))1227 ALLOCATE(dqrauto(klon,klev), dqrcol(klon,klev), dqrmelt(klon,klev), dqrfreez(klon,klev))1228 ALLOCATE(dqsauto(klon,klev), dqsagg(klon,klev), dqsrim(klon,klev), dqsmelt(klon,klev), dqsfreez(klon,klev))1229 1230 #ifdef CPP_StratAer 1231 ALLOCATE (d_q_emiss(klon, klev))1232 ALLOCATE (R2SO4(klon, klev))1233 ALLOCATE (R2SO4B(klon, klev,nbtr_bin))1234 ALLOCATE (DENSO4(klon, klev))1235 ALLOCATE (DENSO4B(klon, klev,nbtr_bin))1236 ALLOCATE (f_r_wet(klon, klev))1237 ALLOCATE (f_r_wetB(klon, klev,nbtr_bin))1238 ALLOCATE (decfluxaer(klon, nbtr))1206 ALLOCATE (p_tropopause(klon)) 1207 ALLOCATE (z_tropopause(klon)) 1208 ALLOCATE (t_tropopause(klon)) 1209 1210 ALLOCATE(zn2mout(klon, 6)) 1211 1212 ! Supersaturation 1213 ALLOCATE(rneb_seri(klon, klev)) 1214 ALLOCATE(d_rneb_dyn(klon, klev)) 1215 ALLOCATE(qclr(klon, klev), qcld(klon, klev), qss(klon, klev), qvc(klon, klev)) 1216 ALLOCATE(rnebclr(klon, klev), rnebss(klon, klev), gamma_ss(klon, klev)) 1217 ALLOCATE(N1_ss(klon, klev), N2_ss(klon, klev)) 1218 ALLOCATE(drneb_sub(klon, klev), drneb_con(klon, klev), drneb_tur(klon, klev), drneb_avi(klon, klev)) 1219 ALLOCATE(zqsatl(klon, klev), zqsats(klon, klev)) 1220 ALLOCATE(Tcontr(klon, klev), qcontr(klon, klev), qcontr2(klon, klev), fcontrN(klon, klev), fcontrP(klon, klev)) 1221 1222 !--POPRECIP variables 1223 ALLOCATE(qraindiag(klon, klev), qsnowdiag(klon, klev)) 1224 ALLOCATE(dqreva(klon, klev), dqssub(klon, klev)) 1225 ALLOCATE(dqrauto(klon, klev), dqrcol(klon, klev), dqrmelt(klon, klev), dqrfreez(klon, klev)) 1226 ALLOCATE(dqsauto(klon, klev), dqsagg(klon, klev), dqsrim(klon, klev), dqsmelt(klon, klev), dqsfreez(klon, klev)) 1227 1228 IF (CPPKEY_STRATAER) THEN 1229 ALLOCATE (d_q_emiss(klon, klev)) 1230 ALLOCATE (R2SO4(klon, klev)) 1231 ALLOCATE (R2SO4B(klon, klev, nbtr_bin)) 1232 ALLOCATE (DENSO4(klon, klev)) 1233 ALLOCATE (DENSO4B(klon, klev, nbtr_bin)) 1234 ALLOCATE (f_r_wet(klon, klev)) 1235 ALLOCATE (f_r_wetB(klon, klev, nbtr_bin)) 1236 ALLOCATE (decfluxaer(klon, nbtr)) 1239 1237 ALLOCATE (mdw(nbtr)) 1240 ALLOCATE (budg_3D_nucl(klon, klev))1241 ALLOCATE (budg_3D_cond_evap(klon, klev))1242 ALLOCATE (budg_3D_ocs_to_so2(klon, klev))1243 ALLOCATE (budg_3D_so2_to_h2so4(klon, klev))1244 ALLOCATE (budg_3D_backgr_ocs(klon, klev))1245 ALLOCATE (budg_3D_backgr_so2(klon, klev))1246 ALLOCATE (OCS_lifetime(klon, klev))1247 ALLOCATE (SO2_lifetime(klon, klev))1248 ALLOCATE (H2SO4_lifetime(klon, klev))1249 ALLOCATE (O3_clim(klon, klev))1250 ALLOCATE (alpha_bin(nbands_sw_rrtm +nbands_lw_rrtm+nwave,nbtr))1251 ALLOCATE (piz_bin(nbands_sw_rrtm +nbands_lw_rrtm+nwave,nbtr))1252 ALLOCATE (cg_bin(nbands_sw_rrtm +nbands_lw_rrtm+nwave,nbtr))1253 ALLOCATE (tau_strat_550(klon, klev))1254 ALLOCATE (tau_strat_1020(klon, klev))1255 ALLOCATE (tausum_strat(klon, 3))1238 ALLOCATE (budg_3D_nucl(klon, klev)) 1239 ALLOCATE (budg_3D_cond_evap(klon, klev)) 1240 ALLOCATE (budg_3D_ocs_to_so2(klon, klev)) 1241 ALLOCATE (budg_3D_so2_to_h2so4(klon, klev)) 1242 ALLOCATE (budg_3D_backgr_ocs(klon, klev)) 1243 ALLOCATE (budg_3D_backgr_so2(klon, klev)) 1244 ALLOCATE (OCS_lifetime(klon, klev)) 1245 ALLOCATE (SO2_lifetime(klon, klev)) 1246 ALLOCATE (H2SO4_lifetime(klon, klev)) 1247 ALLOCATE (O3_clim(klon, klev)) 1248 ALLOCATE (alpha_bin(nbands_sw_rrtm + nbands_lw_rrtm + nwave, nbtr)) 1249 ALLOCATE (piz_bin(nbands_sw_rrtm + nbands_lw_rrtm + nwave, nbtr)) 1250 ALLOCATE (cg_bin(nbands_sw_rrtm + nbands_lw_rrtm + nwave, nbtr)) 1251 ALLOCATE (tau_strat_550(klon, klev)) 1252 ALLOCATE (tau_strat_1020(klon, klev)) 1253 ALLOCATE (tausum_strat(klon, 3)) 1256 1254 ALLOCATE (budg_dep_dry_ocs(klon)) 1257 1255 ALLOCATE (budg_dep_wet_ocs(klon)) … … 1271 1269 ALLOCATE (budg_sed_part(klon)) 1272 1270 ALLOCATE (surf_PM25_sulf(klon)) 1273 ALLOCATE (vsed_aer(klon, klev))1274 ALLOCATE (sulfmmr(klon, klev))1275 ALLOCATE (SAD_sulfate(klon, klev))1276 ALLOCATE (sulfmmr_mode(klon, klev,nbtr_bin))1277 ALLOCATE (nd_mode(klon, klev,nbtr_bin))1278 #endif 1279 1280 END SUBROUTINE phys_local_var_init1281 1282 !======================================================================1283 SUBROUTINE phys_local_var_end1284 USE dimphy1285 USE indice_sol_mod1286 IMPLICIT NONE1287 DEALLOCATE(t_seri,q_seri,ql_seri,qs_seri, qbs_seri)1288 ! SN 4D ISO1289 1290 ! SN1291 DEALLOCATE(u_seri,v_seri)1292 DEALLOCATE(l_mixmin,l_mix,wprime)1293 DEALLOCATE(tke_shear,tke_buoy,tke_trans)1294 1295 1296 1297 DEALLOCATE(d_t_dyn,d_q_dyn)1298 DEALLOCATE(d_ql_dyn,d_qs_dyn, d_qbs_dyn)1299 DEALLOCATE(d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d, d_qbs_dyn2d)1300 DEALLOCATE(d_u_dyn,d_v_dyn)1301 1302 DEALLOCATE(d_t_con,d_q_con,d_q_con_zmasse)1303 DEALLOCATE(d_u_con,d_v_con)1304 DEALLOCATE(d_t_wake,d_q_wake)1305 DEALLOCATE(d_t_lsc,d_q_lsc)1306 DEALLOCATE(d_t_lwr,d_t_lw0)1307 DEALLOCATE(d_t_swr,d_t_sw0)1308 DEALLOCATE(d_ql_lsc,d_qi_lsc)1309 DEALLOCATE(d_t_ajsb,d_q_ajsb)1310 DEALLOCATE(d_t_ajs,d_q_ajs)1311 !nrlmd<1312 DEALLOCATE(d_t_ajs_w,d_q_ajs_w)1313 DEALLOCATE(d_t_ajs_x,d_q_ajs_x)1314 !>nrlmd1315 DEALLOCATE(d_u_ajs,d_v_ajs)1316 DEALLOCATE(d_t_eva,d_q_eva)1317 ! SN 4D ISO1318 1319 ! SN1320 DEALLOCATE(d_ql_eva,d_qi_eva)1321 DEALLOCATE(d_t_lscst,d_q_lscst)1322 DEALLOCATE(d_t_lscth,d_q_lscth)1323 DEALLOCATE(plul_st,plul_th)1324 DEALLOCATE(d_t_vdf,d_q_vdf,d_t_diss)1325 1326 DEALLOCATE(d_t_bsss,d_q_bsss,d_qbs_bsss)1271 ALLOCATE (vsed_aer(klon, klev)) 1272 ALLOCATE (sulfmmr(klon, klev)) 1273 ALLOCATE (SAD_sulfate(klon, klev)) 1274 ALLOCATE (sulfmmr_mode(klon, klev, nbtr_bin)) 1275 ALLOCATE (nd_mode(klon, klev, nbtr_bin)) 1276 END IF 1277 1278 END SUBROUTINE phys_local_var_init 1279 1280 !====================================================================== 1281 SUBROUTINE phys_local_var_end 1282 USE dimphy 1283 USE indice_sol_mod 1284 IMPLICIT NONE 1285 DEALLOCATE(t_seri, q_seri, ql_seri, qs_seri, qbs_seri) 1286 ! SN 4D ISO 1287 DEALLOCATE(qx_seri) 1288 ! SN 1289 DEALLOCATE(u_seri, v_seri) 1290 DEALLOCATE(l_mixmin, l_mix, wprime) 1291 DEALLOCATE(tke_shear, tke_buoy, tke_trans) 1292 DEALLOCATE(pbl_eps) 1293 DEALLOCATE(rhcl) 1294 DEALLOCATE(tr_seri) 1295 DEALLOCATE(d_t_dyn, d_q_dyn) 1296 DEALLOCATE(d_ql_dyn, d_qs_dyn, d_qbs_dyn) 1297 DEALLOCATE(d_q_dyn2d, d_ql_dyn2d, d_qs_dyn2d, d_qbs_dyn2d) 1298 DEALLOCATE(d_u_dyn, d_v_dyn) 1299 DEALLOCATE(d_tr_dyn) !RomP 1300 DEALLOCATE(d_t_con, d_q_con, d_q_con_zmasse) 1301 DEALLOCATE(d_u_con, d_v_con) 1302 DEALLOCATE(d_t_wake, d_q_wake) 1303 DEALLOCATE(d_t_lsc, d_q_lsc) 1304 DEALLOCATE(d_t_lwr, d_t_lw0) 1305 DEALLOCATE(d_t_swr, d_t_sw0) 1306 DEALLOCATE(d_ql_lsc, d_qi_lsc) 1307 DEALLOCATE(d_t_ajsb, d_q_ajsb) 1308 DEALLOCATE(d_t_ajs, d_q_ajs) 1309 !nrlmd< 1310 DEALLOCATE(d_t_ajs_w, d_q_ajs_w) 1311 DEALLOCATE(d_t_ajs_x, d_q_ajs_x) 1312 !>nrlmd 1313 DEALLOCATE(d_u_ajs, d_v_ajs) 1314 DEALLOCATE(d_t_eva, d_q_eva) 1315 ! SN 4D ISO 1316 DEALLOCATE(d_qx_eva) 1317 ! SN 1318 DEALLOCATE(d_ql_eva, d_qi_eva) 1319 DEALLOCATE(d_t_lscst, d_q_lscst) 1320 DEALLOCATE(d_t_lscth, d_q_lscth) 1321 DEALLOCATE(plul_st, plul_th) 1322 DEALLOCATE(d_t_vdf, d_q_vdf, d_t_diss) 1323 DEALLOCATE(d_qbs_vdf) 1324 DEALLOCATE(d_t_bsss, d_q_bsss, d_qbs_bsss) 1327 1325 #ifdef ISO 1328 1326 deallocate(xt_seri,xtl_seri,xts_seri,xtbs_seri) … … 1347 1345 #endif 1348 1346 1349 DEALLOCATE(d_u_vdf,d_v_vdf)1350 DEALLOCATE(d_t_oli,d_t_oro)1351 DEALLOCATE(d_u_oli,d_v_oli)1352 DEALLOCATE(d_u_oro,d_v_oro)1353 1354 DEALLOCATE(d_u_oro_gw,d_v_oro_gw)1355 DEALLOCATE(d_t_lif,d_t_ec)1356 DEALLOCATE(d_u_lif,d_v_lif)1357 1358 DEALLOCATE(topswad_aero,solswad_aero)1359 DEALLOCATE(topswai_aero,solswai_aero)1360 DEALLOCATE(topswad0_aero,solswad0_aero)1361 DEALLOCATE(toplwad_aero,sollwad_aero)1362 DEALLOCATE(toplwai_aero,sollwai_aero)1363 DEALLOCATE(toplwad0_aero,sollwad0_aero)1364 DEALLOCATE(topsw_aero,solsw_aero)1365 DEALLOCATE(topsw0_aero,solsw0_aero)1366 DEALLOCATE(topswcf_aero,solswcf_aero)1367 DEALLOCATE(stratomask)1368 DEALLOCATE(tausum_aero)1369 DEALLOCATE(drytausum_aero)1370 DEALLOCATE(tau3d_aero)1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 DEALLOCATE(sconcso4)1381 DEALLOCATE(sconcno3)1382 DEALLOCATE(sconcoa)1383 DEALLOCATE(sconcbc)1384 DEALLOCATE(sconcss)1385 DEALLOCATE(sconcdust)1386 DEALLOCATE(concso4)1387 DEALLOCATE(concno3)1388 DEALLOCATE(concoa)1389 DEALLOCATE(concbc)1390 DEALLOCATE(concss)1391 DEALLOCATE(concdust)1392 DEALLOCATE(loadso4)1393 DEALLOCATE(loadoa)1394 DEALLOCATE(loadbc)1395 DEALLOCATE(loadss)1396 DEALLOCATE(loaddust)1397 DEALLOCATE(loadno3)1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 DEALLOCATE(du_gwd_hines,dv_gwd_hines,d_t_hin)1409 1410 DEALLOCATE(dv_gwd_rando,dv_gwd_front)1411 DEALLOCATE(east_gwstress,west_gwstress)1412 1413 !IM ajout variables CFMIP2/CMIP51414 1415 1416 1417 1418 1419 1420 !CK LW diagnostics1421 1422 1423 1424 1425 !AI Ajout pour Ecrad (3Deffect)1426 1427 1428 1429 1430 1431 1432 !CK LW diagnostics1433 1434 1435 DEALLOCATE(toplwad0_aero_s2, sollwad0_aero_s2)1436 1437 ! FH Ajout de celles necessaires au phys_output_write_mod1438 1439 1440 !1441 1442 DEALLOCATE(wake_h,wake_k)1443 1444 1445 1446 1447 1448 !! DEALLOCATE( d_s_vdf, d_dens_vdf)1449 1450 !! DEALLOCATE( d_s_the, d_dens_the)1451 1347 DEALLOCATE(d_u_vdf, d_v_vdf) 1348 DEALLOCATE(d_t_oli, d_t_oro) 1349 DEALLOCATE(d_u_oli, d_v_oli) 1350 DEALLOCATE(d_u_oro, d_v_oro) 1351 DEALLOCATE(d_t_oro_gw) 1352 DEALLOCATE(d_u_oro_gw, d_v_oro_gw) 1353 DEALLOCATE(d_t_lif, d_t_ec) 1354 DEALLOCATE(d_u_lif, d_v_lif) 1355 DEALLOCATE(d_ts, d_tr) 1356 DEALLOCATE(topswad_aero, solswad_aero) 1357 DEALLOCATE(topswai_aero, solswai_aero) 1358 DEALLOCATE(topswad0_aero, solswad0_aero) 1359 DEALLOCATE(toplwad_aero, sollwad_aero) 1360 DEALLOCATE(toplwai_aero, sollwai_aero) 1361 DEALLOCATE(toplwad0_aero, sollwad0_aero) 1362 DEALLOCATE(topsw_aero, solsw_aero) 1363 DEALLOCATE(topsw0_aero, solsw0_aero) 1364 DEALLOCATE(topswcf_aero, solswcf_aero) 1365 DEALLOCATE(stratomask) 1366 DEALLOCATE(tausum_aero) 1367 DEALLOCATE(drytausum_aero) 1368 DEALLOCATE(tau3d_aero) 1369 DEALLOCATE(dNovrN) 1370 DEALLOCATE(zfice) 1371 DEALLOCATE(od443aer) 1372 DEALLOCATE(od550aer) 1373 DEALLOCATE(od865aer) 1374 DEALLOCATE(dryod550aer) 1375 DEALLOCATE(abs550aer) 1376 DEALLOCATE(ec550aer) 1377 DEALLOCATE(od550lt1aer) 1378 DEALLOCATE(sconcso4) 1379 DEALLOCATE(sconcno3) 1380 DEALLOCATE(sconcoa) 1381 DEALLOCATE(sconcbc) 1382 DEALLOCATE(sconcss) 1383 DEALLOCATE(sconcdust) 1384 DEALLOCATE(concso4) 1385 DEALLOCATE(concno3) 1386 DEALLOCATE(concoa) 1387 DEALLOCATE(concbc) 1388 DEALLOCATE(concss) 1389 DEALLOCATE(concdust) 1390 DEALLOCATE(loadso4) 1391 DEALLOCATE(loadoa) 1392 DEALLOCATE(loadbc) 1393 DEALLOCATE(loadss) 1394 DEALLOCATE(loaddust) 1395 DEALLOCATE(loadno3) 1396 DEALLOCATE(load_tmp1) 1397 DEALLOCATE(load_tmp2) 1398 DEALLOCATE(load_tmp3) 1399 DEALLOCATE(load_tmp4) 1400 DEALLOCATE(load_tmp5) 1401 DEALLOCATE(load_tmp6) 1402 DEALLOCATE(load_tmp7) 1403 DEALLOCATE(load_tmp8) 1404 DEALLOCATE(load_tmp9) 1405 DEALLOCATE(load_tmp10) 1406 DEALLOCATE(du_gwd_hines, dv_gwd_hines, d_t_hin) 1407 DEALLOCATE(d_q_ch4) 1408 DEALLOCATE(dv_gwd_rando, dv_gwd_front) 1409 DEALLOCATE(east_gwstress, west_gwstress) 1410 1411 !IM ajout variables CFMIP2/CMIP5 1412 DEALLOCATE(topswad_aerop, solswad_aerop) 1413 DEALLOCATE(topswai_aerop, solswai_aerop) 1414 DEALLOCATE(topswad0_aerop, solswad0_aerop) 1415 DEALLOCATE(topsw_aerop, topsw0_aerop) 1416 DEALLOCATE(solsw_aerop, solsw0_aerop) 1417 DEALLOCATE(topswcf_aerop, solswcf_aerop) 1418 !CK LW diagnostics 1419 DEALLOCATE(toplwad_aerop, sollwad_aerop) 1420 DEALLOCATE(toplwai_aerop, sollwai_aerop) 1421 DEALLOCATE(toplwad0_aerop, sollwad0_aerop) 1422 1423 !AI Ajout pour Ecrad (3Deffect) 1424 DEALLOCATE(topswad_aero_s2, solswad_aero_s2) 1425 DEALLOCATE(topswai_aero_s2, solswai_aero_s2) 1426 DEALLOCATE(topswad0_aero_s2, solswad0_aero_s2) 1427 DEALLOCATE(topsw_aero_s2, topsw0_aero_s2) 1428 DEALLOCATE(solsw_aero_s2, solsw0_aero_s2) 1429 DEALLOCATE(topswcf_aero_s2, solswcf_aero_s2) 1430 !CK LW diagnostics 1431 DEALLOCATE(toplwad_aero_s2, sollwad_aero_s2) 1432 DEALLOCATE(toplwai_aero_s2, sollwai_aero_s2) 1433 DEALLOCATE(toplwad0_aero_s2, sollwad0_aero_s2) 1434 1435 ! FH Ajout de celles necessaires au phys_output_write_mod 1436 DEALLOCATE(tal1, pal1, pab1, pab2) 1437 DEALLOCATE(ptstar, pt0, slp) 1438 ! 1439 DEALLOCATE(alp_wake) 1440 DEALLOCATE(wake_h, wake_k) 1441 DEALLOCATE(wake_omg) 1442 DEALLOCATE(d_deltat_wk, d_deltaq_wk) 1443 DEALLOCATE(d_s_wk, d_s_a_wk, d_dens_wk, d_dens_a_wk) 1444 DEALLOCATE(d_deltat_wk_gw, d_deltaq_wk_gw) 1445 DEALLOCATE(d_deltat_vdf, d_deltaq_vdf) 1446 !! DEALLOCATE( d_s_vdf, d_dens_vdf) 1447 DEALLOCATE(d_deltat_the, d_deltaq_the) 1448 !! DEALLOCATE( d_s_the, d_dens_the) 1449 DEALLOCATE(d_deltat_ajs_cv, d_deltaq_ajs_cv) 1452 1450 #ifdef ISO 1453 1451 DEALLOCATE(d_deltaxt_wk) … … 1456 1454 DEALLOCATE(d_deltaxt_vdf) 1457 1455 #endif 1458 !1459 1460 1461 1462 1463 1464 1465 1466 !1467 !nrlmd+jyg<1468 1469 1470 !>nrlmd+jyg1471 !1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 !1483 1484 1485 1486 !jyg<1487 !! DEALLOCATE(t_x, t_w)1488 !! DEALLOCATE(q_x, q_w)1489 !>jyg1490 1491 1492 1493 1494 1495 1496 1456 ! 1457 DEALLOCATE(bils) 1458 DEALLOCATE(cdragm, cdragh, cldh, cldl) 1459 DEALLOCATE(cldm, cldq, cldt, qsat2m) 1460 DEALLOCATE(JrNt) 1461 DEALLOCATE(dthmin, evap, snowerosion, fder, plcl, plfc) 1462 DEALLOCATE(prw, prlw, prsw, prbsw, water_budget, zustar, zu10m, zv10m, rh2m, s_lcl) 1463 DEALLOCATE(s_pblh, s_pblt, s_therm) 1464 ! 1465 !nrlmd+jyg< 1466 DEALLOCATE(s_pblh_x, s_pblh_w) 1467 DEALLOCATE(s_lcl_x, s_lcl_w) 1468 !>nrlmd+jyg 1469 ! 1470 DEALLOCATE(slab_wfbils, tpot, tpote, ue) 1471 DEALLOCATE(uq, ve, vq, zxffonte) 1472 DEALLOCATE(uwat, vwat) 1473 DEALLOCATE(zxfqcalving, zxfluxlat) 1474 DEALLOCATE(zxrunofflic) 1475 DEALLOCATE(zxustartlic, zxrhoslic, zxqsaltlic) 1476 DEALLOCATE(zxtsol, snow_lsc, zxfqfonte, zxqsurf) 1477 DEALLOCATE(rain_lsc) 1478 DEALLOCATE(rain_num) 1479 DEALLOCATE(qlth, qith, qsith, wiceth) 1480 ! 1481 DEALLOCATE(sens_x, sens_w) 1482 DEALLOCATE(zxfluxlat_x, zxfluxlat_w) 1483 DEALLOCATE(delta_qsurf) 1484 !jyg< 1485 !! DEALLOCATE(t_x, t_w) 1486 !! DEALLOCATE(q_x, q_w) 1487 !>jyg 1488 DEALLOCATE(d_t_vdf_x, d_t_vdf_w) 1489 DEALLOCATE(d_q_vdf_x, d_q_vdf_w) 1490 DEALLOCATE(pbl_tke_input) 1491 DEALLOCATE(t_therm, q_therm, u_therm, v_therm) 1492 DEALLOCATE(cdragh_x, cdragh_w) 1493 DEALLOCATE(cdragm_x, cdragm_w) 1494 DEALLOCATE(kh, kh_x, kh_w) 1497 1495 #ifdef ISO 1498 1496 DEALLOCATE(xtevap,xtprw) … … 1505 1503 DEALLOCATE(h1_diag,runoff_diag,xtrunoff_diag) 1506 1504 #endif 1507 !1508 1509 1510 !1511 1512 1513 1514 1515 1516 DEALLOCATE(alp_bl_conv,alp_bl_det)1517 DEALLOCATE(alp_bl_fluct_m,alp_bl_fluct_tke)1518 1519 1520 !FC1521 DEALLOCATE(zxfluxq,zxfluxt)1522 1523 1524 ! DEALLOCATE(upwd, omega, coefh)1525 1526 1527 ! DEALLOCATE(coefm, lambda_th, cldemi)1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1505 ! 1506 DEALLOCATE(ptconv) 1507 DEALLOCATE(ratqsc) 1508 ! 1509 DEALLOCATE(wbeff, convoccur, zmax_th) 1510 DEALLOCATE(zq2m, zt2m, weak_inversion) 1511 DEALLOCATE(zt2m_min_mon, zt2m_max_mon) 1512 DEALLOCATE(t2m_min_mon, t2m_max_mon) 1513 DEALLOCATE(sens, flwp, fiwp) 1514 DEALLOCATE(alp_bl_conv, alp_bl_det) 1515 DEALLOCATE(alp_bl_fluct_m, alp_bl_fluct_tke) 1516 DEALLOCATE(alp_bl_stat, n2, s2, strig, zcong, zlcl_th) 1517 DEALLOCATE(proba_notrig, random_notrig) 1518 !FC 1519 DEALLOCATE(zxfluxq, zxfluxt) 1520 1521 DEALLOCATE(dnwd0) 1522 ! DEALLOCATE(upwd, omega, coefh) 1523 DEALLOCATE(omega) 1524 DEALLOCATE(epmax_diag) 1525 ! DEALLOCATE(coefm, lambda_th, cldemi) 1526 DEALLOCATE(lambda_th, cldemi) 1527 DEALLOCATE(cldfra, cldtau, fiwc) 1528 DEALLOCATE(fl, re, flwc) 1529 DEALLOCATE(ref_liq, ref_ice, theta) 1530 DEALLOCATE(ref_liq_pi, ref_ice_pi) 1531 DEALLOCATE(zphi, zx_rh, zx_rhl, zx_rhi) 1532 DEALLOCATE(pmfd, pmfu) 1533 1534 DEALLOCATE(t2m, fluxlat) 1535 DEALLOCATE(fsollw, evap_pot) 1536 DEALLOCATE(fsolsw, wfbils) 1537 DEALLOCATE(wfevap) 1538 1539 DEALLOCATE(pmflxr, pmflxs) 1540 DEALLOCATE(wdtrainA, wdtrainS, wdtrainM) 1541 DEALLOCATE(upwd, dnwd) 1542 DEALLOCATE(ep) 1543 DEALLOCATE(da, mp) 1544 DEALLOCATE(phi) 1545 DEALLOCATE(wght_cvfd) 1546 DEALLOCATE(phi2) 1547 DEALLOCATE(d1a, dam) 1548 DEALLOCATE(ev) 1549 DEALLOCATE(elij) 1550 DEALLOCATE(qtaa) 1551 DEALLOCATE(clw) 1552 DEALLOCATE(epmlmMm, eplaMm) 1553 DEALLOCATE(sij) 1556 1554 #ifdef ISO 1557 1555 DEALLOCATE(xtwdtrainA) … … 1579 1577 1580 1578 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 ! ug et d'autres encore:1592 1593 1594 DEALLOCATE(pfraclr,pfracld)1595 1596 1597 1598 DEALLOCATE (zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic)1599 1600 1579 DEALLOCATE(prfl, psfl, bsfl, fraca, Vprecip) 1580 DEALLOCATE(zw2) 1581 1582 DEALLOCATE(fluxu, fluxv) 1583 DEALLOCATE(fluxt) 1584 1585 DEALLOCATE(uwriteSTD, vwriteSTD) 1586 DEALLOCATE(wwriteSTD, phiwriteSTD) 1587 DEALLOCATE(qwriteSTD, twriteSTD, rhwriteSTD) 1588 1589 ! ug et d'autres encore: 1590 DEALLOCATE(beta_prec) 1591 DEALLOCATE(rneb) 1592 DEALLOCATE(pfraclr, pfracld) 1593 DEALLOCATE(cldfraliq) 1594 DEALLOCATE(sigma2_icefracturb) 1595 DEALLOCATE(mean_icefracturb) 1596 DEALLOCATE (zxsnow, snowhgt, qsnow, to_ice, sissnow, runoff, albsol3_lic) 1597 DEALLOCATE(distcltop) 1598 DEALLOCATE(temp_cltop) 1601 1599 #ifdef ISO 1602 1600 DEALLOCATE (zxxtsnow,xtVprecip,xtVprecipi,pxtrfl,pxtsfl) 1603 1601 #endif 1604 1602 1605 1606 1607 1608 1609 1610 ! Supersaturation1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 !--POPRECIP variables1621 1622 1623 1624 1625 1626 #ifdef CPP_StratAer 1627 ! variables for strat. aerosol CK1603 DEALLOCATE (p_tropopause) 1604 DEALLOCATE (z_tropopause) 1605 DEALLOCATE (t_tropopause) 1606 DEALLOCATE(zn2mout) 1607 1608 ! Supersaturation 1609 DEALLOCATE(rneb_seri) 1610 DEALLOCATE(d_rneb_dyn) 1611 DEALLOCATE(qclr, qcld, qss, qvc) 1612 DEALLOCATE(rnebclr, rnebss, gamma_ss) 1613 DEALLOCATE(N1_ss, N2_ss) 1614 DEALLOCATE(drneb_sub, drneb_con, drneb_tur, drneb_avi) 1615 DEALLOCATE(zqsatl, zqsats) 1616 DEALLOCATE(Tcontr, qcontr, qcontr2, fcontrN, fcontrP) 1617 1618 !--POPRECIP variables 1619 DEALLOCATE(qraindiag, qsnowdiag) 1620 DEALLOCATE(dqreva, dqssub) 1621 DEALLOCATE(dqrauto, dqrcol, dqrmelt, dqrfreez) 1622 DEALLOCATE(dqsauto, dqsagg, dqsrim, dqsmelt, dqsfreez) 1623 1624 IF (CPPKEY_STRATAER) THEN 1625 ! variables for strat. aerosol CK 1628 1626 DEALLOCATE (d_q_emiss) 1629 1627 DEALLOCATE (R2SO4, R2SO4B) … … 1670 1668 DEALLOCATE (budg_h2so4_to_part) 1671 1669 DEALLOCATE (budg_sed_part) 1672 #endif 1673 1674 END SUBROUTINE phys_local_var_end1670 END IF 1671 1672 END SUBROUTINE phys_local_var_end 1675 1673 1676 1674 END MODULE phys_local_var_mod -
LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_ctrlout_mod.F90
r5056 r5098 1440 1440 'flx_co2_land_cor', 'correction of the CO2 flux from the land', 'kg CO2 m-2 s-1', (/ ('', i=1, 10) /)) 1441 1441 1442 #ifdef CPP_StratAer1443 1442 !--extinction coefficient 1444 1443 TYPE(ctrl_out), SAVE :: o_ext_strat_550 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), & … … 1517 1516 TYPE(ctrl_out), SAVE :: o_surf_PM25_sulf = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), & 1518 1517 'surf_PM25_sulf', 'Sulfate PM2.5 concentration at the surface', 'ug/m3', (/ ('', i=1, 10) /)) 1519 #endif1520 1518 1521 1519 !!!!!!!!!!!!!!!!!!!!!! 3D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -
LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_mod.F90
r5082 r5098 49 49 ! ug Pour les sorties XIOS 50 50 USE wxios 51 #ifdef CPP_StratAer52 51 USE infotrac_phy, ONLY: nbtr_bin 53 #endif54 52 #ifdef ISO 55 53 USE isotopes_mod, ONLY: isoName,iso_HTO … … 58 56 #endif 59 57 #endif 58 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER 60 59 61 60 IMPLICIT NONE … … 171 170 ALLOCATE(o_dtr_sscav(nqtot),o_dtr_sat(nqtot),o_dtr_uscav(nqtot)) 172 171 ALLOCATE(o_dtr_dry(nqtot),o_dtr_vdf(nqtot)) 173 #ifdef CPP_StratAer 172 IF (CPPKEY_STRATAER) THEN 174 173 ALLOCATE(o_nd_mode(nbtr_bin),o_sulfmmr_mode(nbtr_bin)) 175 #endif 174 END IF 176 175 #ifdef ISO 177 176 ALLOCATE(o_xtprecip(ntraciso)) … … 233 232 clef_files(8) = ok_histNMC(2) 234 233 clef_files(9) = ok_histNMC(3) 235 #ifdef CPP_StratAer 236 clef_files(10)= .TRUE. 237 #else 238 clef_files(10)= .FALSE. 239 #endif 234 clef_files(10)= CPPKEY_STRATAER 240 235 241 236 !sortir des fichiers "stations" si clef_stations(:)=.TRUE. … … 545 540 tnam = 'cum'//TRIM(tracers(iq)%name); o_trac_cum(itr) = ctrl_out(flag, tnam, lnam, "-", [('',i=1,nfiles)]) 546 541 547 #ifdef CPP_StratAer 542 IF (CPPKEY_STRATAER) THEN 548 543 if(tracers(iq)%name(1:3)=='BIN') then 549 544 itrb = itrb + 1 … … 554 549 tnam = TRIM(tracers(iq)%name)//'_sulfmmr_mode';o_sulfmmr_mode (itrb) = ctrl_out(flag, tnam, lnam, "kg(H2SO4)/kg(air)", [('',i=1,nfiles)]) 555 550 endif 556 #endif 551 END IF 557 552 ENDDO 558 553 -
LMDZ6/branches/Amaury_dev/libf/phylmd/phys_output_write_mod.F90
r5088 r5098 244 244 #endif 245 245 246 #ifdef CPP_StratAer247 246 USE infotrac_phy, ONLY: nbtr_bin 248 247 USE phys_output_ctrlout_mod, ONLY: & … … 259 258 o_vsed_aer, o_tau_strat_1020, o_ext_strat_1020, o_f_r_wet, & 260 259 o_SAD_sulfate, o_sulfmmr, o_nd_mode, o_sulfmmr_mode 261 #endif262 260 263 261 USE ice_sursat_mod, ONLY: flight_m, flight_h2o … … 402 400 USE phys_output_var_mod, ONLY: scdnc, cldncl, reffclwtop, lcc, reffclws, & 403 401 reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra 404 405 #ifdef CPP_StratAer 402 406 403 USE phys_local_var_mod, ONLY: & 407 404 budg_3D_nucl, budg_3D_cond_evap, budg_3D_ocs_to_so2, budg_3D_so2_to_h2so4, & … … 417 414 vsed_aer, tau_strat_1020, f_r_wet, & 418 415 SAD_sulfate, sulfmmr, nd_mode, sulfmmr_mode 419 #endif 416 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER 420 417 421 418 USE carbon_cycle_mod, ONLY: fco2_ff, fco2_bb, fco2_land, fco2_ocean … … 526 523 REAL, DIMENSION(klon,klev) :: coefh_stok 527 524 528 #ifdef CPP_StratAer529 525 LOGICAL, PARAMETER :: debug_strataer=.FALSE. 530 526 CHARACTER(LEN=maxlen) :: unt 531 #endif532 527 REAL,DIMENSION(klon,klev) :: z, dz 533 528 REAL,DIMENSION(klon) :: zrho, zt … … 1808 1803 ! end add ThL 1809 1804 1810 #ifdef CPP_StratAer 1805 IF (CPPKEy_STRATAER) THEN 1811 1806 IF (type_trac=='coag') THEN 1812 1807 CALL histwrite_phy(o_R2SO4, R2SO4) … … 1850 1845 ENDDO !--itr 1851 1846 ENDIF 1852 #endif 1847 END IF 1853 1848 !NL 1854 1849 IF (ok_volcan .AND. ok_ade) THEN -
LMDZ6/branches/Amaury_dev/libf/phylmd/physiq_mod.F90
r5091 r5098 94 94 USE phys_output_var_mod, ONLY : cloud_cover_sw, cloud_cover_sw_s2 95 95 96 USE geometry_mod, ONLY: longitude, latitude, boundslon, boundslat, ind_cell_glo 97 USE time_phylmdz_mod, ONLY: ndays 98 USE infotrac_phy, ONLY: nqCO2 99 100 USE time_phylmdz_mod, ONLY: annee_ref, day_ini, day_ref, start_time 101 USE vertical_layers_mod, ONLY: aps, bps, ap, bp 102 103 104 USE lmdz_xios, ONLY: xios_update_calendar, xios_context_finalize, xios_get_field_attr, & 105 xios_field_is_active, xios_context, xios_set_current_context 106 USE wxios, ONLY: missing_val, using_xios 107 USE paramLMDZ_phy_mod 96 108 97 109 !USE cmp_seri_mod … … 110 122 #endif 111 123 112 113 USE geometry_mod, ONLY: longitude, latitude, boundslon, boundslat, ind_cell_glo114 USE time_phylmdz_mod, ONLY: ndays115 USE infotrac_phy, ONLY: nqCO2116 124 #ifdef REPROBUS 117 125 USE chem_rep, ONLY: Init_chem_rep_xjour, d_q_rep, d_ql_rep, d_qi_rep, & … … 120 128 USE strataer_emiss_mod, ONLY: strataer_emiss_init 121 129 #endif 122 USE time_phylmdz_mod, ONLY: annee_ref, day_ini, day_ref, start_time123 USE vertical_layers_mod, ONLY: aps, bps, ap, bp124 125 130 126 131 #ifdef CPP_RRTM … … 129 134 #endif 130 135 131 132 #ifdef CPP_StratAer133 136 USE phys_local_var_mod, ONLY: d_q_emiss 134 137 USE strataer_local_var_mod 135 138 USE strataer_nuc_mod, ONLY: strataer_nuc_init 136 139 USE strataer_emiss_mod, ONLY: strataer_emiss_init 137 #endif 138 139 USE lmdz_xios, ONLY: xios_update_calendar, xios_context_finalize 140 USE lmdz_xios, ONLY: xios_get_field_attr, xios_field_is_active, xios_context 141 USE lmdz_xios, ONLY: xios_set_current_context 142 USE wxios, ONLY: missing_val, using_xios 143 144 #ifndef CPP_XIOS 145 USE paramLMDZ_phy_mod 146 #endif 140 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER 147 141 ! 148 142 ! … … 363 357 reffclwc, cldnvi, lcc3d, lcc3dcon, lcc3dstra, icc3dcon, icc3dstra 364 358 USE output_physiqex_mod, ONLY: output_physiqex 365 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA359 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA 366 360 367 361 … … 1764 1758 WRITE(lunout,*)'OK freq_outNMC(3)=',freq_outNMC(3) 1765 1759 1766 #ifndef CPP_XIOS 1760 IF (.NOT. using_xios) THEN 1767 1761 CALL ini_paramLMDZ_phy(phys_tstep,nid_ctesGCM) 1768 #endif 1762 END IF 1769 1763 1770 1764 #endif … … 1891 1885 #endif 1892 1886 1893 #ifdef CPP_StratAer 1887 IF (CPPKEY_STRATAER) THEN 1894 1888 CALL strataer_init 1895 1889 CALL strataer_nuc_init 1896 1890 CALL strataer_emiss_init 1897 #endif 1891 END IF 1898 1892 1899 1893 #ifdef CPP_Dust … … 4346 4340 ELSE 4347 4341 #ifdef CPP_RRTM 4348 #ifndef CPP_StratAer 4342 IF (.NOT. CPPKEY_STRATAER) THEN 4349 4343 !--prescribed strat aerosols 4350 4344 !--only in the case of non-interactive strat aerosols … … 4357 4351 CALL abort_physic(modname,abort_message,1) 4358 4352 ENDIF 4359 #endif 4353 END IF 4360 4354 #else 4361 4355 abort_message='You should compile with -rrtm if running ' & … … 4369 4363 ! 4370 4364 #ifdef CPP_RRTM 4371 #ifdef CPP_StratAer 4365 IF (CPPKEY_STRATAER) THEN 4372 4366 !--compute stratospheric mask 4373 4367 CALL stratosphere_mask(missing_val, pphis, t_seri, pplay, latitude_deg) 4374 4368 !--interactive strat aerosols 4375 4369 CALL calcaerosolstrato_rrtm(pplay,t_seri,paprs,debut) 4376 #endif 4370 END IF 4377 4371 #endif 4378 4372 !--fin STRAT AEROSOL … … 4987 4981 IF (ok_qch4) THEN 4988 4982 ! d_q_ch4: H2O source from CH4 in MMR/s (mass mixing ratio/s or kg H2O/kg air/s) 4989 #ifdef CPP_StratAer 4983 IF (CPPKEY_STRATAER) THEN 4990 4984 CALL stratH2O_methox(debut,paprs,d_q_ch4) 4991 #else 4985 ELSE 4992 4986 ! ECMWF routine METHOX 4993 4987 CALL METHOX(1,klon,klon,klev,q_seri,d_q_ch4,pplay) 4994 #endif 4988 END IF 4995 4989 ! add humidity tendency due to methane 4996 4990 d_q_ch4_dtime(:,:) = d_q_ch4(:,:)*phys_tstep … … 5001 4995 ! 5002 4996 ! 5003 #ifdef CPP_StratAer 4997 IF (CPPKEY_STRATAER) THEN 5004 4998 IF (ok_qemiss) THEN 5005 4999 flh2o=1 … … 5044 5038 END SELECT ! emission scenario (flag_emit) 5045 5039 ENDIF 5046 #endif 5040 END IF 5047 5041 5048 5042 !=============================================================== … … 5419 5413 ENDDO 5420 5414 5421 #ifdef CPP_StratAer 5415 IF (CPPKEY_STRATAER) THEN 5422 5416 IF (ok_qemiss) THEN 5423 5417 DO k = 1, klev … … 5425 5419 ENDDO 5426 5420 ENDIF 5427 #endif 5421 END IF 5428 5422 IF (ok_qch4) THEN 5429 5423 DO k = 1, klev … … 5726 5720 #endif 5727 5721 5728 #ifndef CPP_XIOS 5722 IF (.NOT. using_xios) THEN 5729 5723 CALL write_paramLMDZ_phy(itap,nid_ctesGCM,ok_sync) 5730 #endif 5724 END IF 5731 5725 5732 5726 #endif -
LMDZ6/branches/Amaury_dev/libf/phylmd/phytrac_mod.F90
r5091 r5098 1 1 !$Id$ 2 2 MODULE phytrac_mod 3 !=================================================================================4 ! Interface between the LMDZ physical package and tracer computation.5 ! Chemistry modules (INCA, Reprobus or the more specific traclmdz routine)6 ! are called from phytrac.7 !8 !======================================================================9 ! Auteur(s) FH10 ! Objet: Moniteur general des tendances traceurs11 !12 ! iflag_vdf_trac : Options for activating transport by vertical diffusion :13 ! 1. notmal14 ! 0. emission is injected in the first layer only, without diffusion15 ! -1 no emission & no diffusion16 ! Modification 2013/07/22 : transformed into a module to pass tendencies to17 ! physics outputs. Additional keys for controling activation of sub processes.18 ! Modification R. Pilon 10 octobre 2012 large scale scavenging incloud_scav + bc_scav19 ! Modification R. Pilon 01 janvier 2012 transport+scavenging KE scheme : cvltr20 !=================================================================================21 22 !23 ! Tracer tendencies, for outputs24 !-------------------------------25 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_cl ! Td couche limite/traceur26 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_dec !RomP27 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_cv ! Td convection/traceur28 ! RomP >>>29 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_insc30 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_bcscav31 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_evapls32 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_ls33 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_trsp34 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_sscav35 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_sat36 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_uscav37 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: qPr,qDi ! concentration tra dans pluie,air descente insaturee38 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: qPa,qMel39 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: qTrdi,dtrcvMA ! conc traceur descente air insaturee et td convective MA40 ! RomP <<<41 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_th ! Td thermique42 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_lessi_impa ! Td du lessivage par impaction43 REAL, DIMENSION(:,:,:),ALLOCATABLE,SAVE :: d_tr_lessi_nucl ! Td du lessivage par nucleation44 REAL, DIMENSION(:,:),ALLOCATABLE,SAVE:: qPrls !jyg: concentration tra dans pluie LS a la surf.45 REAL, DIMENSION(:,:),ALLOCATABLE,SAVE:: d_tr_dry ! Td depot sec/traceur (1st layer),ALLOCATABLE,SAVE jyg46 REAL, DIMENSION(:,:),ALLOCATABLE,SAVE:: flux_tr_dry ! depot sec/traceur (surface),ALLOCATABLE,SAVE jyg47 48 !$OMP THREADPRIVATE(qPa,qMel,qTrdi,dtrcvMA,d_tr_th,d_tr_lessi_impa,d_tr_lessi_nucl)49 !$OMP THREADPRIVATE(d_tr_trsp,d_tr_sscav,d_tr_sat,d_tr_uscav,qPr,qDi)50 !$OMP THREADPRIVATE(d_tr_insc,d_tr_bcscav,d_tr_evapls,d_tr_ls,qPrls)51 !$OMP THREADPRIVATE(d_tr_cl,d_tr_dry,flux_tr_dry,d_tr_dec,d_tr_cv)3 !================================================================================= 4 ! Interface between the LMDZ physical package and tracer computation. 5 ! Chemistry modules (INCA, Reprobus or the more specific traclmdz routine) 6 ! are called from phytrac. 7 ! 8 !====================================================================== 9 ! Auteur(s) FH 10 ! Objet: Moniteur general des tendances traceurs 11 ! 12 ! iflag_vdf_trac : Options for activating transport by vertical diffusion : 13 ! 1. notmal 14 ! 0. emission is injected in the first layer only, without diffusion 15 ! -1 no emission & no diffusion 16 ! Modification 2013/07/22 : transformed into a module to pass tendencies to 17 ! physics outputs. Additional keys for controling activation of sub processes. 18 ! Modification R. Pilon 10 octobre 2012 large scale scavenging incloud_scav + bc_scav 19 ! Modification R. Pilon 01 janvier 2012 transport+scavenging KE scheme : cvltr 20 !================================================================================= 21 22 ! 23 ! Tracer tendencies, for outputs 24 !------------------------------- 25 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_cl ! Td couche limite/traceur 26 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_dec !RomP 27 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_cv ! Td convection/traceur 28 ! RomP >>> 29 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_insc 30 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_bcscav 31 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_evapls 32 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_ls 33 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_trsp 34 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_sscav 35 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_sat 36 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_uscav 37 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: qPr, qDi ! concentration tra dans pluie,air descente insaturee 38 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: qPa, qMel 39 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: qTrdi, dtrcvMA ! conc traceur descente air insaturee et td convective MA 40 ! RomP <<< 41 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_th ! Td thermique 42 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_lessi_impa ! Td du lessivage par impaction 43 REAL, DIMENSION(:, :, :), ALLOCATABLE, SAVE :: d_tr_lessi_nucl ! Td du lessivage par nucleation 44 REAL, DIMENSION(:, :), ALLOCATABLE, SAVE :: qPrls !jyg: concentration tra dans pluie LS a la surf. 45 REAL, DIMENSION(:, :), ALLOCATABLE, SAVE :: d_tr_dry ! Td depot sec/traceur (1st layer),ALLOCATABLE,SAVE jyg 46 REAL, DIMENSION(:, :), ALLOCATABLE, SAVE :: flux_tr_dry ! depot sec/traceur (surface),ALLOCATABLE,SAVE jyg 47 48 !$OMP THREADPRIVATE(qPa,qMel,qTrdi,dtrcvMA,d_tr_th,d_tr_lessi_impa,d_tr_lessi_nucl) 49 !$OMP THREADPRIVATE(d_tr_trsp,d_tr_sscav,d_tr_sat,d_tr_uscav,qPr,qDi) 50 !$OMP THREADPRIVATE(d_tr_insc,d_tr_bcscav,d_tr_evapls,d_tr_ls,qPrls) 51 !$OMP THREADPRIVATE(d_tr_cl,d_tr_dry,flux_tr_dry,d_tr_dec,d_tr_cv) 52 52 53 53 CONTAINS … … 56 56 57 57 USE dimphy 58 USE infotrac_phy, ONLY : nbtr, type_trac59 USE tracco2i_mod, ONLY : tracco2i_init60 58 USE infotrac_phy, ONLY : nbtr, type_trac 59 USE tracco2i_mod, ONLY : tracco2i_init 60 61 61 IMPLICIT NONE 62 62 63 ALLOCATE(d_tr_cl(klon, klev,nbtr),d_tr_dry(klon,nbtr))64 ALLOCATE(flux_tr_dry(klon, nbtr),d_tr_dec(klon,klev,nbtr),d_tr_cv(klon,klev,nbtr))65 ALLOCATE(d_tr_insc(klon, klev,nbtr),d_tr_bcscav(klon,klev,nbtr))66 ALLOCATE(d_tr_evapls(klon, klev,nbtr),d_tr_ls(klon,klev,nbtr))67 ALLOCATE(qPrls(klon, nbtr),d_tr_trsp(klon,klev,nbtr))68 ALLOCATE(d_tr_sscav(klon, klev,nbtr),d_tr_sat(klon,klev,nbtr))69 ALLOCATE(d_tr_uscav(klon, klev,nbtr),qPr(klon,klev,nbtr),qDi(klon,klev,nbtr))70 ALLOCATE(qPa(klon, klev,nbtr),qMel(klon,klev,nbtr))71 ALLOCATE(qTrdi(klon, klev,nbtr),dtrcvMA(klon,klev,nbtr))72 ALLOCATE(d_tr_th(klon, klev,nbtr))73 ALLOCATE(d_tr_lessi_impa(klon, klev,nbtr),d_tr_lessi_nucl(klon,klev,nbtr))63 ALLOCATE(d_tr_cl(klon, klev, nbtr), d_tr_dry(klon, nbtr)) 64 ALLOCATE(flux_tr_dry(klon, nbtr), d_tr_dec(klon, klev, nbtr), d_tr_cv(klon, klev, nbtr)) 65 ALLOCATE(d_tr_insc(klon, klev, nbtr), d_tr_bcscav(klon, klev, nbtr)) 66 ALLOCATE(d_tr_evapls(klon, klev, nbtr), d_tr_ls(klon, klev, nbtr)) 67 ALLOCATE(qPrls(klon, nbtr), d_tr_trsp(klon, klev, nbtr)) 68 ALLOCATE(d_tr_sscav(klon, klev, nbtr), d_tr_sat(klon, klev, nbtr)) 69 ALLOCATE(d_tr_uscav(klon, klev, nbtr), qPr(klon, klev, nbtr), qDi(klon, klev, nbtr)) 70 ALLOCATE(qPa(klon, klev, nbtr), qMel(klon, klev, nbtr)) 71 ALLOCATE(qTrdi(klon, klev, nbtr), dtrcvMA(klon, klev, nbtr)) 72 ALLOCATE(d_tr_th(klon, klev, nbtr)) 73 ALLOCATE(d_tr_lessi_impa(klon, klev, nbtr), d_tr_lessi_nucl(klon, klev, nbtr)) 74 74 75 75 !=============================================================================== 76 76 ! -- Do specific treatment according to chemestry model or local LMDZ tracers 77 ! 77 ! 78 78 !=============================================================================== 79 79 ! -- CO2 interactif -- 80 IF (ANY(type_trac == ['co2i', 'inco'])) CALL tracco2i_init()81 82 ! -- type_trac == 'co2i' ! PC83 84 ! -- source is updated with FF and BB emissions85 ! -- and net fluxes from ocean and orchidee86 80 IF (ANY(type_trac == ['co2i', 'inco'])) CALL tracco2i_init() 81 82 ! -- type_trac == 'co2i' ! PC 83 ! -- CO2 interactif -- 84 ! -- source is updated with FF and BB emissions 85 ! -- and net fluxes from ocean and orchidee 86 ! -- sign convention : positive into the atmosphere 87 87 88 88 END SUBROUTINE phytrac_init 89 89 90 SUBROUTINE phytrac( 91 nstep, julien, gmtime, debutphy,&92 lafin, pdtphys, u, v, t_seri,&93 paprs, pplay, pmfu, pmfd,&94 pen_u, pde_u, pen_d, pde_d,&95 cdragh, coefh, fm_therm, entr_therm,&96 yu1, yv1, ftsol, pctsrf,&97 ustar, u10m, v10m,&98 wstar, ale_bl, ale_wake,&99 xlat, xlon,&100 frac_impa,frac_nucl,beta_fisrt,beta_v1,&101 presnivs, pphis, pphi, albsol,&102 sh, ch, rh, cldfra, rneb,&103 diafra, cldliq, itop_con, ibas_con,&104 pmflxr, pmflxs, prfl, psfl,&105 da, phi, mp, upwd,&106 phi2, d1a, dam,sij, wght_cvfd, & ! RomP +RL107 wdtrainA, wdtrainM, sigd, clw, elij, & ! RomP108 evap, ep, epmlmMm, eplaMm,& ! RomP109 dnwd, aerosol_couple, flxmass_w,&110 tau_aero, piz_aero, cg_aero, ccm,&111 rfname,&112 d_tr_dyn,& ! RomP113 tr_seri, init_source)90 SUBROUTINE phytrac(& 91 nstep, julien, gmtime, debutphy, & 92 lafin, pdtphys, u, v, t_seri, & 93 paprs, pplay, pmfu, pmfd, & 94 pen_u, pde_u, pen_d, pde_d, & 95 cdragh, coefh, fm_therm, entr_therm, & 96 yu1, yv1, ftsol, pctsrf, & 97 ustar, u10m, v10m, & 98 wstar, ale_bl, ale_wake, & 99 xlat, xlon, & 100 frac_impa, frac_nucl, beta_fisrt, beta_v1, & 101 presnivs, pphis, pphi, albsol, & 102 sh, ch, rh, cldfra, rneb, & 103 diafra, cldliq, itop_con, ibas_con, & 104 pmflxr, pmflxs, prfl, psfl, & 105 da, phi, mp, upwd, & 106 phi2, d1a, dam, sij, wght_cvfd, & ! RomP +RL 107 wdtrainA, wdtrainM, sigd, clw, elij, & ! RomP 108 evap, ep, epmlmMm, eplaMm, & ! RomP 109 dnwd, aerosol_couple, flxmass_w, & 110 tau_aero, piz_aero, cg_aero, ccm, & 111 rfname, & 112 d_tr_dyn, & ! RomP 113 tr_seri, init_source) 114 114 ! 115 115 !====================================================================== … … 123 123 USE phys_cal_mod, only : hour 124 124 USE dimphy 125 USE infotrac_phy, ONLY : nbtr, nqCO2, type_trac, conv_flg, pbl_flg126 USE strings_mod, ONLY: int2str125 USE infotrac_phy, ONLY : nbtr, nqCO2, type_trac, conv_flg, pbl_flg 126 USE strings_mod, ONLY : int2str 127 127 USE mod_grid_phy_lmdz 128 128 USE mod_phys_lmdz_para … … 132 132 USE tracreprobus_mod 133 133 USE indice_sol_mod 134 USE mod_phys_lmdz_mpi_data, ONLY : 135 USE print_control_mod, ONLY : lunout134 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 135 USE print_control_mod, ONLY : lunout 136 136 USE aero_mod, ONLY : naero_grp 137 137 USE lmdz_thermcell_dq, ONLY : thermcell_dq … … 139 139 USE tracco2i_mod 140 140 141 #ifdef CPP_StratAer142 141 USE traccoag_mod 143 USE phys_local_var_mod, ONLY : mdw144 USE phys_local_var_mod, ONLY : budg_dep_dry_ocs,budg_dep_wet_ocs145 USE phys_local_var_mod, ONLY : budg_dep_dry_so2,budg_dep_wet_so2146 USE phys_local_var_mod, ONLY : budg_dep_dry_h2so4, budg_dep_wet_h2so4147 USE phys_local_var_mod, ONLY : budg_dep_dry_part,budg_dep_wet_part148 USE infotrac_phy, ONLY : nbtr_sulgas, id_OCS_strat, id_SO2_strat, id_H2SO4_strat142 USE phys_local_var_mod, ONLY : mdw 143 USE phys_local_var_mod, ONLY : budg_dep_dry_ocs, budg_dep_wet_ocs 144 USE phys_local_var_mod, ONLY : budg_dep_dry_so2, budg_dep_wet_so2 145 USE phys_local_var_mod, ONLY : budg_dep_dry_h2so4, budg_dep_wet_h2so4 146 USE phys_local_var_mod, ONLY : budg_dep_dry_part, budg_dep_wet_part 147 USE infotrac_phy, ONLY : nbtr_sulgas, id_OCS_strat, id_SO2_strat, id_H2SO4_strat 149 148 USE strataer_nuc_mod, ONLY : tracstrataer_init 150 149 USE aerophys 151 #endif 150 USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_STRATAER 151 USE lmdz_yomcst 152 152 153 153 IMPLICIT NONE 154 154 155 INCLUDE "YOMCST.h"156 155 INCLUDE "clesphys.h" 157 156 !========================================================================== … … 162 161 !---------------- 163 162 !Configuration grille,temps: 164 INTEGER, INTENT(IN) :: nstep ! Appel physique165 INTEGER, INTENT(IN) :: julien ! Jour julien166 REAL, INTENT(IN):: gmtime ! Heure courante167 REAL, INTENT(IN):: pdtphys ! Pas d'integration pour la physique (seconde)168 LOGICAL, INTENT(IN) :: debutphy ! le flag de l'initialisation de la physique169 LOGICAL, INTENT(IN) :: lafin ! le flag de la fin de la physique170 171 REAL, DIMENSION(klon),INTENT(IN) :: xlat ! latitudes pour chaque point172 REAL, DIMENSION(klon),INTENT(IN) :: xlon ! longitudes pour chaque point173 ! 174 !Physique: 163 INTEGER, INTENT(IN) :: nstep ! Appel physique 164 INTEGER, INTENT(IN) :: julien ! Jour julien 165 REAL, INTENT(IN) :: gmtime ! Heure courante 166 REAL, INTENT(IN) :: pdtphys ! Pas d'integration pour la physique (seconde) 167 LOGICAL, INTENT(IN) :: debutphy ! le flag de l'initialisation de la physique 168 LOGICAL, INTENT(IN) :: lafin ! le flag de la fin de la physique 169 170 REAL, DIMENSION(klon), INTENT(IN) :: xlat ! latitudes pour chaque point 171 REAL, DIMENSION(klon), INTENT(IN) :: xlon ! longitudes pour chaque point 172 ! 173 !Physique: 175 174 !-------- 176 REAL, DIMENSION(klon,klev),INTENT(IN):: t_seri ! Temperature177 REAL, DIMENSION(klon,klev),INTENT(IN) :: u ! variable not used178 REAL, DIMENSION(klon,klev),INTENT(IN) :: v ! variable not used179 REAL, DIMENSION(klon,klev),INTENT(IN):: sh ! humidite specifique180 REAL, DIMENSION(klon,klev),INTENT(IN):: rh ! humidite relative181 REAL, DIMENSION(klon,klev),INTENT(IN) :: ch ! eau liquide (+ glace si le traceur existe)182 REAL, DIMENSION(klon,klev+1),INTENT(IN) :: paprs ! pression pour chaque inter-couche (en Pa)183 REAL, DIMENSION(klon,klev),INTENT(IN):: pplay ! pression pour le mileu de chaque couche (en Pa)184 REAL, DIMENSION(klon,klev),INTENT(IN):: pphi ! geopotentiel185 REAL, DIMENSION(klon),INTENT(IN):: pphis186 REAL, DIMENSION(klev),INTENT(IN) :: presnivs187 REAL, DIMENSION(klon,klev),INTENT(IN):: cldliq ! eau condensee totale188 REAL, DIMENSION(klon,klev),INTENT(IN):: cldfra ! fraction nuageuse (tous les nuages)189 REAL, DIMENSION(klon,klev),INTENT(IN):: diafra ! fraction nuageuse (convection ou stratus artificiels)190 REAL, DIMENSION(klon,klev),INTENT(IN):: rneb ! fraction nuageuse (grande echelle)191 ! 192 REAL 193 REAL, DIMENSION(klon,klev),INTENT(IN):: beta_fisrt ! taux de conversion de l'eau cond (de fisrtilp)194 REAL, DIMENSION(klon,klev),INTENT(out):: beta_v1 ! -- (originale version)195 196 ! 197 INTEGER, DIMENSION(klon),INTENT(IN):: itop_con198 INTEGER, DIMENSION(klon),INTENT(IN):: ibas_con199 REAL, DIMENSION(klon),INTENT(IN):: albsol ! albedo surface175 REAL, DIMENSION(klon, klev), INTENT(IN) :: t_seri ! Temperature 176 REAL, DIMENSION(klon, klev), INTENT(IN) :: u ! variable not used 177 REAL, DIMENSION(klon, klev), INTENT(IN) :: v ! variable not used 178 REAL, DIMENSION(klon, klev), INTENT(IN) :: sh ! humidite specifique 179 REAL, DIMENSION(klon, klev), INTENT(IN) :: rh ! humidite relative 180 REAL, DIMENSION(klon, klev), INTENT(IN) :: ch ! eau liquide (+ glace si le traceur existe) 181 REAL, DIMENSION(klon, klev + 1), INTENT(IN) :: paprs ! pression pour chaque inter-couche (en Pa) 182 REAL, DIMENSION(klon, klev), INTENT(IN) :: pplay ! pression pour le mileu de chaque couche (en Pa) 183 REAL, DIMENSION(klon, klev), INTENT(IN) :: pphi ! geopotentiel 184 REAL, DIMENSION(klon), INTENT(IN) :: pphis 185 REAL, DIMENSION(klev), INTENT(IN) :: presnivs 186 REAL, DIMENSION(klon, klev), INTENT(IN) :: cldliq ! eau condensee totale 187 REAL, DIMENSION(klon, klev), INTENT(IN) :: cldfra ! fraction nuageuse (tous les nuages) 188 REAL, DIMENSION(klon, klev), INTENT(IN) :: diafra ! fraction nuageuse (convection ou stratus artificiels) 189 REAL, DIMENSION(klon, klev), INTENT(IN) :: rneb ! fraction nuageuse (grande echelle) 190 ! 191 REAL :: ql_incl ! contenu en eau liquide nuageuse dans le nuage ! ql_incl=oliq/rneb 192 REAL, DIMENSION(klon, klev), INTENT(IN) :: beta_fisrt ! taux de conversion de l'eau cond (de fisrtilp) 193 REAL, DIMENSION(klon, klev), INTENT(out) :: beta_v1 ! -- (originale version) 194 195 ! 196 INTEGER, DIMENSION(klon), INTENT(IN) :: itop_con 197 INTEGER, DIMENSION(klon), INTENT(IN) :: ibas_con 198 REAL, DIMENSION(klon), INTENT(IN) :: albsol ! albedo surface 200 199 ! 201 200 !Dynamique 202 201 !-------- 203 REAL, DIMENSION(klon,klev,nbtr),INTENT(IN):: d_tr_dyn202 REAL, DIMENSION(klon, klev, nbtr), INTENT(IN) :: d_tr_dyn 204 203 ! 205 204 !Convection: 206 205 !---------- 207 REAL, DIMENSION(klon,klev),INTENT(IN) :: pmfu ! flux de masse dans le panache montant208 REAL, DIMENSION(klon,klev),INTENT(IN) :: pmfd ! flux de masse dans le panache descendant209 REAL, DIMENSION(klon,klev),INTENT(IN) :: pen_u ! flux entraine dans le panache montant210 REAL, DIMENSION(klon,klev),INTENT(IN) :: pde_u ! flux detraine dans le panache montant211 REAL, DIMENSION(klon,klev),INTENT(IN) :: pen_d ! flux entraine dans le panache descendant212 REAL, DIMENSION(klon,klev),INTENT(IN) :: pde_d ! flux detraine dans le panache descendant213 214 !...Tiedke 215 REAL, DIMENSION(klon,klev+1),INTENT(IN):: pmflxr, pmflxs ! Flux precipitant de pluie, neige aux interfaces [convection]216 REAL, DIMENSION(klon,klev+1),INTENT(IN):: prfl, psfl ! Flux precipitant de pluie, neige aux interfaces [large-scale]217 218 LOGICAL, INTENT(IN):: aerosol_couple219 REAL, DIMENSION(klon,klev),INTENT(IN):: flxmass_w220 REAL, DIMENSION(klon,klev,naero_grp,2),INTENT(IN) :: tau_aero221 REAL, DIMENSION(klon,klev,naero_grp,2),INTENT(IN) :: piz_aero222 REAL, DIMENSION(klon,klev,naero_grp,2),INTENT(IN) :: cg_aero223 CHARACTER(len =4),DIMENSION(naero_grp),INTENT(IN) :: rfname224 REAL, DIMENSION(klon,klev,2),INTENT(IN) :: ccm206 REAL, DIMENSION(klon, klev), INTENT(IN) :: pmfu ! flux de masse dans le panache montant 207 REAL, DIMENSION(klon, klev), INTENT(IN) :: pmfd ! flux de masse dans le panache descendant 208 REAL, DIMENSION(klon, klev), INTENT(IN) :: pen_u ! flux entraine dans le panache montant 209 REAL, DIMENSION(klon, klev), INTENT(IN) :: pde_u ! flux detraine dans le panache montant 210 REAL, DIMENSION(klon, klev), INTENT(IN) :: pen_d ! flux entraine dans le panache descendant 211 REAL, DIMENSION(klon, klev), INTENT(IN) :: pde_d ! flux detraine dans le panache descendant 212 213 !...Tiedke 214 REAL, DIMENSION(klon, klev + 1), INTENT(IN) :: pmflxr, pmflxs ! Flux precipitant de pluie, neige aux interfaces [convection] 215 REAL, DIMENSION(klon, klev + 1), INTENT(IN) :: prfl, psfl ! Flux precipitant de pluie, neige aux interfaces [large-scale] 216 217 LOGICAL, INTENT(IN) :: aerosol_couple 218 REAL, DIMENSION(klon, klev), INTENT(IN) :: flxmass_w 219 REAL, DIMENSION(klon, klev, naero_grp, 2), INTENT(IN) :: tau_aero 220 REAL, DIMENSION(klon, klev, naero_grp, 2), INTENT(IN) :: piz_aero 221 REAL, DIMENSION(klon, klev, naero_grp, 2), INTENT(IN) :: cg_aero 222 CHARACTER(len = 4), DIMENSION(naero_grp), INTENT(IN) :: rfname 223 REAL, DIMENSION(klon, klev, 2), INTENT(IN) :: ccm 225 224 !... K.Emanuel 226 REAL, DIMENSION(klon,klev),INTENT(IN):: da227 REAL, DIMENSION(klon,klev,klev),INTENT(IN):: phi225 REAL, DIMENSION(klon, klev), INTENT(IN) :: da 226 REAL, DIMENSION(klon, klev, klev), INTENT(IN) :: phi 228 227 ! RomP >>> 229 REAL, DIMENSION(klon,klev),INTENT(IN) :: d1a,dam230 REAL, DIMENSION(klon,klev,klev),INTENT(IN) :: phi2231 ! 232 REAL, DIMENSION(klon,klev),INTENT(IN):: wdtrainA233 REAL, DIMENSION(klon,klev),INTENT(IN):: wdtrainM234 REAL, DIMENSION(klon),INTENT(IN):: sigd228 REAL, DIMENSION(klon, klev), INTENT(IN) :: d1a, dam 229 REAL, DIMENSION(klon, klev, klev), INTENT(IN) :: phi2 230 ! 231 REAL, DIMENSION(klon, klev), INTENT(IN) :: wdtrainA 232 REAL, DIMENSION(klon, klev), INTENT(IN) :: wdtrainM 233 REAL, DIMENSION(klon), INTENT(IN) :: sigd 235 234 ! ---- RomP flux entraine, detraine et precipitant kerry Emanuel 236 REAL, DIMENSION(klon,klev),INTENT(IN):: evap237 REAL, DIMENSION(klon,klev),INTENT(IN):: ep238 REAL, DIMENSION(klon,klev,klev),INTENT(IN) :: sij239 REAL, DIMENSION(klon,klev),INTENT(IN):: wght_cvfd !RL240 REAL, DIMENSION(klon,klev,klev),INTENT(IN) :: elij241 REAL, DIMENSION(klon,klev,klev),INTENT(IN) :: epmlmMm242 REAL, DIMENSION(klon,klev),INTENT(IN):: eplaMm243 REAL, DIMENSION(klon,klev),INTENT(IN):: clw235 REAL, DIMENSION(klon, klev), INTENT(IN) :: evap 236 REAL, DIMENSION(klon, klev), INTENT(IN) :: ep 237 REAL, DIMENSION(klon, klev, klev), INTENT(IN) :: sij 238 REAL, DIMENSION(klon, klev), INTENT(IN) :: wght_cvfd !RL 239 REAL, DIMENSION(klon, klev, klev), INTENT(IN) :: elij 240 REAL, DIMENSION(klon, klev, klev), INTENT(IN) :: epmlmMm 241 REAL, DIMENSION(klon, klev), INTENT(IN) :: eplaMm 242 REAL, DIMENSION(klon, klev), INTENT(IN) :: clw 244 243 ! RomP <<< 245 244 ! 246 REAL, DIMENSION(klon,klev),INTENT(IN):: mp247 REAL, DIMENSION(klon,klev),INTENT(IN):: upwd ! saturated updraft mass flux248 REAL, DIMENSION(klon,klev),INTENT(IN):: dnwd ! saturated downdraft mass flux245 REAL, DIMENSION(klon, klev), INTENT(IN) :: mp 246 REAL, DIMENSION(klon, klev), INTENT(IN) :: upwd ! saturated updraft mass flux 247 REAL, DIMENSION(klon, klev), INTENT(IN) :: dnwd ! saturated downdraft mass flux 249 248 ! 250 249 !Thermiques: 251 250 !---------- 252 REAL, DIMENSION(klon,klev+1),INTENT(IN):: fm_therm253 REAL, DIMENSION(klon,klev),INTENT(INOUT):: entr_therm251 REAL, DIMENSION(klon, klev + 1), INTENT(IN) :: fm_therm 252 REAL, DIMENSION(klon, klev), INTENT(INOUT) :: entr_therm 254 253 ! 255 254 !Couche limite: 256 255 !-------------- 257 256 ! 258 REAL, DIMENSION(:),INTENT(IN):: cdragh ! (klon) coeff drag pour T et Q259 REAL, DIMENSION(:,:),INTENT(IN) :: coefh ! (klon,klev) coeff melange CL (m**2/s)260 REAL, DIMENSION(:),INTENT(IN) :: ustar,u10m,v10m ! (klon) u* & vent a 10m (m/s)261 REAL, DIMENSION(:),INTENT(IN) :: wstar,ale_bl,ale_wake ! (klon) w* and Avail. Lifting Ener.262 REAL, DIMENSION(:),INTENT(IN):: yu1 ! (klon) vents au premier niveau263 REAL, DIMENSION(:),INTENT(IN):: yv1 ! (klon) vents au premier niveau257 REAL, DIMENSION(:), INTENT(IN) :: cdragh ! (klon) coeff drag pour T et Q 258 REAL, DIMENSION(:, :), INTENT(IN) :: coefh ! (klon,klev) coeff melange CL (m**2/s) 259 REAL, DIMENSION(:), INTENT(IN) :: ustar, u10m, v10m ! (klon) u* & vent a 10m (m/s) 260 REAL, DIMENSION(:), INTENT(IN) :: wstar, ale_bl, ale_wake ! (klon) w* and Avail. Lifting Ener. 261 REAL, DIMENSION(:), INTENT(IN) :: yu1 ! (klon) vents au premier niveau 262 REAL, DIMENSION(:), INTENT(IN) :: yv1 ! (klon) vents au premier niveau 264 263 ! 265 264 !Lessivage: … … 270 269 REAL, DIMENSION(:), ALLOCATABLE, SAVE :: coefcoli 271 270 LOGICAL, DIMENSION(:), ALLOCATABLE, SAVE :: flag_cvltr 272 !$OMP THREADPRIVATE(ccntrAA,ccntrENV,coefcoli,flag_cvltr)273 REAL, DIMENSION(klon, klev) :: ccntrAA_3d274 REAL, DIMENSION(klon, klev) :: ccntrENV_3d275 REAL, DIMENSION(klon, klev) :: coefcoli_3d271 !$OMP THREADPRIVATE(ccntrAA,ccntrENV,coefcoli,flag_cvltr) 272 REAL, DIMENSION(klon, klev) :: ccntrAA_3d 273 REAL, DIMENSION(klon, klev) :: ccntrENV_3d 274 REAL, DIMENSION(klon, klev) :: coefcoli_3d 276 275 ! 277 276 ! pour le ON-LINE 278 277 ! 279 REAL, DIMENSION(klon,klev),INTENT(IN) :: frac_impa ! fraction d'aerosols non impactes280 REAL, DIMENSION(klon,klev),INTENT(IN) :: frac_nucl ! fraction d'aerosols non nuclees278 REAL, DIMENSION(klon, klev), INTENT(IN) :: frac_impa ! fraction d'aerosols non impactes 279 REAL, DIMENSION(klon, klev), INTENT(IN) :: frac_nucl ! fraction d'aerosols non nuclees 281 280 282 281 ! Arguments necessaires pour les sources et puits de traceur: 283 REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: ftsol ! Temperature du sol (surf)(Kelvin) 284 REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: pctsrf ! Pourcentage de sol (nature du sol) 285 286 #ifdef CPP_StratAer 287 REAL,DIMENSION(klon) :: v_dep_dry !dry deposition velocity of stratospheric sulfate in m/s 288 #endif 282 REAL, DIMENSION(klon, nbsrf), INTENT(IN) :: ftsol ! Temperature du sol (surf)(Kelvin) 283 REAL, DIMENSION(klon, nbsrf), INTENT(IN) :: pctsrf ! Pourcentage de sol (nature du sol) 284 285 REAL, DIMENSION(klon) :: v_dep_dry !dry deposition velocity of stratospheric sulfate in m/s 289 286 ! Output argument 290 287 !---------------- 291 REAL, DIMENSION(klon,klev,nbtr),INTENT(INOUT) :: tr_seri ! Concentration Traceur [U/KgA]292 REAL, DIMENSION(klon,klev) :: sourceBE293 REAL, DIMENSION(klon,nbtr), INTENT(IN) :: init_source288 REAL, DIMENSION(klon, klev, nbtr), INTENT(INOUT) :: tr_seri ! Concentration Traceur [U/KgA] 289 REAL, DIMENSION(klon, klev) :: sourceBE 290 REAL, DIMENSION(klon, nbtr), INTENT(IN) :: init_source 294 291 295 292 !======================================================================================= … … 303 300 !-------------------------------------------- 304 301 ! 305 REAL, DIMENSION(:,:),ALLOCATABLE,SAVE :: source ! a voir lorsque le flux de surface est prescrit306 !$OMP THREADPRIVATE(source)302 REAL, DIMENSION(:, :), ALLOCATABLE, SAVE :: source ! a voir lorsque le flux de surface est prescrit 303 !$OMP THREADPRIVATE(source) 307 304 308 305 ! 309 306 !Entrees/Sorties: 310 307 !--------------- 311 INTEGER 312 INTEGER 313 REAL 314 INTEGER, SAVE :: nid_tra ! pointe vers le fichier histrac.nc315 !$OMP THREADPRIVATE(nid_tra)316 REAL, DIMENSION(klon):: zx_tmp_fi2d ! variable temporaire grille physique317 INTEGER 318 LOGICAL, PARAMETER :: ok_sync=.TRUE.308 INTEGER :: iiq, ierr 309 INTEGER :: nhori, nvert 310 REAL :: zsto, zout, zjulian 311 INTEGER, SAVE :: nid_tra ! pointe vers le fichier histrac.nc 312 !$OMP THREADPRIVATE(nid_tra) 313 REAL, DIMENSION(klon) :: zx_tmp_fi2d ! variable temporaire grille physique 314 INTEGER :: itau_w ! pas de temps ecriture = nstep + itau_phy 315 LOGICAL, PARAMETER :: ok_sync = .TRUE. 319 316 ! 320 317 ! Nature du traceur 321 318 !------------------ 322 LOGICAL, DIMENSION(:),ALLOCATABLE,SAVE :: aerosol ! aerosol(it) = true => aerosol => lessivage323 !$OMP THREADPRIVATE(aerosol) ! aerosol(it) = false => gaz324 REAL, DIMENSION(klon,klev):: delp ! epaisseur de couche (Pa)319 LOGICAL, DIMENSION(:), ALLOCATABLE, SAVE :: aerosol ! aerosol(it) = true => aerosol => lessivage 320 !$OMP THREADPRIVATE(aerosol) ! aerosol(it) = false => gaz 321 REAL, DIMENSION(klon, klev) :: delp ! epaisseur de couche (Pa) 325 322 ! 326 323 ! Tendances de traceurs (Td) et flux de traceurs: 327 324 !------------------------ 328 REAL, DIMENSION(klon,klev):: d_tr ! Td dans l'atmosphere329 REAL, DIMENSION(klon,klev):: Mint330 REAL, DIMENSION(klon,klev,nbtr) :: zmfd1a331 REAL, DIMENSION(klon,klev,nbtr) :: zmfdam332 REAL, DIMENSION(klon,klev,nbtr) :: zmfphi2325 REAL, DIMENSION(klon, klev) :: d_tr ! Td dans l'atmosphere 326 REAL, DIMENSION(klon, klev) :: Mint 327 REAL, DIMENSION(klon, klev, nbtr) :: zmfd1a 328 REAL, DIMENSION(klon, klev, nbtr) :: zmfdam 329 REAL, DIMENSION(klon, klev, nbtr) :: zmfphi2 333 330 ! Physique 334 !---------- 335 REAL, DIMENSION(klon,klev,nbtr) :: flestottr ! flux de lessivage dans chaque couche336 REAL, DIMENSION(klon,klev):: zmasse ! densite atmospherique Kg/m2337 REAL, DIMENSION(klon,klev):: ztra_th331 !---------- 332 REAL, DIMENSION(klon, klev, nbtr) :: flestottr ! flux de lessivage dans chaque couche 333 REAL, DIMENSION(klon, klev) :: zmasse ! densite atmospherique Kg/m2 334 REAL, DIMENSION(klon, klev) :: ztra_th 338 335 !PhH 339 REAL, DIMENSION(klon,klev):: zrho340 REAL, DIMENSION(klon,klev):: zdz341 REAL :: evaplsc,dx,beta ! variable pour lessivage Genthon342 REAL, DIMENSION(klon):: his_dh ! ---336 REAL, DIMENSION(klon, klev) :: zrho 337 REAL, DIMENSION(klon, klev) :: zdz 338 REAL :: evaplsc, dx, beta ! variable pour lessivage Genthon 339 REAL, DIMENSION(klon) :: his_dh ! --- 343 340 ! in-cloud scav variables 344 REAL 341 REAL :: ql_incloud_ref ! ref value of in-cloud condensed water content 345 342 346 343 !Controles: 347 344 !--------- 348 INTEGER, SAVE :: iflag_vdf_trac,iflag_con_trac,iflag_the_trac349 INTEGER, SAVE :: iflag_con_trac_omp, iflag_vdf_trac_omp,iflag_the_trac_omp350 !$OMP THREADPRIVATE(iflag_vdf_trac,iflag_con_trac,iflag_the_trac)351 352 LOGICAL, SAVE :: lessivage353 !$OMP THREADPRIVATE(lessivage)345 INTEGER, SAVE :: iflag_vdf_trac, iflag_con_trac, iflag_the_trac 346 INTEGER, SAVE :: iflag_con_trac_omp, iflag_vdf_trac_omp, iflag_the_trac_omp 347 !$OMP THREADPRIVATE(iflag_vdf_trac,iflag_con_trac,iflag_the_trac) 348 349 LOGICAL, SAVE :: lessivage 350 !$OMP THREADPRIVATE(lessivage) 354 351 355 352 !RomP >>> 356 INTEGER, SAVE :: iflag_lscav_omp,iflag_lscav357 REAL, SAVE :: ccntrAA_in,ccntrAA_omp358 REAL, SAVE :: ccntrENV_in,ccntrENV_omp359 REAL, SAVE :: coefcoli_in,coefcoli_omp360 361 LOGICAL, SAVE :: convscav_omp,convscav362 !$OMP THREADPRIVATE(iflag_lscav)363 !$OMP THREADPRIVATE(ccntrAA_in,ccntrENV_in,coefcoli_in)364 !$OMP THREADPRIVATE(convscav)353 INTEGER, SAVE :: iflag_lscav_omp, iflag_lscav 354 REAL, SAVE :: ccntrAA_in, ccntrAA_omp 355 REAL, SAVE :: ccntrENV_in, ccntrENV_omp 356 REAL, SAVE :: coefcoli_in, coefcoli_omp 357 358 LOGICAL, SAVE :: convscav_omp, convscav 359 !$OMP THREADPRIVATE(iflag_lscav) 360 !$OMP THREADPRIVATE(ccntrAA_in,ccntrENV_in,coefcoli_in) 361 !$OMP THREADPRIVATE(convscav) 365 362 !RomP <<< 366 363 !###################################################################### … … 368 365 !###################################################################### 369 366 370 DO k =1,klev371 DO i=1,klon372 sourceBE(i,k)=0.373 Mint(i,k)=0.374 zrho(i,k)=0.375 zdz(i,k)=0.376 367 DO k = 1, klev 368 DO i = 1, klon 369 sourceBE(i, k) = 0. 370 Mint(i, k) = 0. 371 zrho(i, k) = 0. 372 zdz(i, k) = 0. 373 ENDDO 377 374 ENDDO 378 375 379 DO it =1, nbtr380 DO k=1,klev381 DO i=1,klon382 d_tr_insc(i,k,it)=0.383 d_tr_bcscav(i,k,it)=0.384 d_tr_evapls(i,k,it)=0.385 d_tr_ls(i,k,it)=0.386 d_tr_cv(i,k,it)=0.387 d_tr_cl(i,k,it)=0.388 d_tr_trsp(i,k,it)=0.389 d_tr_sscav(i,k,it)=0.390 d_tr_sat(i,k,it)=0.391 d_tr_uscav(i,k,it)=0.392 d_tr_lessi_impa(i,k,it)=0.393 d_tr_lessi_nucl(i,k,it)=0.394 qDi(i,k,it)=0.395 qPr(i,k,it)=0.396 qPa(i,k,it)=0.397 qMel(i,k,it)=0.398 qTrdi(i,k,it)=0.399 dtrcvMA(i,k,it)=0.400 zmfd1a(i,k,it)=0.401 zmfdam(i,k,it)=0.402 zmfphi2(i,k,it)=0.403 404 376 DO it = 1, nbtr 377 DO k = 1, klev 378 DO i = 1, klon 379 d_tr_insc(i, k, it) = 0. 380 d_tr_bcscav(i, k, it) = 0. 381 d_tr_evapls(i, k, it) = 0. 382 d_tr_ls(i, k, it) = 0. 383 d_tr_cv(i, k, it) = 0. 384 d_tr_cl(i, k, it) = 0. 385 d_tr_trsp(i, k, it) = 0. 386 d_tr_sscav(i, k, it) = 0. 387 d_tr_sat(i, k, it) = 0. 388 d_tr_uscav(i, k, it) = 0. 389 d_tr_lessi_impa(i, k, it) = 0. 390 d_tr_lessi_nucl(i, k, it) = 0. 391 qDi(i, k, it) = 0. 392 qPr(i, k, it) = 0. 393 qPa(i, k, it) = 0. 394 qMel(i, k, it) = 0. 395 qTrdi(i, k, it) = 0. 396 dtrcvMA(i, k, it) = 0. 397 zmfd1a(i, k, it) = 0. 398 zmfdam(i, k, it) = 0. 399 zmfphi2(i, k, it) = 0. 400 ENDDO 401 ENDDO 405 402 ENDDO 406 403 407 DO it =1, nbtr408 DO i=1,klon409 d_tr_dry(i,it)=0.410 flux_tr_dry(i,it)=0.411 404 DO it = 1, nbtr 405 DO i = 1, klon 406 d_tr_dry(i, it) = 0. 407 flux_tr_dry(i, it) = 0. 408 ENDDO 412 409 ENDDO 413 410 414 411 DO k = 1, klev 415 416 delp(i,k) = paprs(i,k)-paprs(i,k+1)417 412 DO i = 1, klon 413 delp(i, k) = paprs(i, k) - paprs(i, k + 1) 414 ENDDO 418 415 ENDDO 419 416 420 417 IF (debutphy) THEN 421 !!jyg 422 !$OMP BARRIER 423 ecrit_tra=86400. ! frequence de stokage en dur 424 ! obsolete car remplace par des ecritures dans phys_output_write 425 !RomP >>> 426 ! 427 !Config Key = convscav 428 !Config Desc = Convective scavenging switch: 0=off, 1=on. 429 !Config Def = .FALSE. 430 !Config Help = 431 ! 432 !$OMP MASTER 433 convscav_omp=.FALSE. 434 call getin('convscav', convscav_omp) 435 iflag_vdf_trac_omp=1 436 call getin('iflag_vdf_trac', iflag_vdf_trac_omp) 437 iflag_con_trac_omp=1 438 call getin('iflag_con_trac', iflag_con_trac_omp) 439 iflag_the_trac_omp=1 440 call getin('iflag_the_trac', iflag_the_trac_omp) 441 !$OMP END MASTER 442 !$OMP BARRIER 443 convscav=convscav_omp 444 iflag_vdf_trac=iflag_vdf_trac_omp 445 iflag_con_trac=iflag_con_trac_omp 446 iflag_the_trac=iflag_the_trac_omp 447 write(lunout,*) 'phytrac passage dans routine conv avec lessivage', convscav 448 ! 449 !Config Key = iflag_lscav 450 !Config Desc = Large scale scavenging parametrization: 0=none, 1=old(Genthon92), 451 ! 2=1+PHeinrich, 3=Reddy_Boucher2004, 4=3+RPilon. 452 !Config Def = 1 453 !Config Help = 454 ! 455 !$OMP MASTER 456 iflag_lscav_omp=1 457 call getin('iflag_lscav', iflag_lscav_omp) 458 ccntrAA_omp=1 459 ccntrENV_omp=1. 460 coefcoli_omp=0.001 461 call getin('ccntrAA', ccntrAA_omp) 462 call getin('ccntrENV', ccntrENV_omp) 463 call getin('coefcoli', coefcoli_omp) 464 !$OMP END MASTER 465 !$OMP BARRIER 466 iflag_lscav=iflag_lscav_omp 467 ccntrAA_in=ccntrAA_omp 468 ccntrENV_in=ccntrENV_omp 469 coefcoli_in=coefcoli_omp 470 ! 471 SELECT CASE(iflag_lscav) 472 CASE(0) 473 WRITE(lunout,*) 'Large scale scavenging: none' 474 CASE(1) 475 WRITE(lunout,*) 'Large scale scavenging: C. Genthon, Tellus(1992), 44B, 371-389' 476 CASE(2) 477 WRITE(lunout,*) 'Large scale scavenging: C. Genthon, modified P. Heinrich' 478 CASE(3) 479 WRITE(lunout,*) 'Large scale scavenging: M. Shekkar Reddy and O. Boucher, JGR(2004), 109, D14202' 480 CASE(4) 481 WRITE(lunout,*) 'Large scale scavenging: Reddy and Boucher, modified R. Pilon' 482 END SELECT 483 !RomP <<< 484 WRITE(*,*) 'FIRST TIME IN PHYTRAC : pdtphys(sec) = ',pdtphys,'ecrit_tra (sec) = ',ecrit_tra 485 ALLOCATE( source(klon,nbtr), stat=ierr) 486 IF (ierr /= 0) CALL abort_physic('phytrac', 'pb in allocation 1',1) 487 488 ALLOCATE( aerosol(nbtr), stat=ierr) 489 IF (ierr /= 0) CALL abort_physic('phytrac', 'pb in allocation 2',1) 490 491 492 ! Initialize module for specific tracers 493 IF (type_trac == 'inca') THEN 494 source(:,:)=init_source(:,:) 495 CALL tracinca_init(aerosol,lessivage) 496 ELSE IF (type_trac == 'repr') THEN 497 source(:,:)=0. 498 ELSE IF (type_trac == 'co2i') THEN 499 source(:,:)=0. 500 lessivage = .FALSE. 501 aerosol(:) = .FALSE. 502 pbl_flg(:) = 1 503 iflag_the_trac= 1 504 iflag_vdf_trac= 1 505 iflag_con_trac= 1 506 ELSE IF (type_trac == 'inco') THEN 507 source(:,1:nqCO2) = 0. ! from CO2i ModThL 508 source(:,nqCO2+1:nbtr)=init_source(:,:) ! from INCA ModThL 509 aerosol(1:nqCO2) = .FALSE. ! from CO2i ModThL 510 CALL tracinca_init(aerosol(nqCO2+1:nbtr),lessivage) ! from INCA ModThL 511 pbl_flg(1:nqCO2) = 1 ! From CO2i ModThL 512 iflag_the_trac = 1 ! From CO2i 513 iflag_vdf_trac = 1 ! From CO2i 514 iflag_con_trac = 1 ! From CO2i 515 #ifdef CPP_StratAer 516 ELSE IF (type_trac == 'coag') THEN 517 source(:,:)=0. 518 CALL tracstrataer_init(aerosol,lessivage) ! init aerosols and lessivage param 519 #endif 520 ELSE IF (type_trac == 'lmdz') THEN 521 CALL traclmdz_init(pctsrf,xlat,xlon,ftsol,tr_seri,t_seri,pplay,sh,pdtphys,aerosol,lessivage) 522 ENDIF 523 524 ! 525 !--initialising coefficients for scavenging in the case of NP 526 ! 527 ALLOCATE(flag_cvltr(nbtr)) 528 IF (iflag_con==3) THEN 529 ! 530 ALLOCATE(ccntrAA(nbtr)) 531 ALLOCATE(ccntrENV(nbtr)) 532 ALLOCATE(coefcoli(nbtr)) 533 ! 534 DO it=1, nbtr 535 IF (type_trac == 'repr') THEN 536 flag_cvltr(it)=.FALSE. 537 ELSE IF (type_trac == 'inca') THEN 538 ! IF ((it.EQ.id_Rn222) .OR. ((it.GE.id_SO2) .AND. (it.LE.id_NH3)) ) THEN 539 ! !--gas-phase species 540 ! flag_cvltr(it)=.FALSE. 541 ! 542 ! ELSEIF ( (it.GE.id_CIDUSTM) .AND. (it.LE.id_AIN) ) THEN 543 ! !--insoluble aerosol species 544 ! flag_cvltr(it)=.TRUE. 545 ! ccntrAA(it)=0.7 546 ! ccntrENV(it)=0.7 547 ! coefcoli(it)=0.001 548 ! ELSEIF ( (it.EQ.id_Pb210) .OR. ((it.GE.id_CSSSM) .AND. (it.LE.id_SSN))) THEN 549 ! !--soluble aerosol species 550 ! flag_cvltr(it)=.TRUE. 551 ! ccntrAA(it)=0.9 552 ! ccntrENV(it)=0.9 553 ! coefcoli(it)=0.001 554 ! ELSE 555 ! WRITE(lunout,*) 'pb it=', it 556 ! CALL abort_physic('phytrac','pb it scavenging',1) 557 ! ENDIF 558 !--test OB 559 !--for now we do not scavenge in cvltr 560 flag_cvltr(it)=.FALSE. 561 ELSE IF (type_trac == 'co2i') THEN 562 !--co2 tracers are not scavenged 563 flag_cvltr(it)=.FALSE. 564 ELSE IF (type_trac == 'inco') THEN ! Add ThL 565 flag_cvltr(it)=.FALSE. 566 #ifdef CPP_StratAer 567 ELSE IF (type_trac == 'coag') THEN 568 IF (convscav.and.aerosol(it)) THEN 569 flag_cvltr(it)=.TRUE. 570 ccntrAA(it) =ccntrAA_in 571 ccntrENV(it)=ccntrENV_in 572 coefcoli(it)=coefcoli_in 573 ELSE 574 flag_cvltr(it)=.FALSE. 575 ENDIF 576 #endif 577 ELSE IF (type_trac == 'lmdz') THEN 578 IF (convscav.and.aerosol(it)) THEN 579 flag_cvltr(it)=.TRUE. 580 ccntrAA(it) =ccntrAA_in !--a modifier par JYG a lire depuis fichier 581 ccntrENV(it)=ccntrENV_in 582 coefcoli(it)=coefcoli_in 583 ELSE 584 flag_cvltr(it)=.FALSE. 585 ENDIF 586 ENDIF 587 ENDDO 588 ! 589 ELSE ! iflag_con .ne. 3 590 flag_cvltr(:) = .FALSE. 591 ENDIF 592 ! 593 ! print out all tracer flags 594 ! 595 WRITE(lunout,*) 'print out all tracer flags' 596 WRITE(lunout,*) 'type_trac =', type_trac 597 WRITE(lunout,*) 'config_inca =', config_inca 598 WRITE(lunout,*) 'iflag_con_trac =', iflag_con_trac 599 WRITE(lunout,*) 'iflag_con =', iflag_con 600 WRITE(lunout,*) 'convscav =', convscav 601 WRITE(lunout,*) 'iflag_lscav =', iflag_lscav 602 WRITE(lunout,*) 'aerosol =', aerosol 603 WRITE(lunout,*) 'iflag_the_trac =', iflag_the_trac 604 WRITE(lunout,*) 'iflag_thermals =', iflag_thermals 605 WRITE(lunout,*) 'iflag_vdf_trac =', iflag_vdf_trac 606 WRITE(lunout,*) 'pbl_flg =', pbl_flg 607 WRITE(lunout,*) 'lessivage =', lessivage 608 write(lunout,*) 'flag_cvltr = ', flag_cvltr 609 610 IF (lessivage .AND. ANY(type_trac == ['inca','inco'])) & 611 CALL abort_physic('phytrac', 'lessivage=T config_inca=inca impossible',1) 612 ! 418 !!jyg 419 !$OMP BARRIER 420 ecrit_tra = 86400. ! frequence de stokage en dur 421 ! obsolete car remplace par des ecritures dans phys_output_write 422 !RomP >>> 423 ! 424 !Config Key = convscav 425 !Config Desc = Convective scavenging switch: 0=off, 1=on. 426 !Config Def = .FALSE. 427 !Config Help = 428 ! 429 !$OMP MASTER 430 convscav_omp = .FALSE. 431 call getin('convscav', convscav_omp) 432 iflag_vdf_trac_omp = 1 433 call getin('iflag_vdf_trac', iflag_vdf_trac_omp) 434 iflag_con_trac_omp = 1 435 call getin('iflag_con_trac', iflag_con_trac_omp) 436 iflag_the_trac_omp = 1 437 call getin('iflag_the_trac', iflag_the_trac_omp) 438 !$OMP END MASTER 439 !$OMP BARRIER 440 convscav = convscav_omp 441 iflag_vdf_trac = iflag_vdf_trac_omp 442 iflag_con_trac = iflag_con_trac_omp 443 iflag_the_trac = iflag_the_trac_omp 444 write(lunout, *) 'phytrac passage dans routine conv avec lessivage', convscav 445 ! 446 !Config Key = iflag_lscav 447 !Config Desc = Large scale scavenging parametrization: 0=none, 1=old(Genthon92), 448 ! 2=1+PHeinrich, 3=Reddy_Boucher2004, 4=3+RPilon. 449 !Config Def = 1 450 !Config Help = 451 ! 452 !$OMP MASTER 453 iflag_lscav_omp = 1 454 call getin('iflag_lscav', iflag_lscav_omp) 455 ccntrAA_omp = 1 456 ccntrENV_omp = 1. 457 coefcoli_omp = 0.001 458 call getin('ccntrAA', ccntrAA_omp) 459 call getin('ccntrENV', ccntrENV_omp) 460 call getin('coefcoli', coefcoli_omp) 461 !$OMP END MASTER 462 !$OMP BARRIER 463 iflag_lscav = iflag_lscav_omp 464 ccntrAA_in = ccntrAA_omp 465 ccntrENV_in = ccntrENV_omp 466 coefcoli_in = coefcoli_omp 467 ! 468 SELECT CASE(iflag_lscav) 469 CASE(0) 470 WRITE(lunout, *) 'Large scale scavenging: none' 471 CASE(1) 472 WRITE(lunout, *) 'Large scale scavenging: C. Genthon, Tellus(1992), 44B, 371-389' 473 CASE(2) 474 WRITE(lunout, *) 'Large scale scavenging: C. Genthon, modified P. Heinrich' 475 CASE(3) 476 WRITE(lunout, *) 'Large scale scavenging: M. Shekkar Reddy and O. Boucher, JGR(2004), 109, D14202' 477 CASE(4) 478 WRITE(lunout, *) 'Large scale scavenging: Reddy and Boucher, modified R. Pilon' 479 END SELECT 480 !RomP <<< 481 WRITE(*, *) 'FIRST TIME IN PHYTRAC : pdtphys(sec) = ', pdtphys, 'ecrit_tra (sec) = ', ecrit_tra 482 ALLOCATE(source(klon, nbtr), stat = ierr) 483 IF (ierr /= 0) CALL abort_physic('phytrac', 'pb in allocation 1', 1) 484 485 ALLOCATE(aerosol(nbtr), stat = ierr) 486 IF (ierr /= 0) CALL abort_physic('phytrac', 'pb in allocation 2', 1) 487 488 489 ! Initialize module for specific tracers 490 IF (type_trac == 'inca') THEN 491 source(:, :) = init_source(:, :) 492 CALL tracinca_init(aerosol, lessivage) 493 ELSE IF (type_trac == 'repr') THEN 494 source(:, :) = 0. 495 ELSE IF (type_trac == 'co2i') THEN 496 source(:, :) = 0. 497 lessivage = .FALSE. 498 aerosol(:) = .FALSE. 499 pbl_flg(:) = 1 500 iflag_the_trac = 1 501 iflag_vdf_trac = 1 502 iflag_con_trac = 1 503 ELSE IF (type_trac == 'inco') THEN 504 source(:, 1:nqCO2) = 0. ! from CO2i ModThL 505 source(:, nqCO2 + 1:nbtr) = init_source(:, :) ! from INCA ModThL 506 aerosol(1:nqCO2) = .FALSE. ! from CO2i ModThL 507 CALL tracinca_init(aerosol(nqCO2 + 1:nbtr), lessivage) ! from INCA ModThL 508 pbl_flg(1:nqCO2) = 1 ! From CO2i ModThL 509 iflag_the_trac = 1 ! From CO2i 510 iflag_vdf_trac = 1 ! From CO2i 511 iflag_con_trac = 1 ! From CO2i 512 ELSE IF (type_trac == 'coag' .AND. CPPKEY_STRATAER) THEN 513 source(:, :) = 0. 514 CALL tracstrataer_init(aerosol, lessivage) ! init aerosols and lessivage param 515 ELSE IF (type_trac == 'lmdz') THEN 516 CALL traclmdz_init(pctsrf, xlat, xlon, ftsol, tr_seri, t_seri, pplay, sh, pdtphys, aerosol, lessivage) 517 ENDIF 518 519 ! 520 !--initialising coefficients for scavenging in the case of NP 521 ! 522 ALLOCATE(flag_cvltr(nbtr)) 523 IF (iflag_con==3) THEN 524 ! 525 ALLOCATE(ccntrAA(nbtr)) 526 ALLOCATE(ccntrENV(nbtr)) 527 ALLOCATE(coefcoli(nbtr)) 528 ! 529 DO it = 1, nbtr 530 IF (type_trac == 'repr') THEN 531 flag_cvltr(it) = .FALSE. 532 ELSE IF (type_trac == 'inca') THEN 533 ! IF ((it.EQ.id_Rn222) .OR. ((it.GE.id_SO2) .AND. (it.LE.id_NH3)) ) THEN 534 ! !--gas-phase species 535 ! flag_cvltr(it)=.FALSE. 536 ! 537 ! ELSEIF ( (it.GE.id_CIDUSTM) .AND. (it.LE.id_AIN) ) THEN 538 ! !--insoluble aerosol species 539 ! flag_cvltr(it)=.TRUE. 540 ! ccntrAA(it)=0.7 541 ! ccntrENV(it)=0.7 542 ! coefcoli(it)=0.001 543 ! ELSEIF ( (it.EQ.id_Pb210) .OR. ((it.GE.id_CSSSM) .AND. (it.LE.id_SSN))) THEN 544 ! !--soluble aerosol species 545 ! flag_cvltr(it)=.TRUE. 546 ! ccntrAA(it)=0.9 547 ! ccntrENV(it)=0.9 548 ! coefcoli(it)=0.001 549 ! ELSE 550 ! WRITE(lunout,*) 'pb it=', it 551 ! CALL abort_physic('phytrac','pb it scavenging',1) 552 ! ENDIF 553 !--test OB 554 !--for now we do not scavenge in cvltr 555 flag_cvltr(it) = .FALSE. 556 ELSE IF (type_trac == 'co2i') THEN 557 !--co2 tracers are not scavenged 558 flag_cvltr(it) = .FALSE. 559 ELSE IF (type_trac == 'inco') THEN ! Add ThL 560 flag_cvltr(it) = .FALSE. 561 ELSE IF (type_trac == 'coag' .AND. CPPKEY_STRATAER) THEN 562 IF (convscav.and.aerosol(it)) THEN 563 flag_cvltr(it) = .TRUE. 564 ccntrAA(it) = ccntrAA_in 565 ccntrENV(it) = ccntrENV_in 566 coefcoli(it) = coefcoli_in 567 ELSE 568 flag_cvltr(it) = .FALSE. 569 ENDIF 570 ELSE IF (type_trac == 'lmdz') THEN 571 IF (convscav.and.aerosol(it)) THEN 572 flag_cvltr(it) = .TRUE. 573 ccntrAA(it) = ccntrAA_in !--a modifier par JYG a lire depuis fichier 574 ccntrENV(it) = ccntrENV_in 575 coefcoli(it) = coefcoli_in 576 ELSE 577 flag_cvltr(it) = .FALSE. 578 ENDIF 579 ENDIF 580 ENDDO 581 ! 582 ELSE ! iflag_con .ne. 3 583 flag_cvltr(:) = .FALSE. 584 ENDIF 585 ! 586 ! print out all tracer flags 587 ! 588 WRITE(lunout, *) 'print out all tracer flags' 589 WRITE(lunout, *) 'type_trac =', type_trac 590 WRITE(lunout, *) 'config_inca =', config_inca 591 WRITE(lunout, *) 'iflag_con_trac =', iflag_con_trac 592 WRITE(lunout, *) 'iflag_con =', iflag_con 593 WRITE(lunout, *) 'convscav =', convscav 594 WRITE(lunout, *) 'iflag_lscav =', iflag_lscav 595 WRITE(lunout, *) 'aerosol =', aerosol 596 WRITE(lunout, *) 'iflag_the_trac =', iflag_the_trac 597 WRITE(lunout, *) 'iflag_thermals =', iflag_thermals 598 WRITE(lunout, *) 'iflag_vdf_trac =', iflag_vdf_trac 599 WRITE(lunout, *) 'pbl_flg =', pbl_flg 600 WRITE(lunout, *) 'lessivage =', lessivage 601 write(lunout, *) 'flag_cvltr = ', flag_cvltr 602 603 IF (lessivage .AND. ANY(type_trac == ['inca', 'inco'])) & 604 CALL abort_physic('phytrac', 'lessivage=T config_inca=inca impossible', 1) 605 ! 613 606 ENDIF ! of IF (debutphy) 614 607 !############################################ END INITIALIZATION ####### 615 608 616 DO k =1,klev617 DO i=1,klon618 zmasse(i,k)=(paprs(i,k)-paprs(i,k+1))/rg619 609 DO k = 1, klev 610 DO i = 1, klon 611 zmasse(i, k) = (paprs(i, k) - paprs(i, k + 1)) / rg 612 ENDDO 620 613 ENDDO 621 614 ! 622 615 IF (id_be > 0) THEN 623 DO k=1,klev624 DO i=1,klon625 sourceBE(i,k)=srcbe(i,k) !RomP -> pour sortie histrac626 627 616 DO k = 1, klev 617 DO i = 1, klon 618 sourceBE(i, k) = srcbe(i, k) !RomP -> pour sortie histrac 619 ENDDO 620 ENDDO 628 621 ENDIF 629 622 630 623 !=============================================================================== 631 624 ! -- Do specific treatment according to chemestry model or local LMDZ tracers 632 ! 625 ! 633 626 !=============================================================================== 634 627 IF (type_trac == 'inca') THEN 635 636 ! Appel fait en fin de phytrac pour avoir les emissions modifiees par637 ! la couche limite et la convection avant le calcul de la chimie628 ! -- CHIMIE INCA config_inca = aero or chem -- 629 ! Appel fait en fin de phytrac pour avoir les emissions modifiees par 630 ! la couche limite et la convection avant le calcul de la chimie 638 631 639 632 ELSE IF (type_trac == 'repr') THEN 640 641 642 presnivs, xlat, xlon, pphis, pphi, &643 t_seri, pplay, paprs, sh, &644 tr_seri)633 ! -- CHIMIE REPROBUS -- 634 CALL tracreprobus(pdtphys, gmtime, debutphy, julien, & 635 presnivs, xlat, xlon, pphis, pphi, & 636 t_seri, pplay, paprs, sh, & 637 tr_seri) 645 638 646 639 ELSE IF (type_trac == 'co2i') THEN 647 648 ! -- source is updated with FF and BB emissions649 ! -- and net fluxes from ocean and orchidee650 651 652 653 xlat, xlon, pphis, pphi, &654 t_seri, pplay, paprs, tr_seri, source)640 ! -- CO2 interactif -- 641 ! -- source is updated with FF and BB emissions 642 ! -- and net fluxes from ocean and orchidee 643 ! -- sign convention : positive into the atmosphere 644 645 CALL tracco2i(pdtphys, debutphy, & 646 xlat, xlon, pphis, pphi, & 647 t_seri, pplay, paprs, tr_seri, source) 655 648 ELSE IF (type_trac == 'inco') THEN ! Add ThL 656 CALL tracco2i(pdtphys, debutphy, & 657 xlat, xlon, pphis, pphi, & 658 t_seri, pplay, paprs, tr_seri, source) 659 660 #ifdef CPP_StratAer 661 ELSE IF (type_trac == 'coag') THEN 662 ! --STRATOSPHERIC AER IN THE STRAT -- 663 CALL traccoag(pdtphys, gmtime, debutphy, julien, & 664 presnivs, xlat, xlon, pphis, pphi, & 665 t_seri, pplay, paprs, sh, rh , & 666 tr_seri) 667 #endif 649 CALL tracco2i(pdtphys, debutphy, & 650 xlat, xlon, pphis, pphi, & 651 t_seri, pplay, paprs, tr_seri, source) 652 653 ELSE IF (type_trac == 'coag' .AND. CPPKEY_STRATAER) THEN 654 ! --STRATOSPHERIC AER IN THE STRAT -- 655 CALL traccoag(pdtphys, gmtime, debutphy, julien, & 656 presnivs, xlat, xlon, pphis, pphi, & 657 t_seri, pplay, paprs, sh, rh, & 658 tr_seri) 668 659 ELSE IF (type_trac == 'lmdz') THEN 669 670 671 cdragh, coefh, yu1, yv1, ftsol, pctsrf, xlat, xlon,iflag_vdf_trac>=0,sh, &672 rh, pphi, ustar, wstar, ale_bl, ale_wake,u10m, v10m, &673 tr_seri, source, d_tr_cl,d_tr_dec, zmasse) !RomP660 ! -- Traitement des traceurs avec traclmdz 661 CALL traclmdz(nstep, julien, gmtime, pdtphys, t_seri, paprs, pplay, & 662 cdragh, coefh, yu1, yv1, ftsol, pctsrf, xlat, xlon, iflag_vdf_trac>=0, sh, & 663 rh, pphi, ustar, wstar, ale_bl, ale_wake, u10m, v10m, & 664 tr_seri, source, d_tr_cl, d_tr_dec, zmasse) !RomP 674 665 ENDIF 675 666 !====================================================================== … … 679 670 IF (iflag_con_trac==1) THEN 680 671 681 DO it=1, nbtr 682 IF ( conv_flg(it) == 0 ) CYCLE 683 IF (iflag_con<2) THEN 684 !--pas de transport convectif 685 d_tr_cv(:,:,it)=0. 686 687 ELSE IF (iflag_con==2) THEN 688 !--ancien transport convectif de Tiedtke 689 690 CALL nflxtr(pdtphys, pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, & 691 pplay, paprs, tr_seri(:,:,it), d_tr_cv(:,:,it)) 692 ELSE 693 !--nouveau transport convectif de Emanuel 694 695 IF (flag_cvltr(it)) THEN 696 !--nouveau transport convectif de Emanuel avec lessivage convectif 697 ! 698 ! 699 ccntrAA_3d(:,:) =ccntrAA(it) 700 ccntrENV_3d(:,:)=ccntrENV(it) 701 coefcoli_3d(:,:)=coefcoli(it) 702 703 !--beware this interface is a bit weird because it is called for each tracer 704 !--with the full array tr_seri even if only item it is processed 705 706 CALL cvltr_scav(pdtphys, da, phi,phi2,d1a,dam, mp,ep, & 707 sigd,sij,wght_cvfd,clw,elij,epmlmMm,eplaMm, & 708 pmflxr,pmflxs,evap,t_seri,wdtrainA,wdtrainM, & 709 paprs,it,tr_seri,upwd,dnwd,itop_con,ibas_con, & 710 ccntrAA_3d,ccntrENV_3d,coefcoli_3d, & 711 d_tr_cv,d_tr_trsp,d_tr_sscav,d_tr_sat,d_tr_uscav,qDi,qPr,& 712 qPa,qMel,qTrdi,dtrcvMA,Mint, & 713 zmfd1a,zmfphi2,zmfdam) 714 715 716 ELSE !---flag_cvltr(it).EQ.FALSE 717 !--nouveau transport convectif de Emanuel mais pas de lessivage convectif 718 719 !--beware this interface is a bit weird because it is called for each tracer 720 !--with the full array tr_seri even if only item it is processed 721 ! 722 CALL cvltr_noscav(it,pdtphys, da, phi,mp,wght_cvfd,paprs,pplay, & !jyg 723 tr_seri,upwd,dnwd,d_tr_cv) !jyg 724 725 ENDIF 726 727 ENDIF !--iflag 728 729 !--on ajoute les tendances 730 731 DO k = 1, klev 732 DO i = 1, klon 733 tr_seri(i,k,it) = tr_seri(i,k,it) + d_tr_cv(i,k,it) 734 ENDDO 672 DO it = 1, nbtr 673 IF (conv_flg(it) == 0) CYCLE 674 IF (iflag_con<2) THEN 675 !--pas de transport convectif 676 d_tr_cv(:, :, it) = 0. 677 678 ELSE IF (iflag_con==2) THEN 679 !--ancien transport convectif de Tiedtke 680 681 CALL nflxtr(pdtphys, pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, & 682 pplay, paprs, tr_seri(:, :, it), d_tr_cv(:, :, it)) 683 ELSE 684 !--nouveau transport convectif de Emanuel 685 686 IF (flag_cvltr(it)) THEN 687 !--nouveau transport convectif de Emanuel avec lessivage convectif 688 ! 689 ! 690 ccntrAA_3d(:, :) = ccntrAA(it) 691 ccntrENV_3d(:, :) = ccntrENV(it) 692 coefcoli_3d(:, :) = coefcoli(it) 693 694 !--beware this interface is a bit weird because it is called for each tracer 695 !--with the full array tr_seri even if only item it is processed 696 697 CALL cvltr_scav(pdtphys, da, phi, phi2, d1a, dam, mp, ep, & 698 sigd, sij, wght_cvfd, clw, elij, epmlmMm, eplaMm, & 699 pmflxr, pmflxs, evap, t_seri, wdtrainA, wdtrainM, & 700 paprs, it, tr_seri, upwd, dnwd, itop_con, ibas_con, & 701 ccntrAA_3d, ccntrENV_3d, coefcoli_3d, & 702 d_tr_cv, d_tr_trsp, d_tr_sscav, d_tr_sat, d_tr_uscav, qDi, qPr, & 703 qPa, qMel, qTrdi, dtrcvMA, Mint, & 704 zmfd1a, zmfphi2, zmfdam) 705 706 ELSE !---flag_cvltr(it).EQ.FALSE 707 !--nouveau transport convectif de Emanuel mais pas de lessivage convectif 708 709 !--beware this interface is a bit weird because it is called for each tracer 710 !--with the full array tr_seri even if only item it is processed 711 ! 712 CALL cvltr_noscav(it, pdtphys, da, phi, mp, wght_cvfd, paprs, pplay, & !jyg 713 tr_seri, upwd, dnwd, d_tr_cv) !jyg 714 715 ENDIF 716 717 ENDIF !--iflag 718 719 !--on ajoute les tendances 720 721 DO k = 1, klev 722 DO i = 1, klon 723 tr_seri(i, k, it) = tr_seri(i, k, it) + d_tr_cv(i, k, it) 735 724 ENDDO 736 737 CALL minmaxqfi(tr_seri(:,:,it),0.,1.e33,'convection it = '//TRIM(int2str(it))) 738 739 ENDDO ! nbtr 740 741 #ifdef CPP_StratAer 742 IF (type_trac=='coag') THEN 743 ! initialize wet deposition flux of sulfur 744 budg_dep_wet_ocs(:)=0.0 745 budg_dep_wet_so2(:)=0.0 746 budg_dep_wet_h2so4(:)=0.0 747 budg_dep_wet_part(:)=0.0 748 ! compute wet deposition flux of sulfur (sum over gases and particles) 749 ! and convert to kg(S)/m2/s 750 DO i = 1, klon 751 DO k = 1, klev 752 DO it = 1, nbtr 753 !do not include SO2 because most of it comes trom the troposphere 754 IF (it==id_OCS_strat) THEN 755 budg_dep_wet_ocs(i)=budg_dep_wet_ocs(i)+d_tr_cv(i,k,it)*(mSatom/mOCSmol) & 756 *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys 757 ELSEIF (it==id_SO2_strat) THEN 758 budg_dep_wet_so2(i)=budg_dep_wet_so2(i)+d_tr_cv(i,k,it)*(mSatom/mSO2mol) & 759 *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys 760 ELSEIF (it==id_H2SO4_strat) THEN 761 budg_dep_wet_h2so4(i)=budg_dep_wet_h2so4(i)+d_tr_cv(i,k,it)*(mSatom/mH2SO4mol) & 762 *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys 763 ELSEIF (it.GT.nbtr_sulgas) THEN 764 budg_dep_wet_part(i)=budg_dep_wet_part(i)+d_tr_cv(i,k,it)*(mSatom/mH2SO4mol) & 765 *dens_aer_dry*4./3.*RPI*(mdw(it-nbtr_sulgas)/2.)**3 & 766 *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys 767 ENDIF 768 ENDDO 769 ENDDO 770 ENDDO 771 ENDIF 772 #endif 725 ENDDO 726 727 CALL minmaxqfi(tr_seri(:, :, it), 0., 1.e33, 'convection it = ' // TRIM(int2str(it))) 728 729 ENDDO ! nbtr 730 731 IF (CPPKEY_STRATAER) THEN 732 IF (type_trac=='coag') THEN 733 ! initialize wet deposition flux of sulfur 734 budg_dep_wet_ocs(:) = 0.0 735 budg_dep_wet_so2(:) = 0.0 736 budg_dep_wet_h2so4(:) = 0.0 737 budg_dep_wet_part(:) = 0.0 738 ! compute wet deposition flux of sulfur (sum over gases and particles) 739 ! and convert to kg(S)/m2/s 740 DO i = 1, klon 741 DO k = 1, klev 742 DO it = 1, nbtr 743 !do not include SO2 because most of it comes trom the troposphere 744 IF (it==id_OCS_strat) THEN 745 budg_dep_wet_ocs(i) = budg_dep_wet_ocs(i) + d_tr_cv(i, k, it) * (mSatom / mOCSmol) & 746 * (paprs(i, k) - paprs(i, k + 1)) / RG / pdtphys 747 ELSEIF (it==id_SO2_strat) THEN 748 budg_dep_wet_so2(i) = budg_dep_wet_so2(i) + d_tr_cv(i, k, it) * (mSatom / mSO2mol) & 749 * (paprs(i, k) - paprs(i, k + 1)) / RG / pdtphys 750 ELSEIF (it==id_H2SO4_strat) THEN 751 budg_dep_wet_h2so4(i) = budg_dep_wet_h2so4(i) + d_tr_cv(i, k, it) * (mSatom / mH2SO4mol) & 752 * (paprs(i, k) - paprs(i, k + 1)) / RG / pdtphys 753 ELSEIF (it>nbtr_sulgas) THEN 754 budg_dep_wet_part(i) = budg_dep_wet_part(i) + d_tr_cv(i, k, it) * (mSatom / mH2SO4mol) & 755 * dens_aer_dry * 4. / 3. * RPI * (mdw(it - nbtr_sulgas) / 2.)**3 & 756 * (paprs(i, k) - paprs(i, k + 1)) / RG / pdtphys 757 ENDIF 758 ENDDO 759 ENDDO 760 ENDDO 761 ENDIF 762 END IF 773 763 774 764 ENDIF ! convection … … 778 768 !====================================================================== 779 769 780 DO it=1,nbtr 781 DO k=1,klev 782 DO i=1,klon 783 d_tr_th(i,k,it)=0. 784 tr_seri(i,k,it)=MAX(tr_seri(i,k,it),0.) 785 ! the next safeguard causes some problem for stratospheric aerosol tracers (particle number) 786 ! and there is little justification for it so it is commented out (4 December 2017) by OB 787 ! if reinstated please keep the ifndef CPP_StratAer 788 !#ifndef CPP_StratAer 789 ! tr_seri(i,k,it)=MIN(tr_seri(i,k,it),1.e10) 790 !#endif 770 DO it = 1, nbtr 771 DO k = 1, klev 772 DO i = 1, klon 773 d_tr_th(i, k, it) = 0. 774 tr_seri(i, k, it) = MAX(tr_seri(i, k, it), 0.) 775 ! the next safeguard causes some problem for stratospheric aerosol tracers (particle number) 776 ! and there is little justification for it so it is commented out (4 December 2017) by OB 777 ! if reinstated please keep the ifndef CPP_StratAer 778 !#ifndef CPP_StratAer 779 ! tr_seri(i,k,it)=MIN(tr_seri(i,k,it),1.e10) 780 !#endif 781 ENDDO 782 ENDDO 783 ENDDO 784 785 IF (iflag_thermals>0.AND.iflag_the_trac>0) THEN 786 787 DO it = 1, nbtr 788 789 CALL thermcell_dq(klon, klev, 1, pdtphys, fm_therm, entr_therm, & 790 zmasse, tr_seri(1:klon, 1:klev, it), & 791 d_tr_th(1:klon, 1:klev, it), ztra_th, 0) 792 793 DO k = 1, klev 794 DO i = 1, klon 795 d_tr_th(i, k, it) = pdtphys * d_tr_th(i, k, it) 796 tr_seri(i, k, it) = MAX(tr_seri(i, k, it) + d_tr_th(i, k, it), 0.) 791 797 ENDDO 792 ENDDO 793 ENDDO 794 795 IF (iflag_thermals>0.AND.iflag_the_trac>0) THEN 796 797 DO it=1, nbtr 798 799 CALL thermcell_dq(klon,klev,1,pdtphys,fm_therm,entr_therm, & 800 zmasse,tr_seri(1:klon,1:klev,it), & 801 d_tr_th(1:klon,1:klev,it),ztra_th,0 ) 802 803 DO k=1,klev 804 DO i=1,klon 805 d_tr_th(i,k,it)=pdtphys*d_tr_th(i,k,it) 806 tr_seri(i,k,it)=MAX(tr_seri(i,k,it)+d_tr_th(i,k,it),0.) 807 ENDDO 808 ENDDO 809 810 ENDDO ! it 798 ENDDO 799 800 ENDDO ! it 811 801 812 802 ENDIF ! Thermiques … … 818 808 IF (iflag_vdf_trac==1) THEN 819 809 820 ! Injection during BL mixing 821 ! 822 #ifdef CPP_StratAer 823 IF (type_trac=='coag') THEN 824 825 ! initialize dry deposition flux of sulfur 826 budg_dep_dry_ocs(:)=0.0 827 budg_dep_dry_so2(:)=0.0 828 budg_dep_dry_h2so4(:)=0.0 829 budg_dep_dry_part(:)=0.0 830 831 ! compute dry deposition velocity as function of surface type (numbers 832 ! from IPSL note 23, 2002) 833 v_dep_dry(:) = pctsrf(:,is_ter) * 2.5e-3 & 834 + pctsrf(:,is_oce) * 0.5e-3 & 835 + pctsrf(:,is_lic) * 2.5e-3 & 836 + pctsrf(:,is_sic) * 2.5e-3 837 838 ! compute surface dry deposition flux 839 zrho(:,1)=pplay(:,1)/t_seri(:,1)/RD 840 841 DO it=1, nbtr 842 source(:,it) = - v_dep_dry(:) * tr_seri(:,1,it) * zrho(:,1) 843 ENDDO 844 845 ENDIF 846 #endif 847 848 DO it=1, nbtr 810 ! Injection during BL mixing 811 ! 812 IF (CPPKEY_STRATAER) THEN 813 IF (type_trac=='coag') THEN 814 815 ! initialize dry deposition flux of sulfur 816 budg_dep_dry_ocs(:) = 0.0 817 budg_dep_dry_so2(:) = 0.0 818 budg_dep_dry_h2so4(:) = 0.0 819 budg_dep_dry_part(:) = 0.0 820 821 ! compute dry deposition velocity as function of surface type (numbers 822 ! from IPSL note 23, 2002) 823 v_dep_dry(:) = pctsrf(:, is_ter) * 2.5e-3 & 824 + pctsrf(:, is_oce) * 0.5e-3 & 825 + pctsrf(:, is_lic) * 2.5e-3 & 826 + pctsrf(:, is_sic) * 2.5e-3 827 828 ! compute surface dry deposition flux 829 zrho(:, 1) = pplay(:, 1) / t_seri(:, 1) / RD 830 831 DO it = 1, nbtr 832 source(:, it) = - v_dep_dry(:) * tr_seri(:, 1, it) * zrho(:, 1) 833 ENDDO 834 835 ENDIF 836 END IF 837 838 DO it = 1, nbtr 839 ! 840 IF (pbl_flg(it) /= 0) THEN 849 841 ! 850 IF (pbl_flg(it) /= 0) THEN 851 ! 852 CALL cltrac(pdtphys, coefh,t_seri, & 853 tr_seri(:,:,it), source(:,it), & 854 paprs, pplay, delp, & 855 d_tr_cl(:,:,it),d_tr_dry(:,it),flux_tr_dry(:,it)) 856 ! 857 tr_seri(:,:,it)=tr_seri(:,:,it)+d_tr_cl(:,:,it) 858 ! 859 #ifdef CPP_StratAer 860 IF (type_trac=='coag') THEN 861 ! compute dry deposition flux of sulfur (sum over gases and particles) 862 IF (it==id_OCS_strat) THEN 863 budg_dep_dry_ocs(:)=budg_dep_dry_ocs(:)-source(:,it)*(mSatom/mOCSmol) 864 ELSEIF (it==id_SO2_strat) THEN 865 budg_dep_dry_so2(:)=budg_dep_dry_so2(:)-source(:,it)*(mSatom/mSO2mol) 866 ELSEIF (it==id_H2SO4_strat) THEN 867 budg_dep_dry_h2so4(:)=budg_dep_dry_h2so4(:)-source(:,it)*(mSatom/mH2SO4mol) 868 ELSEIF (it.GT.nbtr_sulgas) THEN 869 budg_dep_dry_part(:)=budg_dep_dry_part(:)-source(:,it)*(mSatom/mH2SO4mol)*dens_aer_dry & 870 *4./3.*RPI*(mdw(it-nbtr_sulgas)/2.)**3 871 ENDIF 872 ENDIF 873 #endif 874 ! 875 ENDIF 842 CALL cltrac(pdtphys, coefh, t_seri, & 843 tr_seri(:, :, it), source(:, it), & 844 paprs, pplay, delp, & 845 d_tr_cl(:, :, it), d_tr_dry(:, it), flux_tr_dry(:, it)) 876 846 ! 877 ENDDO 878 ! 847 tr_seri(:, :, it) = tr_seri(:, :, it) + d_tr_cl(:, :, it) 848 ! 849 IF (CPPKEY_STRATAER) THEN 850 IF (type_trac=='coag') THEN 851 ! compute dry deposition flux of sulfur (sum over gases and particles) 852 IF (it==id_OCS_strat) THEN 853 budg_dep_dry_ocs(:) = budg_dep_dry_ocs(:) - source(:, it) * (mSatom / mOCSmol) 854 ELSEIF (it==id_SO2_strat) THEN 855 budg_dep_dry_so2(:) = budg_dep_dry_so2(:) - source(:, it) * (mSatom / mSO2mol) 856 ELSEIF (it==id_H2SO4_strat) THEN 857 budg_dep_dry_h2so4(:) = budg_dep_dry_h2so4(:) - source(:, it) * (mSatom / mH2SO4mol) 858 ELSEIF (it>nbtr_sulgas) THEN 859 budg_dep_dry_part(:) = budg_dep_dry_part(:) - source(:, it) * (mSatom / mH2SO4mol) * dens_aer_dry & 860 * 4. / 3. * RPI * (mdw(it - nbtr_sulgas) / 2.)**3 861 ENDIF 862 ENDIF 863 END IF 864 ! 865 ENDIF 866 ! 867 ENDDO 868 ! 879 869 ELSE IF (iflag_vdf_trac==0) THEN 880 881 882 883 DO it=1,nbtr884 d_tr_cl(:,1,it)=source(:,it)*RG/delp(:,1)*pdtphys885 tr_seri(:,1,it)=tr_seri(:,1,it)+d_tr_cl(:,1,it)886 887 d_tr_cl(:,2:klev,1:nbtr)=0.888 870 ! 871 ! Injection of source in the first model layer 872 ! 873 DO it = 1, nbtr 874 d_tr_cl(:, 1, it) = source(:, it) * RG / delp(:, 1) * pdtphys 875 tr_seri(:, 1, it) = tr_seri(:, 1, it) + d_tr_cl(:, 1, it) 876 ENDDO 877 d_tr_cl(:, 2:klev, 1:nbtr) = 0. 878 ! 889 879 ELSE IF (iflag_vdf_trac==-1) THEN 890 891 892 d_tr_cl=0.893 880 ! 881 ! Nothing happens 882 d_tr_cl = 0. 883 ! 894 884 ELSE 895 896 CALL abort_physic('iflag_vdf_trac', 'cas non prevu',1)897 885 ! 886 CALL abort_physic('iflag_vdf_trac', 'cas non prevu', 1) 887 ! 898 888 ENDIF ! couche limite 899 889 … … 905 895 IF (lessivage) THEN 906 896 907 ql_incloud_ref = 10.e-4 908 ql_incloud_ref = 5.e-4 909 910 911 ! calcul du contenu en eau liquide au sein du nuage 912 ql_incl = ql_incloud_ref 913 ! choix du lessivage 914 ! 915 IF (iflag_lscav == 3 .OR. iflag_lscav == 4) THEN 916 ! ******** Olivier Boucher version (3) possibly with modified ql_incl (4) 917 ! 918 DO it = 1, nbtr 919 920 IF (aerosol(it)) THEN 921 ! incloud scavenging and removal by large scale rain ! orig : ql_incl was replaced by 0.5e-3 kg/kg 922 ! the value 0.5e-3 kg/kg is from Giorgi and Chameides (1986), JGR 923 ! Liu (2001) proposed to use 1.5e-3 kg/kg 924 925 CALL lsc_scav(pdtphys,it,iflag_lscav,aerosol,ql_incl,prfl,psfl,rneb,beta_fisrt, & 926 beta_v1,pplay,paprs,t_seri,tr_seri,d_tr_insc,d_tr_bcscav,d_tr_evapls,qPrls) 927 928 !large scale scavenging tendency 929 DO k = 1, klev 930 DO i = 1, klon 931 d_tr_ls(i,k,it)=d_tr_insc(i,k,it)+d_tr_bcscav(i,k,it)+d_tr_evapls(i,k,it) 932 tr_seri(i,k,it)=tr_seri(i,k,it)+d_tr_ls(i,k,it) 897 ql_incloud_ref = 10.e-4 898 ql_incloud_ref = 5.e-4 899 900 901 ! calcul du contenu en eau liquide au sein du nuage 902 ql_incl = ql_incloud_ref 903 ! choix du lessivage 904 ! 905 IF (iflag_lscav == 3 .OR. iflag_lscav == 4) THEN 906 ! ******** Olivier Boucher version (3) possibly with modified ql_incl (4) 907 ! 908 DO it = 1, nbtr 909 910 IF (aerosol(it)) THEN 911 ! incloud scavenging and removal by large scale rain ! orig : ql_incl was replaced by 0.5e-3 kg/kg 912 ! the value 0.5e-3 kg/kg is from Giorgi and Chameides (1986), JGR 913 ! Liu (2001) proposed to use 1.5e-3 kg/kg 914 915 CALL lsc_scav(pdtphys, it, iflag_lscav, aerosol, ql_incl, prfl, psfl, rneb, beta_fisrt, & 916 beta_v1, pplay, paprs, t_seri, tr_seri, d_tr_insc, d_tr_bcscav, d_tr_evapls, qPrls) 917 918 !large scale scavenging tendency 919 DO k = 1, klev 920 DO i = 1, klon 921 d_tr_ls(i, k, it) = d_tr_insc(i, k, it) + d_tr_bcscav(i, k, it) + d_tr_evapls(i, k, it) 922 tr_seri(i, k, it) = tr_seri(i, k, it) + d_tr_ls(i, k, it) 923 ENDDO 924 ENDDO 925 CALL minmaxqfi(tr_seri(:, :, it), 0., 1.e33, 'lsc scav it = ' // TRIM(int2str(it))) 926 ENDIF 927 928 ENDDO !tr 929 930 IF (CPPKEY_STRATAER) THEN 931 IF (type_trac=='coag') THEN 932 ! compute wet deposition flux of sulfur (sum over gases and 933 ! particles) and convert to kg(S)/m2/s 934 ! adding contribution of d_tr_ls to d_tr_cv (above) 935 DO i = 1, klon 936 DO k = 1, klev 937 DO it = 1, nbtr 938 IF (it==id_OCS_strat) THEN 939 budg_dep_wet_ocs(i) = budg_dep_wet_ocs(i) + d_tr_ls(i, k, it) * (mSatom / mOCSmol) & 940 * (paprs(i, k) - paprs(i, k + 1)) / RG / pdtphys 941 ELSEIF (it==id_SO2_strat) THEN 942 budg_dep_wet_so2(i) = budg_dep_wet_so2(i) + d_tr_ls(i, k, it) * (mSatom / mSO2mol) & 943 * (paprs(i, k) - paprs(i, k + 1)) / RG / pdtphys 944 ELSEIF (it==id_H2SO4_strat) THEN 945 budg_dep_wet_h2so4(i) = budg_dep_wet_h2so4(i) + d_tr_ls(i, k, it) * (mSatom / mH2SO4mol) & 946 * (paprs(i, k) - paprs(i, k + 1)) / RG / pdtphys 947 ELSEIF (it>nbtr_sulgas) THEN 948 budg_dep_wet_part(i) = budg_dep_wet_part(i) + d_tr_ls(i, k, it) * (mSatom / mH2SO4mol) & 949 * dens_aer_dry * 4. / 3. * RPI * (mdw(it - nbtr_sulgas) / 2.)**3 & 950 * (paprs(i, k) - paprs(i, k + 1)) / RG / pdtphys 951 ENDIF 933 952 ENDDO 934 ENDDO 935 CALL minmaxqfi(tr_seri(:,:,it),0.,1.e33,'lsc scav it = '//TRIM(int2str(it))) 936 ENDIF 937 938 ENDDO !tr 939 940 #ifdef CPP_StratAer 941 IF (type_trac=='coag') THEN 942 ! compute wet deposition flux of sulfur (sum over gases and 943 ! particles) and convert to kg(S)/m2/s 944 ! adding contribution of d_tr_ls to d_tr_cv (above) 945 DO i = 1, klon 946 DO k = 1, klev 947 DO it = 1, nbtr 948 IF (it==id_OCS_strat) THEN 949 budg_dep_wet_ocs(i)=budg_dep_wet_ocs(i)+d_tr_ls(i,k,it)*(mSatom/mOCSmol) & 950 *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys 951 ELSEIF (it==id_SO2_strat) THEN 952 budg_dep_wet_so2(i)=budg_dep_wet_so2(i)+d_tr_ls(i,k,it)*(mSatom/mSO2mol) & 953 *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys 954 ELSEIF (it==id_H2SO4_strat) THEN 955 budg_dep_wet_h2so4(i)=budg_dep_wet_h2so4(i)+d_tr_ls(i,k,it)*(mSatom/mH2SO4mol) & 956 *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys 957 ELSEIF (it.GT.nbtr_sulgas) THEN 958 budg_dep_wet_part(i)=budg_dep_wet_part(i)+d_tr_ls(i,k,it)*(mSatom/mH2SO4mol) & 959 *dens_aer_dry*4./3.*RPI*(mdw(it-nbtr_sulgas)/2.)**3 & 960 *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys 961 ENDIF 962 ENDDO 963 ENDDO 964 ENDDO 965 ENDIF 966 #endif 967 968 ELSE IF (iflag_lscav == 2) THEN ! frac_impa, frac_nucl 969 ! ********* modified old version 970 971 d_tr_lessi_nucl(:,:,:) = 0. 972 d_tr_lessi_impa(:,:,:) = 0. 973 flestottr(:,:,:) = 0. 974 ! Tendance des aerosols nuclees et impactes 975 DO it = 1, nbtr 976 IF (aerosol(it)) THEN 977 his_dh(:)=0. 978 DO k = 1, klev 979 DO i = 1, klon 980 !PhH 981 zrho(i,k)=pplay(i,k)/t_seri(i,k)/RD 982 zdz(i,k)=(paprs(i,k)-paprs(i,k+1))/zrho(i,k)/RG 983 ! 984 ENDDO 985 ENDDO 986 987 DO k=klev-1, 1, -1 988 DO i=1, klon 989 ! d_tr_ls(i,k,it)=tr_seri(i,k,it)*(frac_impa(i,k)*frac_nucl(i,k)-1.) 990 dx=d_tr_ls(i,k,it) 991 his_dh(i)=his_dh(i)-dx*zrho(i,k)*zdz(i,k)/pdtphys ! kg/m2/s 992 evaplsc = prfl(i,k) - prfl(i,k+1) + psfl(i,k) - psfl(i,k+1) 993 ! Evaporation Partielle -> Liberation Partielle 0.5*evap 994 IF ( evaplsc <0..and.abs(prfl(i,k+1)+psfl(i,k+1))>1.e-10) THEN 995 evaplsc = (-evaplsc)/(prfl(i,k+1)+psfl(i,k+1)) 996 ! evaplsc est donc positif, his_dh(i) est positif 997 !-------------- 998 d_tr_evapls(i,k,it)=0.5*evaplsc*(d_tr_lessi_nucl(i,k+1,it) & 999 +d_tr_lessi_impa(i,k+1,it)) 1000 !------------- d_tr_evapls(i,k,it)=-0.5*evaplsc*(d_tr_lsc(i,k+1,it)) 1001 beta=0.5*evaplsc 1002 if ((prfl(i,k)+psfl(i,k))<1.e-10) THEN 1003 beta=1.0*evaplsc 1004 endif 1005 dx=beta*his_dh(i)/zrho(i,k)/zdz(i,k)*pdtphys 1006 his_dh(i)=(1.-beta)*his_dh(i) ! tracer from 1007 d_tr_evapls(i,k,it)=dx 1008 ENDIF 1009 d_tr_ls(i,k,it)=tr_seri(i,k,it)*(frac_impa(i,k)*frac_nucl(i,k)-1.) & 1010 +d_tr_evapls(i,k,it) 1011 1012 !-------------- 1013 d_tr_lessi_nucl(i,k,it) = d_tr_lessi_nucl(i,k,it) + & 1014 ( 1 - frac_nucl(i,k) )*tr_seri(i,k,it) 1015 d_tr_lessi_impa(i,k,it) = d_tr_lessi_impa(i,k,it) + & 1016 ( 1 - frac_impa(i,k) )*tr_seri(i,k,it) 1017 ! 1018 ! Flux lessivage total 1019 flestottr(i,k,it) = flestottr(i,k,it) - & 1020 ( d_tr_lessi_nucl(i,k,it) + & 1021 d_tr_lessi_impa(i,k,it) ) * & 1022 ( paprs(i,k)-paprs(i,k+1) ) / & 1023 (RG * pdtphys) 1024 !! Mise a jour des traceurs due a l'impaction,nucleation 1025 ! tr_seri(i,k,it)=tr_seri(i,k,it)*frac_impa(i,k)*frac_nucl(i,k) 1026 !! calcul de la tendance liee au lessivage stratiforme 1027 ! d_tr_ls(i,k,it)=tr_seri(i,k,it)*& 1028 ! (1.-1./(frac_impa(i,k)*frac_nucl(i,k))) 1029 !-------------- 1030 ENDDO 1031 ENDDO 1032 ENDIF 1033 ENDDO 1034 ! ********* end modified old version 1035 1036 ELSE IF (iflag_lscav == 1) THEN ! frac_impa, frac_nucl 1037 ! ********* old version 1038 1039 d_tr_lessi_nucl(:,:,:) = 0. 1040 d_tr_lessi_impa(:,:,:) = 0. 1041 flestottr(:,:,:) = 0. 1042 !========================= 1043 ! LESSIVAGE LARGE SCALE : 1044 !========================= 1045 1046 ! Tendance des aerosols nuclees et impactes 1047 ! ----------------------------------------- 1048 DO it = 1, nbtr 1049 IF (aerosol(it)) THEN 1050 DO k = 1, klev 1051 DO i = 1, klon 1052 d_tr_lessi_nucl(i,k,it) = d_tr_lessi_nucl(i,k,it) + & 1053 ( 1 - frac_nucl(i,k) )*tr_seri(i,k,it) 1054 d_tr_lessi_impa(i,k,it) = d_tr_lessi_impa(i,k,it) + & 1055 ( 1 - frac_impa(i,k) )*tr_seri(i,k,it) 1056 1057 ! 1058 ! Flux lessivage total 1059 ! ------------------------------------------------------------ 1060 flestottr(i,k,it) = flestottr(i,k,it) - & 1061 ( d_tr_lessi_nucl(i,k,it) + & 1062 d_tr_lessi_impa(i,k,it) ) * & 1063 ( paprs(i,k)-paprs(i,k+1) ) / & 1064 (RG * pdtphys) 1065 ! 1066 ! Mise a jour des traceurs due a l'impaction,nucleation 1067 ! ---------------------------------------------------------------------- 1068 tr_seri(i,k,it)=tr_seri(i,k,it)*frac_impa(i,k)*frac_nucl(i,k) 1069 ENDDO 1070 ENDDO 1071 ENDIF 1072 ENDDO 1073 1074 ! ********* end old version 1075 ENDIF ! iflag_lscav .EQ. 1, 2, 3 or 4 1076 ! 953 ENDDO 954 ENDDO 955 ENDIF 956 END IF 957 958 ELSE IF (iflag_lscav == 2) THEN ! frac_impa, frac_nucl 959 ! ********* modified old version 960 961 d_tr_lessi_nucl(:, :, :) = 0. 962 d_tr_lessi_impa(:, :, :) = 0. 963 flestottr(:, :, :) = 0. 964 ! Tendance des aerosols nuclees et impactes 965 DO it = 1, nbtr 966 IF (aerosol(it)) THEN 967 his_dh(:) = 0. 968 DO k = 1, klev 969 DO i = 1, klon 970 !PhH 971 zrho(i, k) = pplay(i, k) / t_seri(i, k) / RD 972 zdz(i, k) = (paprs(i, k) - paprs(i, k + 1)) / zrho(i, k) / RG 973 ! 974 ENDDO 975 ENDDO 976 977 DO k = klev - 1, 1, -1 978 DO i = 1, klon 979 ! d_tr_ls(i,k,it)=tr_seri(i,k,it)*(frac_impa(i,k)*frac_nucl(i,k)-1.) 980 dx = d_tr_ls(i, k, it) 981 his_dh(i) = his_dh(i) - dx * zrho(i, k) * zdz(i, k) / pdtphys ! kg/m2/s 982 evaplsc = prfl(i, k) - prfl(i, k + 1) + psfl(i, k) - psfl(i, k + 1) 983 ! Evaporation Partielle -> Liberation Partielle 0.5*evap 984 IF (evaplsc <0..and.abs(prfl(i, k + 1) + psfl(i, k + 1))>1.e-10) THEN 985 evaplsc = (-evaplsc) / (prfl(i, k + 1) + psfl(i, k + 1)) 986 ! evaplsc est donc positif, his_dh(i) est positif 987 !-------------- 988 d_tr_evapls(i, k, it) = 0.5 * evaplsc * (d_tr_lessi_nucl(i, k + 1, it) & 989 + d_tr_lessi_impa(i, k + 1, it)) 990 !------------- d_tr_evapls(i,k,it)=-0.5*evaplsc*(d_tr_lsc(i,k+1,it)) 991 beta = 0.5 * evaplsc 992 if ((prfl(i, k) + psfl(i, k))<1.e-10) THEN 993 beta = 1.0 * evaplsc 994 endif 995 dx = beta * his_dh(i) / zrho(i, k) / zdz(i, k) * pdtphys 996 his_dh(i) = (1. - beta) * his_dh(i) ! tracer from 997 d_tr_evapls(i, k, it) = dx 998 ENDIF 999 d_tr_ls(i, k, it) = tr_seri(i, k, it) * (frac_impa(i, k) * frac_nucl(i, k) - 1.) & 1000 + d_tr_evapls(i, k, it) 1001 1002 !-------------- 1003 d_tr_lessi_nucl(i, k, it) = d_tr_lessi_nucl(i, k, it) + & 1004 (1 - frac_nucl(i, k)) * tr_seri(i, k, it) 1005 d_tr_lessi_impa(i, k, it) = d_tr_lessi_impa(i, k, it) + & 1006 (1 - frac_impa(i, k)) * tr_seri(i, k, it) 1007 ! 1008 ! Flux lessivage total 1009 flestottr(i, k, it) = flestottr(i, k, it) - & 1010 (d_tr_lessi_nucl(i, k, it) + & 1011 d_tr_lessi_impa(i, k, it)) * & 1012 (paprs(i, k) - paprs(i, k + 1)) / & 1013 (RG * pdtphys) 1014 !! Mise a jour des traceurs due a l'impaction,nucleation 1015 ! tr_seri(i,k,it)=tr_seri(i,k,it)*frac_impa(i,k)*frac_nucl(i,k) 1016 !! calcul de la tendance liee au lessivage stratiforme 1017 ! d_tr_ls(i,k,it)=tr_seri(i,k,it)*& 1018 ! (1.-1./(frac_impa(i,k)*frac_nucl(i,k))) 1019 !-------------- 1020 ENDDO 1021 ENDDO 1022 ENDIF 1023 ENDDO 1024 ! ********* end modified old version 1025 1026 ELSE IF (iflag_lscav == 1) THEN ! frac_impa, frac_nucl 1027 ! ********* old version 1028 1029 d_tr_lessi_nucl(:, :, :) = 0. 1030 d_tr_lessi_impa(:, :, :) = 0. 1031 flestottr(:, :, :) = 0. 1032 !========================= 1033 ! LESSIVAGE LARGE SCALE : 1034 !========================= 1035 1036 ! Tendance des aerosols nuclees et impactes 1037 ! ----------------------------------------- 1038 DO it = 1, nbtr 1039 IF (aerosol(it)) THEN 1040 DO k = 1, klev 1041 DO i = 1, klon 1042 d_tr_lessi_nucl(i, k, it) = d_tr_lessi_nucl(i, k, it) + & 1043 (1 - frac_nucl(i, k)) * tr_seri(i, k, it) 1044 d_tr_lessi_impa(i, k, it) = d_tr_lessi_impa(i, k, it) + & 1045 (1 - frac_impa(i, k)) * tr_seri(i, k, it) 1046 1047 ! 1048 ! Flux lessivage total 1049 ! ------------------------------------------------------------ 1050 flestottr(i, k, it) = flestottr(i, k, it) - & 1051 (d_tr_lessi_nucl(i, k, it) + & 1052 d_tr_lessi_impa(i, k, it)) * & 1053 (paprs(i, k) - paprs(i, k + 1)) / & 1054 (RG * pdtphys) 1055 ! 1056 ! Mise a jour des traceurs due a l'impaction,nucleation 1057 ! ---------------------------------------------------------------------- 1058 tr_seri(i, k, it) = tr_seri(i, k, it) * frac_impa(i, k) * frac_nucl(i, k) 1059 ENDDO 1060 ENDDO 1061 ENDIF 1062 ENDDO 1063 1064 ! ********* end old version 1065 ENDIF ! iflag_lscav .EQ. 1, 2, 3 or 4 1066 ! 1077 1067 ENDIF ! lessivage 1078 1068 1079 1069 1080 1070 ! -- CHIMIE INCA config_inca = aero or chem -- 1081 IF (ANY(type_trac == ['inca', 'inco'])) THEN ! ModThL1082 1083 1084 nstep, julien, gmtime, lafin,&1085 pdtphys, t_seri, paprs, pplay,&1086 pmfu, upwd, ftsol, pctsrf, pphis,&1087 pphi, albsol, sh, ch, rh,&1088 cldfra, rneb, diafra, cldliq,&1089 itop_con, ibas_con, pmflxr, pmflxs,&1090 prfl, psfl,aerosol_couple, flxmass_w, &1091 tau_aero, piz_aero, cg_aero, ccm,&1092 rfname,&1093 tr_seri(:,:,1+nqCO2:nbtr), source(:,1+nqCO2:nbtr)) ! ModThL1071 IF (ANY(type_trac == ['inca', 'inco'])) THEN ! ModThL 1072 1073 CALL tracinca(& 1074 nstep, julien, gmtime, lafin, & 1075 pdtphys, t_seri, paprs, pplay, & 1076 pmfu, upwd, ftsol, pctsrf, pphis, & 1077 pphi, albsol, sh, ch, rh, & 1078 cldfra, rneb, diafra, cldliq, & 1079 itop_con, ibas_con, pmflxr, pmflxs, & 1080 prfl, psfl, aerosol_couple, flxmass_w, & 1081 tau_aero, piz_aero, cg_aero, ccm, & 1082 rfname, & 1083 tr_seri(:, :, 1 + nqCO2:nbtr), source(:, 1 + nqCO2:nbtr)) ! ModThL 1094 1084 ENDIF 1095 1085 -
LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_mod.F90
r4982 r5098 144 144 !$OMP THREADPRIVATE(ok_prod_nucl_tritium) 145 145 INTEGER, PARAMETER :: nessai = 486 146 INTEGER, DIMENSION(nessai) , SAVE:: &146 INTEGER, DIMENSION(nessai) :: & 147 147 day_nucl, month_nucl, year_nucl 148 148 !$OMP THREADPRIVATE(day_nucl, month_nucl, year_nucl) 149 REAL, DIMENSION(nessai) , SAVE:: &149 REAL, DIMENSION(nessai) :: & 150 150 lat_nucl, lon_nucl, zmin_nucl, zmax_nucl, HTO_nucl 151 151 !$OMP THREADPRIVATE(lat_nucl, lon_nucl, zmin_nucl, zmax_nucl, HTO_nucl) -
LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_routines_mod.F90
r5087 r5098 17 17 & bidouille_anti_divergence, & 18 18 & iso_eau,iso_HDO,iso_O18 19 USE lmdz_yomcst 20 19 21 #ifdef ISOVERIF 20 22 !USE isotopes_verif_mod, ONLY: errmax,errmaxrel … … 28 30 #endif 29 31 implicit none 30 31 #include "YOMCST.h"32 32 33 33 ! inputs … … 12962 12962 & bidouille_anti_divergence, ridicule,ridicule_snow, & 12963 12963 & tcorr,toce,alpha_liq_sol 12964 USE indice_sol_mod 12964 USE indice_sol_mod 12965 USE lmdz_yomcst 12965 12966 #ifdef ISOVERIF 12966 12967 ! USE isotopes_verif_mod, ONLY: errmax,errmaxrel,errmax_sol,deltalim_snow … … 12978 12979 #include "YOETHF.h" 12979 12980 #include "FCTTRE.h" 12980 #include "YOMCST.h"12981 12981 !#include "dimensions.h" 12982 12982 !#include "paramet.h" … … 13534 13534 & rh_cste_surf_cond,Rdefault,T_cste_surf_cond,iso_O17,iso_O18, & 13535 13535 & ridicule_evap,tnat 13536 USE lmdz_yomcst 13536 13537 #ifdef ISOVERIF 13537 13538 ! USE isotopes_verif_mod, ONLY: deltaDfaible, faible_evap,errmax,errmaxrel … … 13546 13547 #include "YOETHF.h" 13547 13548 #include "FCTTRE.h" 13548 #include "YOMCST.h" 13549 13549 13550 13550 ! inputs 13551 13551 integer, intent(in) :: klon,knon ! dimensions … … 14447 14447 & ridicule_evap 14448 14448 USE fonte_neige_mod, ONLY: gestion_neige_besoin_varglob_fonte_neige 14449 USE lmdz_yomcst 14449 14450 #ifdef ISOVERIF 14450 14451 !USE isotopes_verif_mod, ONLY: errmax,errmaxrel,errmax_sol,deltalim_snow, & … … 14460 14461 14461 14462 #include "YOETHF.h" 14462 #include "FCTTRE.h" 14463 #include "YOMCST.h" 14464 !#include "dimensions.h" 14465 !#include "paramet.h" 14463 #include "FCTTRE.h" 14466 14464 14467 14465 ! inputs … … 16634 16632 USE geometry_mod, only: latitude_deg,longitude_deg, & ! en degré, remplace rlat et rlon 16635 16633 latitude,longitude ! en radian, remplace rlatd et rlond 16634 USE lmdz_yomcst 16636 16635 #ifdef ISOVERIF 16637 16636 USE isotopes_verif_mod 16638 16637 #endif 16639 16638 implicit none 16640 16641 #include "YOMCST.h"16642 16639 16643 16640 ! input … … 18232 18229 USE dimphy, only: klon,klev 18233 18230 use geometry_mod, only: latitude_deg,longitude_deg 18231 USE lmdz_yomcst 18234 18232 #ifdef ISOVERIF 18235 18233 USE isotopes_verif_mod … … 18237 18235 implicit none 18238 18236 18239 #include "YOMCST.h"18240 18237 #include "dimensions.h" 18241 18238 ! pour avoir iim et jjm … … 18375 18372 use geometry_mod, only: cell_area 18376 18373 use dimphy, only: klon,klev 18374 USE lmdz_yomcst 18377 18375 #ifdef ISOVERIF 18378 18376 USE isotopes_verif_mod 18379 18377 #endif 18380 18378 implicit none 18381 18382 #include "YOMCST.h"18383 18379 18384 18380 ! Arguments -
LMDZ6/branches/Amaury_dev/libf/phylmdiso/phys_local_var_mod.F90
r5066 r5098 2 2 ! $Id: phys_local_var_mod.F90 3888 2021-05-05 10:50:37Z jyg $ 3 3 ! 4 MODULE phys_local_var_mod 5 ! Variables locales pour effectuer les appels en serie 6 !====================================================================== 7 ! 8 ! 9 !====================================================================== 10 ! Declaration des variables 11 12 REAL, SAVE, ALLOCATABLE :: t_seri(:,:), q_seri(:,:) 13 !$OMP THREADPRIVATE(t_seri, q_seri) 14 REAL, SAVE, ALLOCATABLE :: ql_seri(:,:),qs_seri(:,:) 15 !$OMP THREADPRIVATE(ql_seri,qs_seri) 16 REAL, SAVE, ALLOCATABLE :: qx_seri(:,:,:) 17 !$OMP THREADPRIVATE(qx_seri) 18 REAL, SAVE, ALLOCATABLE :: qbs_seri(:,:) 19 !$OMP THREADPRIVATE(qbs_seri) 20 REAL, SAVE, ALLOCATABLE :: u_seri(:,:), v_seri(:,:) 21 !$OMP THREADPRIVATE(u_seri, v_seri) 22 REAL, SAVE, ALLOCATABLE :: rneb_seri(:,:) 23 !$OMP THREADPRIVATE(rneb_seri) 24 REAL, SAVE, ALLOCATABLE :: d_rneb_dyn(:,:) 25 !$OMP THREADPRIVATE(d_rneb_dyn) 26 REAL, SAVE, ALLOCATABLE :: l_mixmin(:,:,:),l_mix(:,:,:),wprime(:,:,:) 27 !$OMP THREADPRIVATE(l_mixmin, l_mix, wprime) 28 REAL, SAVE, ALLOCATABLE :: pbl_eps(:,:,:) 29 !$OMP THREADPRIVATE(pbl_eps) 30 REAL, SAVE, ALLOCATABLE :: tke_shear(:,:,:), tke_buoy(:,:,:), tke_trans(:,:,:) 31 !$OMP THREADPRIVATE(tke_shear,tke_buoy,tke_trans) 32 REAL, SAVE, ALLOCATABLE :: tr_seri(:,:,:) 33 !$OMP THREADPRIVATE(tr_seri) 34 REAL, SAVE, ALLOCATABLE :: rhcl(:,:) 35 !$OMP THREADPRIVATE(rhcl) 36 REAL, SAVE, ALLOCATABLE :: d_t_dyn(:,:), d_q_dyn(:,:) 37 !$OMP THREADPRIVATE(d_t_dyn, d_q_dyn) 38 REAL, SAVE, ALLOCATABLE :: d_ql_dyn(:,:), d_qs_dyn(:,:), d_qbs_dyn(:,:) 39 !$OMP THREADPRIVATE(d_ql_dyn, d_qs_dyn, d_qbs_dyn) 40 REAL, SAVE, ALLOCATABLE :: d_q_dyn2d(:), d_ql_dyn2d(:), d_qs_dyn2d(:), d_qbs_dyn2d(:) 41 !$OMP THREADPRIVATE(d_q_dyn2d, d_ql_dyn2d, d_qs_dyn2d, d_qbs_dyn2d) 42 REAL, SAVE, ALLOCATABLE :: d_u_dyn(:,:), d_v_dyn(:,:) 43 !$OMP THREADPRIVATE(d_u_dyn, d_v_dyn) 44 REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:,:,:) 45 !$OMP THREADPRIVATE(d_tr_dyn) 46 REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:),d_q_con_zmasse(:,:) 47 !$OMP THREADPRIVATE(d_t_con,d_q_con,d_q_con_zmasse) 48 REAL, SAVE, ALLOCATABLE :: d_u_con(:,:),d_v_con(:,:) 49 !$OMP THREADPRIVATE(d_u_con,d_v_con) 50 REAL, SAVE, ALLOCATABLE :: d_t_wake(:,:),d_q_wake(:,:) 51 !$OMP THREADPRIVATE( d_t_wake,d_q_wake) 52 REAL, SAVE, ALLOCATABLE :: d_t_lsc(:,:),d_q_lsc(:,:),d_ql_lsc(:,:),d_qi_lsc(:,:) 53 !$OMP THREADPRIVATE(d_t_lsc,d_q_lsc,d_ql_lsc,d_qi_lsc) 54 REAL, SAVE, ALLOCATABLE :: d_t_lwr(:,:),d_t_lw0(:,:),d_t_swr(:,:),d_t_sw0(:,:) 55 !$OMP THREADPRIVATE(d_t_lwr,d_t_lw0,d_t_swr,d_t_sw0) 56 REAL, SAVE, ALLOCATABLE :: d_t_ajsb(:,:), d_q_ajsb(:,:) 57 !$OMP THREADPRIVATE(d_t_ajsb, d_q_ajsb) 58 REAL, SAVE, ALLOCATABLE :: d_t_ajs(:,:), d_q_ajs(:,:) 59 !$OMP THREADPRIVATE(d_t_ajs, d_q_ajs) 60 REAL, SAVE, ALLOCATABLE :: d_u_ajs(:,:), d_v_ajs(:,:) 61 !$OMP THREADPRIVATE(d_u_ajs, d_v_ajs) 62 !nrlmd< 63 REAL, SAVE, ALLOCATABLE :: d_t_ajs_w(:,:), d_q_ajs_w(:,:) 64 !$OMP THREADPRIVATE(d_t_ajs_w, d_q_ajs_w) 65 REAL, SAVE, ALLOCATABLE :: d_t_ajs_x(:,:), d_q_ajs_x(:,:) 66 !$OMP THREADPRIVATE(d_t_ajs_x, d_q_ajs_x) 67 !>nrlmd 68 REAL, SAVE, ALLOCATABLE :: d_t_eva(:,:),d_q_eva(:,:),d_ql_eva(:,:),d_qi_eva(:,:) 69 !$OMP THREADPRIVATE(d_t_eva,d_q_eva,d_ql_eva,d_qi_eva) 70 REAL, SAVE, ALLOCATABLE :: d_qx_eva(:,:,:) 71 !$OMP THREADPRIVATE(d_qx_eva) 72 REAL, SAVE, ALLOCATABLE :: d_t_lscst(:,:),d_q_lscst(:,:) 73 !$OMP THREADPRIVATE(d_t_lscst,d_q_lscst) 74 REAL, SAVE, ALLOCATABLE :: d_t_lscth(:,:),d_q_lscth(:,:) 75 !$OMP THREADPRIVATE(d_t_lscth,d_q_lscth) 76 REAL, SAVE, ALLOCATABLE :: plul_th(:),plul_st(:) 77 !$OMP THREADPRIVATE(plul_th,plul_st) 78 !tendances dues a oro et lif 79 REAL, SAVE, ALLOCATABLE :: d_t_oli(:,:) 80 !$OMP THREADPRIVATE(d_t_oli) 81 REAL, SAVE, ALLOCATABLE :: d_u_oli(:,:), d_v_oli(:,:) 82 !$OMP THREADPRIVATE(d_u_oli, d_v_oli) 83 REAL, SAVE, ALLOCATABLE :: d_t_vdf(:,:), d_q_vdf(:,:), d_qbs_vdf(:,:), d_t_diss(:,:) 84 !$OMP THREADPRIVATE( d_t_vdf, d_q_vdf, d_qbs_vdf, d_t_diss) 85 REAL, SAVE, ALLOCATABLE :: d_u_vdf(:,:), d_v_vdf(:,:) 86 !$OMP THREADPRIVATE(d_u_vdf, d_v_vdf) 87 !nrlmd+jyg< 88 REAL, SAVE, ALLOCATABLE :: d_t_vdf_w(:,:), d_q_vdf_w(:,:) 89 !$OMP THREADPRIVATE( d_t_vdf_w, d_q_vdf_w) 90 REAL, SAVE, ALLOCATABLE :: d_t_vdf_x(:,:), d_q_vdf_x(:,:) 91 !$OMP THREADPRIVATE( d_t_vdf_x, d_q_vdf_x) 92 REAL, SAVE, ALLOCATABLE :: d_t_bsss(:,:), d_q_bsss(:,:), d_qbs_bsss(:,:) 93 !$OMP THREADPRIVATE( d_t_bsss,d_q_bsss, d_qbs_bsss) 94 !>nrlmd+jyg 95 REAL, SAVE, ALLOCATABLE :: d_t_oro(:,:) 96 !$OMP THREADPRIVATE(d_t_oro) 97 REAL, SAVE, ALLOCATABLE :: d_u_oro(:,:), d_v_oro(:,:) 98 !$OMP THREADPRIVATE(d_u_oro, d_v_oro) 99 REAL, SAVE, ALLOCATABLE :: d_t_oro_gw(:,:) 100 !$OMP THREADPRIVATE(d_t_oro_gw) 101 REAL, SAVE, ALLOCATABLE :: d_u_oro_gw(:,:), d_v_oro_gw(:,:) 102 !$OMP THREADPRIVATE(d_u_oro_gw, d_v_oro_gw) 103 REAL, SAVE, ALLOCATABLE :: d_t_lif(:,:) 104 !$OMP THREADPRIVATE(d_t_lif) 105 REAL, SAVE, ALLOCATABLE :: d_u_lif(:,:), d_v_lif(:,:) 106 !$OMP THREADPRIVATE(d_u_lif, d_v_lif) 107 ! Tendances Ondes de G non oro (runs strato). 108 REAL, SAVE, ALLOCATABLE :: du_gwd_hines(:,:) 109 !$OMP THREADPRIVATE(du_gwd_hines) 110 REAL, SAVE, ALLOCATABLE :: dv_gwd_hines(:,:) 111 !$OMP THREADPRIVATE(dv_gwd_hines) 112 REAL, SAVE, ALLOCATABLE :: dv_gwd_rando(:,:) 113 !$OMP THREADPRIVATE(dv_gwd_rando) 114 REAL, SAVE, ALLOCATABLE :: dv_gwd_front(:,:) 115 !$OMP THREADPRIVATE(dv_gwd_front) 116 REAL, SAVE, ALLOCATABLE :: east_gwstress(:,:) 117 !$OMP THREADPRIVATE(east_gwstress) 118 REAL, SAVE, ALLOCATABLE :: west_gwstress(:,:) 119 !$OMP THREADPRIVATE(west_gwstress) 120 REAL, SAVE, ALLOCATABLE :: d_t_hin(:,:) 121 !$OMP THREADPRIVATE(d_t_hin) 122 ! tendance due a l'oxydation du methane 123 REAL, SAVE, ALLOCATABLE :: d_q_ch4(:,:) 124 !$OMP THREADPRIVATE(d_q_ch4) 4 MODULE phys_local_var_mod 5 USE lmdz_cppkeys_wrapper, ONLY : CPPKEY_STRATAER 6 ! Variables locales pour effectuer les appels en serie 7 !====================================================================== 8 ! 9 ! 10 !====================================================================== 11 ! Declaration des variables 12 13 REAL, SAVE, ALLOCATABLE :: t_seri(:, :), q_seri(:, :) 14 !$OMP THREADPRIVATE(t_seri, q_seri) 15 REAL, SAVE, ALLOCATABLE :: ql_serf_r_wetbi(:, :), qs_seri(:, :) 16 !$OMP THREADPRIVATE(ql_seri,qs_seri) 17 REAL, SAVE, ALLOCATABLE :: qx_seri(:, :, :) 18 !$OMP THREADPRIVATE(qx_seri) 19 REAL, SAVE, ALLOCATABLE :: qbs_seri(:, :) 20 !$OMP THREADPRIVATE(qbs_seri) 21 REAL, SAVE, ALLOCATABLE :: u_seri(:, :), v_seri(:, :) 22 !$OMP THREADPRIVATE(u_seri, v_seri) 23 REAL, SAVE, ALLOCATABLE :: rneb_seri(:, :) 24 !$OMP THREADPRIVATE(rneb_seri) 25 REAL, SAVE, ALLOCATABLE :: d_rneb_dyn(:, :) 26 !$OMP THREADPRIVATE(d_rneb_dyn) 27 REAL, SAVE, ALLOCATABLE :: l_mixmin(:, :, :), l_mix(:, :, :), wprime(:, :, :) 28 !$OMP THREADPRIVATE(l_mixmin, l_mix, wprime) 29 REAL, SAVE, ALLOCATABLE :: pbl_eps(:, :, :) 30 !$OMP THREADPRIVATE(pbl_eps) 31 REAL, SAVE, ALLOCATABLE :: tke_shear(:, :, :), tke_buoy(:, :, :), tke_trans(:, :, :) 32 !$OMP THREADPRIVATE(tke_shear,tke_buoy,tke_trans) 33 REAL, SAVE, ALLOCATABLE :: tr_seri(:, :, :) 34 !$OMP THREADPRIVATE(tr_seri) 35 REAL, SAVE, ALLOCATABLE :: rhcl(:, :) 36 !$OMP THREADPRIVATE(rhcl) 37 REAL, SAVE, ALLOCATABLE :: d_t_dyn(:, :), d_q_dyn(:, :) 38 !$OMP THREADPRIVATE(d_t_dyn, d_q_dyn) 39 REAL, SAVE, ALLOCATABLE :: d_ql_dyn(:, :), d_qs_dyn(:, :), d_qbs_dyn(:, :) 40 !$OMP THREADPRIVATE(d_ql_dyn, d_qs_dyn, d_qbs_dyn) 41 REAL, SAVE, ALLOCATABLE :: d_q_dyn2d(:), d_ql_dyn2d(:), d_qs_dyn2d(:), d_qbs_dyn2d(:) 42 !$OMP THREADPRIVATE(d_q_dyn2d, d_ql_dyn2d, d_qs_dyn2d, d_qbs_dyn2d) 43 REAL, SAVE, ALLOCATABLE :: d_u_dyn(:, :), d_v_dyn(:, :) 44 !$OMP THREADPRIVATE(d_u_dyn, d_v_dyn) 45 REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:, :, :) 46 !$OMP THREADPRIVATE(d_tr_dyn) 47 REAL, SAVE, ALLOCATABLE :: d_t_con(:, :), d_q_con(:, :), d_q_con_zmasse(:, :) 48 !$OMP THREADPRIVATE(d_t_con,d_q_con,d_q_con_zmasse) 49 REAL, SAVE, ALLOCATABLE :: d_u_con(:, :), d_v_con(:, :) 50 !$OMP THREADPRIVATE(d_u_con,d_v_con) 51 REAL, SAVE, ALLOCATABLE :: d_t_wake(:, :), d_q_wake(:, :) 52 !$OMP THREADPRIVATE( d_t_wake,d_q_wake) 53 REAL, SAVE, ALLOCATABLE :: d_t_lsc(:, :), d_q_lsc(:, :), d_ql_lsc(:, :), d_qi_lsc(:, :) 54 !$OMP THREADPRIVATE(d_t_lsc,d_q_lsc,d_ql_lsc,d_qi_lsc) 55 REAL, SAVE, ALLOCATABLE :: d_t_lwr(:, :), d_t_lw0(:, :), d_t_swr(:, :), d_t_sw0(:, :) 56 !$OMP THREADPRIVATE(d_t_lwr,d_t_lw0,d_t_swr,d_t_sw0) 57 REAL, SAVE, ALLOCATABLE :: d_t_ajsb(:, :), d_q_ajsb(:, :) 58 !$OMP THREADPRIVATE(d_t_ajsb, d_q_ajsb) 59 REAL, SAVE, ALLOCATABLE :: d_t_ajs(:, :), d_q_ajs(:, :) 60 !$OMP THREADPRIVATE(d_t_ajs, d_q_ajs) 61 REAL, SAVE, ALLOCATABLE :: d_u_ajs(:, :), d_v_ajs(:, :) 62 !$OMP THREADPRIVATE(d_u_ajs, d_v_ajs) 63 !nrlmd< 64 REAL, SAVE, ALLOCATABLE :: d_t_ajs_w(:, :), d_q_ajs_w(:, :) 65 !$OMP THREADPRIVATE(d_t_ajs_w, d_q_ajs_w) 66 REAL, SAVE, ALLOCATABLE :: d_t_ajs_x(:, :), d_q_ajs_x(:, :) 67 !$OMP THREADPRIVATE(d_t_ajs_x, d_q_ajs_x) 68 !>nrlmd 69 REAL, SAVE, ALLOCATABLE :: d_t_eva(:, :), d_q_eva(:, :), d_ql_eva(:, :), d_qi_eva(:, :) 70 !$OMP THREADPRIVATE(d_t_eva,d_q_eva,d_ql_eva,d_qi_eva) 71 REAL, SAVE, ALLOCATABLE :: d_qx_eva(:, :, :) 72 !$OMP THREADPRIVATE(d_qx_eva) 73 REAL, SAVE, ALLOCATABLE :: d_t_lscst(:, :), d_q_lscst(:, :) 74 !$OMP THREADPRIVATE(d_t_lscst,d_q_lscst) 75 REAL, SAVE, ALLOCATABLE :: d_t_lscth(:, :), d_q_lscth(:, :) 76 !$OMP THREADPRIVATE(d_t_lscth,d_q_lscth) 77 REAL, SAVE, ALLOCATABLE :: plul_th(:), plul_st(:) 78 !$OMP THREADPRIVATE(plul_th,plul_st) 79 !tendances dues a oro et lif 80 REAL, SAVE, ALLOCATABLE :: d_t_oli(:, :) 81 !$OMP THREADPRIVATE(d_t_oli) 82 REAL, SAVE, ALLOCATABLE :: d_u_oli(:, :), d_v_oli(:, :) 83 !$OMP THREADPRIVATE(d_u_oli, d_v_oli) 84 REAL, SAVE, ALLOCATABLE :: d_t_vdf(:, :), d_q_vdf(:, :), d_qbs_vdf(:, :), d_t_diss(:, :) 85 !$OMP THREADPRIVATE( d_t_vdf, d_q_vdf, d_qbs_vdf, d_t_diss) 86 REAL, SAVE, ALLOCATABLE :: d_u_vdf(:, :), d_v_vdf(:, :) 87 !$OMP THREADPRIVATE(d_u_vdf, d_v_vdf) 88 !nrlmd+jyg< 89 REAL, SAVE, ALLOCATABLE :: d_t_vdf_w(:, :), d_q_vdf_w(:, :) 90 !$OMP THREADPRIVATE( d_t_vdf_w, d_q_vdf_w) 91 REAL, SAVE, ALLOCATABLE :: d_t_vdf_x(:, :), d_q_vdf_x(:, :) 92 !$OMP THREADPRIVATE( d_t_vdf_x, d_q_vdf_x) 93 REAL, SAVE, ALLOCATABLE :: d_t_bsss(:, :), d_q_bsss(:, :), d_qbs_bsss(:, :) 94 !$OMP THREADPRIVATE( d_t_bsss,d_q_bsss, d_qbs_bsss) 95 !>nrlmd+jyg 96 REAL, SAVE, ALLOCATABLE :: d_t_oro(:, :) 97 !$OMP THREADPRIVATE(d_t_oro) 98 REAL, SAVE, ALLOCATABLE :: d_u_oro(:, :), d_v_oro(:, :) 99 !$OMP THREADPRIVATE(d_u_oro, d_v_oro) 100 REAL, SAVE, ALLOCATABLE :: d_t_oro_gw(:, :) 101 !$OMP THREADPRIVATE(d_t_oro_gw) 102 REAL, SAVE, ALLOCATABLE :: d_u_oro_gw(:, :), d_v_oro_gw(:, :) 103 !$OMP THREADPRIVATE(d_u_oro_gw, d_v_oro_gw) 104 REAL, SAVE, ALLOCATABLE :: d_t_lif(:, :) 105 !$OMP THREADPRIVATE(d_t_lif) 106 REAL, SAVE, ALLOCATABLE :: d_u_lif(:, :), d_v_lif(:, :) 107 !$OMP THREADPRIVATE(d_u_lif, d_v_lif) 108 ! Tendances Ondes de G non oro (runs strato). 109 REAL, SAVE, ALLOCATABLE :: du_gwd_hines(:, :) 110 !$OMP THREADPRIVATE(du_gwd_hines) 111 REAL, SAVE, ALLOCATABLE :: dv_gwd_hines(:, :) 112 !$OMP THREADPRIVATE(dv_gwd_hines) 113 REAL, SAVE, ALLOCATABLE :: dv_gwd_rando(:, :) 114 !$OMP THREADPRIVATE(dv_gwd_rando) 115 REAL, SAVE, ALLOCATABLE :: dv_gwd_front(:, :) 116 !$OMP THREADPRIVATE(dv_gwd_front) 117 REAL, SAVE, ALLOCATABLE :: east_gwstress(:, :) 118 !$OMP THREADPRIVATE(east_gwstress) 119 REAL, SAVE, ALLOCATABLE :: west_gwstress(:, :) 120 !$OMP THREADPRIVATE(west_gwstress) 121 REAL, SAVE, ALLOCATABLE :: d_t_hin(:, :) 122 !$OMP THREADPRIVATE(d_t_hin) 123 ! tendance due a l'oxydation du methane 124 REAL, SAVE, ALLOCATABLE :: d_q_ch4(:, :) 125 !$OMP THREADPRIVATE(d_q_ch4) 125 126 #ifdef ISO 126 127 REAL, SAVE, ALLOCATABLE :: xt_seri(:,:,:) … … 168 169 #endif 169 170 170 ! tendance du a la conersion Ec -> E thermique171 REAL, SAVE, ALLOCATABLE :: d_t_ec(:,:)172 173 REAL, SAVE, ALLOCATABLE :: d_ts(:,:), d_tr(:,:,:)174 175 176 ! aerosols177 REAL, SAVE, ALLOCATABLE :: m_allaer (:,:,:)178 179 ! diagnostique pour le rayonnement180 REAL, SAVE, ALLOCATABLE :: topswad_aero(:),solswad_aero(:) ! diag181 182 REAL, SAVE, ALLOCATABLE :: topswai_aero(:),solswai_aero(:) ! diag183 184 185 186 REAL, SAVE, ALLOCATABLE :: topsw_aero(:,:), solsw_aero(:,:) ! diag187 188 REAL, SAVE, ALLOCATABLE :: topsw0_aero(:,:), solsw0_aero(:,:) ! diag189 190 REAL, SAVE, ALLOCATABLE :: topswcf_aero(:,:), solswcf_aero(:,:) ! diag191 192 ! LW radiation diagnostics CK193 REAL, SAVE, ALLOCATABLE :: toplwad_aero(:),sollwad_aero(:) ! diag194 195 REAL, SAVE, ALLOCATABLE :: toplwai_aero(:),sollwai_aero(:) ! diag196 197 198 199 ! Special RRTM200 REAL, SAVE, ALLOCATABLE :: ZLWFT0_i(:,:), ZSWFT0_i(:,:) ! diag201 202 REAL, SAVE, ALLOCATABLE :: ZFLDN0(:,:), ZFLUP0(:,:) ! diag203 204 REAL, SAVE, ALLOCATABLE :: ZFSDN0(:,:), ZFSUP0(:,:) ! diag205 206 !207 REAL, SAVE, ALLOCATABLE :: stratomask(:,:)208 !$OMP THREADPRIVATE(stratomask)209 REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:)210 !$OMP THREADPRIVATE(tausum_aero)211 REAL, SAVE, ALLOCATABLE :: drytausum_aero(:,:)212 !$OMP THREADPRIVATE(drytausum_aero)213 REAL, SAVE, ALLOCATABLE :: tau3d_aero(:,:,:,:)214 !$OMP THREADPRIVATE(tau3d_aero)215 REAL, SAVE, ALLOCATABLE :: dNovrN(:)216 !$OMP THREADPRIVATE(dNovrN)217 REAL, SAVE, ALLOCATABLE :: zfice(:,:)218 219 REAL, SAVE, ALLOCATABLE :: od443aer(:)220 !$OMP THREADPRIVATE(od443aer)221 REAL, SAVE, ALLOCATABLE :: od550aer(:)222 !$OMP THREADPRIVATE(od550aer)223 REAL, SAVE, ALLOCATABLE :: dryod550aer(:)224 !$OMP THREADPRIVATE(dryod550aer)225 REAL, SAVE, ALLOCATABLE :: abs550aer(:)226 !$OMP THREADPRIVATE(abs550aer)227 REAL, SAVE, ALLOCATABLE :: od865aer(:)228 !$OMP THREADPRIVATE(od865aer)229 REAL, SAVE, ALLOCATABLE :: ec550aer(:,:)230 !$OMP THREADPRIVATE(ec550aer)231 REAL, SAVE, ALLOCATABLE :: od550lt1aer(:)232 !$OMP THREADPRIVATE(od550lt1aer)233 REAL, SAVE, ALLOCATABLE :: sconcso4(:)234 !$OMP THREADPRIVATE(sconcso4)235 REAL, SAVE, ALLOCATABLE :: sconcno3(:)236 !$OMP THREADPRIVATE(sconcno3)237 REAL, SAVE, ALLOCATABLE :: sconcoa(:)238 !$OMP THREADPRIVATE(sconcoa)239 REAL, SAVE, ALLOCATABLE :: sconcbc(:)240 !$OMP THREADPRIVATE(sconcbc)241 REAL, SAVE, ALLOCATABLE :: sconcss(:)242 !$OMP THREADPRIVATE(sconcss)243 REAL, SAVE, ALLOCATABLE :: sconcdust(:)244 !$OMP THREADPRIVATE(sconcdust)245 REAL, SAVE, ALLOCATABLE :: concso4(:,:)246 !$OMP THREADPRIVATE(concso4)247 REAL, SAVE, ALLOCATABLE :: concno3(:,:)248 !$OMP THREADPRIVATE(concno3)249 REAL, SAVE, ALLOCATABLE :: concoa(:,:)250 !$OMP THREADPRIVATE(concoa)251 REAL, SAVE, ALLOCATABLE :: concbc(:,:)252 !$OMP THREADPRIVATE(concbc)253 REAL, SAVE, ALLOCATABLE :: concss(:,:)254 !$OMP THREADPRIVATE(concss)255 REAL, SAVE, ALLOCATABLE :: concdust(:,:)256 !$OMP THREADPRIVATE(concdust)257 REAL, SAVE, ALLOCATABLE :: loadso4(:)258 !$OMP THREADPRIVATE(loadso4)259 REAL, SAVE, ALLOCATABLE :: loadoa(:)260 !$OMP THREADPRIVATE(loadoa)261 REAL, SAVE, ALLOCATABLE :: loadbc(:)262 !$OMP THREADPRIVATE(loadbc)263 REAL, SAVE, ALLOCATABLE :: loadss(:)264 !$OMP THREADPRIVATE(loadss)265 REAL, SAVE, ALLOCATABLE :: loaddust(:)266 !$OMP THREADPRIVATE(loaddust)267 REAL, SAVE, ALLOCATABLE :: loadno3(:)268 !$OMP THREADPRIVATE(loadno3)269 270 !$OMP THREADPRIVATE(load_tmp1, load_tmp2)271 272 !$OMP THREADPRIVATE(load_tmp3, load_tmp4)273 274 !$OMP THREADPRIVATE(load_tmp5, load_tmp6)275 276 !$OMP THREADPRIVATE(load_tmp7, load_tmp8)277 278 !$OMP THREADPRIVATE(load_tmp9, load_tmp10)279 280 !IM ajout variables CFMIP2/CMIP5281 REAL,ALLOCATABLE,SAVE :: topswad_aerop(:), solswad_aerop(:)282 !$OMP THREADPRIVATE(topswad_aerop, solswad_aerop)283 REAL,ALLOCATABLE,SAVE :: topswai_aerop(:), solswai_aerop(:)284 !$OMP THREADPRIVATE(topswai_aerop, solswai_aerop)285 REAL,ALLOCATABLE,SAVE :: topswad0_aerop(:), solswad0_aerop(:)286 !$OMP THREADPRIVATE(topswad0_aerop, solswad0_aerop)287 REAL,ALLOCATABLE,SAVE :: topsw_aerop(:,:), topsw0_aerop(:,:)288 !$OMP THREADPRIVATE(topsw_aerop, topsw0_aerop)289 REAL,ALLOCATABLE,SAVE :: solsw_aerop(:,:), solsw0_aerop(:,:)290 !$OMP THREADPRIVATE(solsw_aerop, solsw0_aerop)291 REAL,ALLOCATABLE,SAVE :: topswcf_aerop(:,:), solswcf_aerop(:,:)292 !$OMP THREADPRIVATE(topswcf_aerop, solswcf_aerop)293 294 ! additional LW variables CK295 REAL,ALLOCATABLE,SAVE :: toplwad_aerop(:), sollwad_aerop(:)296 !$OMP THREADPRIVATE(toplwad_aerop, sollwad_aerop)297 REAL,ALLOCATABLE,SAVE :: toplwai_aerop(:), sollwai_aerop(:)298 !$OMP THREADPRIVATE(toplwai_aerop, sollwai_aerop)299 REAL,ALLOCATABLE,SAVE :: toplwad0_aerop(:), sollwad0_aerop(:)300 !$OMP THREADPRIVATE(toplwad0_aerop, sollwad0_aerop)301 302 !AI 08 2023 ajout pour Ecrad303 REAL,ALLOCATABLE,SAVE :: topswad_aero_s2(:), solswad_aero_s2(:)304 !$OMP THREADPRIVATE(topswad_aero_s2, solswad_aero_s2)305 REAL,ALLOCATABLE,SAVE :: topswai_aero_s2(:), solswai_aero_s2(:)306 !$OMP THREADPRIVATE(topswai_aero_s2, solswai_aero_s2)307 REAL,ALLOCATABLE,SAVE :: topswad0_aero_s2(:), solswad0_aero_s2(:)308 !$OMP THREADPRIVATE(topswad0_aero_s2, solswad0_aero_s2)309 REAL,ALLOCATABLE,SAVE :: topsw_aero_s2(:,:), topsw0_aero_s2(:,:)310 !$OMP THREADPRIVATE(topsw_aero_s2, topsw0_aero_s2)311 REAL,ALLOCATABLE,SAVE :: solsw_aero_s2(:,:), solsw0_aero_s2(:,:)312 !$OMP THREADPRIVATE(solsw_aero_s2, solsw0_aero_s2)313 REAL,ALLOCATABLE,SAVE :: topswcf_aero_s2(:,:), solswcf_aero_s2(:,:)314 !$OMP THREADPRIVATE(topswcf_aero_s2, solswcf_aero_s2)315 ! additional LW variables CK316 REAL,ALLOCATABLE,SAVE :: toplwad_aero_s2(:), sollwad_aero_s2(:)317 !$OMP THREADPRIVATE(toplwad_aero_s2, sollwad_aero_s2)318 REAL,ALLOCATABLE,SAVE :: toplwai_aero_s2(:), sollwai_aero_s2(:)319 !$OMP THREADPRIVATE(toplwai_aero_s2, sollwai_aero_s2)320 REAL,ALLOCATABLE,SAVE :: toplwad0_aero_s2(:), sollwad0_aero_s2(:)321 !$OMP THREADPRIVATE(toplwad0_aero_s2, sollwad0_aero_s2)322 323 !Ajout de celles n??cessaires au phys_output_write_mod324 325 !$OMP THREADPRIVATE(tal1, pal1, pab1, pab2)326 327 !$OMP THREADPRIVATE(ptstar, pt0, slp)328 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sens, flwp, fiwp329 !$OMP THREADPRIVATE(sens, flwp, fiwp)330 !!331 !FC 332 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zxfluxt, zxfluxq333 !$OMP THREADPRIVATE(zxfluxt, zxfluxq)334 !FC335 !! Wake variables336 REAL,ALLOCATABLE,SAVE,DIMENSION(:):: alp_wake337 !$OMP THREADPRIVATE(alp_wake) 338 !!jyg! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wake_h,wake_k339 REAL,ALLOCATABLE,SAVE,DIMENSION(:):: wake_h340 INTEGER,ALLOCATABLE,SAVE,DIMENSION(:):: wake_k341 !$OMP THREADPRIVATE(wake_h,wake_k) 342 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: wake_omg343 !$OMP THREADPRIVATE(wake_omg) 344 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:):: d_deltat_wk, d_deltaq_wk345 !$OMP THREADPRIVATE(d_deltat_wk, d_deltaq_wk)346 REAL,ALLOCATABLE,SAVE,DIMENSION(:):: d_s_wk, d_dens_a_wk, d_dens_wk347 !$OMP THREADPRIVATE(d_s_wk, d_dens_a_wk, d_dens_wk)348 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:):: d_deltat_wk_gw, d_deltaq_wk_gw349 !$OMP THREADPRIVATE(d_deltat_wk_gw, d_deltaq_wk_gw)350 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:):: d_deltat_vdf, d_deltaq_vdf351 !$OMP THREADPRIVATE(d_deltat_vdf, d_deltaq_vdf)352 !!! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: d_s_vdf, d_dens_vdf353 !!!$OMP THREADPRIVATE(d_s_vdf, d_dens_vdf)354 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:):: d_deltat_the, d_deltaq_the355 !$OMP THREADPRIVATE(d_deltat_the, d_deltaq_the)356 !!! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: d_s_the, d_dens_the357 !!!$OMP THREADPRIVATE(d_s_the, d_dens_the)358 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: d_deltat_ajs_cv, d_deltaq_ajs_cv359 !$OMP THREADPRIVATE(d_deltat_ajs_cv, d_deltaq_ajs_cv) 171 ! tendance du a la conersion Ec -> E thermique 172 REAL, SAVE, ALLOCATABLE :: d_t_ec(:, :) 173 !$OMP THREADPRIVATE(d_t_ec) 174 REAL, SAVE, ALLOCATABLE :: d_ts(:, :), d_tr(:, :, :) 175 !$OMP THREADPRIVATE(d_ts, d_tr) 176 177 ! aerosols 178 REAL, SAVE, ALLOCATABLE :: m_allaer (:, :, :) 179 !$OMP THREADPRIVATE(m_allaer) 180 ! diagnostique pour le rayonnement 181 REAL, SAVE, ALLOCATABLE :: topswad_aero(:), solswad_aero(:) ! diag 182 !$OMP THREADPRIVATE(topswad_aero,solswad_aero) 183 REAL, SAVE, ALLOCATABLE :: topswai_aero(:), solswai_aero(:) ! diag 184 !$OMP THREADPRIVATE(topswai_aero,solswai_aero) 185 REAL, SAVE, ALLOCATABLE :: topswad0_aero(:), solswad0_aero(:) ! diag 186 !$OMP THREADPRIVATE(topswad0_aero,solswad0_aero) 187 REAL, SAVE, ALLOCATABLE :: topsw_aero(:, :), solsw_aero(:, :) ! diag 188 !$OMP THREADPRIVATE(topsw_aero,solsw_aero) 189 REAL, SAVE, ALLOCATABLE :: topsw0_aero(:, :), solsw0_aero(:, :) ! diag 190 !$OMP THREADPRIVATE(topsw0_aero,solsw0_aero) 191 REAL, SAVE, ALLOCATABLE :: topswcf_aero(:, :), solswcf_aero(:, :) ! diag 192 !$OMP THREADPRIVATE(topswcf_aero,solswcf_aero) 193 ! LW radiation diagnostics CK 194 REAL, SAVE, ALLOCATABLE :: toplwad_aero(:), sollwad_aero(:) ! diag 195 !$OMP THREADPRIVATE(toplwad_aero,sollwad_aero) 196 REAL, SAVE, ALLOCATABLE :: toplwai_aero(:), sollwai_aero(:) ! diag 197 !$OMP THREADPRIVATE(toplwai_aero,sollwai_aero) 198 REAL, SAVE, ALLOCATABLE :: toplwad0_aero(:), sollwad0_aero(:) ! diag 199 !$OMP THREADPRIVATE(toplwad0_aero,sollwad0_aero) 200 ! Special RRTM 201 REAL, SAVE, ALLOCATABLE :: ZLWFT0_i(:, :), ZSWFT0_i(:, :) ! diag 202 !$OMP THREADPRIVATE(ZLWFT0_i,ZSWFT0_i) 203 REAL, SAVE, ALLOCATABLE :: ZFLDN0(:, :), ZFLUP0(:, :) ! diag 204 !$OMP THREADPRIVATE(ZFLDN0,ZFLUP0) 205 REAL, SAVE, ALLOCATABLE :: ZFSDN0(:, :), ZFSUP0(:, :) ! diag 206 !$OMP THREADPRIVATE(ZFSDN0,ZFSUP0) 207 ! 208 REAL, SAVE, ALLOCATABLE :: stratomask(:, :) 209 !$OMP THREADPRIVATE(stratomask) 210 REAL, SAVE, ALLOCATABLE :: tausum_aero(:, :, :) 211 !$OMP THREADPRIVATE(tausum_aero) 212 REAL, SAVE, ALLOCATABLE :: drytausum_aero(:, :) 213 !$OMP THREADPRIVATE(drytausum_aero) 214 REAL, SAVE, ALLOCATABLE :: tau3d_aero(:, :, :, :) 215 !$OMP THREADPRIVATE(tau3d_aero) 216 REAL, SAVE, ALLOCATABLE :: dNovrN(:) 217 !$OMP THREADPRIVATE(dNovrN) 218 REAL, SAVE, ALLOCATABLE :: zfice(:, :) 219 !$OMP THREADPRIVATE(zfice) 220 REAL, SAVE, ALLOCATABLE :: od443aer(:) 221 !$OMP THREADPRIVATE(od443aer) 222 REAL, SAVE, ALLOCATABLE :: od550aer(:) 223 !$OMP THREADPRIVATE(od550aer) 224 REAL, SAVE, ALLOCATABLE :: dryod550aer(:) 225 !$OMP THREADPRIVATE(dryod550aer) 226 REAL, SAVE, ALLOCATABLE :: abs550aer(:) 227 !$OMP THREADPRIVATE(abs550aer) 228 REAL, SAVE, ALLOCATABLE :: od865aer(:) 229 !$OMP THREADPRIVATE(od865aer) 230 REAL, SAVE, ALLOCATABLE :: ec550aer(:, :) 231 !$OMP THREADPRIVATE(ec550aer) 232 REAL, SAVE, ALLOCATABLE :: od550lt1aer(:) 233 !$OMP THREADPRIVATE(od550lt1aer) 234 REAL, SAVE, ALLOCATABLE :: sconcso4(:) 235 !$OMP THREADPRIVATE(sconcso4) 236 REAL, SAVE, ALLOCATABLE :: sconcno3(:) 237 !$OMP THREADPRIVATE(sconcno3) 238 REAL, SAVE, ALLOCATABLE :: sconcoa(:) 239 !$OMP THREADPRIVATE(sconcoa) 240 REAL, SAVE, ALLOCATABLE :: sconcbc(:) 241 !$OMP THREADPRIVATE(sconcbc) 242 REAL, SAVE, ALLOCATABLE :: sconcss(:) 243 !$OMP THREADPRIVATE(sconcss) 244 REAL, SAVE, ALLOCATABLE :: sconcdust(:) 245 !$OMP THREADPRIVATE(sconcdust) 246 REAL, SAVE, ALLOCATABLE :: concso4(:, :) 247 !$OMP THREADPRIVATE(concso4) 248 REAL, SAVE, ALLOCATABLE :: concno3(:, :) 249 !$OMP THREADPRIVATE(concno3) 250 REAL, SAVE, ALLOCATABLE :: concoa(:, :) 251 !$OMP THREADPRIVATE(concoa) 252 REAL, SAVE, ALLOCATABLE :: concbc(:, :) 253 !$OMP THREADPRIVATE(concbc) 254 REAL, SAVE, ALLOCATABLE :: concss(:, :) 255 !$OMP THREADPRIVATE(concss) 256 REAL, SAVE, ALLOCATABLE :: concdust(:, :) 257 !$OMP THREADPRIVATE(concdust) 258 REAL, SAVE, ALLOCATABLE :: loadso4(:) 259 !$OMP THREADPRIVATE(loadso4) 260 REAL, SAVE, ALLOCATABLE :: loadoa(:) 261 !$OMP THREADPRIVATE(loadoa) 262 REAL, SAVE, ALLOCATABLE :: loadbc(:) 263 !$OMP THREADPRIVATE(loadbc) 264 REAL, SAVE, ALLOCATABLE :: loadss(:) 265 !$OMP THREADPRIVATE(loadss) 266 REAL, SAVE, ALLOCATABLE :: loaddust(:) 267 !$OMP THREADPRIVATE(loaddust) 268 REAL, SAVE, ALLOCATABLE :: loadno3(:) 269 !$OMP THREADPRIVATE(loadno3) 270 REAL, SAVE, ALLOCATABLE :: load_tmp1(:), load_tmp2(:) 271 !$OMP THREADPRIVATE(load_tmp1, load_tmp2) 272 REAL, SAVE, ALLOCATABLE :: load_tmp3(:), load_tmp4(:) 273 !$OMP THREADPRIVATE(load_tmp3, load_tmp4) 274 REAL, SAVE, ALLOCATABLE :: load_tmp5(:), load_tmp6(:) 275 !$OMP THREADPRIVATE(load_tmp5, load_tmp6) 276 REAL, SAVE, ALLOCATABLE :: load_tmp7(:), load_tmp8(:) 277 !$OMP THREADPRIVATE(load_tmp7, load_tmp8) 278 REAL, SAVE, ALLOCATABLE :: load_tmp9(:), load_tmp10(:) 279 !$OMP THREADPRIVATE(load_tmp9, load_tmp10) 280 281 !IM ajout variables CFMIP2/CMIP5 282 REAL, ALLOCATABLE, SAVE :: topswad_aerop(:), solswad_aerop(:) 283 !$OMP THREADPRIVATE(topswad_aerop, solswad_aerop) 284 REAL, ALLOCATABLE, SAVE :: topswai_aerop(:), solswai_aerop(:) 285 !$OMP THREADPRIVATE(topswai_aerop, solswai_aerop) 286 REAL, ALLOCATABLE, SAVE :: topswad0_aerop(:), solswad0_aerop(:) 287 !$OMP THREADPRIVATE(topswad0_aerop, solswad0_aerop) 288 REAL, ALLOCATABLE, SAVE :: topsw_aerop(:, :), topsw0_aerop(:, :) 289 !$OMP THREADPRIVATE(topsw_aerop, topsw0_aerop) 290 REAL, ALLOCATABLE, SAVE :: solsw_aerop(:, :), solsw0_aerop(:, :) 291 !$OMP THREADPRIVATE(solsw_aerop, solsw0_aerop) 292 REAL, ALLOCATABLE, SAVE :: topswcf_aerop(:, :), solswcf_aerop(:, :) 293 !$OMP THREADPRIVATE(topswcf_aerop, solswcf_aerop) 294 295 ! additional LW variables CK 296 REAL, ALLOCATABLE, SAVE :: toplwad_aerop(:), sollwad_aerop(:) 297 !$OMP THREADPRIVATE(toplwad_aerop, sollwad_aerop) 298 REAL, ALLOCATABLE, SAVE :: toplwai_aerop(:), sollwai_aerop(:) 299 !$OMP THREADPRIVATE(toplwai_aerop, sollwai_aerop) 300 REAL, ALLOCATABLE, SAVE :: toplwad0_aerop(:), sollwad0_aerop(:) 301 !$OMP THREADPRIVATE(toplwad0_aerop, sollwad0_aerop) 302 303 !AI 08 2023 ajout pour Ecrad 304 REAL, ALLOCATABLE, SAVE :: topswad_aero_s2(:), solswad_aero_s2(:) 305 !$OMP THREADPRIVATE(topswad_aero_s2, solswad_aero_s2) 306 REAL, ALLOCATABLE, SAVE :: topswai_aero_s2(:), solswai_aero_s2(:) 307 !$OMP THREADPRIVATE(topswai_aero_s2, solswai_aero_s2) 308 REAL, ALLOCATABLE, SAVE :: topswad0_aero_s2(:), solswad0_aero_s2(:) 309 !$OMP THREADPRIVATE(topswad0_aero_s2, solswad0_aero_s2) 310 REAL, ALLOCATABLE, SAVE :: topsw_aero_s2(:, :), topsw0_aero_s2(:, :) 311 !$OMP THREADPRIVATE(topsw_aero_s2, topsw0_aero_s2) 312 REAL, ALLOCATABLE, SAVE :: solsw_aero_s2(:, :), solsw0_aero_s2(:, :) 313 !$OMP THREADPRIVATE(solsw_aero_s2, solsw0_aero_s2) 314 REAL, ALLOCATABLE, SAVE :: topswcf_aero_s2(:, :), solswcf_aero_s2(:, :) 315 !$OMP THREADPRIVATE(topswcf_aero_s2, solswcf_aero_s2) 316 ! additional LW variables CK 317 REAL, ALLOCATABLE, SAVE :: toplwad_aero_s2(:), sollwad_aero_s2(:) 318 !$OMP THREADPRIVATE(toplwad_aero_s2, sollwad_aero_s2) 319 REAL, ALLOCATABLE, SAVE :: toplwai_aero_s2(:), sollwai_aero_s2(:) 320 !$OMP THREADPRIVATE(toplwai_aero_s2, sollwai_aero_s2) 321 REAL, ALLOCATABLE, SAVE :: toplwad0_aero_s2(:), sollwad0_aero_s2(:) 322 !$OMP THREADPRIVATE(toplwad0_aero_s2, sollwad0_aero_s2) 323 324 !Ajout de celles n??cessaires au phys_output_write_mod 325 REAL, SAVE, ALLOCATABLE :: tal1(:), pal1(:), pab1(:), pab2(:) 326 !$OMP THREADPRIVATE(tal1, pal1, pab1, pab2) 327 REAL, SAVE, ALLOCATABLE :: ptstar(:), pt0(:), slp(:) 328 !$OMP THREADPRIVATE(ptstar, pt0, slp) 329 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sens, flwp, fiwp 330 !$OMP THREADPRIVATE(sens, flwp, fiwp) 331 !! 332 !FC 333 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: zxfluxt, zxfluxq 334 !$OMP THREADPRIVATE(zxfluxt, zxfluxq) 335 !FC 336 !! Wake variables 337 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: alp_wake 338 !$OMP THREADPRIVATE(alp_wake) 339 !!jyg! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wake_h,wake_k 340 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: wake_h 341 INTEGER, ALLOCATABLE, SAVE, DIMENSION(:) :: wake_k 342 !$OMP THREADPRIVATE(wake_h,wake_k) 343 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: wake_omg 344 !$OMP THREADPRIVATE(wake_omg) 345 REAL, SAVE, ALLOCATABLE, DIMENSION(:, :) :: d_deltat_wk, d_deltaq_wk 346 !$OMP THREADPRIVATE(d_deltat_wk, d_deltaq_wk) 347 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: d_s_wk, d_dens_a_wk, d_dens_wk 348 !$OMP THREADPRIVATE(d_s_wk, d_dens_a_wk, d_dens_wk) 349 REAL, SAVE, ALLOCATABLE, DIMENSION(:, :) :: d_deltat_wk_gw, d_deltaq_wk_gw 350 !$OMP THREADPRIVATE(d_deltat_wk_gw, d_deltaq_wk_gw) 351 REAL, SAVE, ALLOCATABLE, DIMENSION(:, :) :: d_deltat_vdf, d_deltaq_vdf 352 !$OMP THREADPRIVATE(d_deltat_vdf, d_deltaq_vdf) 353 !!! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: d_s_vdf, d_dens_vdf 354 !!!$OMP THREADPRIVATE(d_s_vdf, d_dens_vdf) 355 REAL, SAVE, ALLOCATABLE, DIMENSION(:, :) :: d_deltat_the, d_deltaq_the 356 !$OMP THREADPRIVATE(d_deltat_the, d_deltaq_the) 357 !!! REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: d_s_the, d_dens_the 358 !!!$OMP THREADPRIVATE(d_s_the, d_dens_the) 359 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: d_deltat_ajs_cv, d_deltaq_ajs_cv 360 !$OMP THREADPRIVATE(d_deltat_ajs_cv, d_deltaq_ajs_cv) 360 361 #ifdef ISO 361 362 REAL, SAVE, ALLOCATABLE,DIMENSION(:,:,:) :: d_deltaxt_wk … … 370 371 !$OMP THREADPRIVATE(d_deltaxt_ajs_cv) 371 372 #endif 372 !! End of Wake variables373 !!374 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: bils375 !$OMP THREADPRIVATE(bils)376 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragm, cdragh377 !$OMP THREADPRIVATE(cdragm, cdragh)378 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cldh, cldl, cldm, cldq, cldt, qsat2m379 !$OMP THREADPRIVATE(cldh, cldl, cldm, cldq, cldt, qsat2m)380 !AS: cldhjn, cldljn, cldmjn,cldtjn pas utilisés en tant que variables, juste noms de diagnostics381 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: JrNt382 !$OMP THREADPRIVATE(JrNt)383 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget384 !$OMP THREADPRIVATE(dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget)385 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zustar, zu10m, zv10m, rh2m386 !$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m)387 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_lcl, s_pblh, s_pblt, s_therm388 !$OMP THREADPRIVATE(s_lcl, s_pblh, s_pblt, s_therm)389 !390 !nrlmd+jyg<391 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_pblh_x, s_pblh_w392 !$OMP THREADPRIVATE(s_pblh_x, s_pblh_w)393 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: s_lcl_x, s_lcl_w394 !$OMP THREADPRIVATE(s_lcl_x, s_lcl_w)395 !>nrlmd+jyg396 !397 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: slab_wfbils398 !$OMP THREADPRIVATE(slab_wfbils)399 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte400 !$OMP THREADPRIVATE(tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte)401 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxustartlic, zxrhoslic, zxqsaltlic402 !$OMP THREADPRIVATE(zxustartlic, zxrhoslic, zxqsaltlic)403 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfqcalving404 !$OMP THREADPRIVATE(zxfqcalving)405 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat, zxtsol, snow_lsc, zxfqfonte406 !$OMP THREADPRIVATE(zxfluxlat, zxtsol, snow_lsc, zxfqfonte)407 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxrunofflic408 !$OMP THREADPRIVATE(zxrunofflic)409 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxqsurf, rain_lsc, rain_num410 !$OMP THREADPRIVATE(zxqsurf, rain_lsc, rain_num)373 !! End of Wake variables 374 !! 375 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: bils 376 !$OMP THREADPRIVATE(bils) 377 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: cdragm, cdragh 378 !$OMP THREADPRIVATE(cdragm, cdragh) 379 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: cldh, cldl, cldm, cldq, cldt, qsat2m 380 !$OMP THREADPRIVATE(cldh, cldl, cldm, cldq, cldt, qsat2m) 381 !AS: cldhjn, cldljn, cldmjn,cldtjn pas utilisés en tant que variables, juste noms de diagnostics 382 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: JrNt 383 !$OMP THREADPRIVATE(JrNt) 384 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget 385 !$OMP THREADPRIVATE(dthmin, evap, snowerosion, fder, plcl, plfc, prw, prlw, prsw, prbsw, water_budget) 386 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zustar, zu10m, zv10m, rh2m 387 !$OMP THREADPRIVATE(zustar, zu10m, zv10m, rh2m) 388 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: s_lcl, s_pblh, s_pblt, s_therm 389 !$OMP THREADPRIVATE(s_lcl, s_pblh, s_pblt, s_therm) 390 ! 391 !nrlmd+jyg< 392 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: s_pblh_x, s_pblh_w 393 !$OMP THREADPRIVATE(s_pblh_x, s_pblh_w) 394 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: s_lcl_x, s_lcl_w 395 !$OMP THREADPRIVATE(s_lcl_x, s_lcl_w) 396 !>nrlmd+jyg 397 ! 398 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: slab_wfbils 399 !$OMP THREADPRIVATE(slab_wfbils) 400 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte 401 !$OMP THREADPRIVATE(tpot, tpote, ue, uq, uwat, ve, vq, vwat, zxffonte) 402 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxustartlic, zxrhoslic, zxqsaltlic 403 !$OMP THREADPRIVATE(zxustartlic, zxrhoslic, zxqsaltlic) 404 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxfqcalving 405 !$OMP THREADPRIVATE(zxfqcalving) 406 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxfluxlat, zxtsol, snow_lsc, zxfqfonte 407 !$OMP THREADPRIVATE(zxfluxlat, zxtsol, snow_lsc, zxfqfonte) 408 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxrunofflic 409 !$OMP THREADPRIVATE(zxrunofflic) 410 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxqsurf, rain_lsc, rain_num 411 !$OMP THREADPRIVATE(zxqsurf, rain_lsc, rain_num) 411 412 #ifdef ISO 412 413 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtevap,xtprw … … 424 425 !$OMP THREADPRIVATE(xtrain_lsc) 425 426 #endif 426 !427 !jyg+nrlmd<428 !!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc429 ! c430 ! Declarations liees a la couche limite differentiee w-x c431 ! c432 !!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc433 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sens_x, sens_w434 !$OMP THREADPRIVATE(sens_x, sens_w)435 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat_x, zxfluxlat_w436 !$OMP THREADPRIVATE(zxfluxlat_x, zxfluxlat_w)437 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: delta_qsurf438 !$OMP THREADPRIVATE(delta_qsurf)439 !jyg<440 !!! Entrees supplementaires couche-limite441 !! REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t_x, t_w442 !!!$OMP THREADPRIVATE(t_x, t_w)443 !! REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: q_x, q_w444 !!!$OMP THREADPRIVATE(q_x, q_w)445 !>jyg446 !!! Sorties ferret447 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dtvdf_x, dtvdf_w448 !$OMP THREADPRIVATE(dtvdf_x, dtvdf_w)449 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dqvdf_x, dqvdf_w450 !$OMP THREADPRIVATE(dqvdf_x, dqvdf_w)451 ! Variables supplementaires dans physiq.F relative au splitting de la surface452 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: pbl_tke_input453 !$OMP THREADPRIVATE(pbl_tke_input)454 ! Entree supplementaire Thermiques :455 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t_therm, q_therm, u_therm, v_therm456 !$OMP THREADPRIVATE(t_therm, q_therm, u_therm, v_therm)457 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragh_x, cdragh_w458 !$OMP THREADPRIVATE(cdragh_x, cdragh_w)459 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: cdragm_x, cdragm_w460 !$OMP THREADPRIVATE(cdragm_x, cdragm_w)461 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: kh, kh_x, kh_w462 !$OMP THREADPRIVATE(kh, kh_x, kh_w)427 ! 428 !jyg+nrlmd< 429 !!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 430 ! c 431 ! Declarations liees a la couche limite differentiee w-x c 432 ! c 433 !!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 434 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sens_x, sens_w 435 !$OMP THREADPRIVATE(sens_x, sens_w) 436 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxfluxlat_x, zxfluxlat_w 437 !$OMP THREADPRIVATE(zxfluxlat_x, zxfluxlat_w) 438 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: delta_qsurf 439 !$OMP THREADPRIVATE(delta_qsurf) 440 !jyg< 441 !!! Entrees supplementaires couche-limite 442 !! REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t_x, t_w 443 !!!$OMP THREADPRIVATE(t_x, t_w) 444 !! REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: q_x, q_w 445 !!!$OMP THREADPRIVATE(q_x, q_w) 446 !>jyg 447 !!! Sorties ferret 448 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: dtvdf_x, dtvdf_w 449 !$OMP THREADPRIVATE(dtvdf_x, dtvdf_w) 450 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: dqvdf_x, dqvdf_w 451 !$OMP THREADPRIVATE(dqvdf_x, dqvdf_w) 452 ! Variables supplementaires dans physiq.F relative au splitting de la surface 453 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: pbl_tke_input 454 !$OMP THREADPRIVATE(pbl_tke_input) 455 ! Entree supplementaire Thermiques : 456 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: t_therm, q_therm, u_therm, v_therm 457 !$OMP THREADPRIVATE(t_therm, q_therm, u_therm, v_therm) 458 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: cdragh_x, cdragh_w 459 !$OMP THREADPRIVATE(cdragh_x, cdragh_w) 460 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: cdragm_x, cdragm_w 461 !$OMP THREADPRIVATE(cdragm_x, cdragm_w) 462 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: kh, kh_x, kh_w 463 !$OMP THREADPRIVATE(kh, kh_x, kh_w) 463 464 #ifdef ISO 464 465 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: dxtvdf_x, dxtvdf_w … … 467 468 !$OMP THREADPRIVATE(xt_therm) 468 469 #endif 469 !!!470 !!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc471 LOGICAL, SAVE, ALLOCATABLE :: ptconv(:,:)472 473 REAL, SAVE, ALLOCATABLE :: ratqsc(:,:)474 475 !>jyg+nrlmd470 !!! 471 !!!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 472 LOGICAL, SAVE, ALLOCATABLE :: ptconv(:, :) 473 !$OMP THREADPRIVATE(ptconv) 474 REAL, SAVE, ALLOCATABLE :: ratqsc(:, :) 475 !$OMP THREADPRIVATE(ratqsc) 476 !>jyg+nrlmd 476 477 ! 477 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: wbeff, convoccur, zmax_th, zq2m, zt2m478 !$OMP THREADPRIVATE(wbeff, convoccur, zmax_th, zq2m, zt2m)479 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zt2m_min_mon, zt2m_max_mon480 !$OMP THREADPRIVATE(zt2m_min_mon, zt2m_max_mon)481 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: t2m_min_mon, t2m_max_mon482 !$OMP THREADPRIVATE(t2m_min_mon, t2m_max_mon)483 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: weak_inversion484 !$OMP THREADPRIVATE(weak_inversion)485 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_conv,alp_bl_det486 !$OMP THREADPRIVATE(alp_bl_conv,alp_bl_det)487 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_fluct_m,alp_bl_fluct_tke488 !$OMP THREADPRIVATE(alp_bl_fluct_m,alp_bl_fluct_tke)489 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: alp_bl_stat, n2, s2, strig, zcong, zlcl_th490 !$OMP THREADPRIVATE(alp_bl_stat, n2, s2, strig, zcong, zlcl_th)491 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: proba_notrig, random_notrig492 !$OMP THREADPRIVATE(proba_notrig, random_notrig)493 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: fsolsw, wfbils494 !$OMP THREADPRIVATE(fsolsw, wfbils)495 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: wfevap496 !$OMP THREADPRIVATE(wfevap)497 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: t2m, fluxlat, fsollw,evap_pot498 !$OMP THREADPRIVATE(t2m, fluxlat, fsollw,evap_pot)499 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: dnwd0, omega500 !$OMP THREADPRIVATE(dnwd0, omega)501 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: epmax_diag ! epmax_cape502 !$OMP THREADPRIVATE(epmax_diag)503 !504 ! Deep convective variables used in phytrac505 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: ep ! epmax_cape506 !$OMP THREADPRIVATE(ep)507 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: dnwd, upwd508 !$OMP THREADPRIVATE(dnwd, upwd)509 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: pmflxr, pmflxs510 !$OMP THREADPRIVATE(pmflxr, pmflxs)511 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: wdtrainA, wdtrainS, wdtrainM512 !$OMP THREADPRIVATE(wdtrainA, wdtrainS, wdtrainM)513 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: da, mp514 !$OMP THREADPRIVATE(da, mp)515 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: wght_cvfd516 !$OMP THREADPRIVATE(wght_cvfd)517 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:):: phi, phi2, elij, epmlmMm518 !$OMP THREADPRIVATE(phi, phi2, elij, epmlmMm)519 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: d1a, dam520 !$OMP THREADPRIVATE(d1a, dam)521 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: ev522 !$OMP THREADPRIVATE(ev)523 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: qtaa524 !$OMP THREADPRIVATE(qtaa)525 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: clw526 !$OMP THREADPRIVATE(clw)527 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:):: eplaMm528 !$OMP THREADPRIVATE(eplaMm)529 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:):: sij530 !$OMP THREADPRIVATE(sij)478 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: wbeff, convoccur, zmax_th, zq2m, zt2m 479 !$OMP THREADPRIVATE(wbeff, convoccur, zmax_th, zq2m, zt2m) 480 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zt2m_min_mon, zt2m_max_mon 481 !$OMP THREADPRIVATE(zt2m_min_mon, zt2m_max_mon) 482 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: t2m_min_mon, t2m_max_mon 483 !$OMP THREADPRIVATE(t2m_min_mon, t2m_max_mon) 484 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: weak_inversion 485 !$OMP THREADPRIVATE(weak_inversion) 486 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: alp_bl_conv, alp_bl_det 487 !$OMP THREADPRIVATE(alp_bl_conv,alp_bl_det) 488 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: alp_bl_fluct_m, alp_bl_fluct_tke 489 !$OMP THREADPRIVATE(alp_bl_fluct_m,alp_bl_fluct_tke) 490 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: alp_bl_stat, n2, s2, strig, zcong, zlcl_th 491 !$OMP THREADPRIVATE(alp_bl_stat, n2, s2, strig, zcong, zlcl_th) 492 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: proba_notrig, random_notrig 493 !$OMP THREADPRIVATE(proba_notrig, random_notrig) 494 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: fsolsw, wfbils 495 !$OMP THREADPRIVATE(fsolsw, wfbils) 496 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: wfevap 497 !$OMP THREADPRIVATE(wfevap) 498 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: t2m, fluxlat, fsollw, evap_pot 499 !$OMP THREADPRIVATE(t2m, fluxlat, fsollw,evap_pot) 500 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: dnwd0, omega 501 !$OMP THREADPRIVATE(dnwd0, omega) 502 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: epmax_diag ! epmax_cape 503 !$OMP THREADPRIVATE(epmax_diag) 504 ! 505 ! Deep convective variables used in phytrac 506 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: ep ! epmax_cape 507 !$OMP THREADPRIVATE(ep) 508 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: dnwd, upwd 509 !$OMP THREADPRIVATE(dnwd, upwd) 510 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: pmflxr, pmflxs 511 !$OMP THREADPRIVATE(pmflxr, pmflxs) 512 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: wdtrainA, wdtrainS, wdtrainM 513 !$OMP THREADPRIVATE(wdtrainA, wdtrainS, wdtrainM) 514 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: da, mp 515 !$OMP THREADPRIVATE(da, mp) 516 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: wght_cvfd 517 !$OMP THREADPRIVATE(wght_cvfd) 518 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: phi, phi2, elij, epmlmMm 519 !$OMP THREADPRIVATE(phi, phi2, elij, epmlmMm) 520 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: d1a, dam 521 !$OMP THREADPRIVATE(d1a, dam) 522 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: ev 523 !$OMP THREADPRIVATE(ev) 524 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: qtaa 525 !$OMP THREADPRIVATE(qtaa) 526 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: clw 527 !$OMP THREADPRIVATE(clw) 528 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: eplaMm 529 !$OMP THREADPRIVATE(eplaMm) 530 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: sij 531 !$OMP THREADPRIVATE(sij) 531 532 #ifdef ISO 532 533 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: xtwdtrainA … … 575 576 #endif 576 577 #endif 577 !578 ! REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: coefh, coefm, lambda_th579 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: lambda_th580 !$OMP THREADPRIVATE(lambda_th)581 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: cldemi, cldfra, cldtau, fiwc, fl, re, flwc582 !$OMP THREADPRIVATE(cldemi, cldfra, cldtau, fiwc, fl, re, flwc)583 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: qlth, qith, qsith, wiceth584 !$OMP THREADPRIVATE(qlth, qith, qsith, wiceth)585 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq, ref_ice, theta, zphi586 !$OMP THREADPRIVATE(ref_liq, ref_ice, theta, zphi)587 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: ref_liq_pi, ref_ice_pi588 !$OMP THREADPRIVATE(ref_liq_pi, ref_ice_pi)589 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zx_rh, zx_rhl, zx_rhi590 !$OMP THREADPRIVATE(zx_rh, zx_rhl, zx_rhi)591 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: prfl, psfl, fraca, bsfl592 !$OMP THREADPRIVATE(prfl, psfl, fraca, bsfl)593 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: Vprecip, zw2594 !$OMP THREADPRIVATE(Vprecip, zw2)595 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: pmfd, pmfu596 !$OMP THREADPRIVATE(pmfd, pmfu)597 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: fluxt, fluxu, fluxv598 !$OMP THREADPRIVATE(fluxt, fluxu, fluxv)599 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: uwriteSTD, vwriteSTD, wwriteSTD600 !$OMP THREADPRIVATE(uwriteSTD, vwriteSTD, wwriteSTD)601 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:,:) :: phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD602 !$OMP THREADPRIVATE(phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD)603 604 605 ! ug et d'autres encore:606 REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: beta_prec607 !$OMP THREADPRIVATE(beta_prec)608 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: rneb,rnebjn,rneblsvol609 !$OMP THREADPRIVATE(rneb,rnebjn,rneblsvol)610 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: pfraclr,pfracld611 !$OMP THREADPRIVATE(pfraclr,pfracld)612 REAL, SAVE, ALLOCATABLE :: cldfraliq(:,:)613 !$OMP THREADPRIVATE(cldfraliq)614 REAL, SAVE, ALLOCATABLE ::mean_icefracturb(:,:)615 !$OMP THREADPRIVATE(mean_icefracturb)616 REAL, SAVE, ALLOCATABLE :: sigma2_icefracturb(:,:)617 !$OMP THREADPRIVATE(sigma2_icefracturb)618 619 ! variables de sorties MM620 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxsnow,snowhgt,qsnow,to_ice621 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sissnow,runoff,albsol3_lic622 !$OMP THREADPRIVATE(zxsnow,snowhgt,qsnow,to_ice)623 !$OMP THREADPRIVATE(sissnow,runoff,albsol3_lic)578 ! 579 ! REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: coefh, coefm, lambda_th 580 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: lambda_th 581 !$OMP THREADPRIVATE(lambda_th) 582 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: cldemi, cldfra, cldtau, fiwc, fl, re, flwc 583 !$OMP THREADPRIVATE(cldemi, cldfra, cldtau, fiwc, fl, re, flwc) 584 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: qlth, qith, qsith, wiceth 585 !$OMP THREADPRIVATE(qlth, qith, qsith, wiceth) 586 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: ref_liq, ref_ice, theta, zphi 587 !$OMP THREADPRIVATE(ref_liq, ref_ice, theta, zphi) 588 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: ref_liq_pi, ref_ice_pi 589 !$OMP THREADPRIVATE(ref_liq_pi, ref_ice_pi) 590 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: zx_rh, zx_rhl, zx_rhi 591 !$OMP THREADPRIVATE(zx_rh, zx_rhl, zx_rhi) 592 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: prfl, psfl, fraca, bsfl 593 !$OMP THREADPRIVATE(prfl, psfl, fraca, bsfl) 594 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: Vprecip, zw2 595 !$OMP THREADPRIVATE(Vprecip, zw2) 596 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: pmfd, pmfu 597 !$OMP THREADPRIVATE(pmfd, pmfu) 598 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: fluxt, fluxu, fluxv 599 !$OMP THREADPRIVATE(fluxt, fluxu, fluxv) 600 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: uwriteSTD, vwriteSTD, wwriteSTD 601 !$OMP THREADPRIVATE(uwriteSTD, vwriteSTD, wwriteSTD) 602 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD 603 !$OMP THREADPRIVATE(phiwriteSTD, qwriteSTD, twriteSTD, rhwriteSTD) 604 605 606 ! ug et d'autres encore: 607 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: beta_prec 608 !$OMP THREADPRIVATE(beta_prec) 609 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: rneb, rnebjn, rneblsvol 610 !$OMP THREADPRIVATE(rneb,rnebjn,rneblsvol) 611 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: pfraclr, pfracld 612 !$OMP THREADPRIVATE(pfraclr,pfracld) 613 REAL, SAVE, ALLOCATABLE :: cldfraliq(:, :) 614 !$OMP THREADPRIVATE(cldfraliq) 615 REAL, SAVE, ALLOCATABLE :: mean_icefracturb(:, :) 616 !$OMP THREADPRIVATE(mean_icefracturb) 617 REAL, SAVE, ALLOCATABLE :: sigma2_icefracturb(:, :) 618 !$OMP THREADPRIVATE(sigma2_icefracturb) 619 620 ! variables de sorties MM 621 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: zxsnow, snowhgt, qsnow, to_ice 622 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sissnow, runoff, albsol3_lic 623 !$OMP THREADPRIVATE(zxsnow,snowhgt,qsnow,to_ice) 624 !$OMP THREADPRIVATE(sissnow,runoff,albsol3_lic) 624 625 #ifdef ISO 625 626 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: zxxtsnow … … 631 632 #endif 632 633 633 634 !$OMP THREADPRIVATE(p_tropopause, z_tropopause, t_tropopause)635 636 INTEGER,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zn2mout637 !$OMP THREADPRIVATE(zn2mout)638 639 REAL, SAVE, ALLOCATABLE :: qclr(:,:)640 641 REAL, SAVE, ALLOCATABLE :: qcld(:,:)642 643 REAL, SAVE, ALLOCATABLE :: qss(:,:)644 645 REAL, SAVE, ALLOCATABLE :: qvc(:,:)646 647 REAL, SAVE, ALLOCATABLE :: rnebclr(:,:)648 649 REAL, SAVE, ALLOCATABLE :: rnebss(:,:)650 651 REAL, SAVE, ALLOCATABLE :: gamma_ss(:,:)652 653 REAL, SAVE, ALLOCATABLE :: N1_ss(:,:)654 655 REAL, SAVE, ALLOCATABLE :: N2_ss(:,:)656 657 REAL, SAVE, ALLOCATABLE :: drneb_sub(:,:)658 659 REAL, SAVE, ALLOCATABLE :: drneb_con(:,:)660 661 REAL, SAVE, ALLOCATABLE :: drneb_tur(:,:)662 663 REAL, SAVE, ALLOCATABLE :: drneb_avi(:,:)664 665 REAL, SAVE, ALLOCATABLE :: zqsatl(:,:)666 667 REAL, SAVE, ALLOCATABLE :: zqsats(:,:)668 669 REAL, SAVE, ALLOCATABLE :: Tcontr(:,:)670 671 REAL, SAVE, ALLOCATABLE :: qcontr(:,:)672 673 REAL, SAVE, ALLOCATABLE :: qcontr2(:,:)674 675 REAL, SAVE, ALLOCATABLE :: fcontrN(:,:)676 677 REAL, SAVE, ALLOCATABLE :: fcontrP(:,:)678 679 REAL, SAVE, ALLOCATABLE :: distcltop(:,:)680 !$OMP THREADPRIVATE(distcltop)681 REAL, SAVE, ALLOCATABLE :: temp_cltop(:,:)682 !$OMP THREADPRIVATE(temp_cltop)683 684 685 !--POPRECIP variables 686 REAL, SAVE, ALLOCATABLE :: qraindiag(:,:) 687 !$OMP THREADPRIVATE(qraindiag)688 REAL, SAVE, ALLOCATABLE :: qsnowdiag(:,:)689 !$OMP THREADPRIVATE(qsnowdiag)690 REAL, SAVE, ALLOCATABLE :: dqreva(:,:)691 !$OMP THREADPRIVATE(dqreva)692 REAL, SAVE, ALLOCATABLE :: dqrauto(:,:)693 !$OMP THREADPRIVATE(dqrauto)694 REAL, SAVE, ALLOCATABLE :: dqrcol(:,:)695 !$OMP THREADPRIVATE(dqrcol)696 REAL, SAVE, ALLOCATABLE :: dqrmelt(:,:)697 !$OMP THREADPRIVATE(dqrmelt)698 REAL, SAVE, ALLOCATABLE :: dqrfreez(:,:)699 !$OMP THREADPRIVATE(dqrfreez)700 REAL, SAVE, ALLOCATABLE :: dqssub(:,:)701 !$OMP THREADPRIVATE(dqssub)702 REAL, SAVE, ALLOCATABLE :: dqsauto(:,:)703 !$OMP THREADPRIVATE(dqsauto)704 REAL, SAVE, ALLOCATABLE :: dqsagg(:,:)705 !$OMP THREADPRIVATE(dqsagg)706 REAL, SAVE, ALLOCATABLE :: dqsrim(:,:)707 !$OMP THREADPRIVATE(dqsrim)708 REAL, SAVE, ALLOCATABLE :: dqsmelt(:,:)709 !$OMP THREADPRIVATE(dqsmelt)710 REAL, SAVE, ALLOCATABLE :: dqsfreez(:,:)711 !$OMP THREADPRIVATE(dqsfreez)712 713 714 715 716 717 #ifdef CPP_StratAer 718 ! 719 ! variables for stratospheric aerosol 720 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: d_q_emiss721 !$OMP THREADPRIVATE(d_q_emiss) 722 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: R2SO4723 !$OMP THREADPRIVATE(R2SO4) 724 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: DENSO4725 !$OMP THREADPRIVATE(DENSO4) 726 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: f_r_wet727 !$OMP THREADPRIVATE(f_r_wet) 728 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: decfluxaer729 !$OMP THREADPRIVATE(decfluxaer) 730 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: mdw731 !$OMP THREADPRIVATE(mdw) 732 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: OCS_lifetime733 !$OMP THREADPRIVATE(OCS_lifetime) 734 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: SO2_lifetime735 !$OMP THREADPRIVATE(SO2_lifetime) 736 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: H2SO4_lifetime737 !$OMP THREADPRIVATE(H2SO4_lifetime) 738 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: O3_clim739 !$OMP THREADPRIVATE(O3_clim) 740 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: alpha_bin741 !$OMP THREADPRIVATE(alpha_bin) 742 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: piz_bin743 !$OMP THREADPRIVATE(piz_bin) 744 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: cg_bin745 !$OMP THREADPRIVATE(cg_bin) 746 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_550747 !$OMP THREADPRIVATE(tau_strat_550) 748 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_1020749 !$OMP THREADPRIVATE(tau_strat_1020) 750 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tausum_strat751 !$OMP THREADPRIVATE(tausum_strat) 752 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: surf_PM25_sulf753 !$OMP THREADPRIVATE(surf_PM25_sulf) 754 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vsed_aer755 !$OMP THREADPRIVATE(vsed_aer) 756 ! 757 !---3D budget variables 758 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_nucl759 !$OMP THREADPRIVATE(budg_3D_nucl) 760 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_cond_evap761 !$OMP THREADPRIVATE(budg_3D_cond_evap) 762 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_ocs_to_so2763 !$OMP THREADPRIVATE(budg_3D_ocs_to_so2) 764 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_so2_to_h2so4765 !$OMP THREADPRIVATE(budg_3D_so2_to_h2so4) 766 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_backgr_ocs767 !$OMP THREADPRIVATE(budg_3D_backgr_ocs) 768 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: budg_3D_backgr_so2769 !$OMP THREADPRIVATE(budg_3D_backgr_so2) 770 ! 771 !---2D budget variables 772 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_ocs773 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_so2774 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_h2so4775 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_part776 !$OMP THREADPRIVATE(budg_dep_dry_ocs,budg_dep_dry_so2,budg_dep_dry_h2so4,budg_dep_dry_part) 777 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_ocs778 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_so2779 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_h2so4780 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_part781 !$OMP THREADPRIVATE(budg_dep_wet_ocs,budg_dep_wet_so2,budg_dep_wet_h2so4,budg_dep_wet_part) 782 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_ocs783 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_so2784 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_h2so4785 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_part786 !$OMP THREADPRIVATE(budg_emi_ocs,budg_emi_so2,budg_emi_h2so4,budg_emi_part) 787 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_ocs_to_so2788 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_so2_to_h2so4789 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_h2so4_to_part790 !$OMP THREADPRIVATE(budg_ocs_to_so2,budg_so2_to_h2so4,budg_h2so4_to_part) 791 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_sed_part792 !$OMP THREADPRIVATE(budg_sed_part) 793 #endif 634 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: p_tropopause, z_tropopause, t_tropopause 635 !$OMP THREADPRIVATE(p_tropopause, z_tropopause, t_tropopause) 636 637 INTEGER, ALLOCATABLE, SAVE, DIMENSION(:, :) :: zn2mout 638 !$OMP THREADPRIVATE(zn2mout) 639 640 REAL, SAVE, ALLOCATABLE :: qclr(:, :) 641 !$OMP THREADPRIVATE(qclr) 642 REAL, SAVE, ALLOCATABLE :: qcld(:, :) 643 !$OMP THREADPRIVATE(qcld) 644 REAL, SAVE, ALLOCATABLE :: qss(:, :) 645 !$OMP THREADPRIVATE(qss) 646 REAL, SAVE, ALLOCATABLE :: qvc(:, :) 647 !$OMP THREADPRIVATE(qvc) 648 REAL, SAVE, ALLOCATABLE :: rnebclr(:, :) 649 !$OMP THREADPRIVATE(rnebclr) 650 REAL, SAVE, ALLOCATABLE :: rnebss(:, :) 651 !$OMP THREADPRIVATE(rnebss) 652 REAL, SAVE, ALLOCATABLE :: gamma_ss(:, :) 653 !$OMP THREADPRIVATE(gamma_ss) 654 REAL, SAVE, ALLOCATABLE :: N1_ss(:, :) 655 !$OMP THREADPRIVATE(N1_ss) 656 REAL, SAVE, ALLOCATABLE :: N2_ss(:, :) 657 !$OMP THREADPRIVATE(N2_ss) 658 REAL, SAVE, ALLOCATABLE :: drneb_sub(:, :) 659 !$OMP THREADPRIVATE(drneb_sub) 660 REAL, SAVE, ALLOCATABLE :: drneb_con(:, :) 661 !$OMP THREADPRIVATE(drneb_con) 662 REAL, SAVE, ALLOCATABLE :: drneb_tur(:, :) 663 !$OMP THREADPRIVATE(drneb_tur) 664 REAL, SAVE, ALLOCATABLE :: drneb_avi(:, :) 665 !$OMP THREADPRIVATE(drneb_avi) 666 REAL, SAVE, ALLOCATABLE :: zqsatl(:, :) 667 !$OMP THREADPRIVATE(zqsatl) 668 REAL, SAVE, ALLOCATABLE :: zqsats(:, :) 669 !$OMP THREADPRIVATE(zqsats) 670 REAL, SAVE, ALLOCATABLE :: Tcontr(:, :) 671 !$OMP THREADPRIVATE(Tcontr) 672 REAL, SAVE, ALLOCATABLE :: qcontr(:, :) 673 !$OMP THREADPRIVATE(qcontr) 674 REAL, SAVE, ALLOCATABLE :: qcontr2(:, :) 675 !$OMP THREADPRIVATE(qcontr2) 676 REAL, SAVE, ALLOCATABLE :: fcontrN(:, :) 677 !$OMP THREADPRIVATE(fcontrN) 678 REAL, SAVE, ALLOCATABLE :: fcontrP(:, :) 679 !$OMP THREADPRIVATE(fcontrP) 680 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :, :) :: DENSO4B 681 !$OMP THREADPRIVATE(DENSO4B) 682 REAL, SAVE, ALLOCATABLE :: distcltop(:, :) 683 !$OMP THREADPRIVATE(distcltop) 684 REAL, SAVE, ALLOCATABLE :: temp_cltop(:, :) 685 !$OMP THREADPRIVATE(temp_cltop) 686 687 688 !--POPRECIP variables 689 REAL, SAVE, ALLOCATABLE :: qraindiag(:, :) 690 !$OMP THREADPRIVATE(qraindiag) 691 REAL, SAVE, ALLOCATABLE :: qsnowdiag(:, :) 692 !$OMP THREADPRIVATE(qsnowdiag) 693 REAL, SAVE, ALLOCATABLE :: dqreva(:, :) 694 !$OMP THREADPRIVATE(dqreva) 695 REAL, SAVE, ALLOCATABLE :: dqrauto(:, :) 696 !$OMP THREADPRIVATE(dqrauto) 697 REAL, SAVE, ALLOCATABLE :: dqrcol(:, :) 698 !$OMP THREADPRIVATE(dqrcol) 699 REAL, SAVE, ALLOCATABLE :: dqrmelt(:, :) 700 !$OMP THREADPRIVATE(dqrmelt) 701 REAL, SAVE, ALLOCATABLE :: dqrfreez(:, :) 702 !$OMP THREADPRIVATE(dqrfreez) 703 REAL, SAVE, ALLOCATABLE :: dqssub(:, :) 704 !$OMP THREADPRIVATE(dqssub) 705 REAL, SAVE, ALLOCATABLE :: dqsauto(:, :) 706 !$OMP THREADPRIVATE(dqsauto) 707 REAL, SAVE, ALLOCATABLE :: dqsagg(:, :) 708 !$OMP THREADPRIVATE(dqsagg) 709 REAL, SAVE, ALLOCATABLE :: dqsrim(:, :) 710 !$OMP THREADPRIVATE(dqsrim) 711 REAL, SAVE, ALLOCATABLE :: dqsmelt(:, :) 712 !$OMP THREADPRIVATE(dqsmelt) 713 REAL, SAVE, ALLOCATABLE :: dqsfreez(:, :) 714 !$OMP THREADPRIVATE(dqsfreez) 715 716 717 718 719 720 ! 721 ! variables for stratospheric aerosol 722 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: d_q_emiss 723 !$OMP THREADPRIVATE(d_q_emiss) 724 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: R2SO4 725 !$OMP THREADPRIVATE(R2SO4) 726 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: DENSO4 727 !$OMP THREADPRIVATE(DENSO4) 728 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: f_r_wet 729 !$OMP THREADPRIVATE(f_r_wet) 730 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: decfluxaer 731 !$OMP THREADPRIVATE(decfluxaer) 732 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: mdw 733 !$OMP THREADPRIVATE(mdw) 734 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: OCS_lifetime 735 !$OMP THREADPRIVATE(OCS_lifetime) 736 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: SO2_lifetime 737 !$OMP THREADPRIVATE(SO2_lifetime) 738 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: H2SO4_lifetime 739 !$OMP THREADPRIVATE(H2SO4_lifetime) 740 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: O3_clim 741 !$OMP THREADPRIVATE(O3_clim) 742 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: alpha_bin 743 !$OMP THREADPRIVATE(alpha_bin) 744 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: piz_bin 745 !$OMP THREADPRIVATE(piz_bin) 746 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: cg_bin 747 !$OMP THREADPRIVATE(cg_bin) 748 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: tau_strat_550 749 !$OMP THREADPRIVATE(tau_strat_550) 750 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: tau_strat_1020 751 !$OMP THREADPRIVATE(tau_strat_1020) 752 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: tausum_strat 753 !$OMP THREADPRIVATE(tausum_strat) 754 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: surf_PM25_sulf 755 !$OMP THREADPRIVATE(surf_PM25_sulf) 756 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: vsed_aer 757 !$OMP THREADPRIVATE(vsed_aer) 758 ! 759 !---3D budget variables 760 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: budg_3D_nucl 761 !$OMP THREADPRIVATE(budg_3D_nucl) 762 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: budg_3D_cond_evap 763 !$OMP THREADPRIVATE(budg_3D_cond_evap) 764 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: budg_3D_ocs_to_so2 765 !$OMP THREADPRIVATE(budg_3D_ocs_to_so2) 766 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: budg_3D_so2_to_h2so4 767 !$OMP THREADPRIVATE(budg_3D_so2_to_h2so4) 768 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: budg_3D_backgr_ocs 769 !$OMP THREADPRIVATE(budg_3D_backgr_ocs) 770 REAL, ALLOCATABLE, SAVE, DIMENSION(:, :) :: budg_3D_backgr_so2 771 !$OMP THREADPRIVATE(budg_3D_backgr_so2) 772 ! 773 !---2D budget variables 774 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_ocs 775 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_so2 776 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_h2so4 777 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_dry_part 778 !$OMP THREADPRIVATE(budg_dep_dry_ocs,budg_dep_dry_so2,budg_dep_dry_h2so4,budg_dep_dry_part) 779 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_ocs 780 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_so2 781 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_h2so4 782 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_dep_wet_part 783 !$OMP THREADPRIVATE(budg_dep_wet_ocs,budg_dep_wet_so2,budg_dep_wet_h2so4,budg_dep_wet_part) 784 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_ocs 785 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_so2 786 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_h2so4 787 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_emi_part 788 !$OMP THREADPRIVATE(budg_emi_ocs,budg_emi_so2,budg_emi_h2so4,budg_emi_part) 789 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_ocs_to_so2 790 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_so2_to_h2so4 791 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_h2so4_to_part 792 !$OMP THREADPRIVATE(budg_ocs_to_so2,budg_so2_to_h2so4,budg_h2so4_to_part) 793 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: budg_sed_part 794 !$OMP THREADPRIVATE(budg_sed_part) 794 795 #ifdef REPROBUS 795 796 REAL,SAVE,ALLOCATABLE :: d_q_emiss(:,:) … … 799 800 CONTAINS 800 801 801 !======================================================================802 SUBROUTINE phys_local_var_init803 USE dimphy804 USE infotrac_phy, ONLY : nbtr,nqtot802 !====================================================================== 803 SUBROUTINE phys_local_var_init 804 USE dimphy 805 USE infotrac_phy, ONLY : nbtr, nqtot 805 806 #ifdef ISO 806 807 USE infotrac_phy, ONLY : ntraciso=>ntiso,niso 807 808 #endif 808 USE aero_mod809 USE indice_sol_mod810 USE phys_output_var_mod811 USE phys_state_var_mod812 813 IMPLICIT NONE814 ALLOCATE(t_seri(klon,klev),q_seri(klon,klev),ql_seri(klon,klev),qs_seri(klon,klev), qbs_seri(klon,klev))815 ALLOCATE(qx_seri(klon,klev,nqtot))816 ALLOCATE(u_seri(klon,klev),v_seri(klon,klev))817 ALLOCATE(l_mixmin(klon,klev+1,nbsrf),l_mix(klon,klev+1,nbsrf),wprime(klon,klev+1,nbsrf))818 ALLOCATE(pbl_eps(klon,klev+1,nbsrf+1))819 ALLOCATE(tke_shear(klon,klev+1,nbsrf), tke_buoy(klon,klev+1,nbsrf), tke_trans(klon,klev+1,nbsrf))820 pbl_eps(:,:,:)=0.821 tke_shear(:,:,:)=0.; tke_buoy(:,:,:)=0.; tke_trans(:,:,:)=0.822 l_mix(:,:,:)=0.;l_mixmin(:,:,:)=0.;wprime(:,:,:)=0. ! doit etre initialse car pas toujours remplis823 ALLOCATE(rhcl(klon,klev))824 ALLOCATE(tr_seri(klon,klev,nbtr))825 ALLOCATE(d_t_dyn(klon,klev),d_q_dyn(klon,klev))826 ALLOCATE(d_ql_dyn(klon,klev),d_qs_dyn(klon,klev), d_qbs_dyn(klon,klev))827 ALLOCATE(d_q_dyn2d(klon),d_ql_dyn2d(klon),d_qs_dyn2d(klon), d_qbs_dyn2d(klon))828 ALLOCATE(d_u_dyn(klon,klev),d_v_dyn(klon,klev))829 ALLOCATE(d_tr_dyn(klon,klev,nbtr)) !RomP830 ALLOCATE(d_t_con(klon,klev),d_q_con(klon,klev),d_q_con_zmasse(klon,klev))831 ALLOCATE(d_u_con(klon,klev),d_v_con(klon,klev))832 ALLOCATE(d_t_wake(klon,klev),d_q_wake(klon,klev))833 ALLOCATE(d_t_lsc(klon,klev),d_q_lsc(klon,klev))834 ALLOCATE(d_t_lwr(klon,klev),d_t_lw0(klon,klev))835 ALLOCATE(d_t_swr(klon,klev),d_t_sw0(klon,klev))836 ALLOCATE(d_ql_lsc(klon,klev),d_qi_lsc(klon,klev))837 ALLOCATE(d_t_ajsb(klon,klev),d_q_ajsb(klon,klev))838 ALLOCATE(d_t_ajs(klon,klev),d_q_ajs(klon,klev))839 !nrlmd<840 ALLOCATE(d_t_ajs_w(klon,klev),d_q_ajs_w(klon,klev))841 ALLOCATE(d_t_ajs_x(klon,klev),d_q_ajs_x(klon,klev))842 !>nrlmd843 ALLOCATE(d_u_ajs(klon,klev),d_v_ajs(klon,klev))844 ALLOCATE(d_t_eva(klon,klev),d_q_eva(klon,klev))845 ALLOCATE(d_qx_eva(klon,klev,nqtot))846 ALLOCATE(d_ql_eva(klon,klev),d_qi_eva(klon,klev))847 ALLOCATE(d_t_lscst(klon,klev),d_q_lscst(klon,klev))848 ALLOCATE(d_t_lscth(klon,klev),d_q_lscth(klon,klev))849 ALLOCATE(plul_st(klon),plul_th(klon))850 ALLOCATE(d_t_vdf(klon,klev),d_q_vdf(klon,klev),d_t_diss(klon,klev))851 ALLOCATE (d_qbs_vdf(klon,klev))852 ALLOCATE(d_t_bsss(klon,klev),d_q_bsss(klon,klev),d_qbs_bsss(klon,klev))853 ALLOCATE(d_t_vdf_w(klon,klev),d_q_vdf_w(klon,klev))854 ALLOCATE(d_t_vdf_x(klon,klev),d_q_vdf_x(klon,klev))809 USE aero_mod 810 USE indice_sol_mod 811 USE phys_output_var_mod 812 USE phys_state_var_mod 813 814 IMPLICIT NONE 815 ALLOCATE(t_seri(klon, klev), q_seri(klon, klev), ql_seri(klon, klev), qs_seri(klon, klev), qbs_seri(klon, klev)) 816 ALLOCATE(qx_seri(klon, klev, nqtot)) 817 ALLOCATE(u_seri(klon, klev), v_seri(klon, klev)) 818 ALLOCATE(l_mixmin(klon, klev + 1, nbsrf), l_mix(klon, klev + 1, nbsrf), wprime(klon, klev + 1, nbsrf)) 819 ALLOCATE(pbl_eps(klon, klev + 1, nbsrf + 1)) 820 ALLOCATE(tke_shear(klon, klev + 1, nbsrf), tke_buoy(klon, klev + 1, nbsrf), tke_trans(klon, klev + 1, nbsrf)) 821 pbl_eps(:, :, :) = 0. 822 tke_shear(:, :, :) = 0.; tke_buoy(:, :, :) = 0.; tke_trans(:, :, :) = 0. 823 l_mix(:, :, :) = 0.;l_mixmin(:, :, :) = 0.;wprime(:, :, :) = 0. ! doit etre initialse car pas toujours remplis 824 ALLOCATE(rhcl(klon, klev)) 825 ALLOCATE(tr_seri(klon, klev, nbtr)) 826 ALLOCATE(d_t_dyn(klon, klev), d_q_dyn(klon, klev)) 827 ALLOCATE(d_ql_dyn(klon, klev), d_qs_dyn(klon, klev), d_qbs_dyn(klon, klev)) 828 ALLOCATE(d_q_dyn2d(klon), d_ql_dyn2d(klon), d_qs_dyn2d(klon), d_qbs_dyn2d(klon)) 829 ALLOCATE(d_u_dyn(klon, klev), d_v_dyn(klon, klev)) 830 ALLOCATE(d_tr_dyn(klon, klev, nbtr)) !RomP 831 ALLOCATE(d_t_con(klon, klev), d_q_con(klon, klev), d_q_con_zmasse(klon, klev)) 832 ALLOCATE(d_u_con(klon, klev), d_v_con(klon, klev)) 833 ALLOCATE(d_t_wake(klon, klev), d_q_wake(klon, klev)) 834 ALLOCATE(d_t_lsc(klon, klev), d_q_lsc(klon, klev)) 835 ALLOCATE(d_t_lwr(klon, klev), d_t_lw0(klon, klev)) 836 ALLOCATE(d_t_swr(klon, klev), d_t_sw0(klon, klev)) 837 ALLOCATE(d_ql_lsc(klon, klev), d_qi_lsc(klon, klev)) 838 ALLOCATE(d_t_ajsb(klon, klev), d_q_ajsb(klon, klev)) 839 ALLOCATE(d_t_ajs(klon, klev), d_q_ajs(klon, klev)) 840 !nrlmd< 841 ALLOCATE(d_t_ajs_w(klon, klev), d_q_ajs_w(klon, klev)) 842 ALLOCATE(d_t_ajs_x(klon, klev), d_q_ajs_x(klon, klev)) 843 !>nrlmd 844 ALLOCATE(d_u_ajs(klon, klev), d_v_ajs(klon, klev)) 845 ALLOCATE(d_t_eva(klon, klev), d_q_eva(klon, klev)) 846 ALLOCATE(d_qx_eva(klon, klev, nqtot)) 847 ALLOCATE(d_ql_eva(klon, klev), d_qi_eva(klon, klev)) 848 ALLOCATE(d_t_lscst(klon, klev), d_q_lscst(klon, klev)) 849 ALLOCATE(d_t_lscth(klon, klev), d_q_lscth(klon, klev)) 850 ALLOCATE(plul_st(klon), plul_th(klon)) 851 ALLOCATE(d_t_vdf(klon, klev), d_q_vdf(klon, klev), d_t_diss(klon, klev)) 852 ALLOCATE (d_qbs_vdf(klon, klev)) 853 ALLOCATE(d_t_bsss(klon, klev), d_q_bsss(klon, klev), d_qbs_bsss(klon, klev)) 854 ALLOCATE(d_t_vdf_w(klon, klev), d_q_vdf_w(klon, klev)) 855 ALLOCATE(d_t_vdf_x(klon, klev), d_q_vdf_x(klon, klev)) 855 856 #ifdef ISO 856 857 allocate(xt_seri(ntraciso,klon,klev)) … … 883 884 #endif 884 885 885 ALLOCATE(d_u_vdf(klon,klev),d_v_vdf(klon,klev))886 ALLOCATE(d_t_oli(klon,klev),d_t_oro(klon,klev))887 ALLOCATE(d_u_oli(klon,klev),d_v_oli(klon,klev))888 ALLOCATE(d_u_oro(klon,klev),d_v_oro(klon,klev))889 ALLOCATE(d_u_oro_gw(klon,klev),d_v_oro_gw(klon,klev))890 ALLOCATE(d_t_oro_gw(klon,klev))891 ALLOCATE(d_t_lif(klon,klev),d_t_ec(klon,klev))892 ALLOCATE(d_u_lif(klon,klev),d_v_lif(klon,klev))893 ALLOCATE(d_ts(klon,nbsrf), d_tr(klon,klev,nbtr))894 895 ! aerosols896 ALLOCATE(m_allaer(klon,klev,naero_tot))897 ! Special RRTM898 ALLOCATE(ZLWFT0_i(klon,klev+1),ZSWFT0_i(klon,klev+1),ZFLDN0(klon,klev+1))899 ZFLDN0= 0.900 ALLOCATE(ZFLUP0(klon,klev+1),ZFSDN0(klon,klev+1),ZFSUP0(klon,klev+1))901 !902 903 904 905 906 907 908 ALLOCATE(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp))909 ALLOCATE(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp))910 ALLOCATE(topswcf_aero(klon,3), solswcf_aero(klon,3))911 ALLOCATE(du_gwd_hines(klon,klev),dv_gwd_hines(klon,klev))912 ALLOCATE(dv_gwd_rando(klon,klev),dv_gwd_front(klon,klev))913 ALLOCATE(east_gwstress(klon,klev),west_gwstress(klon,klev))914 east_gwstress(:,:)=0 !ym missing init915 west_gwstress(:,:)=0 !ym missing init916 ALLOCATE(d_t_hin(klon,klev))917 ALLOCATE(d_q_ch4(klon,klev))918 ALLOCATE(stratomask(klon,klev))919 ALLOCATE(tausum_aero(klon,nwave,naero_tot))920 ALLOCATE(drytausum_aero(klon,naero_tot))921 ALLOCATE(tau3d_aero(klon,klev,nwave,naero_tot))922 923 924 925 926 927 928 929 930 931 ALLOCATE(ec550aer(klon,klev))932 933 934 935 936 937 938 939 ALLOCATE(concso4(klon,klev))940 ALLOCATE(concno3(klon,klev))941 ALLOCATE(concoa(klon,klev))942 ALLOCATE(concbc(klon,klev))943 ALLOCATE(concss(klon,klev))944 ALLOCATE(concdust(klon,klev))945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 !IM ajout variables CFMIP2/CMIP5963 964 965 966 ALLOCATE(topsw_aerop(klon,naero_grp), topsw0_aerop(klon,naero_grp))967 ALLOCATE(solsw_aerop(klon,naero_grp), solsw0_aerop(klon,naero_grp))968 ALLOCATE(topswcf_aerop(klon,naero_grp), solswcf_aerop(klon,naero_grp))969 970 ! additional LW variables CK971 972 973 974 975 !AI Ajout Ecrad (3Deffect)976 977 978 979 ALLOCATE(topsw_aero_s2(klon,naero_grp), topsw0_aero_s2(klon,naero_grp))980 ALLOCATE(solsw_aero_s2(klon,naero_grp), solsw0_aero_s2(klon,naero_grp))981 ALLOCATE(topswcf_aero_s2(klon,naero_grp), solswcf_aero_s2(klon,naero_grp))982 ! additional LW variables CK983 984 985 986 987 ! FH Ajout de celles necessaires au phys_output_write_mod988 989 990 ALLOCATE(ptstar(klon),pt0(klon),slp(klon))991 !!992 !! Wake variables993 994 ALLOCATE(wake_h(klon),wake_k(klon))995 996 997 998 999 1000 !! ALLOCATE( d_s_vdf(klon), d_dens_vdf(klon))1001 1002 !! ALLOCATE( d_s_the(klon), d_dens_the(klon))1003 886 ALLOCATE(d_u_vdf(klon, klev), d_v_vdf(klon, klev)) 887 ALLOCATE(d_t_oli(klon, klev), d_t_oro(klon, klev)) 888 ALLOCATE(d_u_oli(klon, klev), d_v_oli(klon, klev)) 889 ALLOCATE(d_u_oro(klon, klev), d_v_oro(klon, klev)) 890 ALLOCATE(d_u_oro_gw(klon, klev), d_v_oro_gw(klon, klev)) 891 ALLOCATE(d_t_oro_gw(klon, klev)) 892 ALLOCATE(d_t_lif(klon, klev), d_t_ec(klon, klev)) 893 ALLOCATE(d_u_lif(klon, klev), d_v_lif(klon, klev)) 894 ALLOCATE(d_ts(klon, nbsrf), d_tr(klon, klev, nbtr)) 895 896 ! aerosols 897 ALLOCATE(m_allaer(klon, klev, naero_tot)) 898 ! Special RRTM 899 ALLOCATE(ZLWFT0_i(klon, klev + 1), ZSWFT0_i(klon, klev + 1), ZFLDN0(klon, klev + 1)) 900 ZFLDN0 = 0. 901 ALLOCATE(ZFLUP0(klon, klev + 1), ZFSDN0(klon, klev + 1), ZFSUP0(klon, klev + 1)) 902 ! 903 ALLOCATE(topswad_aero(klon), solswad_aero(klon)) 904 ALLOCATE(topswai_aero(klon), solswai_aero(klon)) 905 ALLOCATE(topswad0_aero(klon), solswad0_aero(klon)) 906 ALLOCATE(toplwad_aero(klon), sollwad_aero(klon)) 907 ALLOCATE(toplwai_aero(klon), sollwai_aero(klon)) 908 ALLOCATE(toplwad0_aero(klon), sollwad0_aero(klon)) 909 ALLOCATE(topsw_aero(klon, naero_grp), solsw_aero(klon, naero_grp)) 910 ALLOCATE(topsw0_aero(klon, naero_grp), solsw0_aero(klon, naero_grp)) 911 ALLOCATE(topswcf_aero(klon, 3), solswcf_aero(klon, 3)) 912 ALLOCATE(du_gwd_hines(klon, klev), dv_gwd_hines(klon, klev)) 913 ALLOCATE(dv_gwd_rando(klon, klev), dv_gwd_front(klon, klev)) 914 ALLOCATE(east_gwstress(klon, klev), west_gwstress(klon, klev)) 915 east_gwstress(:, :) = 0 !ym missing init 916 west_gwstress(:, :) = 0 !ym missing init 917 ALLOCATE(d_t_hin(klon, klev)) 918 ALLOCATE(d_q_ch4(klon, klev)) 919 ALLOCATE(stratomask(klon, klev)) 920 ALLOCATE(tausum_aero(klon, nwave, naero_tot)) 921 ALLOCATE(drytausum_aero(klon, naero_tot)) 922 ALLOCATE(tau3d_aero(klon, klev, nwave, naero_tot)) 923 ALLOCATE(dNovrN(klon)) 924 ALLOCATE(zfice(klon, klev)) 925 ALLOCATE(od443aer(klon)) 926 ALLOCATE(od550aer(klon)) 927 ALLOCATE(od865aer(klon)) 928 ALLOCATE(dryod550aer(klon)) 929 dryod550aer(:) = 0. 930 ALLOCATE(abs550aer(klon)) 931 abs550aer(:) = 0. 932 ALLOCATE(ec550aer(klon, klev)) 933 ALLOCATE(od550lt1aer(klon)) 934 ALLOCATE(sconcso4(klon)) 935 ALLOCATE(sconcno3(klon)) 936 ALLOCATE(sconcoa(klon)) 937 ALLOCATE(sconcbc(klon)) 938 ALLOCATE(sconcss(klon)) 939 ALLOCATE(sconcdust(klon)) 940 ALLOCATE(concso4(klon, klev)) 941 ALLOCATE(concno3(klon, klev)) 942 ALLOCATE(concoa(klon, klev)) 943 ALLOCATE(concbc(klon, klev)) 944 ALLOCATE(concss(klon, klev)) 945 ALLOCATE(concdust(klon, klev)) 946 ALLOCATE(loadso4(klon)) 947 ALLOCATE(loadoa(klon)) 948 ALLOCATE(loadbc(klon)) 949 ALLOCATE(loadss(klon)) 950 ALLOCATE(loaddust(klon)) 951 ALLOCATE(loadno3(klon)) 952 ALLOCATE(load_tmp1(klon)) 953 ALLOCATE(load_tmp2(klon)) 954 ALLOCATE(load_tmp3(klon)) 955 ALLOCATE(load_tmp4(klon)) 956 ALLOCATE(load_tmp5(klon)) 957 ALLOCATE(load_tmp6(klon)) 958 ALLOCATE(load_tmp7(klon)) 959 ALLOCATE(load_tmp8(klon)) 960 ALLOCATE(load_tmp9(klon)) 961 ALLOCATE(load_tmp10(klon)) 962 963 !IM ajout variables CFMIP2/CMIP5 964 ALLOCATE(topswad_aerop(klon), solswad_aerop(klon)) 965 ALLOCATE(topswai_aerop(klon), solswai_aerop(klon)) 966 ALLOCATE(topswad0_aerop(klon), solswad0_aerop(klon)) 967 ALLOCATE(topsw_aerop(klon, naero_grp), topsw0_aerop(klon, naero_grp)) 968 ALLOCATE(solsw_aerop(klon, naero_grp), solsw0_aerop(klon, naero_grp)) 969 ALLOCATE(topswcf_aerop(klon, naero_grp), solswcf_aerop(klon, naero_grp)) 970 971 ! additional LW variables CK 972 ALLOCATE(toplwad_aerop(klon), sollwad_aerop(klon)) 973 ALLOCATE(toplwai_aerop(klon), sollwai_aerop(klon)) 974 ALLOCATE(toplwad0_aerop(klon), sollwad0_aerop(klon)) 975 976 !AI Ajout Ecrad (3Deffect) 977 ALLOCATE(topswad_aero_s2(klon), solswad_aero_s2(klon)) 978 ALLOCATE(topswai_aero_s2(klon), solswai_aero_s2(klon)) 979 ALLOCATE(topswad0_aero_s2(klon), solswad0_aero_s2(klon)) 980 ALLOCATE(topsw_aero_s2(klon, naero_grp), topsw0_aero_s2(klon, naero_grp)) 981 ALLOCATE(solsw_aero_s2(klon, naero_grp), solsw0_aero_s2(klon, naero_grp)) 982 ALLOCATE(topswcf_aero_s2(klon, naero_grp), solswcf_aero_s2(klon, naero_grp)) 983 ! additional LW variables CK 984 ALLOCATE(toplwad_aero_s2(klon), sollwad_aero_s2(klon)) 985 ALLOCATE(toplwai_aero_s2(klon), sollwai_aero_s2(klon)) 986 ALLOCATE(toplwad0_aero_s2(klon), sollwad0_aero_s2(klon)) 987 988 ! FH Ajout de celles necessaires au phys_output_write_mod 989 990 ALLOCATE(tal1(klon), pal1(klon), pab1(klon), pab2(klon)) 991 ALLOCATE(ptstar(klon), pt0(klon), slp(klon)) 992 !! 993 !! Wake variables 994 ALLOCATE(alp_wake(klon)) 995 ALLOCATE(wake_h(klon), wake_k(klon)) 996 ALLOCATE(wake_omg(klon, klev)) 997 ALLOCATE(d_deltat_wk(klon, klev), d_deltaq_wk(klon, klev)) 998 ALLOCATE(d_s_wk(klon), d_dens_a_wk(klon), d_dens_wk(klon)) 999 ALLOCATE(d_deltat_wk_gw(klon, klev), d_deltaq_wk_gw(klon, klev)) 1000 ALLOCATE(d_deltat_vdf(klon, klev), d_deltaq_vdf(klon, klev)) 1001 !! ALLOCATE( d_s_vdf(klon), d_dens_vdf(klon)) 1002 ALLOCATE(d_deltat_the(klon, klev), d_deltaq_the(klon, klev)) 1003 !! ALLOCATE( d_s_the(klon), d_dens_the(klon)) 1004 ALLOCATE(d_deltat_ajs_cv(klon, klev), d_deltaq_ajs_cv(klon, klev)) 1004 1005 #ifdef ISO 1005 1006 ALLOCATE(d_deltaxt_wk(ntraciso,klon, klev)) … … 1009 1010 ALLOCATE(d_deltaxt_ajs_cv(ntraciso,klon, klev)) 1010 1011 #endif 1011 !! End of wake variables1012 !!1013 1014 1015 1016 1017 1018 1019 1020 1021 !1022 !nrlmd+jyg<1023 1024 1025 !>nrlmd+jyg1026 !1027 1028 1029 1030 1031 1032 1033 1034 zxustartlic(:)=0. ; zxrhoslic(:)=0. ; zxqsaltlic(:)=0.1035 1036 1037 ALLOCATE(qlth(klon,klev), qith(klon,klev), qsith(klon,klev), wiceth(klon,klev))1038 1012 !! End of wake variables 1013 !! 1014 ALLOCATE(bils(klon)) 1015 ALLOCATE(cdragm(klon), cdragh(klon), cldh(klon), cldl(klon)) 1016 ALLOCATE(cldm(klon), cldq(klon), cldt(klon), qsat2m(klon)) 1017 ALLOCATE(JrNt(klon)) 1018 ALLOCATE(dthmin(klon), evap(klon), snowerosion(klon), fder(klon), plcl(klon), plfc(klon)) 1019 ALLOCATE(prw(klon), prlw(klon), prsw(klon), prbsw(klon), water_budget(klon), zustar(klon), zu10m(klon), zv10m(klon), rh2m(klon)) 1020 ALLOCATE(s_lcl(klon)) 1021 ALLOCATE(s_pblh(klon), s_pblt(klon), s_therm(klon)) 1022 ! 1023 !nrlmd+jyg< 1024 ALLOCATE(s_pblh_x(klon), s_pblh_w(klon)) 1025 ALLOCATE(s_lcl_x(klon), s_lcl_w(klon)) 1026 !>nrlmd+jyg 1027 ! 1028 ALLOCATE(slab_wfbils(klon), tpot(klon), tpote(klon), ue(klon)) 1029 ALLOCATE(uq(klon), ve(klon), vq(klon), zxffonte(klon)) 1030 ALLOCATE(uwat(klon), vwat(klon)) 1031 ALLOCATE(zxfqcalving(klon), zxfluxlat(klon)) 1032 ALLOCATE(zxtsol(klon), snow_lsc(klon), zxfqfonte(klon), zxqsurf(klon)) 1033 ALLOCATE(zxrunofflic(klon)) 1034 ALLOCATE(zxustartlic(klon), zxrhoslic(klon), zxqsaltlic(klon)) 1035 zxustartlic(:) = 0. ; zxrhoslic(:) = 0. ; zxqsaltlic(:) = 0. 1036 ALLOCATE(rain_lsc(klon)) 1037 ALLOCATE(rain_num(klon)) 1038 ALLOCATE(qlth(klon, klev), qith(klon, klev), qsith(klon, klev), wiceth(klon, klev)) 1039 ! 1039 1040 #ifdef ISO 1040 1041 ALLOCATE(xtevap(ntraciso,klon)) … … 1049 1050 runoff_diag(:)=0. ; xtrunoff_diag(:,:)=0. ! because variables are only given values on knon grid points 1050 1051 #endif 1051 ! 1052 ALLOCATE(sens_x(klon), sens_w(klon)) 1053 ALLOCATE(zxfluxlat_x(klon), zxfluxlat_w(klon)) 1054 ALLOCATE(delta_qsurf(klon)) 1055 !jyg< 1056 !! ALLOCATE(t_x(klon,klev), t_w(klon,klev)) 1057 !! ALLOCATE(q_x(klon,klev), q_w(klon,klev)) 1058 !>jyg 1059 ALLOCATE(dtvdf_x(klon,klev), dtvdf_w(klon,klev)) 1060 dtvdf_x = 0 ; dtvdf_w=0 ; !ym missing init 1061 ALLOCATE(dqvdf_x(klon,klev), dqvdf_w(klon,klev)) 1062 dqvdf_x = 0 ; dqvdf_w=0 ; !ym missing init 1063 ALLOCATE(pbl_tke_input(klon,klev+1,nbsrf)) 1064 ALLOCATE(t_therm(klon,klev), q_therm(klon,klev),u_therm(klon,klev), v_therm(klon,klev)) 1065 ALLOCATE(cdragh_x(klon), cdragh_w(klon)) 1066 ALLOCATE(cdragm_x(klon), cdragm_w(klon)) 1067 ALLOCATE(kh(klon), kh_x(klon), kh_w(klon)) 1052 ! 1053 ALLOCATE(sens_x(klon), sens_w(klon)) 1054 ALLOCATE(zxfluxlat_x(klon), zxfluxlat_w(klon)) 1055 ALLOCATE(delta_qsurf(klon)) 1056 !jyg< 1057 !! ALLOCATE(t_x(klon,klev), t_w(klon,klev)) 1058 !! ALLOCATE(q_x(klon,klev), q_w(klon,klev)) 1059 !>jyg 1060 ALLOCATE(dtvdf_x(klon, klev), dtvdf_w(klon, klev)) 1061 dtvdf_x = 0 ; dtvdf_w = 0 ; 1062 !ym missing init 1063 ALLOCATE(dqvdf_x(klon, klev), dqvdf_w(klon, klev)) 1064 dqvdf_x = 0 ; dqvdf_w = 0 ; 1065 !ym missing init 1066 ALLOCATE(pbl_tke_input(klon, klev + 1, nbsrf)) 1067 ALLOCATE(t_therm(klon, klev), q_therm(klon, klev), u_therm(klon, klev), v_therm(klon, klev)) 1068 ALLOCATE(cdragh_x(klon), cdragh_w(klon)) 1069 ALLOCATE(cdragm_x(klon), cdragm_w(klon)) 1070 ALLOCATE(kh(klon), kh_x(klon), kh_w(klon)) 1068 1071 #ifdef ISO 1069 1072 ALLOCATE(dxtvdf_x(ntraciso,klon,klev), dxtvdf_w(ntraciso,klon,klev)) 1070 1073 ALLOCATE(xt_therm(ntraciso,klon,klev)) 1071 1074 #endif 1072 !1073 ALLOCATE(ptconv(klon,klev))1074 ALLOCATE(ratqsc(klon,klev))1075 !1076 1077 1078 1079 1080 1081 1082 alp_bl_conv(:)=0 ; alp_bl_det(:)=01083 1084 alp_bl_fluct_m(:)=0 ; alp_bl_fluct_tke(:)= 0.1085 1086 alp_bl_stat(:)=01087 1088 1089 1090 ! ALLOCATE(upwd(klon, klev), omega(klon, klev), coefh(klon, klev))1091 1092 1093 ! ALLOCATE(coefm(klon, klev), lambda_th(klon, klev), cldemi(klon, klev))1094 1095 1096 1097 1098 1099 ALLOCATE(zphi(klon, klev), zx_rh(klon, klev), zx_rhl(klon,klev), zx_rhi(klon,klev))1100 zx_rhl(:,:)=0.; zx_rhi(:,:)=0. ! because not always defined1101 1102 1103 1104 1105 1106 1107 1108 ! FC 1109 ALLOCATE(zxfluxq(klon,klev),zxfluxt(klon,klev))1110 !1111 !1112 ! Deep convective variables used in phytrac1113 ALLOCATE(pmflxr(klon, klev+1), pmflxs(klon, klev+1))1114 ALLOCATE(wdtrainA(klon,klev),wdtrainS(klon,klev),wdtrainM(klon,klev))1115 1116 ALLOCATE(ep(klon,klev)) ! epmax_cape1117 ALLOCATE(da(klon,klev), mp(klon,klev))1118 ALLOCATE(phi(klon,klev,klev))1119 ALLOCATE(wght_cvfd(klon,klev))1120 ALLOCATE(phi2(klon,klev,klev))1121 ALLOCATE(d1a(klon,klev), dam(klon,klev))1122 ALLOCATE(ev(klon,klev))1123 ALLOCATE(elij(klon,klev,klev))1124 ALLOCATE(qtaa(klon,klev))1125 ALLOCATE(clw(klon,klev))1126 ALLOCATE(epmlmMm(klon,klev,klev), eplaMm(klon,klev))1127 ALLOCATE(sij(klon,klev,klev))1075 ! 1076 ALLOCATE(ptconv(klon, klev)) 1077 ALLOCATE(ratqsc(klon, klev)) 1078 ! 1079 ALLOCATE(wbeff(klon), convoccur(klon), zmax_th(klon)) 1080 ALLOCATE(zq2m(klon), zt2m(klon), weak_inversion(klon)) 1081 ALLOCATE(zt2m_min_mon(klon), zt2m_max_mon(klon)) 1082 ALLOCATE(t2m_min_mon(klon), t2m_max_mon(klon)) 1083 ALLOCATE(sens(klon), flwp(klon), fiwp(klon)) 1084 ALLOCATE(alp_bl_conv(klon), alp_bl_det(klon)) 1085 alp_bl_conv(:) = 0 ; alp_bl_det(:) = 0 1086 ALLOCATE(alp_bl_fluct_m(klon), alp_bl_fluct_tke(klon)) 1087 alp_bl_fluct_m(:) = 0 ; alp_bl_fluct_tke(:) = 0. 1088 ALLOCATE(alp_bl_stat(klon), n2(klon), s2(klon), strig(klon), zcong(klon), zlcl_th(klon)) 1089 alp_bl_stat(:) = 0 1090 ALLOCATE(proba_notrig(klon), random_notrig(klon)) 1091 1092 ALLOCATE(dnwd0(klon, klev)) 1093 ! ALLOCATE(upwd(klon, klev), omega(klon, klev), coefh(klon, klev)) 1094 ALLOCATE(omega(klon, klev)) 1095 ALLOCATE(epmax_diag(klon)) ! epmax_cape 1096 ! ALLOCATE(coefm(klon, klev), lambda_th(klon, klev), cldemi(klon, klev)) 1097 ALLOCATE(lambda_th(klon, klev), cldemi(klon, klev)) 1098 ALLOCATE(cldfra(klon, klev), cldtau(klon, klev), fiwc(klon, klev)) 1099 ALLOCATE(fl(klon, klev), re(klon, klev), flwc(klon, klev)) 1100 ALLOCATE(ref_liq(klon, klev), ref_ice(klon, klev), theta(klon, klev)) 1101 ALLOCATE(ref_liq_pi(klon, klev), ref_ice_pi(klon, klev)) 1102 ALLOCATE(zphi(klon, klev), zx_rh(klon, klev), zx_rhl(klon, klev), zx_rhi(klon, klev)) 1103 zx_rhl(:, :) = 0.; zx_rhi(:, :) = 0. ! because not always defined 1104 ALLOCATE(pmfd(klon, klev), pmfu(klon, klev)) 1105 1106 ALLOCATE(t2m(klon, nbsrf), fluxlat(klon, nbsrf)) 1107 ALLOCATE(fsollw(klon, nbsrf)) 1108 ALLOCATE(fsolsw(klon, nbsrf), wfbils(klon, nbsrf)) 1109 ALLOCATE(wfevap(klon, nbsrf)) 1110 ALLOCATE(evap_pot(klon, nbsrf)) 1111 ! FC 1112 ALLOCATE(zxfluxq(klon, klev), zxfluxt(klon, klev)) 1113 ! 1114 ! 1115 ! Deep convective variables used in phytrac 1116 ALLOCATE(pmflxr(klon, klev + 1), pmflxs(klon, klev + 1)) 1117 ALLOCATE(wdtrainA(klon, klev), wdtrainS(klon, klev), wdtrainM(klon, klev)) 1118 ALLOCATE(dnwd(klon, klev), upwd(klon, klev)) 1119 ALLOCATE(ep(klon, klev)) ! epmax_cape 1120 ALLOCATE(da(klon, klev), mp(klon, klev)) 1121 ALLOCATE(phi(klon, klev, klev)) 1122 ALLOCATE(wght_cvfd(klon, klev)) 1123 ALLOCATE(phi2(klon, klev, klev)) 1124 ALLOCATE(d1a(klon, klev), dam(klon, klev)) 1125 ALLOCATE(ev(klon, klev)) 1126 ALLOCATE(elij(klon, klev, klev)) 1127 ALLOCATE(qtaa(klon, klev)) 1128 ALLOCATE(clw(klon, klev)) 1129 ALLOCATE(epmlmMm(klon, klev, klev), eplaMm(klon, klev)) 1130 ALLOCATE(sij(klon, klev, klev)) 1128 1131 #ifdef ISO 1129 1132 ALLOCATE(xtwdtrainA(ntraciso,klon,klev)) … … 1150 1153 #endif 1151 1154 1152 ALLOCATE(prfl(klon, klev+1))1153 ALLOCATE(psfl(klon, klev+1), fraca(klon, klev+1), Vprecip(klon, klev+1))1154 ALLOCATE(bsfl(klon,klev+1))1155 ALLOCATE(zw2(klon, klev+1))1156 1157 1158 1159 1160 ALLOCATE(uwriteSTD(klon,nlevSTD,nfiles), vwriteSTD(klon,nlevSTD,nfiles))1161 ALLOCATE(wwriteSTD(klon,nlevSTD,nfiles), phiwriteSTD(klon,nlevSTD,nfiles))1162 ALLOCATE(qwriteSTD(klon,nlevSTD,nfiles), twriteSTD(klon,nlevSTD,nfiles))1163 ALLOCATE(rhwriteSTD(klon,nlevSTD,nfiles))1164 1165 ! ug et d'autres encore:1166 ALLOCATE(beta_prec(klon,klev))1167 ALLOCATE(rneb(klon,klev),rnebjn(klon,klev),rneblsvol(klon,klev))1168 ALLOCATE(pfraclr(klon,klev),pfracld(klon,klev))1169 pfraclr(:,:)=0. ; pfracld(:,:)=0. ! because not always defined1170 ALLOCATE(cldfraliq(klon,klev))1171 ALLOCATE(sigma2_icefracturb(klon,klev))1172 ALLOCATE(mean_icefracturb(klon,klev))1173 ALLOCATE(distcltop(klon,klev))1174 ALLOCATE(temp_cltop(klon,klev))1175 1176 ALLOCATE (zxsnow(klon),snowhgt(klon),qsnow(klon),to_ice(klon))1177 ALLOCATE (sissnow(klon),runoff(klon),albsol3_lic(klon))1155 ALLOCATE(prfl(klon, klev + 1)) 1156 ALLOCATE(psfl(klon, klev + 1), fraca(klon, klev + 1), Vprecip(klon, klev + 1)) 1157 ALLOCATE(bsfl(klon, klev + 1)) 1158 ALLOCATE(zw2(klon, klev + 1)) 1159 1160 ALLOCATE(fluxu(klon, klev, nbsrf), fluxv(klon, klev, nbsrf)) 1161 ALLOCATE(fluxt(klon, klev, nbsrf)) 1162 1163 ALLOCATE(uwriteSTD(klon, nlevSTD, nfiles), vwriteSTD(klon, nlevSTD, nfiles)) 1164 ALLOCATE(wwriteSTD(klon, nlevSTD, nfiles), phiwriteSTD(klon, nlevSTD, nfiles)) 1165 ALLOCATE(qwriteSTD(klon, nlevSTD, nfiles), twriteSTD(klon, nlevSTD, nfiles)) 1166 ALLOCATE(rhwriteSTD(klon, nlevSTD, nfiles)) 1167 1168 ! ug et d'autres encore: 1169 ALLOCATE(beta_prec(klon, klev)) 1170 ALLOCATE(rneb(klon, klev), rnebjn(klon, klev), rneblsvol(klon, klev)) 1171 ALLOCATE(pfraclr(klon, klev), pfracld(klon, klev)) 1172 pfraclr(:, :) = 0. ; pfracld(:, :) = 0. ! because not always defined 1173 ALLOCATE(cldfraliq(klon, klev)) 1174 ALLOCATE(sigma2_icefracturb(klon, klev)) 1175 ALLOCATE(mean_icefracturb(klon, klev)) 1176 ALLOCATE(distcltop(klon, klev)) 1177 ALLOCATE(temp_cltop(klon, klev)) 1178 1179 ALLOCATE (zxsnow(klon), snowhgt(klon), qsnow(klon), to_ice(klon)) 1180 ALLOCATE (sissnow(klon), runoff(klon), albsol3_lic(klon)) 1178 1181 #ifdef ISO 1179 1182 ALLOCATE (zxxtsnow(niso,klon)) … … 1182 1185 #endif 1183 1186 1184 1185 1186 1187 1188 ALLOCATE(zn2mout(klon,6))1189 1190 ! Supersaturation1191 ALLOCATE(rneb_seri(klon,klev))1192 ALLOCATE(d_rneb_dyn(klon,klev))1193 ALLOCATE(qclr(klon,klev), qcld(klon,klev), qss(klon,klev), qvc(klon,klev))1194 ALLOCATE(rnebclr(klon,klev), rnebss(klon,klev), gamma_ss(klon,klev))1195 ALLOCATE(N1_ss(klon,klev), N2_ss(klon,klev))1196 ALLOCATE(drneb_sub(klon,klev), drneb_con(klon,klev), drneb_tur(klon,klev), drneb_avi(klon,klev))1197 ALLOCATE(zqsatl(klon,klev), zqsats(klon,klev))1198 ALLOCATE(Tcontr(klon,klev), qcontr(klon,klev), qcontr2(klon,klev), fcontrN(klon,klev), fcontrP(klon,klev))1199 1200 !--POPRECIP variables1201 ALLOCATE(qraindiag(klon,klev), qsnowdiag(klon,klev))1202 ALLOCATE(dqreva(klon,klev), dqssub(klon,klev))1203 ALLOCATE(dqrauto(klon,klev), dqrcol(klon,klev), dqrmelt(klon,klev), dqrfreez(klon,klev))1204 ALLOCATE(dqsauto(klon,klev), dqsagg(klon,klev), dqsrim(klon,klev), dqsmelt(klon,klev), dqsfreez(klon,klev))1205 1206 #ifdef CPP_StratAer 1207 ALLOCATE (d_q_emiss(klon, klev))1208 ALLOCATE (R2SO4(klon, klev))1209 ALLOCATE (DENSO4(klon, klev))1210 ALLOCATE (f_r_wet(klon, klev))1211 ALLOCATE (decfluxaer(klon, nbtr))1187 ALLOCATE (p_tropopause(klon)) 1188 ALLOCATE (z_tropopause(klon)) 1189 ALLOCATE (t_tropopause(klon)) 1190 1191 ALLOCATE(zn2mout(klon, 6)) 1192 1193 ! Supersaturation 1194 ALLOCATE(rneb_seri(klon, klev)) 1195 ALLOCATE(d_rneb_dyn(klon, klev)) 1196 ALLOCATE(qclr(klon, klev), qcld(klon, klev), qss(klon, klev), qvc(klon, klev)) 1197 ALLOCATE(rnebclr(klon, klev), rnebss(klon, klev), gamma_ss(klon, klev)) 1198 ALLOCATE(N1_ss(klon, klev), N2_ss(klon, klev)) 1199 ALLOCATE(drneb_sub(klon, klev), drneb_con(klon, klev), drneb_tur(klon, klev), drneb_avi(klon, klev)) 1200 ALLOCATE(zqsatl(klon, klev), zqsats(klon, klev)) 1201 ALLOCATE(Tcontr(klon, klev), qcontr(klon, klev), qcontr2(klon, klev), fcontrN(klon, klev), fcontrP(klon, klev)) 1202 1203 !--POPRECIP variables 1204 ALLOCATE(qraindiag(klon, klev), qsnowdiag(klon, klev)) 1205 ALLOCATE(dqreva(klon, klev), dqssub(klon, klev)) 1206 ALLOCATE(dqrauto(klon, klev), dqrcol(klon, klev), dqrmelt(klon, klev), dqrfreez(klon, klev)) 1207 ALLOCATE(dqsauto(klon, klev), dqsagg(klon, klev), dqsrim(klon, klev), dqsmelt(klon, klev), dqsfreez(klon, klev)) 1208 1209 IF (CPPKEY_STRATAER) THEN 1210 ALLOCATE (d_q_emiss(klon, klev)) 1211 ALLOCATE (R2SO4(klon, klev)) 1212 ALLOCATE (DENSO4(klon, klev)) 1213 ALLOCATE (f_r_wet(klon, klev)) 1214 ALLOCATE (decfluxaer(klon, nbtr)) 1212 1215 ALLOCATE (mdw(nbtr)) 1213 ALLOCATE (budg_3D_nucl(klon, klev))1214 ALLOCATE (budg_3D_cond_evap(klon, klev))1215 ALLOCATE (budg_3D_ocs_to_so2(klon, klev))1216 ALLOCATE (budg_3D_so2_to_h2so4(klon, klev))1217 ALLOCATE (budg_3D_backgr_ocs(klon, klev))1218 ALLOCATE (budg_3D_backgr_so2(klon, klev))1219 ALLOCATE (OCS_lifetime(klon, klev))1220 ALLOCATE (SO2_lifetime(klon, klev))1221 ALLOCATE (H2SO4_lifetime(klon, klev))1222 ALLOCATE (O3_clim(klon, klev))1223 ALLOCATE (alpha_bin(nbands_sw_rrtm +nbands_lw_rrtm+nwave,nbtr))1224 ALLOCATE (piz_bin(nbands_sw_rrtm +nbands_lw_rrtm+nwave,nbtr))1225 ALLOCATE (cg_bin(nbands_sw_rrtm +nbands_lw_rrtm+nwave,nbtr))1226 ALLOCATE (tau_strat_550(klon, klev))1227 ALLOCATE (tau_strat_1020(klon, klev))1228 ALLOCATE (tausum_strat(klon, 3))1216 ALLOCATE (budg_3D_nucl(klon, klev)) 1217 ALLOCATE (budg_3D_cond_evap(klon, klev)) 1218 ALLOCATE (budg_3D_ocs_to_so2(klon, klev)) 1219 ALLOCATE (budg_3D_so2_to_h2so4(klon, klev)) 1220 ALLOCATE (budg_3D_backgr_ocs(klon, klev)) 1221 ALLOCATE (budg_3D_backgr_so2(klon, klev)) 1222 ALLOCATE (OCS_lifetime(klon, klev)) 1223 ALLOCATE (SO2_lifetime(klon, klev)) 1224 ALLOCATE (H2SO4_lifetime(klon, klev)) 1225 ALLOCATE (O3_clim(klon, klev)) 1226 ALLOCATE (alpha_bin(nbands_sw_rrtm + nbands_lw_rrtm + nwave, nbtr)) 1227 ALLOCATE (piz_bin(nbands_sw_rrtm + nbands_lw_rrtm + nwave, nbtr)) 1228 ALLOCATE (cg_bin(nbands_sw_rrtm + nbands_lw_rrtm + nwave, nbtr)) 1229 ALLOCATE (tau_strat_550(klon, klev)) 1230 ALLOCATE (tau_strat_1020(klon, klev)) 1231 ALLOCATE (tausum_strat(klon, 3)) 1229 1232 ALLOCATE (budg_dep_dry_ocs(klon)) 1230 1233 ALLOCATE (budg_dep_wet_ocs(klon)) … … 1244 1247 ALLOCATE (budg_sed_part(klon)) 1245 1248 ALLOCATE (surf_PM25_sulf(klon)) 1246 ALLOCATE (vsed_aer(klon, klev))1247 #endif 1248 1249 END SUBROUTINE phys_local_var_init1250 1251 !======================================================================1252 SUBROUTINE phys_local_var_end1253 USE dimphy1254 USE indice_sol_mod1255 IMPLICIT NONE1256 DEALLOCATE(t_seri,q_seri,ql_seri,qs_seri, qbs_seri,qx_seri)1257 DEALLOCATE(u_seri,v_seri)1258 DEALLOCATE(l_mixmin,l_mix,wprime)1259 DEALLOCATE(tke_shear,tke_buoy,tke_trans)1260 1261 1262 1263 DEALLOCATE(d_t_dyn,d_q_dyn)1264 DEALLOCATE(d_ql_dyn,d_qs_dyn, d_qbs_dyn)1265 DEALLOCATE(d_q_dyn2d,d_ql_dyn2d,d_qs_dyn2d, d_qbs_dyn2d)1266 DEALLOCATE(d_u_dyn,d_v_dyn)1267 1268 DEALLOCATE(d_t_con,d_q_con,d_q_con_zmasse)1269 DEALLOCATE(d_u_con,d_v_con)1270 DEALLOCATE(d_t_wake,d_q_wake)1271 DEALLOCATE(d_t_lsc,d_q_lsc)1272 DEALLOCATE(d_t_lwr,d_t_lw0)1273 DEALLOCATE(d_t_swr,d_t_sw0)1274 DEALLOCATE(d_ql_lsc,d_qi_lsc)1275 DEALLOCATE(d_t_ajsb,d_q_ajsb)1276 DEALLOCATE(d_t_ajs,d_q_ajs)1277 !nrlmd<1278 DEALLOCATE(d_t_ajs_w,d_q_ajs_w)1279 DEALLOCATE(d_t_ajs_x,d_q_ajs_x)1280 !>nrlmd1281 DEALLOCATE(d_u_ajs,d_v_ajs)1282 DEALLOCATE(d_t_eva,d_q_eva)1283 1284 DEALLOCATE(d_ql_eva,d_qi_eva)1285 DEALLOCATE(d_t_lscst,d_q_lscst)1286 DEALLOCATE(d_t_lscth,d_q_lscth)1287 DEALLOCATE(plul_st,plul_th)1288 DEALLOCATE(d_t_vdf,d_q_vdf,d_t_diss)1289 1290 DEALLOCATE(d_t_bsss,d_q_bsss,d_qbs_bsss)1249 ALLOCATE (vsed_aer(klon, klev)) 1250 END IF 1251 1252 END SUBROUTINE phys_local_var_init 1253 1254 !====================================================================== 1255 SUBROUTINE phys_local_var_end 1256 USE dimphy 1257 USE indice_sol_mod 1258 IMPLICIT NONE 1259 DEALLOCATE(t_seri, q_seri, ql_seri, qs_seri, qbs_seri, qx_seri) 1260 DEALLOCATE(u_seri, v_seri) 1261 DEALLOCATE(l_mixmin, l_mix, wprime) 1262 DEALLOCATE(tke_shear, tke_buoy, tke_trans) 1263 DEALLOCATE(pbl_eps) 1264 DEALLOCATE(rhcl) 1265 DEALLOCATE(tr_seri) 1266 DEALLOCATE(d_t_dyn, d_q_dyn) 1267 DEALLOCATE(d_ql_dyn, d_qs_dyn, d_qbs_dyn) 1268 DEALLOCATE(d_q_dyn2d, d_ql_dyn2d, d_qs_dyn2d, d_qbs_dyn2d) 1269 DEALLOCATE(d_u_dyn, d_v_dyn) 1270 DEALLOCATE(d_tr_dyn) !RomP 1271 DEALLOCATE(d_t_con, d_q_con, d_q_con_zmasse) 1272 DEALLOCATE(d_u_con, d_v_con) 1273 DEALLOCATE(d_t_wake, d_q_wake) 1274 DEALLOCATE(d_t_lsc, d_q_lsc) 1275 DEALLOCATE(d_t_lwr, d_t_lw0) 1276 DEALLOCATE(d_t_swr, d_t_sw0) 1277 DEALLOCATE(d_ql_lsc, d_qi_lsc) 1278 DEALLOCATE(d_t_ajsb, d_q_ajsb) 1279 DEALLOCATE(d_t_ajs, d_q_ajs) 1280 !nrlmd< 1281 DEALLOCATE(d_t_ajs_w, d_q_ajs_w) 1282 DEALLOCATE(d_t_ajs_x, d_q_ajs_x) 1283 !>nrlmd 1284 DEALLOCATE(d_u_ajs, d_v_ajs) 1285 DEALLOCATE(d_t_eva, d_q_eva) 1286 DEALLOCATE(d_qx_eva) 1287 DEALLOCATE(d_ql_eva, d_qi_eva) 1288 DEALLOCATE(d_t_lscst, d_q_lscst) 1289 DEALLOCATE(d_t_lscth, d_q_lscth) 1290 DEALLOCATE(plul_st, plul_th) 1291 DEALLOCATE(d_t_vdf, d_q_vdf, d_t_diss) 1292 DEALLOCATE(d_qbs_vdf) 1293 DEALLOCATE(d_t_bsss, d_q_bsss, d_qbs_bsss) 1291 1294 #ifdef ISO 1292 1295 deallocate(xt_seri,xtl_seri,xts_seri,xtbs_seri) … … 1311 1314 #endif 1312 1315 1313 DEALLOCATE(d_u_vdf,d_v_vdf)1314 DEALLOCATE(d_t_oli,d_t_oro)1315 DEALLOCATE(d_u_oli,d_v_oli)1316 DEALLOCATE(d_u_oro,d_v_oro)1317 1318 DEALLOCATE(d_u_oro_gw,d_v_oro_gw)1319 DEALLOCATE(d_t_lif,d_t_ec)1320 DEALLOCATE(d_u_lif,d_v_lif)1321 1322 DEALLOCATE(topswad_aero,solswad_aero)1323 DEALLOCATE(topswai_aero,solswai_aero)1324 DEALLOCATE(topswad0_aero,solswad0_aero)1325 DEALLOCATE(toplwad_aero,sollwad_aero)1326 DEALLOCATE(toplwai_aero,sollwai_aero)1327 DEALLOCATE(toplwad0_aero,sollwad0_aero)1328 DEALLOCATE(topsw_aero,solsw_aero)1329 DEALLOCATE(topsw0_aero,solsw0_aero)1330 DEALLOCATE(topswcf_aero,solswcf_aero)1331 DEALLOCATE(stratomask)1332 DEALLOCATE(tausum_aero)1333 DEALLOCATE(drytausum_aero)1334 DEALLOCATE(tau3d_aero)1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 DEALLOCATE(sconcso4)1345 DEALLOCATE(sconcno3)1346 DEALLOCATE(sconcoa)1347 DEALLOCATE(sconcbc)1348 DEALLOCATE(sconcss)1349 DEALLOCATE(sconcdust)1350 DEALLOCATE(concso4)1351 DEALLOCATE(concno3)1352 DEALLOCATE(concoa)1353 DEALLOCATE(concbc)1354 DEALLOCATE(concss)1355 DEALLOCATE(concdust)1356 DEALLOCATE(loadso4)1357 DEALLOCATE(loadoa)1358 DEALLOCATE(loadbc)1359 DEALLOCATE(loadss)1360 DEALLOCATE(loaddust)1361 DEALLOCATE(loadno3)1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 DEALLOCATE(du_gwd_hines,dv_gwd_hines,d_t_hin)1373 1374 DEALLOCATE(dv_gwd_rando,dv_gwd_front)1375 DEALLOCATE(east_gwstress,west_gwstress)1376 1377 !IM ajout variables CFMIP2/CMIP51378 1379 1380 1381 1382 1383 1384 !AI Aerosols1385 1386 !CK LW diagnostics1387 1388 1389 1390 1391 !AI Ajout pour Ecrad (3Deffect)1392 1393 1394 1395 1396 1397 1398 !CK LW diagnostics1399 1400 1401 DEALLOCATE(toplwad0_aero_s2, sollwad0_aero_s2)1402 1403 ! FH Ajout de celles necessaires au phys_output_write_mod1404 1405 1406 !1407 1408 DEALLOCATE(wake_h,wake_k)1409 1410 1411 1412 1413 1414 !! DEALLOCATE( d_s_vdf, d_dens_vdf)1415 1416 !! DEALLOCATE( d_s_the, d_dens_the)1417 1316 DEALLOCATE(d_u_vdf, d_v_vdf) 1317 DEALLOCATE(d_t_oli, d_t_oro) 1318 DEALLOCATE(d_u_oli, d_v_oli) 1319 DEALLOCATE(d_u_oro, d_v_oro) 1320 DEALLOCATE(d_t_oro_gw) 1321 DEALLOCATE(d_u_oro_gw, d_v_oro_gw) 1322 DEALLOCATE(d_t_lif, d_t_ec) 1323 DEALLOCATE(d_u_lif, d_v_lif) 1324 DEALLOCATE(d_ts, d_tr) 1325 DEALLOCATE(topswad_aero, solswad_aero) 1326 DEALLOCATE(topswai_aero, solswai_aero) 1327 DEALLOCATE(topswad0_aero, solswad0_aero) 1328 DEALLOCATE(toplwad_aero, sollwad_aero) 1329 DEALLOCATE(toplwai_aero, sollwai_aero) 1330 DEALLOCATE(toplwad0_aero, sollwad0_aero) 1331 DEALLOCATE(topsw_aero, solsw_aero) 1332 DEALLOCATE(topsw0_aero, solsw0_aero) 1333 DEALLOCATE(topswcf_aero, solswcf_aero) 1334 DEALLOCATE(stratomask) 1335 DEALLOCATE(tausum_aero) 1336 DEALLOCATE(drytausum_aero) 1337 DEALLOCATE(tau3d_aero) 1338 DEALLOCATE(dNovrN) 1339 DEALLOCATE(zfice) 1340 DEALLOCATE(od443aer) 1341 DEALLOCATE(od550aer) 1342 DEALLOCATE(od865aer) 1343 DEALLOCATE(dryod550aer) 1344 DEALLOCATE(abs550aer) 1345 DEALLOCATE(ec550aer) 1346 DEALLOCATE(od550lt1aer) 1347 DEALLOCATE(sconcso4) 1348 DEALLOCATE(sconcno3) 1349 DEALLOCATE(sconcoa) 1350 DEALLOCATE(sconcbc) 1351 DEALLOCATE(sconcss) 1352 DEALLOCATE(sconcdust) 1353 DEALLOCATE(concso4) 1354 DEALLOCATE(concno3) 1355 DEALLOCATE(concoa) 1356 DEALLOCATE(concbc) 1357 DEALLOCATE(concss) 1358 DEALLOCATE(concdust) 1359 DEALLOCATE(loadso4) 1360 DEALLOCATE(loadoa) 1361 DEALLOCATE(loadbc) 1362 DEALLOCATE(loadss) 1363 DEALLOCATE(loaddust) 1364 DEALLOCATE(loadno3) 1365 DEALLOCATE(load_tmp1) 1366 DEALLOCATE(load_tmp2) 1367 DEALLOCATE(load_tmp3) 1368 DEALLOCATE(load_tmp4) 1369 DEALLOCATE(load_tmp5) 1370 DEALLOCATE(load_tmp6) 1371 DEALLOCATE(load_tmp7) 1372 DEALLOCATE(load_tmp8) 1373 DEALLOCATE(load_tmp9) 1374 DEALLOCATE(load_tmp10) 1375 DEALLOCATE(du_gwd_hines, dv_gwd_hines, d_t_hin) 1376 DEALLOCATE(d_q_ch4) 1377 DEALLOCATE(dv_gwd_rando, dv_gwd_front) 1378 DEALLOCATE(east_gwstress, west_gwstress) 1379 1380 !IM ajout variables CFMIP2/CMIP5 1381 DEALLOCATE(topswad_aerop, solswad_aerop) 1382 DEALLOCATE(topswai_aerop, solswai_aerop) 1383 DEALLOCATE(topswad0_aerop, solswad0_aerop) 1384 DEALLOCATE(topsw_aerop, topsw0_aerop) 1385 DEALLOCATE(solsw_aerop, solsw0_aerop) 1386 DEALLOCATE(topswcf_aerop, solswcf_aerop) 1387 !AI Aerosols 1388 DEALLOCATE(m_allaer) 1389 !CK LW diagnostics 1390 DEALLOCATE(toplwad_aerop, sollwad_aerop) 1391 DEALLOCATE(toplwai_aerop, sollwai_aerop) 1392 DEALLOCATE(toplwad0_aerop, sollwad0_aerop) 1393 1394 !AI Ajout pour Ecrad (3Deffect) 1395 DEALLOCATE(topswad_aero_s2, solswad_aero_s2) 1396 DEALLOCATE(topswai_aero_s2, solswai_aero_s2) 1397 DEALLOCATE(topswad0_aero_s2, solswad0_aero_s2) 1398 DEALLOCATE(topsw_aero_s2, topsw0_aero_s2) 1399 DEALLOCATE(solsw_aero_s2, solsw0_aero_s2) 1400 DEALLOCATE(topswcf_aero_s2, solswcf_aero_s2) 1401 !CK LW diagnostics 1402 DEALLOCATE(toplwad_aero_s2, sollwad_aero_s2) 1403 DEALLOCATE(toplwai_aero_s2, sollwai_aero_s2) 1404 DEALLOCATE(toplwad0_aero_s2, sollwad0_aero_s2) 1405 1406 ! FH Ajout de celles necessaires au phys_output_write_mod 1407 DEALLOCATE(tal1, pal1, pab1, pab2) 1408 DEALLOCATE(ptstar, pt0, slp) 1409 ! 1410 DEALLOCATE(alp_wake) 1411 DEALLOCATE(wake_h, wake_k) 1412 DEALLOCATE(wake_omg) 1413 DEALLOCATE(d_deltat_wk, d_deltaq_wk) 1414 DEALLOCATE(d_s_wk, d_dens_a_wk, d_dens_wk) 1415 DEALLOCATE(d_deltat_wk_gw, d_deltaq_wk_gw) 1416 DEALLOCATE(d_deltat_vdf, d_deltaq_vdf) 1417 !! DEALLOCATE( d_s_vdf, d_dens_vdf) 1418 DEALLOCATE(d_deltat_the, d_deltaq_the) 1419 !! DEALLOCATE( d_s_the, d_dens_the) 1420 DEALLOCATE(d_deltat_ajs_cv, d_deltaq_ajs_cv) 1418 1421 #ifdef ISO 1419 1422 DEALLOCATE(d_deltaxt_wk) … … 1422 1425 DEALLOCATE(d_deltaxt_vdf) 1423 1426 #endif 1424 !1425 1426 1427 1428 1429 1430 1431 1432 !1433 !nrlmd+jyg<1434 1435 1436 !>nrlmd+jyg1437 !1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 !1449 1450 1451 1452 !jyg<1453 !! DEALLOCATE(t_x, t_w)1454 !! DEALLOCATE(q_x, q_w)1455 !>jyg1456 1457 1458 1459 1460 1461 1462 1427 ! 1428 DEALLOCATE(bils) 1429 DEALLOCATE(cdragm, cdragh, cldh, cldl) 1430 DEALLOCATE(cldm, cldq, cldt, qsat2m) 1431 DEALLOCATE(JrNt) 1432 DEALLOCATE(dthmin, evap, snowerosion, fder, plcl, plfc) 1433 DEALLOCATE(prw, prlw, prsw, prbsw, water_budget, zustar, zu10m, zv10m, rh2m, s_lcl) 1434 DEALLOCATE(s_pblh, s_pblt, s_therm) 1435 ! 1436 !nrlmd+jyg< 1437 DEALLOCATE(s_pblh_x, s_pblh_w) 1438 DEALLOCATE(s_lcl_x, s_lcl_w) 1439 !>nrlmd+jyg 1440 ! 1441 DEALLOCATE(slab_wfbils, tpot, tpote, ue) 1442 DEALLOCATE(uq, ve, vq, zxffonte) 1443 DEALLOCATE(uwat, vwat) 1444 DEALLOCATE(zxfqcalving, zxfluxlat) 1445 DEALLOCATE(zxrunofflic) 1446 DEALLOCATE(zxustartlic, zxrhoslic, zxqsaltlic) 1447 DEALLOCATE(zxtsol, snow_lsc, zxfqfonte, zxqsurf) 1448 DEALLOCATE(rain_lsc) 1449 DEALLOCATE(rain_num) 1450 DEALLOCATE(qlth, qith, qsith, wiceth) 1451 ! 1452 DEALLOCATE(sens_x, sens_w) 1453 DEALLOCATE(zxfluxlat_x, zxfluxlat_w) 1454 DEALLOCATE(delta_qsurf) 1455 !jyg< 1456 !! DEALLOCATE(t_x, t_w) 1457 !! DEALLOCATE(q_x, q_w) 1458 !>jyg 1459 DEALLOCATE(d_t_vdf_x, d_t_vdf_w) 1460 DEALLOCATE(d_q_vdf_x, d_q_vdf_w) 1461 DEALLOCATE(pbl_tke_input) 1462 DEALLOCATE(t_therm, q_therm, u_therm, v_therm) 1463 DEALLOCATE(cdragh_x, cdragh_w) 1464 DEALLOCATE(cdragm_x, cdragm_w) 1465 DEALLOCATE(kh, kh_x, kh_w) 1463 1466 #ifdef ISO 1464 1467 DEALLOCATE(xtevap,xtprw) … … 1471 1474 DEALLOCATE(h1_diag,runoff_diag,xtrunoff_diag) 1472 1475 #endif 1473 !1474 1475 1476 !1477 1478 1479 1480 1481 1482 DEALLOCATE(alp_bl_conv,alp_bl_det)1483 DEALLOCATE(alp_bl_fluct_m,alp_bl_fluct_tke)1484 1485 1486 !FC1487 DEALLOCATE(zxfluxq,zxfluxt)1488 1489 1490 ! DEALLOCATE(upwd, omega, coefh)1491 1492 1493 ! DEALLOCATE(coefm, lambda_th, cldemi)1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1476 ! 1477 DEALLOCATE(ptconv) 1478 DEALLOCATE(ratqsc) 1479 ! 1480 DEALLOCATE(wbeff, convoccur, zmax_th) 1481 DEALLOCATE(zq2m, zt2m, weak_inversion) 1482 DEALLOCATE(zt2m_min_mon, zt2m_max_mon) 1483 DEALLOCATE(t2m_min_mon, t2m_max_mon) 1484 DEALLOCATE(sens, flwp, fiwp) 1485 DEALLOCATE(alp_bl_conv, alp_bl_det) 1486 DEALLOCATE(alp_bl_fluct_m, alp_bl_fluct_tke) 1487 DEALLOCATE(alp_bl_stat, n2, s2, strig, zcong, zlcl_th) 1488 DEALLOCATE(proba_notrig, random_notrig) 1489 !FC 1490 DEALLOCATE(zxfluxq, zxfluxt) 1491 1492 DEALLOCATE(dnwd0) 1493 ! DEALLOCATE(upwd, omega, coefh) 1494 DEALLOCATE(omega) 1495 DEALLOCATE(epmax_diag) 1496 ! DEALLOCATE(coefm, lambda_th, cldemi) 1497 DEALLOCATE(lambda_th, cldemi) 1498 DEALLOCATE(cldfra, cldtau, fiwc) 1499 DEALLOCATE(fl, re, flwc) 1500 DEALLOCATE(ref_liq, ref_ice, theta) 1501 DEALLOCATE(ref_liq_pi, ref_ice_pi) 1502 DEALLOCATE(zphi, zx_rh, zx_rhl, zx_rhi) 1503 DEALLOCATE(pmfd, pmfu) 1504 1505 DEALLOCATE(t2m, fluxlat) 1506 DEALLOCATE(fsollw, evap_pot) 1507 DEALLOCATE(fsolsw, wfbils) 1508 DEALLOCATE(wfevap) 1509 1510 DEALLOCATE(pmflxr, pmflxs) 1511 DEALLOCATE(wdtrainA, wdtrainS, wdtrainM) 1512 DEALLOCATE(upwd, dnwd) 1513 DEALLOCATE(ep) 1514 DEALLOCATE(da, mp) 1515 DEALLOCATE(phi) 1516 DEALLOCATE(wght_cvfd) 1517 DEALLOCATE(phi2) 1518 DEALLOCATE(d1a, dam) 1519 DEALLOCATE(ev) 1520 DEALLOCATE(elij) 1521 DEALLOCATE(qtaa) 1522 DEALLOCATE(clw) 1523 DEALLOCATE(epmlmMm, eplaMm) 1524 DEALLOCATE(sij) 1522 1525 #ifdef ISO 1523 1526 DEALLOCATE(xtwdtrainA) … … 1545 1548 1546 1549 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 ! ug et d'autres encore:1558 1559 1560 DEALLOCATE(pfraclr,pfracld)1561 1562 1563 1564 DEALLOCATE (zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic)1565 1566 1550 DEALLOCATE(prfl, psfl, bsfl, fraca, Vprecip) 1551 DEALLOCATE(zw2) 1552 1553 DEALLOCATE(fluxu, fluxv) 1554 DEALLOCATE(fluxt) 1555 1556 DEALLOCATE(uwriteSTD, vwriteSTD) 1557 DEALLOCATE(wwriteSTD, phiwriteSTD) 1558 DEALLOCATE(qwriteSTD, twriteSTD, rhwriteSTD) 1559 1560 ! ug et d'autres encore: 1561 DEALLOCATE(beta_prec) 1562 DEALLOCATE(rneb) 1563 DEALLOCATE(pfraclr, pfracld) 1564 DEALLOCATE(cldfraliq) 1565 DEALLOCATE(sigma2_icefracturb) 1566 DEALLOCATE(mean_icefracturb) 1567 DEALLOCATE (zxsnow, snowhgt, qsnow, to_ice, sissnow, runoff, albsol3_lic) 1568 DEALLOCATE(distcltop) 1569 DEALLOCATE(temp_cltop) 1567 1570 #ifdef ISO 1568 1571 DEALLOCATE (zxxtsnow,xtVprecip,xtVprecipi,pxtrfl,pxtsfl) 1569 1572 #endif 1570 1573 1571 1572 1573 1574 1575 1576 ! Supersaturation1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 !--POPRECIP variables1587 1588 1589 1590 1591 1592 #ifdef CPP_StratAer 1593 ! variables for strat. aerosol CK1574 DEALLOCATE (p_tropopause) 1575 DEALLOCATE (z_tropopause) 1576 DEALLOCATE (t_tropopause) 1577 DEALLOCATE(zn2mout) 1578 1579 ! Supersaturation 1580 DEALLOCATE(rneb_seri) 1581 DEALLOCATE(d_rneb_dyn) 1582 DEALLOCATE(qclr, qcld, qss, qvc) 1583 DEALLOCATE(rnebclr, rnebss, gamma_ss) 1584 DEALLOCATE(N1_ss, N2_ss) 1585 DEALLOCATE(drneb_sub, drneb_con, drneb_tur, drneb_avi) 1586 DEALLOCATE(zqsatl, zqsats) 1587 DEALLOCATE(Tcontr, qcontr, qcontr2, fcontrN, fcontrP) 1588 1589 !--POPRECIP variables 1590 DEALLOCATE(qraindiag, qsnowdiag) 1591 DEALLOCATE(dqreva, dqssub) 1592 DEALLOCATE(dqrauto, dqrcol, dqrmelt, dqrfreez) 1593 DEALLOCATE(dqsauto, dqsagg, dqsrim, dqsmelt, dqsfreez) 1594 1595 IF (CPPKEY_STRATAER) THEN 1596 ! variables for strat. aerosol CK 1594 1597 DEALLOCATE (d_q_emiss) 1595 1598 DEALLOCATE (R2SO4) … … 1632 1635 DEALLOCATE (budg_h2so4_to_part) 1633 1636 DEALLOCATE (budg_sed_part) 1634 #endif 1635 1636 END SUBROUTINE phys_local_var_end1637 END IF 1638 1639 END SUBROUTINE phys_local_var_end 1637 1640 1638 1641 END MODULE phys_local_var_mod -
LMDZ6/branches/Amaury_dev/libf/phylmdiso/phys_output_ctrlout_mod.F90
r5039 r5098 1440 1440 'flx_co2_land_cor', 'correction of the CO2 flux from the land', 'kg CO2 m-2 s-1', (/ ('', i=1, 10) /)) 1441 1441 1442 #ifdef CPP_StratAer1443 1442 !--extinction coefficient 1444 1443 TYPE(ctrl_out), SAVE :: o_ext_strat_550 = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), & … … 1511 1510 TYPE(ctrl_out), SAVE :: o_surf_PM25_sulf = ctrl_out((/ 11, 11, 11, 11, 11, 11, 11, 11, 11, 1/), & 1512 1511 'surf_PM25_sulf', 'Sulfate PM2.5 concentration at the surface', 'ug/m3', (/ ('', i=1, 10) /)) 1513 #endif1514 1512 1515 1513 !!!!!!!!!!!!!!!!!!!!!! 3D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -
LMDZ6/branches/Amaury_dev/libf/phylmdiso/phys_output_mod.F90
r5082 r5098 7 7 USE phys_output_write_mod, ONLY : phys_output_write 8 8 REAL, DIMENSION(nfiles),SAVE :: ecrit_files 9 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_STRATAER 9 10 10 11 ! Abderrahmane 12 2007 … … 228 229 clef_files(8) = ok_histNMC(2) 229 230 clef_files(9) = ok_histNMC(3) 230 #ifdef CPP_StratAer 231 clef_files(10)= .TRUE. 232 #else 233 clef_files(10)= .FALSE. 234 #endif 231 clef_files(10)= CPPKEY_StratAer 235 232 236 233 !sortir des fichiers "stations" si clef_stations(:)=.TRUE. -
LMDZ6/branches/Amaury_dev/libf/phylmdiso/physiq_mod.F90
r5091 r5098 95 95 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA 96 96 97 USE geometry_mod, ONLY: longitude, latitude, boundslon, boundslat, ind_cell_glo 98 USE time_phylmdz_mod, ONLY: ndays 99 USE infotrac_phy, ONLY: nqCO2 100 101 USE time_phylmdz_mod, ONLY: annee_ref, day_ini, day_ref, start_time 102 USE vertical_layers_mod, ONLY: aps, bps, ap, bp 103 104 USE lmdz_xios, ONLY: xios_update_calendar, xios_context_finalize, xios_get_field_attr, & 105 xios_field_is_active, xios_context, xios_set_current_context 106 USE wxios, ONLY: missing_val, using_xios 107 USE paramLMDZ_phy_mod 108 97 109 98 110 !USE cmp_seri_mod … … 111 123 #endif 112 124 113 114 USE geometry_mod, ONLY: longitude, latitude, boundslon, boundslat, ind_cell_glo115 USE time_phylmdz_mod, ONLY: ndays116 USE infotrac_phy, ONLY: nqCO2117 125 #ifdef REPROBUS 118 126 USE chem_rep, ONLY: Init_chem_rep_xjour, d_q_rep, d_ql_rep, d_qi_rep, & … … 121 129 USE strataer_emiss_mod, ONLY: strataer_emiss_init 122 130 #endif 123 USE time_phylmdz_mod, ONLY: annee_ref, day_ini, day_ref, start_time124 USE vertical_layers_mod, ONLY: aps, bps, ap, bp125 126 131 127 132 #ifdef CPP_RRTM … … 131 136 132 137 133 #ifdef CPP_StratAer134 138 USE phys_local_var_mod, ONLY: d_q_emiss 135 139 USE strataer_local_var_mod 136 140 USE strataer_nuc_mod, ONLY: strataer_nuc_init 137 141 USE strataer_emiss_mod, ONLY: strataer_emiss_init 138 #endif139 140 USE lmdz_xios, ONLY: xios_update_calendar, xios_context_finalize141 USE lmdz_xios, ONLY: xios_get_field_attr, xios_field_is_active, xios_context142 USE lmdz_xios, ONLY: xios_set_current_context143 USE wxios, ONLY: missing_val, using_xios144 145 #ifndef CPP_XIOS146 USE paramLMDZ_phy_mod147 #endif148 149 142 150 143 #ifdef ISO … … 1510 1503 #endif 1511 1504 1512 #ifdef CPP_StratAer 1505 IF (CPPKEY_STRATAER) THEN 1513 1506 CALL strataer_init 1514 1507 CALL strataer_nuc_init 1515 1508 CALL strataer_emiss_init 1516 #endif 1509 END IF 1517 1510 1518 1511 print*, '=================================================' … … 1928 1921 WRITE(lunout,*)'OK freq_outNMC(3)=',freq_outNMC(3) 1929 1922 1930 #ifndef CPP_XIOS 1923 IF (.NOT. using_xios) THEN 1931 1924 CALL ini_paramLMDZ_phy(phys_tstep,nid_ctesGCM) 1932 #endif 1925 END IF 1933 1926 1934 1927 #endif … … 5800 5793 ELSE 5801 5794 #ifdef CPP_RRTM 5802 #ifndef CPP_StratAer 5795 IF (.NOT. CPPKEY_STRATAER) THEN 5803 5796 !--prescribed strat aerosols 5804 5797 !--only in the case of non-interactive strat aerosols … … 5811 5804 CALL abort_physic(modname,abort_message,1) 5812 5805 ENDIF 5813 #endif 5806 END IF 5814 5807 #else 5815 5808 abort_message='You should compile with -rrtm if running ' & … … 5823 5816 ! 5824 5817 #ifdef CPP_RRTM 5825 #ifdef CPP_StratAer 5818 IF (CPPKEY_STRATER) THEN 5826 5819 !--compute stratospheric mask 5827 5820 CALL stratosphere_mask(missing_val, pphis, t_seri, pplay, latitude_deg) 5828 5821 !--interactive strat aerosols 5829 5822 CALL calcaerosolstrato_rrtm(pplay,t_seri,paprs,debut) 5830 #endif 5823 END IF 5831 5824 #endif 5832 5825 !--fin STRAT AEROSOL … … 6470 6463 IF (ok_qch4) THEN 6471 6464 ! d_q_ch4: H2O source from CH4 in MMR/s (mass mixing ratio/s or kg H2O/kg air/s) 6472 #ifdef CPP_StratAer 6465 IF (CPPKEY_STRATER) THEN 6473 6466 CALL stratH2O_methox(debut,paprs,d_q_ch4) 6474 #else 6467 ELSE 6475 6468 ! ECMWF routine METHOX 6476 6469 CALL METHOX(1,klon,klon,klev,q_seri,d_q_ch4,pplay) 6477 #endif 6470 END IF 6478 6471 ! add humidity tendency due to methane 6479 6472 d_q_ch4_dtime(:,:) = d_q_ch4(:,:)*phys_tstep … … 6494 6487 ! 6495 6488 ! 6496 #ifdef CPP_StratAer 6489 IF (CPPKEY_STRATER) THEN 6497 6490 IF (ok_qemiss) THEN 6498 6491 flh2o=1 … … 6537 6530 END SELECT ! emission scenario (flag_emit) 6538 6531 ENDIF 6539 #endif 6532 END IF 6540 6533 6541 6534 !=============================================================== … … 6997 6990 ENDDO 6998 6991 6999 #ifdef CPP_StratAer 6992 IF (CPPKEY_STRATER) THEN 7000 6993 IF (ok_qemiss) THEN 7001 6994 DO k = 1, klev … … 7003 6996 ENDDO 7004 6997 ENDIF 7005 #endif 6998 END IF 7006 6999 IF (ok_qch4) THEN 7007 7000 DO k = 1, klev … … 7334 7327 #endif 7335 7328 7336 #ifndef CPP_XIOS 7329 IF (.NOT. using_xios) THEN 7337 7330 CALL write_paramLMDZ_phy(itap,nid_ctesGCM,ok_sync) 7338 #endif 7331 END IF 7339 7332 7340 7333 #endif -
LMDZ6/branches/Amaury_dev/makelmdz_fcm
r5093 r5098 441 441 fi 442 442 443 STRATAER_PATH="$LIBFGCM/phy${physique}/StratAer" 443 444 if [[ $strataer = "true" ]]; then 444 445 CPP_KEY="$CPP_KEY CPP_StratAer" 445 STRATAER_PATH="$LIBFGCM/phy${physique}/StratAer"446 446 fi 447 447
Note: See TracChangeset
for help on using the changeset viewer.