Changeset 967 for LMDZ4/trunk
- Timestamp:
- Jun 11, 2008, 1:14:41 PM (16 years ago)
- Location:
- LMDZ4/trunk/libf/phylmd
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk/libf/phylmd/conf_phys.F90
r963 r967 16 16 17 17 use IOIPSL 18 !!!! USE surface_data, ONLY : ocean, ok_veget 19 18 20 implicit none 19 21 -
LMDZ4/trunk/libf/phylmd/phyetat0.F
r956 r967 4 4 c 5 5 c 6 SUBROUTINE phyetat0 (fichnom,dtime,co2_ppm_etat0,solaire_etat0, 7 . rlat_p, rlon_p, pctsrf_p, tsol_p, 8 . ocean_in, ok_veget_in, 9 . alb1_p, alb2_p, 10 . rain_fall_p, snow_fall_p,solsw_p, sollw_p, 11 . radsol_p,clesphy0, 12 . zmea_p,zstd_p,zsig_p,zgam_p,zthe_p,zpic_p,zval_p, 13 . rugsrel_p,tabcntr0, 14 . t_ancien_p,q_ancien_p,ancien_ok_p, rnebcon_p, ratqs_p, 15 . clwcon_p,pbl_tke_p, zmax0_p, f0_p, 16 . ema_work1_p, ema_work2_p) 6 SUBROUTINE phyetat0 (fichnom, 7 . clesphy0, 8 . tabcntr0) 17 9 18 10 USE dimphy … … 26 18 USE pbl_surface_mod, ONLY : pbl_surface_init 27 19 USE surface_data, ONLY : ocean, ok_veget 20 USE phys_state_var_mod 28 21 29 22 IMPLICIT none … … 42 35 c====================================================================== 43 36 CHARACTER*(*) fichnom 44 REAL dtime 45 INTEGER radpas 46 REAL rlat_p(klon), rlon_p(klon) 47 REAL co2_ppm_etat0 48 REAL solaire_etat0 49 REAL tsol_p(klon,nbsrf) 50 REAL pbl_tke_p(klon,klev,nbsrf) 51 REAL zmax0_p(klon), f0_p(klon) 52 REAL ema_work1_p(klon,klev), ema_work2_p(klon,klev) 37 38 c les variables globales lues dans le fichier restart 39 REAL rlat_glo(klon_glo), rlon_glo(klon_glo) 40 REAL pctsrf_glo(klon_glo, nbsrf) 41 REAL tsol_glo(klon_glo,nbsrf) 42 REAL alb1_glo(klon_glo,nbsrf) 43 REAL alb2_glo(klon_glo,nbsrf) 44 REAL rain_fall_glo(klon_glo) 45 REAL snow_fall_glo(klon_glo) 46 real solsw_glo(klon_glo) 47 real sollw_glo(klon_glo) 48 REAL radsol_glo(klon_glo) 49 REAL zmea_glo(klon_glo) 50 REAL zstd_glo(klon_glo) 51 REAL zsig_glo(klon_glo) 52 REAL zgam_glo(klon_glo) 53 REAL zthe_glo(klon_glo) 54 REAL zpic_glo(klon_glo) 55 REAL zval_glo(klon_glo) 56 REAL rugsrel_glo(klon_glo) 57 REAL t_ancien_glo(klon_glo,klev), q_ancien_glo(klon_glo,klev) 58 REAL clwcon_glo(klon_glo,klev) 59 REAL rnebcon_glo(klon_glo,klev) 60 REAL ratqs_glo(klon_glo,klev) 61 REAL pbl_tke_glo(klon_glo,klev,nbsrf) 62 REAL zmax0_glo(klon_glo), f0_glo(klon) 63 REAL ema_work1_glo(klon_glo, klev), ema_work2_glo(klon_glo, klev) 64 53 65 REAL tsoil_p(klon,nsoilmx,nbsrf) 54 66 REAL tslab_p(klon), seaice_p(klon) … … 56 68 REAL qsol_p(klon) 57 69 REAL snow_p(klon,nbsrf) 58 REAL alb1_p(klon,nbsrf) ! albedo in visible SW interval59 REAL alb2_p(klon,nbsrf) ! albedo in near IR interval60 70 REAL evap_p(klon,nbsrf) 61 REAL radsol_p(klon)62 REAL rain_fall_p(klon)63 REAL snow_fall_p(klon)64 REAL sollw_p(klon)65 real solsw_p(klon)66 71 real fder_p(klon) 67 72 REAL frugs_p(klon,nbsrf) 68 73 REAL agesno_p(klon,nbsrf) 69 REAL zmea_p(klon)70 REAL zstd_p(klon)71 REAL zsig_p(klon)72 REAL zgam_p(klon)73 REAL zthe_p(klon)74 REAL zpic_p(klon)75 REAL zval_p(klon)76 REAL rugsrel_p(klon)77 REAL pctsrf_p(klon, nbsrf)78 74 REAL run_off_lic_0_p(klon) 79 75 80 REAL t_ancien_p(klon,klev), q_ancien_p(klon,klev) 81 real rnebcon_p(klon,klev),clwcon_p(klon,klev) 82 real ratqs_p(klon,klev) 83 LOGICAL,SAVE :: ancien_ok 84 LOGICAL :: ancien_ok_p 85 76 LOGICAL,SAVE :: ancien_ok_glo 77 !$OMP THREADPRIVATE(ancien_ok_glo) 78 86 79 REAL zmasq_glo(klon_glo) 87 REAL rlat(klon_glo), rlon(klon_glo)88 REAL tsol(klon_glo,nbsrf)89 REAL pbl_tke(klon_glo,klev,nbsrf)90 REAL zmax0(klon), f0(klon)91 REAL ema_work1(klon,klev), ema_work2(klon,klev)92 80 REAL tsoil(klon_glo,nsoilmx,nbsrf) 93 81 cIM "slab" ocean … … 96 84 REAL qsol(klon_glo) 97 85 REAL snow(klon_glo,nbsrf) 98 REAL alb1(klon_glo,nbsrf)99 REAL alb2(klon_glo,nbsrf)100 86 REAL evap(klon_glo,nbsrf) 101 REAL radsol(klon_glo)102 REAL rain_fall(klon_glo)103 REAL snow_fall(klon_glo)104 REAL sollw(klon_glo)105 real solsw(klon_glo)106 87 real fder(klon_glo) 107 88 REAL frugs(klon_glo,nbsrf) 108 89 REAL agesno(klon_glo,nbsrf) 109 REAL zmea(klon_glo)110 REAL zstd(klon_glo)111 REAL zsig(klon_glo)112 REAL zgam(klon_glo)113 REAL zthe(klon_glo)114 REAL zpic(klon_glo)115 REAL zval(klon_glo)116 REAL rugsrel(klon_glo)117 REAL pctsrf(klon_glo, nbsrf)118 90 REAL fractint(klon_glo) 119 91 REAL run_off_lic_0(klon_glo) 120 REAL t_ancien(klon_glo,klev)121 REAL q_ancien(klon_glo,klev)122 real rnebcon(klon_glo,klev)123 real clwcon(klon_glo,klev)124 real ratqs(klon_glo,klev)125 92 126 93 CHARACTER*6 ocean_in … … 270 237 ENDIF 271 238 #ifdef NC_DOUBLE 272 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rlat )273 #else 274 ierr = NF_GET_VAR_REAL(nid, nvarid, rlat )239 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rlat_glo) 240 #else 241 ierr = NF_GET_VAR_REAL(nid, nvarid, rlat_glo) 275 242 #endif 276 243 IF (ierr.NE.NF_NOERR) THEN … … 288 255 ENDIF 289 256 #ifdef NC_DOUBLE 290 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rlon )291 #else 292 ierr = NF_GET_VAR_REAL(nid, nvarid, rlon )257 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rlon_glo) 258 #else 259 ierr = NF_GET_VAR_REAL(nid, nvarid, rlon_glo) 293 260 #endif 294 261 IF (ierr.NE.NF_NOERR) THEN … … 332 299 #ifdef NC_DOUBLE 333 300 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, 334 . pctsrf (1 : klon_glo,is_ter))301 . pctsrf_glo(1 : klon_glo,is_ter)) 335 302 #else 336 303 ierr = NF_GET_VAR_REAL(nid, nvarid, 337 . pctsrf (1 : klon_glo,is_ter))304 . pctsrf_glo(1 : klon_glo,is_ter)) 338 305 #endif 339 306 IF (ierr.NE.NF_NOERR) THEN … … 353 320 #ifdef NC_DOUBLE 354 321 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, 355 . pctsrf (1 : klon_glo,is_lic))322 . pctsrf_glo(1 : klon_glo,is_lic)) 356 323 #else 357 324 ierr = NF_GET_VAR_REAL(nid, nvarid, 358 . pctsrf (1 : klon_glo,is_lic))325 . pctsrf_glo(1 : klon_glo,is_lic)) 359 326 #endif 360 327 IF (ierr.NE.NF_NOERR) THEN … … 373 340 #ifdef NC_DOUBLE 374 341 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, 375 . pctsrf (1 : klon_glo,is_oce))342 . pctsrf_glo(1 : klon_glo,is_oce)) 376 343 #else 377 344 ierr = NF_GET_VAR_REAL(nid, nvarid, 378 . pctsrf (1 : klon_glo,is_oce))345 . pctsrf_glo(1 : klon_glo,is_oce)) 379 346 #endif 380 347 IF (ierr.NE.NF_NOERR) THEN … … 394 361 #ifdef NC_DOUBLE 395 362 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, 396 . pctsrf (1 : klon_glo,is_sic))363 . pctsrf_glo(1 : klon_glo,is_sic)) 397 364 #else 398 365 ierr = NF_GET_VAR_REAL(nid, nvarid, 399 . pctsrf (1 : klon_glo, is_sic))366 . pctsrf_glo(1 : klon_glo, is_sic)) 400 367 #endif 401 368 IF (ierr.NE.NF_NOERR) THEN … … 411 378 C Verification de l'adequation entre le masque et les sous-surfaces 412 379 C 413 fractint( 1 : klon_glo) = pctsrf (1 : klon_glo, is_ter)414 $ + pctsrf (1 : klon_glo, is_lic)380 fractint( 1 : klon_glo) = pctsrf_glo(1 : klon_glo, is_ter) 381 $ + pctsrf_glo(1 : klon_glo, is_lic) 415 382 DO i = 1 , klon_glo 416 383 IF ( abs(fractint(i) - zmasq_glo(i) ) .GT. EPSFRA ) THEN 417 384 WRITE(*,*) 'phyetat0: attention fraction terre pas ', 418 $ 'coherente ', i, zmasq_glo(i), pctsrf (i, is_ter)419 $ ,pctsrf (i, is_lic)385 $ 'coherente ', i, zmasq_glo(i), pctsrf_glo(i, is_ter) 386 $ ,pctsrf_glo(i, is_lic) 420 387 ENDIF 421 388 END DO 422 fractint (1 : klon_glo) = pctsrf (1 : klon_glo, is_oce)423 $ + pctsrf (1 : klon_glo, is_sic)389 fractint (1 : klon_glo) = pctsrf_glo(1 : klon_glo, is_oce) 390 $ + pctsrf_glo(1 : klon_glo, is_sic) 424 391 DO i = 1 , klon_glo 425 392 IF ( abs( fractint(i) - (1. - zmasq_glo(i))) .GT. EPSFRA ) THEN 426 393 WRITE(*,*) 'phyetat0 attention fraction ocean pas ', 427 $ 'coherente ', i, zmasq_glo(i) , pctsrf (i, is_oce)428 $ ,pctsrf (i, is_sic)394 $ 'coherente ', i, zmasq_glo(i) , pctsrf_glo(i, is_oce) 395 $ ,pctsrf_glo(i, is_sic) 429 396 ENDIF 430 397 END DO … … 450 417 ENDIF 451 418 #ifdef NC_DOUBLE 452 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tsol (1,nsrf))453 #else 454 ierr = NF_GET_VAR_REAL(nid, nvarid, tsol (1,nsrf))419 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tsol_glo(1,nsrf)) 420 #else 421 ierr = NF_GET_VAR_REAL(nid, nvarid, tsol_glo(1,nsrf)) 455 422 #endif 456 423 IF (ierr.NE.NF_NOERR) THEN … … 462 429 xmax = -1.0E+20 463 430 DO i = 1, klon_glo 464 xmin = MIN(tsol (i,nsrf),xmin)465 xmax = MAX(tsol (i,nsrf),xmax)431 xmin = MIN(tsol_glo(i,nsrf),xmin) 432 xmax = MAX(tsol_glo(i,nsrf),xmax) 466 433 ENDDO 467 434 PRINT*,'Temperature du sol TS**:', nsrf, xmin, xmax … … 471 438 PRINT*, ' J ignore donc les autres temperatures TS**' 472 439 #ifdef NC_DOUBLE 473 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tsol (1,1))474 #else 475 ierr = NF_GET_VAR_REAL(nid, nvarid, tsol (1,1))440 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, tsol_glo(1,1)) 441 #else 442 ierr = NF_GET_VAR_REAL(nid, nvarid, tsol_glo(1,1)) 476 443 #endif 477 444 IF (ierr.NE.NF_NOERR) THEN … … 482 449 xmax = -1.0E+20 483 450 DO i = 1, klon_glo 484 xmin = MIN(tsol (i,1),xmin)485 xmax = MAX(tsol (i,1),xmax)451 xmin = MIN(tsol_glo(i,1),xmin) 452 xmax = MAX(tsol_glo(i,1),xmax) 486 453 ENDDO 487 454 PRINT*,'Temperature du sol <TS>', xmin, xmax 488 455 DO nsrf = 2, nbsrf 489 456 DO i = 1, klon_glo 490 tsol (i,nsrf) = tsol(i,1)457 tsol_glo(i,nsrf) = tsol_glo(i,1) 491 458 ENDDO 492 459 ENDDO … … 508 475 PRINT*, " Il prend donc la valeur de surface" 509 476 DO i=1, klon_glo 510 tsoil(i,isoil,nsrf)=tsol (i,nsrf)477 tsoil(i,isoil,nsrf)=tsol_glo(i,nsrf) 511 478 ENDDO 512 479 ELSE … … 745 712 ENDIF 746 713 #ifdef NC_DOUBLE 747 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, alb1 (1,nsrf))748 #else 749 ierr = NF_GET_VAR_REAL(nid, nvarid, alb1 (1,nsrf))714 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, alb1_glo(1,nsrf)) 715 #else 716 ierr = NF_GET_VAR_REAL(nid, nvarid, alb1_glo(1,nsrf)) 750 717 #endif 751 718 IF (ierr.NE.NF_NOERR) THEN … … 756 723 xmax = -1.0E+20 757 724 DO i = 1, klon_glo 758 xmin = MIN(alb1 (i,nsrf),xmin)759 xmax = MAX(alb1 (i,nsrf),xmax)725 xmin = MIN(alb1_glo(i,nsrf),xmin) 726 xmax = MAX(alb1_glo(i,nsrf),xmax) 760 727 ENDDO 761 728 PRINT*,'Albedo du sol ALBE**:', nsrf, xmin, xmax … … 765 732 PRINT*, ' J ignore donc les autres ALBE**' 766 733 #ifdef NC_DOUBLE 767 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, alb1 (1,1))768 #else 769 ierr = NF_GET_VAR_REAL(nid, nvarid, alb1 (1,1))734 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, alb1_glo(1,1)) 735 #else 736 ierr = NF_GET_VAR_REAL(nid, nvarid, alb1_glo(1,1)) 770 737 #endif 771 738 IF (ierr.NE.NF_NOERR) THEN … … 776 743 xmax = -1.0E+20 777 744 DO i = 1, klon_glo 778 xmin = MIN(alb1 (i,1),xmin)779 xmax = MAX(alb1 (i,1),xmax)745 xmin = MIN(alb1_glo(i,1),xmin) 746 xmax = MAX(alb1_glo(i,1),xmax) 780 747 ENDDO 781 748 PRINT*,'Neige du sol <ALBE>', xmin, xmax 782 749 DO nsrf = 2, nbsrf 783 750 DO i = 1, klon_glo 784 alb1 (i,nsrf) = alb1(i,1)751 alb1_glo(i,nsrf) = alb1_glo(i,1) 785 752 ENDDO 786 753 ENDDO … … 797 764 DO nsrf = 1, nbsrf 798 765 DO i = 1, klon_glo 799 alb2 (i,nsrf) = alb1(i,nsrf)766 alb2_glo(i,nsrf) = alb1_glo(i,nsrf) 800 767 ENDDO 801 768 ENDDO … … 804 771 PRINT*, ' J ignore donc les autres ALBLW**' 805 772 #ifdef NC_DOUBLE 806 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, alb2 (1,1))807 #else 808 ierr = NF_GET_VAR_REAL(nid, nvarid, alb2 (1,1))773 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, alb2_glo(1,1)) 774 #else 775 ierr = NF_GET_VAR_REAL(nid, nvarid, alb2_glo(1,1)) 809 776 #endif 810 777 IF (ierr.NE.NF_NOERR) THEN … … 815 782 xmax = -1.0E+20 816 783 DO i = 1, klon_glo 817 xmin = MIN(alb2 (i,1),xmin)818 xmax = MAX(alb2 (i,1),xmax)784 xmin = MIN(alb2_glo(i,1),xmin) 785 xmax = MAX(alb2_glo(i,1),xmax) 819 786 ENDDO 820 787 PRINT*,'Neige du sol <ALBLW>', xmin, xmax 821 788 DO nsrf = 2, nbsrf 822 789 DO i = 1, klon_glo 823 alb2 (i,nsrf) = alb2(i,1)790 alb2_glo(i,nsrf) = alb2_glo(i,1) 824 791 ENDDO 825 792 ENDDO … … 894 861 ENDIF 895 862 #ifdef NC_DOUBLE 896 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rain_fall )897 #else 898 ierr = NF_GET_VAR_REAL(nid, nvarid, rain_fall )863 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rain_fall_glo) 864 #else 865 ierr = NF_GET_VAR_REAL(nid, nvarid, rain_fall_glo) 899 866 #endif 900 867 IF (ierr.NE.NF_NOERR) THEN … … 905 872 xmax = -1.0E+20 906 873 DO i = 1, klon_glo 907 xmin = MIN(rain_fall (i),xmin)908 xmax = MAX(rain_fall (i),xmax)874 xmin = MIN(rain_fall_glo(i),xmin) 875 xmax = MAX(rain_fall_glo(i),xmax) 909 876 ENDDO 910 877 PRINT*,'Precipitation liquide rain_f:', xmin, xmax … … 918 885 ENDIF 919 886 #ifdef NC_DOUBLE 920 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, snow_fall )921 #else 922 ierr = NF_GET_VAR_REAL(nid, nvarid, snow_fall )887 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, snow_fall_glo) 888 #else 889 ierr = NF_GET_VAR_REAL(nid, nvarid, snow_fall_glo) 923 890 #endif 924 891 IF (ierr.NE.NF_NOERR) THEN … … 929 896 xmax = -1.0E+20 930 897 DO i = 1, klon_glo 931 xmin = MIN(snow_fall (i),xmin)932 xmax = MAX(snow_fall (i),xmax)898 xmin = MIN(snow_fall_glo(i),xmin) 899 xmax = MAX(snow_fall_glo(i),xmax) 933 900 ENDDO 934 901 PRINT*,'Precipitation solide snow_f:', xmin, xmax … … 943 910 ELSE 944 911 #ifdef NC_DOUBLE 945 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, solsw )946 #else 947 ierr = NF_GET_VAR_REAL(nid, nvarid, solsw )912 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, solsw_glo) 913 #else 914 ierr = NF_GET_VAR_REAL(nid, nvarid, solsw_glo) 948 915 #endif 949 916 IF (ierr.NE.NF_NOERR) THEN … … 955 922 xmax = -1.0E+20 956 923 DO i = 1, klon_glo 957 xmin = MIN(solsw (i),xmin)958 xmax = MAX(solsw (i),xmax)924 xmin = MIN(solsw_glo(i),xmin) 925 xmax = MAX(solsw_glo(i),xmax) 959 926 ENDDO 960 927 PRINT*,'Rayonnement solaire au sol solsw:', xmin, xmax … … 969 936 ELSE 970 937 #ifdef NC_DOUBLE 971 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, sollw )972 #else 973 ierr = NF_GET_VAR_REAL(nid, nvarid, sollw )938 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, sollw_glo) 939 #else 940 ierr = NF_GET_VAR_REAL(nid, nvarid, sollw_glo) 974 941 #endif 975 942 IF (ierr.NE.NF_NOERR) THEN … … 981 948 xmax = -1.0E+20 982 949 DO i = 1, klon_glo 983 xmin = MIN(sollw (i),xmin)984 xmax = MAX(sollw (i),xmax)950 xmin = MIN(sollw_glo(i),xmin) 951 xmax = MAX(sollw_glo(i),xmax) 985 952 ENDDO 986 953 PRINT*,'Rayonnement IF au sol sollw:', xmin, xmax … … 1028 995 ENDIF 1029 996 #ifdef NC_DOUBLE 1030 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, radsol )1031 #else 1032 ierr = NF_GET_VAR_REAL(nid, nvarid, radsol )997 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, radsol_glo) 998 #else 999 ierr = NF_GET_VAR_REAL(nid, nvarid, radsol_glo) 1033 1000 #endif 1034 1001 IF (ierr.NE.NF_NOERR) THEN … … 1039 1006 xmax = -1.0E+20 1040 1007 DO i = 1, klon_glo 1041 xmin = MIN(radsol (i),xmin)1042 xmax = MAX(radsol (i),xmax)1008 xmin = MIN(radsol_glo(i),xmin) 1009 xmax = MAX(radsol_glo(i),xmax) 1043 1010 ENDDO 1044 1011 PRINT*,'Rayonnement net au sol radsol:', xmin, xmax … … 1173 1140 ENDIF 1174 1141 #ifdef NC_DOUBLE 1175 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zmea )1176 #else 1177 ierr = NF_GET_VAR_REAL(nid, nvarid, zmea )1142 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zmea_glo) 1143 #else 1144 ierr = NF_GET_VAR_REAL(nid, nvarid, zmea_glo) 1178 1145 #endif 1179 1146 IF (ierr.NE.NF_NOERR) THEN … … 1184 1151 xmax = -1.0E+20 1185 1152 DO i = 1, klon_glo 1186 xmin = MIN(zmea (i),xmin)1187 xmax = MAX(zmea (i),xmax)1153 xmin = MIN(zmea_glo(i),xmin) 1154 xmax = MAX(zmea_glo(i),xmax) 1188 1155 ENDDO 1189 1156 PRINT*,'OROGRAPHIE SOUS-MAILLE zmea:', xmin, xmax … … 1196 1163 ENDIF 1197 1164 #ifdef NC_DOUBLE 1198 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zstd )1199 #else 1200 ierr = NF_GET_VAR_REAL(nid, nvarid, zstd )1165 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zstd_glo) 1166 #else 1167 ierr = NF_GET_VAR_REAL(nid, nvarid, zstd_glo) 1201 1168 #endif 1202 1169 IF (ierr.NE.NF_NOERR) THEN … … 1207 1174 xmax = -1.0E+20 1208 1175 DO i = 1, klon_glo 1209 xmin = MIN(zstd (i),xmin)1210 xmax = MAX(zstd (i),xmax)1176 xmin = MIN(zstd_glo(i),xmin) 1177 xmax = MAX(zstd_glo(i),xmax) 1211 1178 ENDDO 1212 1179 PRINT*,'OROGRAPHIE SOUS-MAILLE zstd:', xmin, xmax … … 1219 1186 ENDIF 1220 1187 #ifdef NC_DOUBLE 1221 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zsig )1222 #else 1223 ierr = NF_GET_VAR_REAL(nid, nvarid, zsig )1188 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zsig_glo) 1189 #else 1190 ierr = NF_GET_VAR_REAL(nid, nvarid, zsig_glo) 1224 1191 #endif 1225 1192 IF (ierr.NE.NF_NOERR) THEN … … 1230 1197 xmax = -1.0E+20 1231 1198 DO i = 1, klon_glo 1232 xmin = MIN(zsig (i),xmin)1233 xmax = MAX(zsig (i),xmax)1199 xmin = MIN(zsig_glo(i),xmin) 1200 xmax = MAX(zsig_glo(i),xmax) 1234 1201 ENDDO 1235 1202 PRINT*,'OROGRAPHIE SOUS-MAILLE zsig:', xmin, xmax … … 1242 1209 ENDIF 1243 1210 #ifdef NC_DOUBLE 1244 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zgam )1245 #else 1246 ierr = NF_GET_VAR_REAL(nid, nvarid, zgam )1211 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zgam_glo) 1212 #else 1213 ierr = NF_GET_VAR_REAL(nid, nvarid, zgam_glo) 1247 1214 #endif 1248 1215 IF (ierr.NE.NF_NOERR) THEN … … 1253 1220 xmax = -1.0E+20 1254 1221 DO i = 1, klon_glo 1255 xmin = MIN(zgam (i),xmin)1256 xmax = MAX(zgam (i),xmax)1222 xmin = MIN(zgam_glo(i),xmin) 1223 xmax = MAX(zgam_glo(i),xmax) 1257 1224 ENDDO 1258 1225 PRINT*,'OROGRAPHIE SOUS-MAILLE zgam:', xmin, xmax … … 1265 1232 ENDIF 1266 1233 #ifdef NC_DOUBLE 1267 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zthe )1268 #else 1269 ierr = NF_GET_VAR_REAL(nid, nvarid, zthe )1234 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zthe_glo) 1235 #else 1236 ierr = NF_GET_VAR_REAL(nid, nvarid, zthe_glo) 1270 1237 #endif 1271 1238 IF (ierr.NE.NF_NOERR) THEN … … 1276 1243 xmax = -1.0E+20 1277 1244 DO i = 1, klon_glo 1278 xmin = MIN(zthe (i),xmin)1279 xmax = MAX(zthe (i),xmax)1245 xmin = MIN(zthe_glo(i),xmin) 1246 xmax = MAX(zthe_glo(i),xmax) 1280 1247 ENDDO 1281 1248 PRINT*,'OROGRAPHIE SOUS-MAILLE zthe:', xmin, xmax … … 1288 1255 ENDIF 1289 1256 #ifdef NC_DOUBLE 1290 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zpic )1291 #else 1292 ierr = NF_GET_VAR_REAL(nid, nvarid, zpic )1257 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zpic_glo) 1258 #else 1259 ierr = NF_GET_VAR_REAL(nid, nvarid, zpic_glo) 1293 1260 #endif 1294 1261 IF (ierr.NE.NF_NOERR) THEN … … 1299 1266 xmax = -1.0E+20 1300 1267 DO i = 1, klon_glo 1301 xmin = MIN(zpic (i),xmin)1302 xmax = MAX(zpic (i),xmax)1268 xmin = MIN(zpic_glo(i),xmin) 1269 xmax = MAX(zpic_glo(i),xmax) 1303 1270 ENDDO 1304 1271 PRINT*,'OROGRAPHIE SOUS-MAILLE zpic:', xmin, xmax … … 1310 1277 ENDIF 1311 1278 #ifdef NC_DOUBLE 1312 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zval )1313 #else 1314 ierr = NF_GET_VAR_REAL(nid, nvarid, zval )1279 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zval_glo) 1280 #else 1281 ierr = NF_GET_VAR_REAL(nid, nvarid, zval_glo) 1315 1282 #endif 1316 1283 IF (ierr.NE.NF_NOERR) THEN … … 1321 1288 xmax = -1.0E+20 1322 1289 DO i = 1, klon_glo 1323 xmin = MIN(zval (i),xmin)1324 xmax = MAX(zval (i),xmax)1290 xmin = MIN(zval_glo(i),xmin) 1291 xmax = MAX(zval_glo(i),xmax) 1325 1292 ENDDO 1326 1293 PRINT*,'OROGRAPHIE SOUS-MAILLE zval:', xmin, xmax … … 1333 1300 ENDIF 1334 1301 #ifdef NC_DOUBLE 1335 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rugsrel )1336 #else 1337 ierr = NF_GET_VAR_REAL(nid, nvarid, rugsrel )1302 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rugsrel_glo) 1303 #else 1304 ierr = NF_GET_VAR_REAL(nid, nvarid, rugsrel_glo) 1338 1305 #endif 1339 1306 IF (ierr.NE.NF_NOERR) THEN … … 1344 1311 xmax = -1.0E+20 1345 1312 DO i = 1, klon_glo 1346 xmin = MIN(rugsrel (i),xmin)1347 xmax = MAX(rugsrel (i),xmax)1313 xmin = MIN(rugsrel_glo(i),xmin) 1314 xmax = MAX(rugsrel_glo(i),xmax) 1348 1315 ENDDO 1349 1316 PRINT*,'Rugosite relief (ecart-type) rugsrel:', xmin, xmax 1350 1317 c 1351 1318 c 1352 ancien_ok = .TRUE.1319 ancien_ok_glo = .TRUE. 1353 1320 c 1354 1321 ierr = NF_INQ_VARID (nid, "TANCIEN", nvarid) … … 1356 1323 PRINT*, "phyetat0: Le champ <TANCIEN> est absent" 1357 1324 PRINT*, "Depart legerement fausse. Mais je continue" 1358 ancien_ok = .FALSE.1359 ELSE 1360 #ifdef NC_DOUBLE 1361 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, t_ancien )1362 #else 1363 ierr = NF_GET_VAR_REAL(nid, nvarid, t_ancien )1325 ancien_ok_glo = .FALSE. 1326 ELSE 1327 #ifdef NC_DOUBLE 1328 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, t_ancien_glo) 1329 #else 1330 ierr = NF_GET_VAR_REAL(nid, nvarid, t_ancien_glo) 1364 1331 #endif 1365 1332 IF (ierr.NE.NF_NOERR) THEN … … 1373 1340 PRINT*, "phyetat0: Le champ <QANCIEN> est absent" 1374 1341 PRINT*, "Depart legerement fausse. Mais je continue" 1375 ancien_ok = .FALSE.1376 ELSE 1377 #ifdef NC_DOUBLE 1378 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, q_ancien )1379 #else 1380 ierr = NF_GET_VAR_REAL(nid, nvarid, q_ancien )1342 ancien_ok_glo = .FALSE. 1343 ELSE 1344 #ifdef NC_DOUBLE 1345 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, q_ancien_glo) 1346 #else 1347 ierr = NF_GET_VAR_REAL(nid, nvarid, q_ancien_glo) 1381 1348 #endif 1382 1349 IF (ierr.NE.NF_NOERR) THEN … … 1394 1361 ELSE 1395 1362 #ifdef NC_DOUBLE 1396 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, clwcon )1397 #else 1398 ierr = NF_GET_VAR_REAL(nid, nvarid, clwcon )1363 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, clwcon_glo) 1364 #else 1365 ierr = NF_GET_VAR_REAL(nid, nvarid, clwcon_glo) 1399 1366 #endif 1400 1367 IF (ierr.NE.NF_NOERR) THEN … … 1417 1384 ELSE 1418 1385 #ifdef NC_DOUBLE 1419 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rnebcon )1420 #else 1421 ierr = NF_GET_VAR_REAL(nid, nvarid, rnebcon )1386 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, rnebcon_glo) 1387 #else 1388 ierr = NF_GET_VAR_REAL(nid, nvarid, rnebcon_glo) 1422 1389 #endif 1423 1390 IF (ierr.NE.NF_NOERR) THEN … … 1443 1410 ELSE 1444 1411 #ifdef NC_DOUBLE 1445 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, ratqs )1446 #else 1447 ierr = NF_GET_VAR_REAL(nid, nvarid, ratqs )1412 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, ratqs_glo) 1413 #else 1414 ierr = NF_GET_VAR_REAL(nid, nvarid, ratqs_glo) 1448 1415 #endif 1449 1416 IF (ierr.NE.NF_NOERR) THEN … … 1498 1465 IF (ierr.NE.NF_NOERR) THEN 1499 1466 PRINT*, "WARNING phyetat0: <TKE"//str2//"> est absent" 1500 pbl_tke (:,:,nsrf)=1.e-81467 pbl_tke_glo(:,:,nsrf)=1.e-8 1501 1468 ELSE 1502 1469 #ifdef NC_DOUBLE 1503 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, pbl_tke(1,1,nsrf)) 1504 #else 1505 ierr = NF_GET_VAR_REAL(nid, nvarid, pbl_tke(1,1,nsrf)) 1470 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, 1471 & pbl_tke_glo(1,1,nsrf)) 1472 #else 1473 ierr = NF_GET_VAR_REAL(nid, nvarid, pbl_tke_glo(1,1,nsrf)) 1506 1474 #endif 1507 1475 IF (ierr.NE.NF_NOERR) THEN … … 1515 1483 DO k = 1, klev 1516 1484 DO i = 1, klon_glo 1517 xmin = MIN(pbl_tke (i,k,nsrf),xmin)1518 xmax = MAX(pbl_tke (i,k,nsrf),xmax)1485 xmin = MIN(pbl_tke_glo(i,k,nsrf),xmin) 1486 xmax = MAX(pbl_tke_glo(i,k,nsrf),xmax) 1519 1487 ENDDO 1520 1488 ENDDO … … 1531 1499 ELSE 1532 1500 #ifdef NC_DOUBLE 1533 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zmax0 )1534 #else 1535 ierr = NF_GET_VAR_REAL(nid, nvarid, zmax0 )1501 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zmax0_glo) 1502 #else 1503 ierr = NF_GET_VAR_REAL(nid, nvarid, zmax0_glo) 1536 1504 #endif 1537 1505 IF (ierr.NE.NF_NOERR) THEN … … 1555 1523 ELSE 1556 1524 #ifdef NC_DOUBLE 1557 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, f0 )1558 #else 1559 ierr = NF_GET_VAR_REAL(nid, nvarid, f0 )1525 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, f0_glo) 1526 #else 1527 ierr = NF_GET_VAR_REAL(nid, nvarid, f0_glo) 1560 1528 #endif 1561 1529 IF (ierr.NE.NF_NOERR) THEN … … 1576 1544 PRINT*, "phyetat0: Le champ <EMA_WORK1> est absent" 1577 1545 PRINT*, "Depart legerement fausse. Mais je continue" 1578 ema_work1 =0.1579 ELSE 1580 #ifdef NC_DOUBLE 1581 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, ema_work1 )1582 #else 1583 ierr = NF_GET_VAR_REAL(nid, nvarid, ema_work1 )1546 ema_work1_glo=0. 1547 ELSE 1548 #ifdef NC_DOUBLE 1549 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, ema_work1_glo) 1550 #else 1551 ierr = NF_GET_VAR_REAL(nid, nvarid, ema_work1_glo) 1584 1552 #endif 1585 1553 IF (ierr.NE.NF_NOERR) THEN … … 1591 1559 DO k = 1, klev 1592 1560 DO i = 1, klon 1593 xmin = MIN(ema_work1 (i,k),xmin)1594 xmax = MAX(ema_work1 (i,k),xmax)1561 xmin = MIN(ema_work1_glo(i,k),xmin) 1562 xmax = MAX(ema_work1_glo(i,k),xmax) 1595 1563 ENDDO 1596 1564 ENDDO … … 1604 1572 PRINT*, "phyetat0: Le champ <EMA_WORK2> est absent" 1605 1573 PRINT*, "Depart legerement fausse. Mais je continue" 1606 ema_work2 =0.1607 ELSE 1608 #ifdef NC_DOUBLE 1609 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, ema_work2 )1610 #else 1611 ierr = NF_GET_VAR_REAL(nid, nvarid, ema_work2 )1574 ema_work2_glo=0. 1575 ELSE 1576 #ifdef NC_DOUBLE 1577 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, ema_work2_glo) 1578 #else 1579 ierr = NF_GET_VAR_REAL(nid, nvarid, ema_work2_glo) 1612 1580 #endif 1613 1581 IF (ierr.NE.NF_NOERR) THEN … … 1619 1587 DO k = 1, klev 1620 1588 DO i = 1, klon 1621 xmin = MIN(ema_work2 (i,k),xmin)1622 xmax = MAX(ema_work2 (i,k),xmax)1589 xmin = MIN(ema_work2_glo(i,k),xmin) 1590 xmax = MAX(ema_work2_glo(i,k),xmax) 1623 1591 ENDDO 1624 1592 ENDDO … … 1639 1607 !FH1D 1640 1608 !iolat(jjm+1)=rlat(klon_glo) 1641 iolat(jjm+1-1/iim)=rlat (klon_glo)1609 iolat(jjm+1-1/iim)=rlat_glo(klon_glo) 1642 1610 if (iim.gt.1) then 1643 1611 do i=2,jjm 1644 iolat(i)=rlat (2+(i-2)*iim)1612 iolat(i)=rlat_glo(2+(i-2)*iim) 1645 1613 enddo 1646 1614 endif … … 1651 1619 !FH1D 1652 1620 ! call init_iophy(iolat,rlon(2:iim+1)) 1653 call init_iophy(iolat,rlon (2-1/iim:iim+1-1/iim))1621 call init_iophy(iolat,rlon_glo(2-1/iim:iim+1-1/iim)) 1654 1622 1655 1623 c$OMP END MASTER 1656 1624 1657 call Scatter( rlat ,rlat_p)1658 call Scatter( rlon ,rlon_p)1659 call Scatter( tsol ,tsol_p)1625 call Scatter( rlat_glo,rlat) 1626 call Scatter( rlon_glo,rlon) 1627 call Scatter( tsol_glo,ftsol) 1660 1628 IF (iflag_pbl>1) then 1661 call Scatter( pbl_tke ,pbl_tke_p)1629 call Scatter( pbl_tke_glo,pbl_tke) 1662 1630 endif 1663 call Scatter( zmax0 ,zmax0_p)1664 call Scatter( f0 ,f0_p)1665 call Scatter( ema_work1 , ema_work1_p)1666 call Scatter( ema_work2 , ema_work2_p)1631 call Scatter( zmax0_glo,zmax0) 1632 call Scatter( f0_glo,f0) 1633 call Scatter( ema_work1_glo, ema_work1) 1634 call Scatter( ema_work2_glo, ema_work2) 1667 1635 call Scatter( tsoil,tsoil_p) 1668 1636 call Scatter( tslab,tslab_p) … … 1671 1639 call Scatter( qsol,qsol_p) 1672 1640 call Scatter( snow,snow_p) 1673 call Scatter( alb1 ,alb1_p)1674 call Scatter( alb2 ,alb2_p)1641 call Scatter( alb1_glo,falb1) 1642 call Scatter( alb2_glo,falb2) 1675 1643 call Scatter( evap,evap_p) 1676 call Scatter( radsol ,radsol_p)1677 call Scatter( rain_fall ,rain_fall_p)1678 call Scatter( snow_fall ,snow_fall_p)1679 call Scatter( sollw ,sollw_p)1680 call Scatter( solsw ,solsw_p)1644 call Scatter( radsol_glo,radsol) 1645 call Scatter( rain_fall_glo,rain_fall) 1646 call Scatter( snow_fall_glo,snow_fall) 1647 call Scatter( sollw_glo,sollw) 1648 call Scatter( solsw_glo,solsw) 1681 1649 call Scatter( fder,fder_p) 1682 1650 call Scatter( frugs,frugs_p) 1683 1651 call Scatter( agesno,agesno_p) 1684 call Scatter( zmea ,zmea_p)1685 call Scatter( zstd ,zstd_p)1686 call Scatter( zsig ,zsig_p)1687 call Scatter( zgam ,zgam_p)1688 call Scatter( zthe ,zthe_p)1689 call Scatter( zpic ,zpic_p)1690 call Scatter( zval ,zval_p)1691 call Scatter( rugsrel ,rugsrel_p)1692 call Scatter( pctsrf ,pctsrf_p)1693 call Scatter( run_off_lic_0,run_off_lic_0 _p)1694 call Scatter( t_ancien ,t_ancien_p)1695 call Scatter( q_ancien ,q_ancien_p)1696 call Scatter( rnebcon ,rnebcon_p)1697 call Scatter( clwcon ,clwcon_p)1698 call Scatter( ratqs ,ratqs_p)1652 call Scatter( zmea_glo,zmea) 1653 call Scatter( zstd_glo,zstd) 1654 call Scatter( zsig_glo,zsig) 1655 call Scatter( zgam_glo,zgam) 1656 call Scatter( zthe_glo,zthe) 1657 call Scatter( zpic_glo,zpic) 1658 call Scatter( zval_glo,zval) 1659 call Scatter( rugsrel_glo,rugoro) 1660 call Scatter( pctsrf_glo,pctsrf) 1661 call Scatter( run_off_lic_0,run_off_lic_0) 1662 call Scatter( t_ancien_glo,t_ancien) 1663 call Scatter( q_ancien_glo,q_ancien) 1664 call Scatter( rnebcon_glo,rnebcon) 1665 call Scatter( clwcon_glo,clwcon) 1666 call Scatter( ratqs_glo,ratqs) 1699 1667 call Scatter( zmasq_glo,zmasq) 1700 1668 … … 1713 1681 IF ( ocean == 'slab' ) THEN 1714 1682 c initilalize module ocean_slab_init 1715 CALL ocean_slab_init(dtime, tslab_p, seaice_p, pctsrf _p)1683 CALL ocean_slab_init(dtime, tslab_p, seaice_p, pctsrf) 1716 1684 ELSEIF ( ocean == 'couple' ) THEN 1717 1685 c initilalize module ocean_cpl_init 1718 CALL ocean_cpl_init(dtime, rlon _p, rlat_p)1686 CALL ocean_cpl_init(dtime, rlon, rlat) 1719 1687 ELSE 1720 1688 c initilalize module ocean_forced_init -
LMDZ4/trunk/libf/phylmd/phyredem.F
r937 r967 3 3 ! 4 4 c 5 SUBROUTINE phyredem (fichnom,dtime,radpas,ocean, 6 . rlat_p,rlon_p, pctsrf_p,tsol_p, 7 . alb1_p, alb2_p, 8 . rain_fall_p, snow_fall_p,solsw_p, sollw_p, 9 . radsol_p,zmea_p,zstd_p,zsig_p, 10 . zgam_p,zthe_p,zpic_p,zval_p,rugsrel_p, 11 . t_ancien_p, q_ancien_p, rnebcon_p, ratqs_p, clwcon_p, 12 . pbl_tke_p, zmax0_p, f0_p, ema_work1_p, ema_work2_p) 5 SUBROUTINE phyredem (fichnom) 13 6 14 7 USE dimphy … … 18 11 USE fonte_neige_mod, ONLY : fonte_neige_final 19 12 USE pbl_surface_mod, ONLY : pbl_surface_final 13 USE surface_data, ONLY : ocean, ok_veget 14 USE phys_state_var_mod 20 15 21 16 IMPLICIT none … … 34 29 c====================================================================== 35 30 CHARACTER*(*) fichnom 36 REAL dtime 37 INTEGER radpas 38 REAL rlat_p(klon), rlon_p(klon) 39 REAL tsol_p(klon,nbsrf) 40 REAL pbl_tke_p(klon,klev,nbsrf) 41 REAL zmax0_p(klon), f0_p(klon) 42 REAL ema_work1_p(klon, klev), ema_work2_p(klon, klev) 31 32 c les variables globales ecrites dans le fichier restart 33 REAL rlat_glo(klon_glo), rlon_glo(klon_glo) 34 REAL pctsrf_glo(klon_glo, nbsrf) 35 REAL tsol_glo(klon_glo,nbsrf) 36 REAL alb1_glo(klon_glo,nbsrf) 37 REAL alb2_glo(klon_glo,nbsrf) 38 REAL rain_fall_glo(klon_glo) 39 REAL snow_fall_glo(klon_glo) 40 real solsw_glo(klon_glo) 41 real sollw_glo(klon_glo) 42 REAL radsol_glo(klon_glo) 43 REAL zmea_glo(klon_glo) 44 REAL zstd_glo(klon_glo) 45 REAL zsig_glo(klon_glo) 46 REAL zgam_glo(klon_glo) 47 REAL zthe_glo(klon_glo) 48 REAL zpic_glo(klon_glo) 49 REAL zval_glo(klon_glo) 50 REAL rugsrel_glo(klon_glo) 51 REAL t_ancien_glo(klon_glo,klev), q_ancien_glo(klon_glo,klev) 52 REAL clwcon_glo(klon_glo,klev) 53 REAL rnebcon_glo(klon_glo,klev) 54 REAL ratqs_glo(klon_glo,klev) 55 REAL pbl_tke_glo(klon_glo,klev,nbsrf) 56 REAL zmax0_glo(klon_glo), f0_glo(klon) 57 REAL ema_work1_glo(klon_glo, klev), ema_work2_glo(klon_glo, klev) 58 59 cIM "slab" ocean 43 60 REAL tsoil_p(klon,nsoilmx,nbsrf) 44 CHARACTER*6 ocean45 cIM "slab" ocean46 61 REAL tslab_p(klon), seaice_p(klon) 47 62 REAL qsurf_p(klon,nbsrf) 48 63 REAL qsol_p(klon) 49 64 REAL snow_p(klon,nbsrf) 50 REAL alb1_p(klon,nbsrf) ! albedo in visible SW interval51 REAL alb2_p(klon,nbsrf) ! albedo in near IR interval52 65 REAL evap_p(klon,nbsrf) 53 REAL rain_fall_p(klon)54 REAL snow_fall_p(klon)55 real solsw_p(klon)56 real sollw_p(klon)57 66 real fder_p(klon) 58 REAL radsol_p(klon)59 67 REAL frugs_p(klon,nbsrf) 60 68 REAL agesno_p(klon,nbsrf) 61 REAL zmea_p(klon)62 REAL zstd_p(klon)63 REAL zsig_p(klon)64 REAL zgam_p(klon)65 REAL zthe_p(klon)66 REAL zpic_p(klon)67 REAL zval_p(klon)68 REAL rugsrel_p(klon)69 REAL pctsrf_p(klon, nbsrf)70 REAL t_ancien_p(klon,klev), q_ancien_p(klon,klev)71 real clwcon_p(klon,klev),rnebcon_p(klon,klev),ratqs_p(klon,klev)72 69 REAL run_off_lic_0_p(klon) 73 70 74 REAL rlat(klon_glo), rlon(klon_glo)75 REAL tsol(klon_glo,nbsrf)76 REAL pbl_tke(klon_glo,klev,nbsrf)77 REAL zmax0(klon_glo), f0(klon)78 REAL ema_work1(klon, klev), ema_work2(klon, klev)79 71 REAL tsoil(klon_glo,nsoilmx,nbsrf) 80 72 REAL tslab(klon_glo), seaice(klon_glo) … … 82 74 REAL qsol(klon_glo) 83 75 REAL snow(klon_glo,nbsrf) 84 REAL alb1(klon_glo,nbsrf)85 REAL alb2(klon_glo,nbsrf)86 76 REAL evap(klon_glo,nbsrf) 87 REAL rain_fall(klon_glo)88 REAL snow_fall(klon_glo)89 real solsw(klon_glo)90 real sollw(klon_glo)91 77 real fder(klon_glo) 92 REAL radsol(klon_glo)93 78 REAL frugs(klon_glo,nbsrf) 94 79 REAL agesno(klon_glo,nbsrf) 95 REAL zmea(klon_glo)96 REAL zstd(klon_glo)97 REAL zsig(klon_glo)98 REAL zgam(klon_glo)99 REAL zthe(klon_glo)100 REAL zpic(klon_glo)101 REAL zval(klon_glo)102 REAL rugsrel(klon_glo)103 REAL pctsrf(klon_glo, nbsrf)104 REAL t_ancien(klon_glo,klev), q_ancien(klon_glo,klev)105 REAL clwcon(klon_glo,klev)106 REAL rnebcon(klon_glo,klev)107 REAL ratqs(klon_glo,klev)108 80 REAL run_off_lic_0(klon_glo) 109 81 REAL masq(klon_glo) … … 116 88 c 117 89 INTEGER isoil, nsrf 118 CHARACTER *7str7119 CHARACTER *2str290 CHARACTER (len=7) :: str7 91 CHARACTER (len=2) :: str2 120 92 121 93 c====================================================================== … … 139 111 c====================================================================== 140 112 141 call Gather( rlat_p,rlat) 142 call Gather( rlon_p,rlon) 143 call Gather( tsol_p,tsol) 144 call Gather( pbl_tke_p,pbl_tke) 145 call Gather( zmax0_p,zmax0) 146 call Gather( f0_p,f0) 147 call Gather( ema_work1_p, ema_work1) 148 call Gather( ema_work2_p, ema_work2) 113 call Gather( rlat,rlat_glo) 114 call Gather( rlon,rlon_glo) 115 call Gather( pctsrf,pctsrf_glo) 116 call Gather( ftsol,tsol_glo) 117 call Gather( falb1,alb1_glo) 118 call Gather( falb2,alb2_glo) 119 call Gather( rain_fall,rain_fall_glo) 120 call Gather( snow_fall,snow_fall_glo) 121 call Gather( sollw,sollw_glo) 122 call Gather( solsw,solsw_glo) 123 call Gather( radsol,radsol_glo) 124 call Gather( zmea,zmea_glo) 125 call Gather( zstd,zstd_glo) 126 call Gather( zsig,zsig_glo) 127 call Gather( zgam,zgam_glo) 128 call Gather( zthe,zthe_glo) 129 call Gather( zpic,zpic_glo) 130 call Gather( zval,zval_glo) 131 call Gather( rugoro,rugsrel_glo) 132 call Gather( t_ancien,t_ancien_glo) 133 call Gather( q_ancien,q_ancien_glo) 134 call Gather( clwcon,clwcon_glo) 135 call Gather( rnebcon,rnebcon_glo) 136 call Gather( ratqs,ratqs_glo) 137 call Gather( pbl_tke,pbl_tke_glo) 138 call Gather( zmax0,zmax0_glo) 139 call Gather( f0,f0_glo) 140 call Gather( ema_work1, ema_work1_glo) 141 call Gather( ema_work2, ema_work2_glo) 142 149 143 call Gather( tsoil_p,tsoil) 150 144 call Gather( tslab_p,tslab) … … 153 147 call Gather( qsol_p,qsol) 154 148 call Gather( snow_p,snow) 155 call Gather( alb1_p,alb1)156 call Gather( alb2_p,alb2)157 149 call Gather( evap_p,evap) 158 call Gather( radsol_p,radsol)159 call Gather( rain_fall_p,rain_fall)160 call Gather( snow_fall_p,snow_fall)161 call Gather( sollw_p,sollw)162 call Gather( solsw_p,solsw)163 150 call Gather( fder_p,fder) 164 151 call Gather( frugs_p,frugs) 165 152 call Gather( agesno_p,agesno) 166 call Gather( zmea_p,zmea)167 call Gather( zstd_p,zstd)168 call Gather( zsig_p,zsig)169 call Gather( zgam_p,zgam)170 call Gather( zthe_p,zthe)171 call Gather( zpic_p,zpic)172 call Gather( zval_p,zval)173 call Gather( rugsrel_p,rugsrel)174 call Gather( pctsrf_p,pctsrf)175 153 call Gather( run_off_lic_0_p,run_off_lic_0) 176 call Gather( t_ancien_p,t_ancien)177 call Gather( q_ancien_p,q_ancien)178 call Gather( rnebcon_p,rnebcon)179 call Gather( clwcon_p,clwcon)180 call Gather( ratqs_p,ratqs)181 154 call Gather( zmasq,masq) 182 155 … … 245 218 ierr = NF_ENDDEF(nid) 246 219 #ifdef NC_DOUBLE 247 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlon )248 #else 249 ierr = NF_PUT_VAR_REAL (nid,nvarid,rlon )220 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlon_glo) 221 #else 222 ierr = NF_PUT_VAR_REAL (nid,nvarid,rlon_glo) 250 223 #endif 251 224 c … … 260 233 ierr = NF_ENDDEF(nid) 261 234 #ifdef NC_DOUBLE 262 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlat )263 #else 264 ierr = NF_PUT_VAR_REAL (nid,nvarid,rlat )235 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rlat_glo) 236 #else 237 ierr = NF_PUT_VAR_REAL (nid,nvarid,rlat_glo) 265 238 #endif 266 239 c … … 295 268 ierr = NF_ENDDEF(nid) 296 269 #ifdef NC_DOUBLE 297 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon_glo, is_ter)) 298 #else 299 ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon_glo, is_ter)) 270 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf_glo(1 : klon_glo, & 271 & is_ter)) 272 #else 273 ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf_glo(1 : klon_glo, & 274 & is_ter)) 300 275 #endif 301 276 C … … 312 287 ierr = NF_ENDDEF(nid) 313 288 #ifdef NC_DOUBLE 314 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon_glo,is_lic)) 315 #else 316 ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon_glo, is_lic)) 289 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf_glo(1 : klon_glo, 290 & is_lic)) 291 #else 292 ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf_glo(1 : klon_glo, 293 & is_lic)) 317 294 #endif 318 295 C … … 329 306 ierr = NF_ENDDEF(nid) 330 307 #ifdef NC_DOUBLE 331 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon_glo, is_oce)) 332 #else 333 ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon_glo, is_oce)) 308 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf_glo(1 : klon_glo, 309 & is_oce)) 310 #else 311 ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf_glo(1 : klon_glo, 312 & is_oce)) 334 313 #endif 335 314 C … … 346 325 ierr = NF_ENDDEF(nid) 347 326 #ifdef NC_DOUBLE 348 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf(1 : klon_glo, is_sic)) 349 #else 350 ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf(1 : klon_glo, is_sic)) 327 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pctsrf_glo(1 : klon_glo, 328 & is_sic)) 329 #else 330 ierr = NF_PUT_VAR_REAL (nid,nvarid,pctsrf_glo(1 : klon_glo, 331 & is_sic)) 351 332 #endif 352 333 C … … 370 351 ENDIF 371 352 #ifdef NC_DOUBLE 372 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tsol (1,nsrf))373 #else 374 ierr = NF_PUT_VAR_REAL (nid,nvarid,tsol (1,nsrf))353 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,tsol_glo(1,nsrf)) 354 #else 355 ierr = NF_PUT_VAR_REAL (nid,nvarid,tsol_glo(1,nsrf)) 375 356 #endif 376 357 ENDDO … … 487 468 ENDIF 488 469 #ifdef NC_DOUBLE 489 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,alb1 (1,nsrf))490 #else 491 ierr = NF_PUT_VAR_REAL (nid,nvarid,alb1 (1,nsrf))470 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,alb1_glo(1,nsrf)) 471 #else 472 ierr = NF_PUT_VAR_REAL (nid,nvarid,alb1_glo(1,nsrf)) 492 473 #endif 493 474 ENDDO … … 510 491 ENDIF 511 492 #ifdef NC_DOUBLE 512 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,alb2 (1,nsrf))513 #else 514 ierr = NF_PUT_VAR_REAL (nid,nvarid,alb2 (1,nsrf))493 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,alb2_glo(1,nsrf)) 494 #else 495 ierr = NF_PUT_VAR_REAL (nid,nvarid,alb2_glo(1,nsrf)) 515 496 #endif 516 497 ENDDO … … 575 556 ierr = NF_ENDDEF(nid) 576 557 #ifdef NC_DOUBLE 577 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,radsol )578 #else 579 ierr = NF_PUT_VAR_REAL (nid,nvarid,radsol )558 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,radsol_glo) 559 #else 560 ierr = NF_PUT_VAR_REAL (nid,nvarid,radsol_glo) 580 561 #endif 581 562 c … … 590 571 ierr = NF_ENDDEF(nid) 591 572 #ifdef NC_DOUBLE 592 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,solsw )593 #else 594 ierr = NF_PUT_VAR_REAL (nid,nvarid,solsw )573 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,solsw_glo) 574 #else 575 ierr = NF_PUT_VAR_REAL (nid,nvarid,solsw_glo) 595 576 #endif 596 577 c … … 605 586 ierr = NF_ENDDEF(nid) 606 587 #ifdef NC_DOUBLE 607 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,sollw )608 #else 609 ierr = NF_PUT_VAR_REAL (nid,nvarid,sollw )588 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,sollw_glo) 589 #else 590 ierr = NF_PUT_VAR_REAL (nid,nvarid,sollw_glo) 610 591 #endif 611 592 c … … 635 616 ierr = NF_ENDDEF(nid) 636 617 #ifdef NC_DOUBLE 637 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rain_fall )638 #else 639 ierr = NF_PUT_VAR_REAL (nid,nvarid,rain_fall )618 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rain_fall_glo) 619 #else 620 ierr = NF_PUT_VAR_REAL (nid,nvarid,rain_fall_glo) 640 621 #endif 641 622 c … … 650 631 ierr = NF_ENDDEF(nid) 651 632 #ifdef NC_DOUBLE 652 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,snow_fall )653 #else 654 ierr = NF_PUT_VAR_REAL (nid,nvarid,snow_fall )633 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,snow_fall_glo) 634 #else 635 ierr = NF_PUT_VAR_REAL (nid,nvarid,snow_fall_glo) 655 636 #endif 656 637 c … … 716 697 ierr = NF_ENDDEF(nid) 717 698 #ifdef NC_DOUBLE 718 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zmea )719 #else 720 ierr = NF_PUT_VAR_REAL (nid,nvarid,zmea )699 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zmea_glo) 700 #else 701 ierr = NF_PUT_VAR_REAL (nid,nvarid,zmea_glo) 721 702 #endif 722 703 c … … 729 710 ierr = NF_ENDDEF(nid) 730 711 #ifdef NC_DOUBLE 731 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zstd )732 #else 733 ierr = NF_PUT_VAR_REAL (nid,nvarid,zstd )712 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zstd_glo) 713 #else 714 ierr = NF_PUT_VAR_REAL (nid,nvarid,zstd_glo) 734 715 #endif 735 716 ierr = NF_REDEF (nid) … … 741 722 ierr = NF_ENDDEF(nid) 742 723 #ifdef NC_DOUBLE 743 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zsig )744 #else 745 ierr = NF_PUT_VAR_REAL (nid,nvarid,zsig )724 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zsig_glo) 725 #else 726 ierr = NF_PUT_VAR_REAL (nid,nvarid,zsig_glo) 746 727 #endif 747 728 ierr = NF_REDEF (nid) … … 753 734 ierr = NF_ENDDEF(nid) 754 735 #ifdef NC_DOUBLE 755 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zgam )756 #else 757 ierr = NF_PUT_VAR_REAL (nid,nvarid,zgam )736 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zgam_glo) 737 #else 738 ierr = NF_PUT_VAR_REAL (nid,nvarid,zgam_glo) 758 739 #endif 759 740 ierr = NF_REDEF (nid) … … 765 746 ierr = NF_ENDDEF(nid) 766 747 #ifdef NC_DOUBLE 767 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zthe )768 #else 769 ierr = NF_PUT_VAR_REAL (nid,nvarid,zthe )748 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zthe_glo) 749 #else 750 ierr = NF_PUT_VAR_REAL (nid,nvarid,zthe_glo) 770 751 #endif 771 752 ierr = NF_REDEF (nid) … … 777 758 ierr = NF_ENDDEF(nid) 778 759 #ifdef NC_DOUBLE 779 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zpic )780 #else 781 ierr = NF_PUT_VAR_REAL (nid,nvarid,zpic )760 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zpic_glo) 761 #else 762 ierr = NF_PUT_VAR_REAL (nid,nvarid,zpic_glo) 782 763 #endif 783 764 ierr = NF_REDEF (nid) … … 789 770 ierr = NF_ENDDEF(nid) 790 771 #ifdef NC_DOUBLE 791 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zval )792 #else 793 ierr = NF_PUT_VAR_REAL (nid,nvarid,zval )772 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,zval_glo) 773 #else 774 ierr = NF_PUT_VAR_REAL (nid,nvarid,zval_glo) 794 775 #endif 795 776 ierr = NF_REDEF (nid) … … 801 782 ierr = NF_ENDDEF(nid) 802 783 #ifdef NC_DOUBLE 803 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rugsrel )804 #else 805 ierr = NF_PUT_VAR_REAL (nid,nvarid,rugsrel )784 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rugsrel_glo) 785 #else 786 ierr = NF_PUT_VAR_REAL (nid,nvarid,rugsrel_glo) 806 787 #endif 807 788 c … … 814 795 ierr = NF_ENDDEF(nid) 815 796 #ifdef NC_DOUBLE 816 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,t_ancien )817 #else 818 ierr = NF_PUT_VAR_REAL (nid,nvarid,t_ancien )797 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,t_ancien_glo) 798 #else 799 ierr = NF_PUT_VAR_REAL (nid,nvarid,t_ancien_glo) 819 800 #endif 820 801 c … … 827 808 ierr = NF_ENDDEF(nid) 828 809 #ifdef NC_DOUBLE 829 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,q_ancien )830 #else 831 ierr = NF_PUT_VAR_REAL (nid,nvarid,q_ancien )810 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,q_ancien_glo) 811 #else 812 ierr = NF_PUT_VAR_REAL (nid,nvarid,q_ancien_glo) 832 813 #endif 833 814 c … … 857 838 ierr = NF_ENDDEF(nid) 858 839 #ifdef NC_DOUBLE 859 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,clwcon )860 #else 861 ierr = NF_PUT_VAR_REAL (nid,nvarid,clwcon )840 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,clwcon_glo) 841 #else 842 ierr = NF_PUT_VAR_REAL (nid,nvarid,clwcon_glo) 862 843 #endif 863 844 c … … 872 853 ierr = NF_ENDDEF(nid) 873 854 #ifdef NC_DOUBLE 874 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rnebcon )875 #else 876 ierr = NF_PUT_VAR_REAL (nid,nvarid,rnebcon )855 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,rnebcon_glo) 856 #else 857 ierr = NF_PUT_VAR_REAL (nid,nvarid,rnebcon_glo) 877 858 #endif 878 859 c … … 887 868 ierr = NF_ENDDEF(nid) 888 869 #ifdef NC_DOUBLE 889 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,ratqs )890 #else 891 ierr = NF_PUT_VAR_REAL (nid,nvarid,ratqs )870 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,ratqs_glo) 871 #else 872 ierr = NF_PUT_VAR_REAL (nid,nvarid,ratqs_glo) 892 873 #endif 893 874 c … … 932 913 ENDIF 933 914 #ifdef NC_DOUBLE 934 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pbl_tke (:,:,nsrf))935 #else 936 ierr = NF_PUT_VAR_REAL (nid,nvarid,pbl_tke (:,:,nsrf))915 ierr = NF_PUT_VAR_DOUBLE (nid,nvarid,pbl_tke_glo(:,:,nsrf)) 916 #else 917 ierr = NF_PUT_VAR_REAL (nid,nvarid,pbl_tke_glo(:,:,nsrf)) 937 918 #endif 938 919 ENDDO -
LMDZ4/trunk/libf/phylmd/phys_state_var_mod.F90
r959 r967 10 10 INTEGER, PARAMETER :: nout=3 11 11 INTEGER, PARAMETER :: napisccp=1 12 INTEGER, SAVE :: radpas 12 13 REAL, SAVE :: dtime, co2_ppm_etat0, solaire_etat0 14 !$OMP THREADPRIVATE(radpas) 15 !$OMP THREADPRIVATE(dtime, co2_ppm_etat0, solaire_etat0) 16 13 17 REAL, ALLOCATABLE, SAVE :: rlat(:), rlon(:), pctsrf(:,:) 18 !$OMP THREADPRIVATE(rlat, rlon, pctsrf) 14 19 REAL, ALLOCATABLE, SAVE :: ftsol(:,:) 15 character(len=6), SAVE :: ocean 16 logical, SAVE :: ok_veget 20 !$OMP THREADPRIVATE(ftsol) 21 ! character(len=6), SAVE :: ocean 22 !!!!!!$OMP THREADPRIVATE(ocean) 23 ! logical, SAVE :: ok_veget 24 !!!!!!$OMP THREADPRIVATE(ok_veget) 17 25 REAL, ALLOCATABLE, SAVE :: falb1(:,:), falb2(:,:) 26 !$OMP THREADPRIVATE(falb1, falb2) 18 27 REAL, ALLOCATABLE, SAVE :: rain_fall(:), snow_fall(:) 28 !$OMP THREADPRIVATE( rain_fall, snow_fall) 19 29 REAL, ALLOCATABLE, SAVE :: solsw(:), sollw(:) 30 !$OMP THREADPRIVATE(solsw, sollw) 20 31 REAL, ALLOCATABLE, SAVE :: radsol(:) 32 !$OMP THREADPRIVATE(radsol) 33 21 34 !clesphy0 param physiq 22 35 ! … … 24 37 ! 25 38 REAL, ALLOCATABLE, SAVE :: zmea(:), zstd(:), zsig(:), zgam(:) 39 !$OMP THREADPRIVATE(zmea, zstd, zsig, zgam) 26 40 REAL, ALLOCATABLE, SAVE :: zthe(:), zpic(:), zval(:) 41 !$OMP THREADPRIVATE(zthe, zpic, zval) 27 42 ! REAL tabcntr0(100) 28 43 REAL, ALLOCATABLE, SAVE :: rugoro(:) 44 !$OMP THREADPRIVATE(rugoro) 29 45 REAL, ALLOCATABLE, SAVE :: t_ancien(:,:), q_ancien(:,:) 46 !$OMP THREADPRIVATE(t_ancien, q_ancien) 30 47 LOGICAL, SAVE :: ancien_ok 48 !$OMP THREADPRIVATE(ancien_ok) 31 49 REAL, ALLOCATABLE, SAVE :: clwcon(:,:),rnebcon(:,:) 50 !$OMP THREADPRIVATE(clwcon,rnebcon) 32 51 REAL, ALLOCATABLE, SAVE :: ratqs(:,:) 52 !$OMP THREADPRIVATE(ratqs) 33 53 REAL, ALLOCATABLE, SAVE :: pbl_tke(:,:,:) ! turb kinetic energy 54 !$OMP THREADPRIVATE(pbl_tke) 34 55 REAL, ALLOCATABLE, SAVE :: zmax0(:), f0(:) ! 56 !$OMP THREADPRIVATE(zmax0,f0) 35 57 REAL, ALLOCATABLE, SAVE :: ema_work1(:,:), ema_work2(:,:) 58 !$OMP THREADPRIVATE(ema_work1,ema_work2) 36 59 REAL, ALLOCATABLE, SAVE :: entr_therm(:,:), fm_therm(:,:) 60 !$OMP THREADPRIVATE(entr_therm,fm_therm) 37 61 REAL, ALLOCATABLE, SAVE :: detr_therm(:,:) 62 !$OMP THREADPRIVATE(detr_therm) 38 63 !IM 150408 39 64 ! pour phsystoke avec thermiques 40 65 REAL,ALLOCATABLE,SAVE :: clwcon0th(:,:),rnebcon0th(:,:) 66 !$OMP THREADPRIVATE(clwcon0th,rnebcon0th) 41 67 ! radiation outputs 42 68 REAL,ALLOCATABLE,SAVE :: swdn0(:,:), swdn(:,:) 69 !$OMP THREADPRIVATE(swdn0,swdn) 43 70 REAL,ALLOCATABLE,SAVE :: swup0(:,:), swup(:,:) 71 !$OMP THREADPRIVATE(swup0,swup) 44 72 REAL,ALLOCATABLE,SAVE :: SWdn200clr(:), SWdn200(:) 73 !$OMP THREADPRIVATE(SWdn200clr,SWdn200) 45 74 REAL,ALLOCATABLE,SAVE :: SWup200clr(:), SWup200(:) 75 !$OMP THREADPRIVATE(SWup200clr,SWup200) 46 76 REAL,ALLOCATABLE,SAVE :: lwdn0(:,:), lwdn(:,:) 77 !$OMP THREADPRIVATE(lwdn0,lwdn) 47 78 REAL,ALLOCATABLE,SAVE :: lwup0(:,:), lwup(:,:) 79 !$OMP THREADPRIVATE(lwup0,lwup) 48 80 REAL,ALLOCATABLE,SAVE :: LWdn200clr(:), LWdn200(:) 81 !$OMP THREADPRIVATE(LWdn200clr,LWdn200) 49 82 REAL,ALLOCATABLE,SAVE :: LWup200clr(:), LWup200(:) 83 !$OMP THREADPRIVATE(LWup200clr,LWup200) 50 84 REAL,ALLOCATABLE,SAVE :: LWdnTOA(:), LWdnTOAclr(:) 85 !$OMP THREADPRIVATE(LWdnTOA,LWdnTOAclr) 51 86 ! pressure level 52 87 REAL,ALLOCATABLE,SAVE :: tsumSTD(:,:,:) 88 !$OMP THREADPRIVATE(tsumSTD) 53 89 REAL,ALLOCATABLE,SAVE :: usumSTD(:,:,:), vsumSTD(:,:,:) 90 !$OMP THREADPRIVATE(usumSTD,vsumSTD) 54 91 REAL,ALLOCATABLE,SAVE :: wsumSTD(:,:,:), phisumSTD(:,:,:) 92 !$OMP THREADPRIVATE(wsumSTD,phisumSTD) 55 93 REAL,ALLOCATABLE,SAVE :: qsumSTD(:,:,:), rhsumSTD(:,:,:) 94 !$OMP THREADPRIVATE(qsumSTD,rhsumSTD) 56 95 REAL,ALLOCATABLE,SAVE :: tnondef(:,:,:) 96 !$OMP THREADPRIVATE(tnondef) 57 97 REAL,ALLOCATABLE,SAVE :: uvsumSTD(:,:,:) 98 !$OMP THREADPRIVATE(uvsumSTD) 58 99 REAL,ALLOCATABLE,SAVE :: vqsumSTD(:,:,:) 100 !$OMP THREADPRIVATE(vqsumSTD) 59 101 REAL,ALLOCATABLE,SAVE :: vTsumSTD(:,:,:) 102 !$OMP THREADPRIVATE(vTsumSTD) 60 103 REAL,ALLOCATABLE,SAVE :: wqsumSTD(:,:,:) 104 !$OMP THREADPRIVATE(wqsumSTD) 61 105 REAL,ALLOCATABLE,SAVE :: vphisumSTD(:,:,:) 106 !$OMP THREADPRIVATE(vphisumSTD) 62 107 REAL,ALLOCATABLE,SAVE :: wTsumSTD(:,:,:) 108 !$OMP THREADPRIVATE(wTsumSTD) 63 109 REAL,ALLOCATABLE,SAVE :: u2sumSTD(:,:,:) 110 !$OMP THREADPRIVATE(u2sumSTD) 64 111 REAL,ALLOCATABLE,SAVE :: v2sumSTD(:,:,:) 112 !$OMP THREADPRIVATE(v2sumSTD) 65 113 REAL,ALLOCATABLE,SAVE :: T2sumSTD(:,:,:) 114 !$OMP THREADPRIVATE(T2sumSTD) 66 115 INTEGER,ALLOCATABLE,SAVE :: seed_old(:,:) 116 !$OMP THREADPRIVATE(seed_old) 67 117 REAL,ALLOCATABLE,SAVE :: zuthe(:),zvthe(:) 118 !$OMP THREADPRIVATE(zuthe,zvthe) 68 119 REAL,ALLOCATABLE,SAVE :: alb_neig(:) 120 !$OMP THREADPRIVATE(alb_neig) 69 121 !cloud base mass flux 70 122 REAL,ALLOCATABLE,SAVE :: ema_workcbmf(:), ema_cbmf(:) 123 !$OMP THREADPRIVATE(ema_workcbmf,ema_cbmf) 71 124 !cloud base pressure & cloud top pressure 72 125 REAL,ALLOCATABLE,SAVE :: ema_pcb(:), ema_pct(:) 126 !$OMP THREADPRIVATE(ema_pcb,ema_pct) 73 127 REAL,ALLOCATABLE,SAVE :: Ma(:,:) ! undilute upward mass flux 128 !$OMP THREADPRIVATE(Ma) 74 129 REAL,ALLOCATABLE,SAVE :: qcondc(:,:) ! in-cld water content from convect 130 !$OMP THREADPRIVATE(qcondc) 75 131 REAL,ALLOCATABLE,SAVE :: wd(:) ! sb 132 !$OMP THREADPRIVATE(wd) 76 133 REAL,ALLOCATABLE,SAVE :: sigd(:) 134 !$OMP THREADPRIVATE(sigd) 77 135 ! 78 136 REAL,ALLOCATABLE,SAVE :: cin(:) 137 !$OMP THREADPRIVATE(cin) 79 138 ! ftd : differential heating between wake and environment 80 139 REAL,ALLOCATABLE,SAVE :: ftd(:,:) 140 !$OMP THREADPRIVATE(ftd) 81 141 ! fqd : differential moistening between wake and environment 82 142 REAL,ALLOCATABLE,SAVE :: fqd(:,:) 143 !$OMP THREADPRIVATE(fqd) 83 144 !34EK 84 145 ! -- Variables de controle de ALE et ALP … … 86 147 ! convection d'Emanuel pour le declenchement et la regulation 87 148 REAL,ALLOCATABLE,SAVE :: ALE(:) 149 !$OMP THREADPRIVATE(ALE) 88 150 !ALP : Puissance disponible pour soulevement 89 151 REAL,ALLOCATABLE,SAVE :: ALP(:) 152 !$OMP THREADPRIVATE(ALP) 90 153 ! 91 154 ! nouvelles variables pour le couplage convection-couche limite 92 155 REAL,ALLOCATABLE,SAVE :: Ale_bl(:) 156 !$OMP THREADPRIVATE(Ale_bl) 93 157 REAL,ALLOCATABLE,SAVE :: Alp_bl(:) 158 !$OMP THREADPRIVATE(Alp_bl) 94 159 INTEGER,ALLOCATABLE,SAVE :: lalim_conv(:) 160 !$OMP THREADPRIVATE(lalim_conv) 95 161 REAL,ALLOCATABLE,SAVE :: wght_th(:,:) 162 !$OMP THREADPRIVATE(wght_th) 96 163 ! 97 164 ! variables de la wake … … 103 170 ! dt_wake, dq_wake: LS tendencies due to wake 104 171 REAL,ALLOCATABLE,SAVE :: wake_deltat(:,:) 172 !$OMP THREADPRIVATE(wake_deltat) 105 173 REAL,ALLOCATABLE,SAVE :: wake_deltaq(:,:) 174 !$OMP THREADPRIVATE(wake_deltaq) 106 175 REAL,ALLOCATABLE,SAVE :: wake_Cstar(:) 176 !$OMP THREADPRIVATE(wake_Cstar) 107 177 REAL,ALLOCATABLE,SAVE :: wake_s(:) 178 !$OMP THREADPRIVATE(wake_s) 108 179 REAL,ALLOCATABLE,SAVE :: wake_fip(:) 180 !$OMP THREADPRIVATE(wake_fip) 109 181 REAL,ALLOCATABLE,SAVE :: dt_wake(:,:) 182 !$OMP THREADPRIVATE(dt_wake) 110 183 REAL,ALLOCATABLE,SAVE :: dq_wake(:,:) 184 !$OMP THREADPRIVATE(dq_wake) 111 185 ! 112 186 ! pfrac_impa : Produits des coefs lessivage impaction … … 114 188 ! pfrac_1nucl: Produits des coefs lessi nucl (alpha = 1) 115 189 REAL,ALLOCATABLE,SAVE :: pfrac_impa(:,:), pfrac_nucl(:,:) 190 !$OMP THREADPRIVATE(pfrac_impa,pfrac_nucl) 116 191 REAL,ALLOCATABLE,SAVE :: pfrac_1nucl(:,:) 192 !$OMP THREADPRIVATE(pfrac_1nucl) 117 193 ! 118 194 REAL,ALLOCATABLE,SAVE :: total_rain(:), nday_rain(:) 195 !$OMP THREADPRIVATE(total_rain,nday_rain) 119 196 REAL,ALLOCATABLE,SAVE :: paire_ter(:) 197 !$OMP THREADPRIVATE(paire_ter) 120 198 ! albsol1: albedo du sol total pour SW visible 121 199 ! albsol2: albedo du sol total pour SW proche IR 122 200 REAL,ALLOCATABLE,SAVE :: albsol1(:), albsol2(:) 201 !$OMP THREADPRIVATE(albsol1,albsol2) 123 202 REAL,ALLOCATABLE,SAVE :: wo(:,:) 203 !$OMP THREADPRIVATE(wo) 124 204 ! 125 205 ! heat : chauffage solaire … … 132 212 ! toplwdownclr : downward CS LW flux at TOA 133 213 REAL,ALLOCATABLE,SAVE :: clwcon0(:,:),rnebcon0(:,:) 214 !$OMP THREADPRIVATE(clwcon0,rnebcon0) 134 215 REAL,ALLOCATABLE,SAVE :: heat(:,:) 216 !$OMP THREADPRIVATE(heat) 135 217 REAL,ALLOCATABLE,SAVE :: heat0(:,:) 218 !$OMP THREADPRIVATE(heat0) 136 219 REAL,ALLOCATABLE,SAVE :: cool(:,:) 220 !$OMP THREADPRIVATE(cool) 137 221 REAL,ALLOCATABLE,SAVE :: cool0(:,:) 222 !$OMP THREADPRIVATE(cool0) 138 223 REAL,ALLOCATABLE,SAVE :: topsw(:), toplw(:) 224 !$OMP THREADPRIVATE(topsw,toplw) 139 225 REAL,ALLOCATABLE,SAVE :: sollwdown(:) 226 !$OMP THREADPRIVATE(sollwdown) 140 227 REAL,ALLOCATABLE,SAVE :: sollwdownclr(:) 228 !$OMP THREADPRIVATE(sollwdownclr) 141 229 REAL,ALLOCATABLE,SAVE :: toplwdown(:) 230 !$OMP THREADPRIVATE(toplwdown) 142 231 REAL,ALLOCATABLE,SAVE :: toplwdownclr(:) 232 !$OMP THREADPRIVATE(toplwdownclr) 143 233 REAL,ALLOCATABLE,SAVE :: topsw0(:),toplw0(:),solsw0(:),sollw0(:) 234 !$OMP THREADPRIVATE(topsw0,toplw0,solsw0,sollw0) 144 235 REAL,ALLOCATABLE,SAVE :: albpla(:) 236 !$OMP THREADPRIVATE(albpla) 145 237 ! pbase : cloud base pressure 146 238 ! bbase : cloud base buoyancy 147 239 REAL,ALLOCATABLE,SAVE :: cape(:) 240 !$OMP THREADPRIVATE(cape) 148 241 REAL,ALLOCATABLE,SAVE :: pbase(:) 242 !$OMP THREADPRIVATE(pbase) 149 243 REAL,ALLOCATABLE,SAVE :: bbase(:) 244 !$OMP THREADPRIVATE(bbase) 150 245 ! 151 246 REAL,SAVE,ALLOCATABLE :: zqasc(:,:) 247 !$OMP THREADPRIVATE( zqasc) 152 248 INTEGER,ALLOCATABLE,SAVE :: ibas_con(:), itop_con(:) 249 !$OMP THREADPRIVATE(ibas_con,itop_con) 153 250 REAL,SAVE,ALLOCATABLE :: rain_con(:) 251 !$OMP THREADPRIVATE(rain_con) 154 252 REAL,SAVE,ALLOCATABLE :: snow_con(:) 253 !$OMP THREADPRIVATE(snow_con) 155 254 ! 156 255 ! sulfate_pi : SO4 aerosol concentration [ug/m3] (pre-industrial value) 157 256 158 257 REAL,SAVE,ALLOCATABLE :: sulfate_pi(:, :) 258 !$OMP THREADPRIVATE(sulfate_pi) 159 259 REAL,SAVE,ALLOCATABLE :: rlonPOS(:) 260 !$OMP THREADPRIVATE(rlonPOS) 160 261 REAL,SAVE,ALLOCATABLE :: newsst(:) 262 !$OMP THREADPRIVATE(newsst) 161 263 REAL,SAVE,ALLOCATABLE :: u10m(:,:), v10m(:,:) 264 !$OMP THREADPRIVATE(u10m,v10m) 162 265 ! 163 266 ! ok_ade=T -ADE=topswad-topsw … … 168 271 !topswad, solswad : Aerosol direct effect 169 272 REAL,SAVE,ALLOCATABLE :: topswad(:), solswad(:) 273 !$OMP THREADPRIVATE(topswad,solswad) 170 274 !topswai, solswai : Aerosol indirect effect 171 275 REAL,SAVE,ALLOCATABLE :: topswai(:), solswai(:) 276 !$OMP THREADPRIVATE(topswai,solswai) 172 277 REAL,SAVE,ALLOCATABLE :: tau_ae(:,:,:), piz_ae(:,:,:) 278 !$OMP THREADPRIVATE(tau_ae,piz_ae) 173 279 REAL,SAVE,ALLOCATABLE :: cg_ae(:,:,:) 280 !$OMP THREADPRIVATE(cg_ae) 174 281 175 282 ! Les variables suivants uniquement pour un configuration avec INCA 176 283 ! topswad_inca, solswad_inca : Aerosol direct effect 177 284 REAL,SAVE,ALLOCATABLE :: topswad_inca(:), solswad_inca(:) 285 !$OMP THREADPRIVATE(topswad_inca,solswad_inca) 178 286 ! topswad0_inca, solswad0_inca : Aerosol direct effect 179 287 REAL,SAVE,ALLOCATABLE :: topswad0_inca(:), solswad0_inca(:) 288 !$OMP THREADPRIVATE(topswad0_inca,solswad0_inca) 180 289 ! topswai_inca, solswai_inca : Aerosol indirect effect 181 290 REAL,SAVE,ALLOCATABLE :: topswai_inca(:), solswai_inca(:) 291 !$OMP THREADPRIVATE(topswai_inca,solswai_inca) 182 292 REAL,SAVE,ALLOCATABLE :: topsw_inca(:,:), solsw_inca(:,:) 293 !$OMP THREADPRIVATE(topsw_inca,solsw_inca) 183 294 REAL,SAVE,ALLOCATABLE :: topsw0_inca(:,:), solsw0_inca(:,:) 295 !$OMP THREADPRIVATE(topsw0_inca,solsw0_inca) 184 296 REAL,SAVE,ALLOCATABLE :: tau_inca(:,:,:,:) 297 !$OMP THREADPRIVATE(tau_inca) 185 298 REAL,SAVE,ALLOCATABLE :: piz_inca(:,:,:,:) 299 !$OMP THREADPRIVATE(piz_inca) 186 300 REAL,SAVE,ALLOCATABLE :: cg_inca(:,:,:,:) 301 !$OMP THREADPRIVATE(cg_inca) 187 302 REAL,SAVE,ALLOCATABLE :: ccm(:,:,:) 303 !$OMP THREADPRIVATE(ccm) 188 304 189 305 CONTAINS -
LMDZ4/trunk/libf/phylmd/physiq.F
r965 r967 24 24 USE vampir 25 25 USE pbl_surface_mod, ONLY : pbl_surface 26 USE surface_data, ONLY : ocean, ok_veget 26 27 USE phys_local_var_mod ! Variables internes non sauvegardees de la physique 27 28 USE phys_state_var_mod ! Variables sauvegardees de la physique … … 535 536 c Variables propres a la physique 536 537 c 537 INTEGER radpas538 SAVE radpas ! frequence d'appel rayonnement539 c $OMP THREADPRIVATE(radpas)538 c INTEGER radpas 539 c SAVE radpas ! frequence d'appel rayonnement 540 ccccccccc$OMP THREADPRIVATE(radpas) 540 541 c 541 542 cc INTEGER iflag_con … … 1261 1262 1262 1263 1263 CALL phyetat0 ("startphy.nc",dtime,co2_ppm_etat0,solaire_etat0, 1264 . rlat,rlon,pctsrf, ftsol, 1265 . ocean, ok_veget, 1266 . falb1, falb2, rain_fall,snow_fall, 1267 . solsw, sollw, 1268 . radsol,clesphy0, 1269 . zmea,zstd,zsig,zgam,zthe,zpic,zval,rugoro,tabcntr0, 1270 . t_ancien, q_ancien, ancien_ok, rnebcon, ratqs,clwcon, 1271 . pbl_tke, zmax0, f0, ema_work1, ema_work2) 1264 CALL phyetat0 ("startphy.nc",clesphy0,tabcntr0) 1272 1265 1273 1266 … … 3354 3347 IF (lafin) THEN 3355 3348 itau_phy = itau_phy + itap 3356 CALL phyredem ("restartphy.nc",dtime,radpas,ocean, 3357 . rlat, rlon, pctsrf, ftsol, 3358 . falb1, falb2, rain_fall, 3359 . snow_fall, 3360 . solsw, sollw, 3361 . radsol, 3362 . zmea,zstd,zsig,zgam,zthe,zpic,zval,rugoro, 3363 . t_ancien, q_ancien, rnebcon, ratqs, clwcon, 3364 . pbl_tke, zmax0, f0, ema_work1, ema_work2) 3349 CALL phyredem ("restartphy.nc") 3365 3350 open(97,form="unformatted",file="finbin") 3366 3351 write(97) u_seri,v_seri,t_seri,q_seri
Note: See TracChangeset
for help on using the changeset viewer.