Changeset 704 for LMDZ4/branches/V3_test/libf/phylmd/physiq.F
- Timestamp:
- Aug 17, 2006, 5:41:51 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/V3_test/libf/phylmd/physiq.F
r702 r704 3 3 ! 4 4 c 5 c#define IO_DEBUG 6 5 7 SUBROUTINE physiq (nlon,nlev,nqmax, 6 8 . debut,lafin,rjourvrai,gmtime,pdtphys, … … 17 19 18 20 USE ioipsl 19 USE histcom 21 USE comgeomphy 22 USE write_field_phy 23 USE dimphy 24 USE iophy 25 USE misc_mod, mydebug=>debug 26 USE vampir 20 27 #ifdef INCA 21 USE chemshut28 cym USE chemshut 22 29 USE species_names 23 30 #ifdef INCA_CH4 … … 84 91 integer jjmp1 85 92 parameter (jjmp1=jjm+1-1/jjm) 86 #include "dimphy.h" 93 integer iip1 94 parameter (iip1=iim+1) 95 cym#include "dimphy.h" 87 96 #include "regdim.h" 88 97 #include "indicesol.h" … … 92 101 #include "logic.h" 93 102 #include "temps.h" 94 #include "comgeomphy.h"103 cym#include "comgeomphy.h" 95 104 #include "advtrac.h" 96 105 #include "iniprint.h" … … 110 119 #include "oasis.h" 111 120 INTEGER,SAVE :: npas, nexca 121 c$OMP THREADPRIVATE(npas, nexca) 112 122 logical rnpb 113 123 #ifdef INCA … … 119 129 character*6 ocean 120 130 SAVE ocean 121 131 c$OMP THREADPRIVATE(ocean) 122 132 c parameter (ocean = 'force ') 123 133 c parameter (ocean = 'couple') 124 134 logical ok_ocean 125 135 SAVE ok_ocean 136 c$OMP THREADPRIVATE(ok_ocean) 126 137 c 127 138 cIM "slab" ocean … … 144 155 logical ok_veget 145 156 save ok_veget 157 c$OMP THREADPRIVATE(ok_veget) 146 158 c parameter (ok_veget = .true.) 147 159 c parameter (ok_veget = .false.) … … 163 175 LOGICAL ok_journe ! sortir le fichier journalier 164 176 save ok_journe 177 c$OMP THREADPRIVATE(ok_journe) 165 178 c PARAMETER (ok_journe=.true.) 166 179 c 167 180 LOGICAL ok_mensuel ! sortir le fichier mensuel 168 181 save ok_mensuel 182 c$OMP THREADPRIVATE(ok_mensuel) 169 183 c PARAMETER (ok_mensuel=.true.) 170 184 c 171 185 LOGICAL ok_instan ! sortir le fichier instantane 172 186 save ok_instan 187 c$OMP THREADPRIVATE(ok_instan) 173 188 c PARAMETER (ok_instan=.true.) 174 189 c … … 179 194 REAL fm_therm(klon,klev+1) 180 195 REAL entr_therm(klon,klev) 181 real q2(klon,klev+1,nbsrf) 182 save q2 196 real,allocatable,save :: q2(:,:,:) 197 c$OMP THREADPRIVATE(q2) 198 cym save q2 183 199 c====================================================================== 184 200 c … … 215 231 REAL qx(klon,klev,nqmax) 216 232 217 REAL t_ancien(klon,klev), q_ancien(klon,klev) 218 SAVE t_ancien, q_ancien 233 REAL,allocatable,save :: t_ancien(:,:), q_ancien(:,:) 234 c$OMP THREADPRIVATE(t_ancien, q_ancien) 235 cym SAVE t_ancien, q_ancien 219 236 LOGICAL ancien_ok 220 237 SAVE ancien_ok 221 238 c$OMP THREADPRIVATE(ancien_ok) 222 239 REAL d_t_dyn(klon,klev) 223 240 REAL d_q_dyn(klon,klev) … … 241 258 CHARACTER*3 ctetaSTD(nbteta) 242 259 DATA ctetaSTD/'350','380','405'/ 260 c$OMP THREADPRIVATE(ctetaSTD) 243 261 REAL rtetaSTD(nbteta) 244 262 DATA rtetaSTD/350., 380., 405./ 263 c$OMP THREADPRIVATE(rtetaSTD) 245 264 c 246 265 REAL PVteta(klon,nbteta) … … 249 268 cMI Amip2 PV a theta constante 250 269 251 INTEGER klevp1, klevm1 252 PARAMETER(klevp1=klev+1,klevm1=klev-1) 253 #include "raddim.h" 254 c 255 REAL swdn0(klon,klevp1), swdn(klon,klevp1) 256 REAL swup0(klon,klevp1), swup(klon,klevp1) 257 SAVE swdn0 , swdn, swup0, swup 258 c 259 REAL SWdn200clr(klon), SWdn200(klon) 260 REAL SWup200clr(klon), SWup200(klon) 261 SAVE SWdn200clr, SWdn200, SWup200clr, SWup200 262 c 263 REAL lwdn0(klon,klevp1), lwdn(klon,klevp1) 264 REAL lwup0(klon,klevp1), lwup(klon,klevp1) 265 SAVE lwdn0 , lwdn, lwup0, lwup 266 c 267 REAL LWdn200clr(klon), LWdn200(klon) 268 REAL LWup200clr(klon), LWup200(klon) 269 SAVE LWdn200clr, LWdn200, LWup200clr, LWup200 270 c 271 REAL LWdnTOA(klon), LWdnTOAclr(klon) 272 SAVE LWdnTOA, LWdnTOAclr 270 cym INTEGER klevp1, klevm1 271 cym PARAMETER(klevp1=klev+1,klevm1=klev-1) 272 cym#include "raddim.h" 273 c 274 275 REAL,allocatable,save :: swdn0(:,:), swdn(:,:) 276 REAL,allocatable,save :: swup0(:,:), swup(:,:) 277 c$OMP THREADPRIVATE(swdn0 , swdn, swup0, swup) 278 cym SAVE swdn0 , swdn, swup0, swup 279 c 280 REAL,allocatable,save :: SWdn200clr(:), SWdn200(:) 281 REAL,allocatable,save :: SWup200clr(:), SWup200(:) 282 c$OMP THREADPRIVATE(SWdn200clr, SWdn200, SWup200clr, SWup200) 283 cym SAVE SWdn200clr, SWdn200, SWup200clr, SWup200 284 c 285 REAL,allocatable,save :: lwdn0(:,:), lwdn(:,:) 286 REAL,allocatable,save :: lwup0(:,:), lwup(:,:) 287 c$OMP THREADPRIVATE(lwdn0 , lwdn, lwup0, lwup) 288 cym SAVE lwdn0 , lwdn, lwup0, lwup 289 c 290 REAL,allocatable,save :: LWdn200clr(:), LWdn200(:) 291 REAL,allocatable,save :: LWup200clr(:), LWup200(:) 292 c$OMP THREADPRIVATE(LWdn200clr, LWdn200, LWup200clr, LWup200) 293 cym SAVE LWdn200clr, LWdn200, LWup200clr, LWup200 294 c 295 REAL,allocatable,save :: LWdnTOA(:), LWdnTOAclr(:) 296 c$OMP THREADPRIVATE(LWdnTOA, LWdnTOAclr) 297 cym SAVE LWdnTOA, LWdnTOAclr 273 298 c 274 299 cIM Amip2 … … 281 306 .60000., 50000., 40000., 30000., 25000., 20000., 282 307 .15000., 10000., 7000., 5000., 3000., 2000., 1000./ 308 c$OMP THREADPRIVATE(rlevSTD) 283 309 CHARACTER*4 clevSTD(nlevSTD) 284 310 DATA clevSTD/'1000','925 ','850 ','700 ','600 ', 285 311 .'500 ','400 ','300 ','250 ','200 ','150 ','100 ', 286 312 .'70 ','50 ','30 ','20 ','10 '/ 313 c$OMP THREADPRIVATE(clevSTD) 287 314 c 288 315 CHARACTER*3 bb2 … … 298 325 PARAMETER(nout=3) !nout=1 : day; =2 : mth; =3 : NMC 299 326 c 300 REAL tsumSTD(klon,nlevSTD,nout) 301 REAL usumSTD(klon,nlevSTD,nout), vsumSTD(klon,nlevSTD,nout) 302 REAL wsumSTD(klon,nlevSTD,nout), phisumSTD(klon,nlevSTD,nout) 303 REAL qsumSTD(klon,nlevSTD,nout), rhsumSTD(klon,nlevSTD,nout) 304 c 305 SAVE tsumSTD, usumSTD, vsumSTD, wsumSTD, phisumSTD, 306 . qsumSTD, rhsumSTD 327 REAL,SAVE,ALLOCATABLE :: tsumSTD(:,:,:) 328 REAL,SAVE,ALLOCATABLE :: usumSTD(:,:,:), vsumSTD(:,:,:) 329 REAL,SAVE,ALLOCATABLE :: wsumSTD(:,:,:), phisumSTD(:,:,:) 330 REAL,SAVE,ALLOCATABLE :: qsumSTD(:,:,:), rhsumSTD(:,:,:) 331 c 332 cym SAVE tsumSTD, usumSTD, vsumSTD, wsumSTD, phisumSTD, 333 cym . qsumSTD, rhsumSTD 334 c$OMP THREADPRIVATE(tsumSTD, usumSTD, vsumSTD, wsumSTD, phisumSTD) 335 c$OMP THREADPRIVATE(qsumSTD, rhsumSTD) 307 336 c 308 337 logical oknondef(klon,nlevSTD,nout) 309 real tnondef(klon,nlevSTD,nout) 310 save tnondef 338 real,SAVE,ALLOCATABLE :: tnondef(:,:,:) 339 c$OMP THREADPRIVATE(tnondef) 340 cym save tnondef 311 341 c 312 342 c les produits uvSTD, vqSTD, .., T2STD sont calcules … … 319 349 real wqSTD(klon,nlevSTD) 320 350 c 321 real uvsumSTD(klon,nlevSTD,nout)322 real vqsumSTD(klon,nlevSTD,nout)323 real vTsumSTD(klon,nlevSTD,nout)324 real wqsumSTD(klon,nlevSTD,nout)351 real,save,allocatable :: uvsumSTD(:,:,:) 352 real,save,allocatable :: vqsumSTD(:,:,:) 353 real,save,allocatable :: vTsumSTD(:,:,:) 354 real,save,allocatable :: wqsumSTD(:,:,:) 325 355 c 326 356 real vphiSTD(klon,nlevSTD) … … 330 360 real T2STD(klon,nlevSTD) 331 361 c 332 real vphisumSTD(klon,nlevSTD,nout) 333 real wTsumSTD(klon,nlevSTD,nout) 334 real u2sumSTD(klon,nlevSTD,nout) 335 real v2sumSTD(klon,nlevSTD,nout) 336 real T2sumSTD(klon,nlevSTD,nout) 337 c 338 SAVE uvsumSTD, vqsumSTD, vTsumSTD, wqsumSTD 339 SAVE vphisumSTD, wTsumSTD, u2sumSTD, v2sumSTD, T2sumSTD 362 real,save,allocatable :: vphisumSTD(:,:,:) 363 real,save,allocatable :: wTsumSTD(:,:,:) 364 real,save,allocatable :: u2sumSTD(:,:,:) 365 real,save,allocatable :: v2sumSTD(:,:,:) 366 real,save,allocatable :: T2sumSTD(:,:,:) 367 c 368 cym SAVE uvsumSTD, vqsumSTD, vTsumSTD, wqsumSTD 369 cym SAVE vphisumSTD, wTsumSTD, u2sumSTD, v2sumSTD, T2sumSTD 370 c$OMP THREADPRIVATE(uvsumSTD, vqsumSTD, vTsumSTD, wqsumSTD) 371 c$OMP THREADPRIVATE(vphisumSTD, wTsumSTD, u2sumSTD, v2sumSTD, T2sumSTD) 372 340 373 cMI Amip2 341 374 c … … 355 388 REAL cldt_s(klon),cldq_s(klon) !nuage total, eau liquide integree 356 389 357 INTEGER kp1390 INTEGER linv, kp1 358 391 c flwp, fiwp = Liquid Water Path & Ice Water Path (kg/m2) 359 392 c flwc, fiwc = Liquid Water Content & Ice Water Content (kg/kg) … … 369 402 cv3.4 370 403 INTEGER debug, debugcol 371 INTEGER npoints372 PARAMETER(npoints=klon)404 cym INTEGER npoints 405 cym PARAMETER(npoints=klon) 373 406 c 374 407 INTEGER sunlit(klon) !sunlit=1 if day; sunlit=0 if night … … 390 423 DATA ifreq_isccp/3/ 391 424 SAVE ifreq_isccp 425 c$OMP THREAPRIVATE(ifreq_isccp) 392 426 CHARACTER*5 typinout(napisccp) 393 427 DATA typinout/'i3od'/ 428 c$OMP THREAPRIVATE(typinout) 394 429 cIM verif boxptop BEG 395 430 CHARACTER*1 verticaxe(napisccp) 396 431 DATA verticaxe/'1'/ 432 c$OMP THREAPRIVATE(verticaxe) 397 433 cIM verif boxptop END 398 434 INTEGER nvlev(napisccp) … … 400 436 REAL t1, aa 401 437 REAL seed_re(klon,napisccp) 402 INTEGER seed_old(klon,napisccp) 403 SAVE seed_old 404 INTEGER iphy(iim,jjmp1) 438 INTEGER,ALLOCATABLE,SAVE :: seed_old(:,:) 439 cym SAVE seed_old 440 c$OMP THREADPRIVATE(seed_old) 441 cym !!!! A voir plus tard 442 cym INTEGER iphy(iim,jjmp1) 405 443 cIM parametres ISCCP END 406 444 c … … 481 519 482 520 INTEGER linv 483 INTEGER pct_ocean(klon,nbregdyn) 484 SAVE pct_ocean 521 INTEGER,ALLOCATABLE,SAVE :: pct_ocean(:,:) 522 c$OMP THREADPRIVATE(pct_ocean) 523 cym SAVE pct_ocean 485 524 486 525 c sorties ISCCP … … 491 530 c save ok_isccp, ecrit_isccp, nid_isccp 492 531 save nid_isccp 493 532 c$OMP THREADPRIVATE(ok_isccp, ecrit_isccp, nid_isccp,nid_isccp) 494 533 #undef histISCCP 495 534 #define histISCCP … … 505 544 cIM bad 151205 DATA zx_pc/50., 180., 310., 440., 560., 680., 800./ 506 545 DATA zx_pc/180., 310., 440., 560., 680., 800., 1000./ 507 546 c$OMP THREADPRIVATE(zx_tau,zx_pc) 508 547 c cldtopres pression au sommet des nuages 509 548 REAL cldtopres(lmaxm1), cldtopres3(lmax3) … … 511 550 DATA cldtopres/180., 310., 440., 560., 680., 800., 1000./ 512 551 DATA cldtopres3/440., 680., 1000./ 552 c$OMP THREADPRIVATE(cldtopres,cldtopres3) 513 553 cIM 051005 BEG 514 554 REAL tmp_his1_3d(iwmax,kmaxm1,lmaxm1,nbregdyn,napisccp) … … 525 565 CHARACTER *3 pclev(lmaxm1) 526 566 DATA pclev/'pc1','pc2','pc3','pc4','pc5','pc6','pc7'/ 567 c$OMP THREADPRIVATE(taulev,pclev) 527 568 c 528 569 c cnameisccp … … 578 619 . 'pc= 680-800hPa, tau> 60.', 579 620 . 'pc= 800-1000hPa, tau> 60.'/ 621 c$OMP THREADPRIVATE(cnameisccp) 580 622 c 581 623 c REAL zx_lonx7(iimx7), zx_latx7(jjmp1x7) … … 591 633 integer nid_hf, nid_hf3d 592 634 save ok_hf, nid_hf, nid_hf3d 593 635 c$OMP THREADPRIVATE(ok_hf, nid_hf, nid_hf3d) 594 636 c QUESTION : noms de variables ? 595 637 596 638 #undef histhf 597 #define histhf639 c#define histhf 598 640 #ifdef histhf 599 641 cIM 130904 data ok_hf,ecrit_hf/.true.,0.25/ … … 602 644 data ok_hf/.false./ 603 645 #endif 604 605 646 INTEGER longcles 606 647 PARAMETER ( longcles = 20 ) … … 611 652 REAL xjour 612 653 SAVE xjour 654 c$OMP THREADPRIVATE(xjour) 613 655 c 614 656 c … … 617 659 REAL dtime 618 660 SAVE dtime ! pas temporel de la physique 661 c$OMP THREADPRIVATE(dtime) 619 662 c 620 663 INTEGER radpas 621 664 SAVE radpas ! frequence d'appel rayonnement 622 c 623 REAL radsol(klon) 624 SAVE radsol ! bilan radiatif au sol calcule par code radiatif 625 c 626 REAL rlat(klon) 627 SAVE rlat ! latitude pour chaque point 628 c 629 REAL rlon(klon) 630 SAVE rlon ! longitude pour chaque point 631 c 632 REAL rlonPOS(klon) 633 SAVE rlonPOS ! longitudes > 0. pour chaque point 665 c$OMP THREADPRIVATE(radpas) 666 c 667 REAL,allocatable,save :: radsol(:) 668 c$OMP THREADPRIVATE(radsol) 669 cym SAVE radsol ! bilan radiatif au sol calcule par code radiatif 670 c 671 REAL,allocatable,save :: rlat(:) 672 c$OMP THREADPRIVATE(rlat) 673 cym SAVE rlat ! latitude pour chaque point 674 c 675 REAL,allocatable,save :: rlon(:) 676 c$OMP THREADPRIVATE(rlon) 677 cym SAVE rlon ! longitude pour chaque point 678 679 REAL,SAVE,ALLOCATABLE :: rlonPOS(:) 680 c$OMP THREADPRIVATE(rlonPOS) 681 cym SAVE rlonPOS ! longitudes > 0. pour chaque point 634 682 c 635 683 cc INTEGER iflag_con … … 638 686 INTEGER itap 639 687 SAVE itap ! compteur pour la physique 688 c$OMP THREADPRIVATE(itap) 640 689 c 641 690 REAL co2_ppm_etat0 … … 645 694 real slp(klon) ! sea level pressure 646 695 647 REAL ftsol(klon,nbsrf) 648 SAVE ftsol ! temperature du sol 696 REAL,allocatable,save :: ftsol(:,:) 697 c$OMP THREADPRIVATE(ftsol) 698 cym SAVE ftsol ! temperature du sol 699 649 700 cIM 650 REAL newsst(klon) !temperature de l'ocean 651 SAVE newsst 652 c 653 REAL ftsoil(klon,nsoilmx,nbsrf) 654 SAVE ftsoil ! temperature dans le sol 655 c 656 REAL fevap(klon,nbsrf) 657 SAVE fevap ! evaporation 658 REAL fluxlat(klon,nbsrf) 659 SAVE fluxlat 660 c 661 REAL deltat(klon) 662 SAVE deltat ! ecart avec la SST de reference 663 c 664 REAL fqsurf(klon,nbsrf) 665 SAVE fqsurf ! humidite de l'air au contact de la surface 666 c 667 REAL qsol(klon) 668 SAVE qsol ! hauteur d'eau dans le sol 669 c 670 REAL fsnow(klon,nbsrf) 671 SAVE fsnow ! epaisseur neigeuse 672 c 673 REAL falbe(klon,nbsrf) 674 SAVE falbe ! albedo par type de surface 675 REAL falblw(klon,nbsrf) 676 SAVE falblw ! albedo par type de surface 701 REAL,SAVE,ALLOCATABLE :: newsst(:) !temperature de l'ocean 702 c$OMP THREADPRIVATE(newsst) 703 cym SAVE newsst 704 c 705 REAL,allocatable,save :: ftsoil(:,:,:) 706 c$OMP THREADPRIVATE(ftsoil) 707 cym SAVE ftsoil ! temperature dans le sol 708 c 709 REAL,allocatable,save :: fevap(:,:) 710 c$OMP THREADPRIVATE(fevap) 711 cym SAVE fevap ! evaporation 712 REAL,allocatable,save :: fluxlat(:,:) 713 c$OMP THREADPRIVATE(fluxlat) 714 cym SAVE fluxlat 715 c 716 REAL,allocatable,save :: deltat(:) 717 c$OMP THREADPRIVATE(deltat) 718 cym SAVE deltat ! ecart avec la SST de reference 719 c 720 REAL,allocatable,save :: fqsurf(:,:) 721 c$OMP THREADPRIVATE(fqsurf) 722 cym SAVE fqsurf ! humidite de l'air au contact de la surface 723 c 724 REAL,allocatable,save :: qsol(:) 725 c$OMP THREADPRIVATE(qsol) 726 cym SAVE qsol ! hauteur d'eau dans le sol 727 c 728 REAL,allocatable,save :: fsnow(:,:) 729 c$OMP THREADPRIVATE(fsnow) 730 cym SAVE fsnow ! epaisseur neigeuse 731 c 732 REAL,allocatable,save :: falbe(:,:) 733 c$OMP THREADPRIVATE(falbe) 734 cym SAVE falbe ! albedo par type de surface 735 REAL,allocatable,save :: falblw(:,:) 736 c$OMP THREADPRIVATE(falblw) 737 cym SAVE falblw ! albedo par type de surface 677 738 678 739 c … … 680 741 c Parametres de l'Orographie a l'Echelle Sous-Maille (OESM): 681 742 c 682 REAL zmea(klon) 683 SAVE zmea ! orographie moyenne 684 c 685 REAL zstd(klon) 686 SAVE zstd ! deviation standard de l'OESM 687 c 688 REAL zsig(klon) 689 SAVE zsig ! pente de l'OESM 690 c 691 REAL zgam(klon) 692 save zgam ! anisotropie de l'OESM 693 c 694 REAL zthe(klon) 695 SAVE zthe ! orientation de l'OESM 696 c 697 REAL zpic(klon) 698 SAVE zpic ! Maximum de l'OESM 699 c 700 REAL zval(klon) 701 SAVE zval ! Minimum de l'OESM 702 c 703 REAL rugoro(klon) 704 SAVE rugoro ! longueur de rugosite de l'OESM 743 REAL,allocatable,save :: zmea(:) 744 c$OMP THREADPRIVATE(zmea) 745 cym SAVE zmea ! orographie moyenne 746 c 747 REAL,allocatable,save :: zstd(:) 748 c$OMP THREADPRIVATE(zstd) 749 cym SAVE zstd ! deviation standard de l'OESM 750 c 751 REAL,allocatable,save :: zsig(:) 752 c$OMP THREADPRIVATE(zsig) 753 cym SAVE zsig ! pente de l'OESM 754 c 755 REAL,allocatable,save :: zgam(:) 756 c$OMP THREADPRIVATE(zgam) 757 cym save zgam ! anisotropie de l'OESM 758 c 759 REAL,allocatable,save :: zthe(:) 760 c$OMP THREADPRIVATE(zthe) 761 cym SAVE zthe ! orientation de l'OESM 762 c 763 REAL,allocatable,save :: zpic(:) 764 c$OMP THREADPRIVATE(zpic) 765 cym SAVE zpic ! Maximum de l'OESM 766 c 767 REAL,allocatable,save :: zval(:) 768 c$OMP THREADPRIVATE(zval) 769 cym SAVE zval ! Minimum de l'OESM 770 c 771 REAL,allocatable,save :: rugoro(:) 772 c$OMP THREADPRIVATE(rugoro) 773 cym SAVE rugoro ! longueur de rugosite de l'OESM 705 774 c 706 775 cIM 141004 REAL zulow(klon),zvlow(klon),zustr(klon), zvstr(klon) 707 776 REAL zulow(klon),zvlow(klon) 708 777 c 709 REAL zuthe(klon),zvthe(klon) 710 SAVE zuthe 711 SAVE zvthe 778 REAL,allocatable,save :: zuthe(:),zvthe(:) 779 c$OMP THREADPRIVATE(zuthe,zvthe) 780 cym SAVE zuthe 781 cym SAVE zvthe 712 782 INTEGER igwd,idx(klon),itest(klon) 713 783 c 714 REAL agesno(klon,nbsrf) 715 SAVE agesno ! age de la neige 716 c 717 REAL alb_neig(klon) 718 SAVE alb_neig ! albedo de la neige 719 c 720 REAL run_off_lic_0(klon) 721 SAVE run_off_lic_0 784 REAL,allocatable,save :: agesno(:,:) 785 c$OMP THREADPRIVATE(agesno) 786 cym SAVE agesno ! age de la neige 787 c 788 REAL,allocatable,save :: alb_neig(:) 789 c$OMP THREADPRIVATE(alb_neig) 790 cym SAVE alb_neig ! albedo de la neige 791 c 792 REAL,allocatable,save :: run_off_lic_0(:) 793 c$OMP THREADPRIVATE(run_off_lic_0) 794 cym SAVE run_off_lic_0 722 795 cKE43 723 796 c Variables liees a la convection de K. Emanuel (sb): 724 797 c 725 REAL ema_workcbmf(klon) ! cloud base mass flux 726 SAVE ema_workcbmf 727 728 REAL ema_cbmf(klon) ! cloud base mass flux 729 SAVE ema_cbmf 730 731 REAL ema_pcb(klon) ! cloud base pressure 732 SAVE ema_pcb 733 734 REAL ema_pct(klon) ! cloud top pressure 735 SAVE ema_pct 798 REAL,allocatable,save :: ema_workcbmf(:) ! cloud base mass flux 799 c$OMP THREADPRIVATE(ema_workcbmf) 800 cym SAVE ema_workcbmf 801 802 REAL,allocatable,save :: ema_cbmf(:) ! cloud base mass flux 803 c$OMP THREADPRIVATE(ema_cbmf) 804 cym SAVE ema_cbmf 805 806 REAL,allocatable,save :: ema_pcb(:) ! cloud base pressure 807 c$OMP THREADPRIVATE(ema_pcb) 808 cym SAVE ema_pcb 809 810 REAL,allocatable,save :: ema_pct(:) ! cloud top pressure 811 c$OMP THREADPRIVATE(ema_pct) 812 cym SAVE ema_pct 736 813 737 814 REAL bas, top ! cloud base and top levels 738 815 SAVE bas 739 816 SAVE top 740 741 REAL Ma(klon,klev) ! undilute upward mass flux 742 SAVE Ma 743 REAL qcondc(klon,klev) ! in-cld water content from convect 744 SAVE qcondc 745 REAL ema_work1(klon, klev), ema_work2(klon, klev) 746 SAVE ema_work1, ema_work2 817 c$OMP THREADPRIVATE(bas, top) 818 819 REAL,allocatable,save :: Ma(:,:) ! undilute upward mass flux 820 c$OMP THREADPRIVATE(Ma) 821 cym SAVE Ma 822 REAL,allocatable,save :: qcondc(:,:) ! in-cld water content from convect 823 c$OMP THREADPRIVATE(qcondc) 824 cym SAVE qcondc 825 REAL,allocatable,save :: ema_work1(:, :), ema_work2(:, :) 826 c$OMP THREADPRIVATE(ema_work1,ema_work2) 827 cym SAVE ema_work1, ema_work2 747 828 REAL wdn(klon), tdn(klon), qdn(klon) 748 829 749 REAL wd(klon) ! sb 750 SAVE wd ! sb 830 REAL,allocatable,save :: wd(:) ! sb 831 c$OMP THREADPRIVATE(wd) 832 cym SAVE wd ! sb 751 833 752 834 c Variables locales pour la couche limite (al1): … … 766 848 REAL yu1(klon) ! vents dans la premiere couche U 767 849 REAL yv1(klon) ! vents dans la premiere couche V 768 REAL ffonte(klon,nbsrf) !Flux thermique utilise pour fondre la neige 769 REAL fqcalving(klon,nbsrf) !Flux d'eau "perdue" par la surface 850 REAL,SAVE,ALLOCATABLE :: ffonte(:,:) !Flux thermique utilise pour fondre la neige 851 c$OMP THREAPRIVATE(ffonte) 852 REAL,SAVE,ALLOCATABLE :: fqcalving(:,:) !Flux d'eau "perdu" par la surface 853 c$OMP THREAPRIVATE(fqcalving) 854 REAL,SAVE,ALLOCATABLE :: fqfonte(:,:) !Quantite d'eau de fonte des glaciers 855 c$OMP THREAPRIVATE(fqcalving) 770 856 c !et necessaire pour limiter la 771 857 c !hauteur de neige, en kg/m2/s 772 REAL zxffonte(klon), zxfqcalving(klon) 773 774 c$$$ LOGICAL offline ! Controle du stockage ds "physique" 775 c$$$ PARAMETER (offline=.false.) 776 c$$$ INTEGER physid 777 REAL pfrac_impa(klon,klev)! Produits des coefs lessivage impaction 778 save pfrac_impa 779 REAL pfrac_nucl(klon,klev)! Produits des coefs lessivage nucleation 780 save pfrac_nucl 781 REAL pfrac_1nucl(klon,klev)! Produits des coefs lessi nucl (alpha = 1) 782 save pfrac_1nucl 858 REAL zxffonte(klon), zxfqcalving(klon),zxfqfonte(klon) 859 860 c@$$ LOGICAL offline ! Controle du stockage ds "physique" 861 c@$$ PARAMETER (offline=.false.) 862 c@$$ INTEGER physid 863 REAL,allocatable,save :: pfrac_impa(:,:)! Produits des coefs lessivage impaction 864 c$OMP THREADPRIVATE(pfrac_impa) 865 cym save pfrac_impa 866 REAL,allocatable,save :: pfrac_nucl(:,:)! Produits des coefs lessivage nucleation 867 c$OMP THREADPRIVATE(pfrac_nucl) 868 cym save pfrac_nucl 869 REAL,allocatable,save :: pfrac_1nucl(:,:)! Produits des coefs lessi nucl (alpha = 1) 870 c$OMP THREADPRIVATE(pfrac_1nucl) 871 cym save pfrac_1nucl 783 872 REAL frac_impa(klon,klev) ! fractions d'aerosols lessivees (impaction) 784 873 REAL frac_nucl(klon,klev) ! idem (nucleation) … … 789 878 790 879 cAA 791 REAL rain_fall(klon) ! pluie 792 REAL snow_fall(klon) ! neige 793 save snow_fall, rain_fall 880 REAL,allocatable,save :: rain_fall(:) ! pluie 881 c$OMP THREADPRIVATE(rain_fall) 882 REAL,allocatable,save :: snow_fall(:) ! neige 883 c$OMP THREADPRIVATE(snow_fall) 884 cym save snow_fall, rain_fall 885 794 886 cIM cf FH pour Tiedtke 080604 795 887 REAL rain_tiedtke(klon),snow_tiedtke(klon) 796 888 c 797 REAL total_rain(klon), nday_rain(klon) 798 save nday_rain 799 c 889 890 REAL,allocatable,save :: total_rain(:), nday_rain(:) 891 c$OMP THREADPRIVATE(total_rain,nday_rain) 892 cym save total_rain, nday_rain 893 cIM 050204 END 800 894 REAL evap(klon), devap(klon) ! evaporation et sa derivee 801 895 REAL sens(klon), dsens(klon) ! chaleur sensible et sa derivee 802 REAL dlw(klon) ! derivee infra rouge 896 REAL,allocatable,save :: dlw(:) ! derivee infra rouge 897 c$OMP THREADPRIVATE(dlw) 803 898 cym 804 SAVE dlw899 cym SAVE dlw 805 900 cym 806 901 REAL bils(klon) ! bilan de chaleur au sol … … 809 904 REAL wfbils(klon,nbsrf) ! bilan de chaleur au sol, pour chaque 810 905 C ! type de sous-surface et pondere par la fraction 811 REAL fder(klon) ! Derive de flux (sensible et latente) 812 save fder 906 REAL,allocatable,save :: fder(:) ! Derive de flux (sensible et latente) 907 c$OMP THREADPRIVATE(fder) 908 cym save fder 813 909 REAL ve(klon) ! integr. verticale du transport meri. de l'energie 814 910 REAL vq(klon) ! integr. verticale du transport meri. de l'eau … … 816 912 REAL uq(klon) ! integr. verticale du transport zonal de l'eau 817 913 c 818 REAL frugs(klon,nbsrf) ! longueur de rugosite 819 save frugs 914 REAL,allocatable,save :: frugs(:,:) ! longueur de rugosite 915 c$OMP THREADPRIVATE(frugs) 916 cym save frugs 820 917 REAL zxrugs(klon) ! longueur de rugosite 821 918 c … … 826 923 INTEGER lmt_pas 827 924 SAVE lmt_pas ! frequence de mise a jour 828 REAL pctsrf(klon,nbsrf) 925 c$OMP THREADPRIVATE(lmt_pas) 926 REAL,allocatable,save :: pctsrf(:,:) 927 c$OMP THREADPRIVATE(pctsrf) 829 928 cIM 830 929 REAL pctsrf_new(klon,nbsrf) !pourcentage surfaces issus d'ORCHIDEE 831 REAL paire_ter(klon) !surfaces terre 832 c 833 SAVE pctsrf ! sous-fraction du sol 834 REAL albsol(klon) 835 SAVE albsol ! albedo du sol total 836 REAL albsollw(klon) 837 SAVE albsollw ! albedo du sol total 838 839 REAL wo(klon,klev) 840 SAVE wo ! ozone 930 931 cym REAL paire_ter(klon) !surfaces terre 932 REAL,allocatable,save :: paire_ter(:) !surfaces terre 933 c$OMP THREADPRIVATE(paire_ter) 934 935 cIM 936 cym SAVE pctsrf ! sous-fraction du sol 937 REAL,allocatable,save :: albsol(:) 938 c$OMP THREADPRIVATE(albsol) 939 cym SAVE albsol ! albedo du sol total 940 REAL,allocatable,save :: albsollw(:) 941 c$OMP THREADPRIVATE(albsollw) 942 cym SAVE albsollw ! albedo du sol total 943 944 REAL,allocatable,save :: wo(:,:) 945 c$OMP THREADPRIVATE(wo) 946 cym SAVE wo ! ozone 947 841 948 cIM sorties 842 949 REAL un_jour … … 885 992 c Variables locales 886 993 c 887 real clwcon(klon,klev),rnebcon(klon,klev) 888 real clwcon0(klon,klev),rnebcon0(klon,klev) 889 cIM cf. AM 081204 BEG 890 real clwcon0th(klon,klev),rnebcon0th(klon,klev) 891 cIM cf. AM 081204 END 892 save rnebcon, clwcon 893 994 real,allocatable,save :: clwcon(:,:),rnebcon(:,:) 995 c$OMP THREADPRIVATE(clwcon,rnebcon) 996 real,allocatable,save :: clwcon0(:,:),rnebcon0(:,:) 997 cym save rnebcon, clwcon 998 c$OMP THREADPRIVATE(clwcon0,rnebcon0) 894 999 REAL rhcl(klon,klev) ! humiditi relative ciel clair 895 1000 REAL dialiq(klon,klev) ! eau liquide nuageuse … … 911 1016 REAL zxfluxv(klon, klev) 912 1017 CXXX 913 REAL heat(klon,klev) ! chauffage solaire 914 REAL heat0(klon,klev) ! chauffage solaire ciel clair 915 REAL cool(klon,klev) ! refroidissement infrarouge 916 REAL cool0(klon,klev) ! refroidissement infrarouge ciel clair 917 REAL topsw(klon), toplw(klon), solsw(klon), sollw(klon) 918 real sollwdown(klon) ! downward LW flux at surface 1018 REAL,allocatable,save :: heat(:,:) ! chauffage solaire 1019 c$OMP THREADPRIVATE(heat) 1020 REAL,allocatable,save :: heat0(:,:) ! chauffage solaire ciel clair 1021 c$OMP THREADPRIVATE(heat0) 1022 REAL,allocatable,save :: cool(:,:) ! refroidissement infrarouge 1023 c$OMP THREADPRIVATE(cool) 1024 REAL,allocatable,save :: cool0(:,:) ! refroidissement infrarouge ciel clair 1025 c$OMP THREADPRIVATE(cool0) 1026 REAL,allocatable,save :: topsw(:), toplw(:), solsw(:), sollw(:) 1027 c$OMP THREADPRIVATE(topsw,toplw,solsw,sollw) 1028 real,allocatable,save :: sollwdown(:) ! downward LW flux at surface 1029 c$OMP THREADPRIVATE(sollwdown) 919 1030 cIM BEG 920 real sollwdownclr(klon) ! downward CS LW flux at surface 921 real toplwdown(klon) ! downward CS LW flux at TOA 922 real toplwdownclr(klon) ! downward CS LW flux at TOA 1031 real,allocatable,save :: sollwdownclr(:) ! downward CS LW flux at surface 1032 c$OMP THREADPRIVATE(sollwdownclr) 1033 real,allocatable,save :: toplwdown(:) ! downward CS LW flux at TOA 1034 c$OMP THREADPRIVATE(toplwdown) 1035 real,allocatable,save :: toplwdownclr(:) ! downward CS LW flux at TOA 1036 c$OMP THREADPRIVATE(toplwdownclr) 923 1037 cIM END 924 REAL topsw0(klon), toplw0(klon), solsw0(klon), sollw0(klon) 925 REAL albpla(klon) 1038 REAL,allocatable,save :: topsw0(:),toplw0(:),solsw0(:),sollw0(:) 1039 c$OMP THREADPRIVATE( topsw0,toplw0,solsw0,sollw0) 1040 REAL,allocatable,save :: albpla(:) 1041 c$OMP THREADPRIVATE(albpla) 926 1042 REAL fsollw(klon, nbsrf) ! bilan flux IR pour chaque sous surface 927 1043 REAL fsolsw(klon, nbsrf) ! flux solaire absorb. pour chaque sous surface 928 1044 c Le rayonnement n'est pas calcule tous les pas, il faut donc 929 1045 c sauvegarder les sorties du rayonnement 930 SAVE heat,cool,albpla,topsw,toplw,solsw,sollw,sollwdown931 SAVE sollwdownclr, toplwdown, toplwdownclr932 SAVE topsw0,toplw0,solsw0,sollw0, heat0, cool01046 cym SAVE heat,cool,albpla,topsw,toplw,solsw,sollw,sollwdown 1047 cym SAVE sollwdownclr, toplwdown, toplwdownclr 1048 cym SAVE topsw0,toplw0,solsw0,sollw0, heat0, cool0 933 1049 c 934 1050 INTEGER itaprad 935 1051 SAVE itaprad 1052 c$OMP THREADPRIVATE(itaprad) 936 1053 c 937 1054 REAL conv_q(klon,klev) ! convergence de l'humidite (kg/kg/s) … … 961 1078 c 962 1079 REAL zphi(klon,klev) 963 REAL zx_relief(iim,jjmp1) 964 REAL zx_aire(iim,jjmp1) 1080 cym A voir plus tard !! 1081 cym REAL zx_relief(iim,jjmp1) 1082 cym REAL zx_aire(iim,jjmp1) 965 1083 c 966 1084 cIM cf. AM Variables locales pour la CLA (hbtm2) 967 1085 c 968 REAL pblh(klon, nbsrf) ! Hauteur de couche limite 969 REAL plcl(klon, nbsrf) ! Niveau de condensation de la CLA 970 REAL capCL(klon, nbsrf) ! CAPE de couche limite 971 REAL oliqCL(klon, nbsrf) ! eau_liqu integree de couche limite 972 REAL cteiCL(klon, nbsrf) ! cloud top instab. crit. couche limite 973 REAL pblt(klon, nbsrf) ! T a la Hauteur de couche limite 974 REAL therm(klon, nbsrf) 975 REAL trmb1(klon, nbsrf) ! deep_cape 976 REAL trmb2(klon, nbsrf) ! inhibition 977 REAL trmb3(klon, nbsrf) ! Point Omega 1086 REAL,SAVE,ALLOCATABLE :: pblh(:, :) ! Hauteur de couche limite 1087 c$OMP THREAPRIVATE(pblh) 1088 REAL,SAVE,ALLOCATABLE :: plcl(:, :) ! Niveau de condensation de la CLA 1089 c$OMP THREAPRIVATE(plcl) 1090 REAL,SAVE,ALLOCATABLE :: capCL(:, :) ! CAPE de couche limite 1091 c$OMP THREAPRIVATE(capCL) 1092 REAL,SAVE,ALLOCATABLE :: oliqCL(:, :) ! eau_liqu integree de couche limite 1093 c$OMP THREAPRIVATE(oliqCL) 1094 REAL,SAVE,ALLOCATABLE :: cteiCL(:, :) ! cloud top instab. crit. couche limite 1095 c$OMP THREAPRIVATE(cteiCL) 1096 REAL,SAVE,ALLOCATABLE :: pblt(:, :) ! T a la Hauteur de couche limite 1097 c$OMP THREAPRIVATE(pblt) 1098 REAL,SAVE,ALLOCATABLE :: therm(:, :) 1099 c$OMP TREADPRIVATE(therm) 1100 REAL,SAVE,ALLOCATABLE :: trmb1(:, :) ! deep_cape 1101 c$OMP TREADPRIVATE(trmb1) 1102 REAL,SAVE,ALLOCATABLE :: trmb2(:, :) ! inhibition 1103 c$OMP TREADPRIVATE(trmb2) 1104 REAL,SAVE,ALLOCATABLE :: trmb3(:, :) ! Point Omega 1105 c$OMP TREADPRIVATE(trmb3) 978 1106 c Grdeurs de sorties 979 1107 REAL s_pblh(klon), s_lcl(klon), s_capCL(klon) … … 988 1116 REAL dnwd0(klon,klev) ! unsaturated downdraft mass flux 989 1117 REAL tvp(klon,klev) ! virtual temp of lifted parcel 990 REAL cape(klon) ! CAPE 991 SAVE cape 1118 REAL,allocatable,save :: cape(:) ! CAPE 1119 c$OMP THREADPRIVATE(cape) 1120 cym SAVE cape 992 1121 CHARACTER*40 capemaxcels !max(CAPE) 993 1122 994 REAL pbase(klon) ! cloud base pressure 995 SAVE pbase 996 REAL bbase(klon) ! cloud base buoyancy 997 SAVE bbase 1123 REAL,allocatable,save :: pbase(:) ! cloud base pressure 1124 c$OMP THREADPRIVATE(pbase) 1125 cym SAVE pbase 1126 REAL,allocatable,save :: bbase(:) ! cloud base buoyancy 1127 c$OMP THREADPRIVATE(bbase) 1128 cym SAVE bbase 998 1129 REAL rflag(klon) ! flag fonctionnement de convect 999 1130 INTEGER iflagctrl(klon) ! flag fonctionnement de convect … … 1018 1149 c vdf: couche limite (Vertical DiFfusion) 1019 1150 REAL d_t_con(klon,klev),d_q_con(klon,klev) 1020 REAL d_u_con(klon,klev),d_v_con(klon,klev) 1151 REAL,SAVE,ALLOCATABLE :: d_u_con(:,:),d_v_con(:,:) 1152 c$OMP THREADPRIVATE(d_u_con,d_v_con) 1021 1153 REAL d_t_lsc(klon,klev),d_q_lsc(klon,klev),d_ql_lsc(klon,klev) 1022 1154 REAL d_t_ajs(klon,klev), d_q_ajs(klon,klev) … … 1028 1160 ********************************************************* 1029 1161 * declarations 1030 real zqasc(klon,klev) 1031 save zqasc 1162 real,save,allocatable :: zqasc(:,:) 1163 c$OMP THREADPRIVATE(zqasc) 1164 cym save zqasc 1032 1165 1033 1166 ********************************************************* … … 1041 1174 REAL prfl(klon,klev+1), psfl(klon,klev+1) 1042 1175 c 1043 INTEGER ibas_con(klon), itop_con(klon) 1176 INTEGER,allocatable,save :: ibas_con(:), itop_con(:) 1177 c$OMP THREADPRIVATE(ibas_con,itop_con) 1044 1178 cym 1045 SAVE ibas_con,itop_con1179 cym SAVE ibas_con,itop_con 1046 1180 cym 1047 REAL rain_con(klon), rain_lsc(klon) 1048 REAL snow_con(klon), snow_lsc(klon) 1181 REAL,SAVE,ALLOCATABLE :: rain_con(:) 1182 c$OMP THREADPRIVATE(rain_con) 1183 REAL rain_lsc(klon) 1184 REAL,SAVE,ALLOCATABLE :: snow_con(:) 1185 c$OMP THREADPRIVATE(snow_con) 1186 REAL snow_lsc(klon) 1049 1187 REAL d_ts(klon,nbsrf) 1050 1188 c … … 1058 1196 REAL d_u_oli(klon,klev), d_v_oli(klon,klev) !tendances dues a oro et lif 1059 1197 1060 REAL ratqs(klon,klev),ratqss(klon,klev),ratqsc(klon,klev) 1198 REAL,allocatable,save :: ratqs(:,:) 1199 c$OMP THREADPRIVATE(ratqs) 1200 REAL ratqss(klon,klev),ratqsc(klon,klev) 1061 1201 real ratqsbas,ratqshaut 1062 save ratqsbas,ratqshaut, ratqs 1202 cym save ratqsbas,ratqshaut, ratqs 1203 save ratqsbas,ratqshaut 1204 c$OMP THREADPRIVATE(ratqsbas,ratqshaut) 1063 1205 real zpt_conv(klon,klev) 1064 1206 … … 1068 1210 logical ok_newmicro 1069 1211 save ok_newmicro 1212 c$OMP THREADPRIVATE(ok_newmicro) 1070 1213 save fact_cldcon,facttemps 1214 c$OMP THREADPRIVATE(fact_cldcon,facttemps) 1071 1215 real facteur 1072 1216 1073 1217 integer iflag_cldcon 1074 1218 save iflag_cldcon 1075 1219 c$OMP THREADPRIVATE(iflag_cldcon) 1076 1220 logical ptconv(klon,klev) 1077 1221 cIM cf. AM 081204 BEG … … 1087 1231 integer imin_ins,imax_ins,jmin_ins,jmax_ins 1088 1232 save imin_ins,imax_ins,jmin_ins,jmax_ins 1233 c$OMP THREADPRIVATE(imin_ins,imax_ins,jmin_ins,jmax_ins) 1089 1234 c real lonmin_ins,lonmax_ins,latmin_ins 1090 1235 c s ,latmax_ins … … 1123 1268 REAL tabcntr0( length ) 1124 1269 c 1270 1125 1271 INTEGER ndex2d(iim*jjmp1),ndex3d(iim*jjmp1*klev) 1126 1272 cIM … … 1138 1284 INTEGER ij, imp1jmp1 1139 1285 PARAMETER(imp1jmp1=(iim+1)*jjmp1) 1286 cym A voir plus tard 1140 1287 REAL zx_tmp(imp1jmp1), airedyn(iim+1,jjmp1) 1141 1288 REAL padyn(iim+1,jjmp1,klev+1) … … 1147 1294 cIM 1148 1295 REAL airetot, pi 1149 REAL zm_wo(jjmp1, klev) 1296 cym A voir plus tard 1297 cym REAL zm_wo(jjmp1, klev) 1150 1298 cIM AMIP2 END 1151 1299 c … … 1153 1301 REAL zx_tmp_fi3d(klon,klev) ! variable temporaire pour champs 3D 1154 1302 #ifdef histmthNMC 1155 REAL zx_tmp_NC(iim,jjmp1,nlevSTD) 1303 cym A voir plus tard !!!! 1304 cym REAL zx_tmp_NC(iim,jjmp1,nlevSTD) 1156 1305 REAL zx_tmp_fiNC(klon,nlevSTD) 1157 1306 #endif … … 1164 1313 SAVE nid_day, nid_mth, nid_ins, nid_nmc, nid_day_seri 1165 1314 SAVE nid_ctesGCM 1315 c$OMP THREADPRIVATE(nid_day, nid_mth, nid_ins, nid_nmc, nid_day_seri,nid_ctesGCM) 1166 1316 c 1167 1317 cIM 280405 BEG 1168 1318 INTEGER nid_bilKPins, nid_bilKPave 1169 1319 SAVE nid_bilKPins, nid_bilKPave 1320 c$OMP THREADPRIVATE(nid_bilKPins, nid_bilKPave) 1170 1321 c 1171 1322 REAL ve_lay(klon,klev) ! transport meri. de l'energie a chaque niveau vert. … … 1182 1333 REAL zout_isccp(napisccp) 1183 1334 SAVE zcals, zcalh, zoutj, zout_isccp 1335 c$OMP THREADPRIVATE(zcals, zcalh, zoutj, zout_isccp) 1184 1336 1185 1337 real zjulian 1186 1338 save zjulian 1339 c$OMP THREADPRIVATE(zjulian) 1187 1340 1188 1341 character*20 modname … … 1208 1361 SAVE h_vcol_tot, h_dair_tot, h_qw_tot, h_ql_tot 1209 1362 $ , h_qs_tot, qw_tot, ql_tot, qs_tot , ec_tot 1363 c$OMP THREADPRIVATE(h_vcol_tot, h_dair_tot, h_qw_tot, h_ql_tot, 1364 c$OMP+ h_qs_tot, qw_tot, ql_tot, qs_tot , ec_tot) 1210 1365 REAL d_h_vcol, d_h_dair, d_qt, d_qw, d_ql, d_qs, d_ec 1211 1366 REAL d_h_vcol_phy 1212 1367 REAL fs_bound, fq_bound 1213 1368 SAVE d_h_vcol_phy 1369 c$OMP THREADPRIVATE(d_h_vcol_phy) 1214 1370 REAL zero_v(klon) 1215 1371 CHARACTER*15 ztit 1216 1372 INTEGER ip_ebil ! PRINT level for energy conserv. diag. 1373 SAVE ip_ebil 1374 DATA ip_ebil/0/ 1375 c$OMP THREADPRIVATE(ip_ebil) 1376 INTEGER if_ebil ! level for energy conserv. dignostics 1377 SAVE if_ebil 1378 c$OMP THREADPRIVATE(if_ebil) 1217 1379 c+jld ec_conser 1218 1380 REAL d_t_ec(klon,klev) ! tendance du a la conersion Ec -> E thermique … … 1220 1382 c-jld ec_conser 1221 1383 cIM: t2m, q2m, u10m, v10m et t2mincels, t2maxcels 1222 REAL t2m(klon,nbsrf), q2m(klon,nbsrf) !temperature, humidite a 2m 1223 REAL u10m(klon,nbsrf), v10m(klon,nbsrf) !vents a 10m 1384 REAL,SAVE,ALLOCATABLE :: t2m(:,:), q2m(:,:) !temperature, humidite a 2m 1385 c$OMP THREADPRIVATE(t2m,q2m) 1386 REAL,SAVE,ALLOCATABLE :: u10m(:,:), v10m(:,:) !vents a 10m 1387 c$OMP THREADPRIVATE(u10m,v10m) 1224 1388 REAL zt2m(klon), zq2m(klon) !temp., hum. 2m moyenne s/ 1 maille 1225 1389 REAL zu10m(klon), zv10m(klon) !vents a 10m moyennes s/1 maille … … 1228 1392 cjq Aerosol effects (Johannes Quaas, 27/11/2003) 1229 1393 REAL sulfate(klon, klev) ! SO4 aerosol concentration [ug/m3] 1230 REAL sulfate_pi(klon, klev) ! SO4 aerosol concentration [ug/m3] (pre-industrial value) 1231 SAVE sulfate_pi 1394 REAL,allocatable,save :: sulfate_pi(:,:) ! SO4 aerosol concentration [ug/m3] (pre-industrial value) 1395 c$OMP THREADPRIVATE(sulfate_pi) 1396 cym SAVE sulfate_pi 1232 1397 1233 1398 REAL cldtaupi(klon,klev) ! Cloud optical thickness for pre-industrial (pi) aerosols … … 1239 1404 1240 1405 ! Aerosol optical properties 1241 REAL tau_ae(klon,klev,2), piz_ae(klon,klev,2) 1242 REAL cg_ae(klon,klev,2) 1243 1244 REAL topswad(klon), solswad(klon) ! Aerosol direct effect. 1406 REAL,SAVE,ALLOCATABLE :: tau_ae(:,:,:), piz_ae(:,:,:) 1407 c$OMP THREADPRIVATE(tau_ae,piz_ae) 1408 REAL,SAVE,ALLOCATABLE :: cg_ae(:,:,:) 1409 c$OMP THREADPRIVATE(cg_ae) 1410 1411 REAL,SAVE,ALLOCATABLE :: topswad(:), solswad(:) ! Aerosol direct effect. 1412 c$OMP THREADPRIVATE(topswad,solswad) 1245 1413 ! ok_ade=T -ADE=topswad-topsw 1246 1414 1247 REAL topswai(klon), solswai(klon) ! Aerosol indirect effect. 1415 REAL,SAVE,ALLOCATABLE :: topswai(:), solswai(:) ! Aerosol indirect effect. 1416 c$OMP THREADPRIVATE(topswai(,solswai) 1248 1417 ! ok_aie=T -> 1249 1418 ! ok_ade=T -AIE=topswai-topswad … … 1257 1426 cym 1258 1427 SAVE ok_ade, ok_aie, bl95_b0, bl95_b1 1259 cym 1260 c Anne 1261 SAVE u10m 1262 SAVE v10m 1263 SAVE t2m 1264 SAVE q2m 1265 SAVE ffonte 1266 SAVE fqcalving 1267 SAVE piz_ae 1268 SAVE tau_ae 1269 SAVE cg_ae 1270 SAVE rain_con 1271 SAVE snow_con 1272 SAVE topswai 1273 SAVE topswad 1274 SAVE solswai 1275 SAVE solswad 1276 SAVE d_u_con 1277 SAVE d_v_con 1278 SAVE rnebcon0 1279 SAVE clwcon0 1280 SAVE paire_ter 1281 c SAVE nhistoW 1282 c SAVE histoW 1283 c SAVE anne 20/09/2005 1284 SAVE pblh 1285 SAVE plcl 1286 SAVE capCL 1287 SAVE oliqCL 1288 SAVE cteiCL 1289 SAVE pblt 1290 SAVE therm 1291 SAVE trmb1 1292 SAVE trmb2 1293 SAVE trmb3 1294 1295 c fin Anne 1296 cjq-end 1428 c$OMP THREADPRIVATE(ok_ade, ok_aie, bl95_b0, bl95_b1) 1429 1297 1430 c 1298 1431 c Declaration des constantes et des fonctions thermodynamiques 1299 1432 c 1433 REAL Field_tmp(klon2,klevp1) 1434 LOGICAL,SAVE :: first=.true. 1435 c$OMP THREADPRIVATE(first) 1300 1436 #include "YOMCST.h" 1301 1437 #include "YOETHF.h" … … 1309 1445 c 1310 1446 c====================================================================== 1311 modname = 'physiq' 1447 1448 cym => necessaire pour iflag_con != 2 1449 pmfd(:,:) = 0. 1450 pen_u(:,:) = 0. 1451 pen_d(:,:) = 0. 1452 pde_d(:,:) = 0. 1453 pde_u(:,:) = 0. 1454 aam=0. 1455 torsfc=0. 1456 cym => pour le couple ocean => revoir dans clmain/intersurf 1457 fluxg(:)=0. 1458 fluxo(:)=0. 1459 1460 if (first) then 1461 1462 allocate( t_ancien(klon,klev), q_ancien(klon,klev)) 1463 allocate( q2(klon,klev+1,nbsrf)) 1464 allocate( swdn0(klon,klevp1), swdn(klon,klevp1)) 1465 allocate( swup0(klon,klevp1), swup(klon,klevp1)) 1466 allocate( SWdn200clr(klon), SWdn200(klon)) 1467 allocate( SWup200clr(klon), SWup200(klon)) 1468 allocate( lwdn0(klon,klevp1), lwdn(klon,klevp1)) 1469 allocate( lwup0(klon,klevp1), lwup(klon,klevp1)) 1470 allocate( LWdn200clr(klon), LWdn200(klon)) 1471 allocate( LWup200clr(klon), LWup200(klon)) 1472 allocate( LWdnTOA(klon), LWdnTOAclr(klon)) 1473 allocate( radsol(klon)) 1474 allocate( rlat(klon)) 1475 allocate( rlon(klon)) 1476 allocate( ftsol(klon,nbsrf)) 1477 allocate( ftsoil(klon,nsoilmx,nbsrf)) 1478 allocate( fevap(klon,nbsrf)) 1479 allocate( fluxlat(klon,nbsrf)) 1480 allocate( deltat(klon)) 1481 allocate( fqsurf(klon,nbsrf)) 1482 allocate( qsol(klon)) 1483 allocate( fsnow(klon,nbsrf)) 1484 allocate( falbe(klon,nbsrf)) 1485 allocate( falblw(klon,nbsrf)) 1486 allocate( zmea(klon)) 1487 allocate( zstd(klon)) 1488 allocate( zsig(klon)) 1489 allocate( zgam(klon)) 1490 allocate( zthe(klon)) 1491 allocate( zpic(klon)) 1492 allocate( zval(klon)) 1493 allocate( rugoro(klon)) 1494 allocate( zuthe(klon),zvthe(klon)) 1495 allocate( agesno(klon,nbsrf)) 1496 allocate( alb_neig(klon)) 1497 allocate( run_off_lic_0(klon)) 1498 allocate( ema_workcbmf(klon)) 1499 allocate( ema_cbmf(klon)) 1500 allocate( ema_pcb(klon)) 1501 allocate( ema_pct(klon)) 1502 allocate( Ma(klon,klev) ) 1503 allocate( qcondc(klon,klev)) 1504 allocate( ema_work1(klon, klev), ema_work2(klon, klev)) 1505 allocate( wd(klon) ) 1506 allocate( pfrac_impa(klon,klev)) 1507 allocate( pfrac_nucl(klon,klev)) 1508 allocate( pfrac_1nucl(klon,klev)) 1509 allocate( rain_fall(klon) ) 1510 allocate( snow_fall(klon) ) 1511 allocate( total_rain(klon), nday_rain(klon)) 1512 allocate( dlw(klon) ) 1513 allocate( fder(klon) ) 1514 allocate( frugs(klon,nbsrf) ) 1515 allocate( pctsrf(klon,nbsrf)) 1516 allocate( albsol(klon)) 1517 allocate( albsollw(klon)) 1518 allocate( wo(klon,klev)) 1519 allocate( clwcon(klon,klev),rnebcon(klon,klev)) 1520 allocate( heat(klon,klev) ) 1521 allocate( heat0(klon,klev) ) 1522 allocate( cool(klon,klev) ) 1523 allocate( cool0(klon,klev) ) 1524 allocate( topsw(klon), toplw(klon), solsw(klon), sollw(klon)) 1525 allocate( sollwdown(klon) ) 1526 allocate( sollwdownclr(klon) ) 1527 allocate( toplwdown(klon) ) 1528 allocate( toplwdownclr(klon) ) 1529 allocate( topsw0(klon), toplw0(klon), solsw0(klon), sollw0(klon)) 1530 allocate( albpla(klon)) 1531 allocate( cape(klon) ) 1532 allocate( pbase(klon) ) 1533 allocate( bbase(klon) ) 1534 allocate( ibas_con(klon), itop_con(klon)) 1535 allocate( ratqs(klon,klev)) 1536 allocate( sulfate_pi(klon, klev)) 1537 allocate( paire_ter(klon)) 1538 allocate(tsumSTD(klon,nlevSTD,nout)) 1539 allocate(usumSTD(klon,nlevSTD,nout)) 1540 allocate(vsumSTD(klon,nlevSTD,nout)) 1541 allocate(wsumSTD(klon,nlevSTD,nout)) 1542 allocate(phisumSTD(klon,nlevSTD,nout)) 1543 allocate(qsumSTD(klon,nlevSTD,nout)) 1544 allocate(rhsumSTD(klon,nlevSTD,nout)) 1545 allocate(uvsumSTD(klon,nlevSTD,nout)) 1546 allocate(vqsumSTD(klon,nlevSTD,nout)) 1547 allocate(vTsumSTD(klon,nlevSTD,nout)) 1548 allocate(wqsumSTD(klon,nlevSTD,nout)) 1549 allocate( vphisumSTD(klon,nlevSTD,nout)) 1550 allocate( wTsumSTD(klon,nlevSTD,nout)) 1551 allocate( u2sumSTD(klon,nlevSTD,nout)) 1552 allocate( v2sumSTD(klon,nlevSTD,nout)) 1553 allocate( T2sumSTD(klon,nlevSTD,nout)) 1554 allocate( seed_old(klon,napisccp)) 1555 allocate( pct_ocean(klon,nbregdyn)) 1556 allocate( rlonPOS(klon)) 1557 allocate( newsst(klon)) 1558 allocate( zqasc(klon,klev)) 1559 allocate( therm(klon, nbsrf)) 1560 allocate( rain_con(klon)) 1561 allocate( pblt(klon, nbsrf)) 1562 allocate( t2m(klon,nbsrf), q2m(klon,nbsrf) ) 1563 allocate( u10m(klon,nbsrf), v10m(klon,nbsrf)) 1564 allocate( topswad(klon), solswad(klon)) 1565 allocate( topswai(klon), solswai(klon) ) 1566 allocate( ffonte(klon,nbsrf)) 1567 allocate( fqcalving(klon,nbsrf)) 1568 allocate( fqfonte(klon,nbsrf)) 1569 allocate( pblh(klon, nbsrf)) 1570 allocate( plcl(klon, nbsrf)) 1571 allocate( capCL(klon, nbsrf)) 1572 allocate( oliqCL(klon, nbsrf)) 1573 allocate( cteiCL(klon, nbsrf)) 1574 allocate( trmb1(klon, nbsrf)) 1575 allocate( trmb2(klon, nbsrf)) 1576 allocate( trmb3(klon, nbsrf)) 1577 allocate( clwcon0(klon,klev),rnebcon0(klon,klev)) 1578 allocate( tau_ae(klon,klev,2), piz_ae(klon,klev,2)) 1579 allocate( cg_ae(klon,klev,2)) 1580 allocate( snow_con(klon)) 1581 allocate( tnondef(klon,nlevSTD,nout)) 1582 allocate( d_u_con(klon,klev),d_v_con(klon,klev)) 1583 1584 1585 paire_ter(:)=0. 1586 clwcon(:,:)=0. 1587 rnebcon(:,:)=0. 1588 ratqs(:,:)=0. 1589 run_off_lic_0(:)=0. 1590 sollw(:)=0. 1591 ema_work1(:,:)=0. 1592 ema_work2(:,:)=0. 1593 cym Attention pbase pas initialise dans concvl !!!! 1594 pbase(:)=0 1595 1596 first=.false. 1597 endif 1598 1599 1600 modname = 'physiq' 1312 1601 cIM 1313 1602 IF (ip_ebil_phy.ge.1) THEN … … 1341 1630 ffonte(:,:)=0. 1342 1631 fqcalving(:,:)=0. 1632 fqfonte(:,:)=0. 1343 1633 piz_ae(:,:,:)=0. 1344 1634 tau_ae(:,:,:)=0. … … 1414 1704 . run_off_lic_0) 1415 1705 1706 DO i=1,klon 1707 IF ( abs( pctsrf(i, is_ter) + pctsrf(i, is_lic) + 1708 $ pctsrf(i, is_oce) + pctsrf(i, is_sic) - 1.) .GT. EPSFRA) 1709 $ THEN 1710 WRITE(*,*) 'physiq : pb sous surface au point ', i, 1711 $ pctsrf(i, 1 : nbsrf) 1712 ENDIF 1713 ENDDO 1714 1416 1715 c ATTENTION : il faudra a terme relire q2 dans l'etat initial 1417 1716 q2(:,:,:)=1.e-8 … … 1644 1943 c 1645 1944 #ifdef INCA 1945 call VTe(VTphysiq) 1946 call VTb(VTinca) 1646 1947 iii = MOD(NINT(xjour),360) 1647 1948 calday = FLOAT(iii) + gmtime … … 1666 1967 WRITE(lunout,*) 'OK.' 1667 1968 #endif 1969 call VTe(VTinca) 1970 call VTb(VTphysiq) 1668 1971 #endif 1669 1972 c … … 1903 2206 DO nsrf = 1, nbsrf 1904 2207 DO i = 1, klon 1905 c $$$ fsollw(i,nsrf) = sollwdown(i) - RSIGMA*ftsol(i,nsrf)**41906 c $$$ fsollw(i,nsrf) = sollw(i)2208 c@$$ fsollw(i,nsrf) = sollwdown(i) - RSIGMA*ftsol(i,nsrf)**4 2209 c@$$ fsollw(i,nsrf) = sollw(i) 1907 2210 fsollw(i,nsrf) = sollw(i) 1908 2211 $ + 4.0*RSIGMA*ztsol(i)**3 * (ztsol(i)-ftsol(i,nsrf)) … … 1910 2213 ENDDO 1911 2214 ENDDO 1912 2215 2216 cYM !!!!!!!!!!!!!!!!!!!!!!!!!!!! 2217 cYM Attention verrue 2218 cYM ---> A supprimer plus tard 2219 cYM pour etre integre dans 2220 cYM ORCHIDEE 2221 DO i = 1, klon 2222 sollwdown(i)=sollw(i)+RSIGMA*ztsol(i)**4 2223 ENDDO 2224 cYM !!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2225 1913 2226 fder = dlw 1914 2227 2228 if (mydebug) then 2229 call writefield_phy('u_seri',u_seri,llm) 2230 call writefield_phy('v_seri',v_seri,llm) 2231 call writefield_phy('t_seri',t_seri,llm) 2232 call writefield_phy('q_seri',q_seri,llm) 2233 endif 2234 1915 2235 IF (check) THEN 1916 2236 amn=MIN(tslab(1),1000.) … … 1944 2264 s pblh,capCL,oliqCL,cteiCL,pblT, 1945 2265 s therm,trmb1,trmb2,trmb3,plcl, 1946 s fqcalving, f fonte, run_off_lic_0,2266 s fqcalving, fqfonte,ffonte, run_off_lic_0, 1947 2267 cIM "slab" ocean 1948 2268 s fluxo, fluxg, tslab, seaice) … … 1986 2306 ENDDO 1987 2307 ENDDO 2308 2309 if (mydebug) then 2310 call writefield_phy('u_seri',u_seri,llm) 2311 call writefield_phy('v_seri',v_seri,llm) 2312 call writefield_phy('t_seri',t_seri,llm) 2313 call writefield_phy('q_seri',q_seri,llm) 2314 endif 2315 2316 1988 2317 cIM 1989 2318 IF (ip_ebil_phy.ge.2) THEN … … 2013 2342 zxffonte(i) = 0.0 2014 2343 zxfqcalving(i) = 0.0 2344 zxfqfonte(i) = 0.0 2015 2345 cIM cf. AM 081204 BEG 2016 2346 c … … 2054 2384 zxfqcalving(i) = zxfqcalving(i) + 2055 2385 . fqcalving(i,nsrf)*pctsrf(i,nsrf) 2386 zxfqfonte(i) = zxfqfonte(i) + 2387 . fqfonte(i,nsrf)*pctsrf(i,nsrf) 2056 2388 cIM cf. AM 081204 BEG 2057 2389 s_pblh(i) = s_pblh(i) + pblh(i,nsrf)*pctsrf(i,nsrf) … … 2092 2424 ffonte(i,nsrf) = zxffonte(i) 2093 2425 fqcalving(i,nsrf) = zxfqcalving(i) 2426 fqfonte(i,nsrf) = zxfqfonte(i) 2094 2427 pblh(i,nsrf)=s_pblh(i) 2095 2428 plcl(i,nsrf)=s_lcl(i) … … 2206 2539 ENDIF ! ok_cvl 2207 2540 2541 c 2542 c Correction precip 2543 rain_con = rain_con * cvl_corr 2544 snow_con = snow_con * cvl_corr 2545 c 2546 2208 2547 IF (.NOT. ok_gust) THEN 2209 2548 do i = 1, klon … … 2267 2606 ENDDO 2268 2607 ENDDO 2608 2609 if (mydebug) then 2610 call writefield_phy('u_seri',u_seri,llm) 2611 call writefield_phy('v_seri',v_seri,llm) 2612 call writefield_phy('t_seri',t_seri,llm) 2613 call writefield_phy('q_seri',q_seri,llm) 2614 endif 2615 2269 2616 cIM 2270 2617 IF (ip_ebil_phy.ge.2) THEN … … 2467 2814 s , fs_bound, fq_bound ) 2468 2815 END IF 2816 2817 if (mydebug) then 2818 call writefield_phy('u_seri',u_seri,llm) 2819 call writefield_phy('v_seri',v_seri,llm) 2820 call writefield_phy('t_seri',t_seri,llm) 2821 call writefield_phy('q_seri',q_seri,llm) 2822 endif 2823 2469 2824 c 2470 2825 c------------------------------------------------------------------- … … 2515 2870 ELSE IF (iflag_cldcon.eq.3) THEN 2516 2871 c On prend pour les nuages convectifs le max du calcul de la 2517 c convection et du calcul du pas de temps pr écédent diminuéd'un facteur2872 c convection et du calcul du pas de temps pr��ent diminu�d'un facteur 2518 2873 c facttemps 2519 2874 c facttemps=pdtphys/1.e4 … … 2665 3020 2666 3021 #ifdef INCA 3022 call VTe(VTphysiq) 3023 call VTb(VTinca) 2667 3024 calday = FLOAT(julien) + gmtime 2668 3025 … … 2722 3079 WRITE(lunout,*)'OK.' 2723 3080 #endif 3081 call VTe(VTinca) 3082 call VTb(VTphysiq) 2724 3083 #endif 2725 3084 c … … 2760 3119 . + falblw(i,is_sic) * pctsrf(i,is_sic) 2761 3120 ENDDO 3121 3122 if (mydebug) then 3123 call writefield_phy('u_seri',u_seri,llm) 3124 call writefield_phy('v_seri',v_seri,llm) 3125 call writefield_phy('t_seri',t_seri,llm) 3126 call writefield_phy('q_seri',q_seri,llm) 3127 endif 3128 2762 3129 CALL radlwsw ! nouveau rayonnement (compatible Arpege-IFS) 2763 3130 e (dist, rmu0, fract, … … 2788 3155 ENDDO 2789 3156 ENDDO 3157 c 3158 if (mydebug) then 3159 call writefield_phy('u_seri',u_seri,llm) 3160 call writefield_phy('v_seri',v_seri,llm) 3161 call writefield_phy('t_seri',t_seri,llm) 3162 call writefield_phy('q_seri',q_seri,llm) 3163 endif 3164 2790 3165 cIM 2791 3166 IF (ip_ebil_phy.ge.2) THEN … … 2875 3250 ENDIF ! fin de test sur ok_orodr 2876 3251 c 3252 if (mydebug) then 3253 call writefield_phy('u_seri',u_seri,llm) 3254 call writefield_phy('v_seri',v_seri,llm) 3255 call writefield_phy('t_seri',t_seri,llm) 3256 call writefield_phy('q_seri',q_seri,llm) 3257 endif 3258 2877 3259 IF (ok_orolf) THEN 2878 3260 c … … 2910 3292 C STRESS NECESSAIRES: TOUTE LA PHYSIQUE 2911 3293 3294 if (mydebug) then 3295 call writefield_phy('u_seri',u_seri,llm) 3296 call writefield_phy('v_seri',v_seri,llm) 3297 call writefield_phy('t_seri',t_seri,llm) 3298 call writefield_phy('q_seri',q_seri,llm) 3299 endif 3300 2912 3301 DO i = 1, klon 2913 3302 zustrph(i)=0. … … 2925 3314 cIM calcul composantes axiales du moment angulaire et couple des montagnes 2926 3315 c 2927 CALL aaam_bud (27,klon,klev,rjourvrai,gmtime, 2928 C ra,rg,romega, 2929 C rlat,rlon,pphis, 2930 C zustrdr,zustrli,zustrph, 2931 C zvstrdr,zvstrli,zvstrph, 2932 C paprs,u,v, 2933 C aam, torsfc) 3316 IF (monocpu) THEN 3317 3318 CALL aaam_bud (27,klon,klev,rjourvrai,gmtime, 3319 C ra,rg,romega, 3320 C rlat,rlon,pphis, 3321 C zustrdr,zustrli,zustrph, 3322 C zvstrdr,zvstrli,zvstrph, 3323 C paprs,u,v, 3324 C aam, torsfc) 3325 ENDIF 2934 3326 cIM cf. FLott END 2935 3327 cIM … … 3096 3488 c 3097 3489 #ifdef INCA 3490 call VTe(VTphysiq) 3491 call VTb(VTinca) 3098 3492 #ifdef INCAINFO 3099 3493 WRITE(lunout,*)'Appel CHEMHOOK_END ...' … … 3106 3500 $ nbtr, 3107 3501 $ paprs, 3108 #ifdef INCA_CH43109 3502 $ q_seri, 3110 #endif3111 3503 $ annee_ref, 3112 3504 $ day_ini, … … 3115 3507 $ pphi, 3116 3508 $ pphis, 3117 $ zx_rh, 3118 $ qx(1,1,1)) 3509 $ zx_rh) 3119 3510 #else 3120 3511 $ xjour) … … 3123 3514 WRITE(lunout,*)'OK.' 3124 3515 #endif 3516 call VTe(VTinca) 3517 call VTb(VTphysiq) 3125 3518 #endif 3126 3519 … … 3129 3522 c Convertir les incrementations en tendances 3130 3523 c 3524 if (mydebug) then 3525 call writefield_phy('u_seri',u_seri,llm) 3526 call writefield_phy('v_seri',v_seri,llm) 3527 call writefield_phy('t_seri',t_seri,llm) 3528 call writefield_phy('q_seri',q_seri,llm) 3529 endif 3530 3131 3531 DO k = 1, klev 3132 3532 DO i = 1, klon
Note: See TracChangeset
for help on using the changeset viewer.