Changeset 1821 for LMDZ5/trunk
- Timestamp:
- Jul 30, 2013, 2:46:15 PM (11 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/iophy.F90
r1807 r1821 767 767 ! On regarde si on est dans la phase de définition ou d'écriture: 768 768 IF(.NOT.vars_defined) THEN 769 769 !$OMP MASTER 770 770 !Si phase de définition.... on définit 771 771 DO iff=iff_beg, iff_end … … 774 774 ENDIF 775 775 ENDDO 776 !$OMP END MASTER 776 777 ELSE 777 778 … … 861 862 IF(.NOT.vars_defined) THEN 862 863 !Si phase de définition.... on définit 864 !$OMP MASTER 863 865 DO iff=1, nfiles 864 866 IF (clef_files(iff)) THEN … … 866 868 ENDIF 867 869 ENDDO 870 !$OMP END MASTER 868 871 ELSE 869 872 !Et sinon on.... écrit -
LMDZ5/trunk/libf/phylmd/phys_output_mod.F90
r1813 r1821 387 387 ENDDO ! iff 388 388 389 ! ug On déclare les sorties avec un premier appel à phys_output_write:390 ! on utilise itap=0 pour signaler à histwrite qu'il s'agit du passage de définition391 CALL phys_output_write(0, pdtphys, paprs, pphis, &392 & pplay, lmax_th, aerosol_couple, &393 & ok_ade, ok_aie, ivap, new_aod, ok_sync, &394 & ptconv, read_climoz, clevSTD, ptconvth, &395 & d_t, qx, d_qx, zmasse, flag_aerosol_strat)396 397 DO iff=1,nfiles398 IF (clef_files(iff)) THEN399 CALL histend(nid_files(iff))400 401 ndex2d = 0402 ndex3d = 0403 404 ENDIF ! clef_files405 ENDDO ! iff406 389 407 390 ! Updated write frequencies due to phys_out_filetimesteps. -
LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90
r1816 r1821 67 67 INTEGER, PARAMETER :: jjmp1=jjm+1-1/jjm 68 68 INTEGER :: itau_w 69 INTEGER :: i, i ff, iq, nsrf, k, ll, naero69 INTEGER :: i, iinit, iinitend=1, iff, iq, nsrf, k, ll, naero 70 70 REAL, DIMENSION (klon) :: zx_tmp_fi2d 71 71 REAL, DIMENSION (klon,klev) :: zx_tmp_fi3d, zpt_conv … … 76 76 REAL, PARAMETER :: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 77 77 78 IF(vars_defined) THEN 79 ! On calcul le nouveau tau: 78 ! On calcul le nouveau tau: 80 79 itau_w = itau_phy + itap + start_time * day_step / iphysiq 81 ! On le donne à iophy pour que les histwrite y aient accès:80 ! On le donne à iophy pour que les histwrite y aient accès: 82 81 CALL set_itau_iophy(itau_w) 82 IF(.NOT.vars_defined) THEN 83 iinitend = 2 84 ELSE 85 iinitend = 1 83 86 ENDIF 84 87 88 ! ug la boucle qui suit ne sert qu'une fois, pour l'initialisation, sinon il n'y a toujours qu'un seul passage: 89 DO iinit=1, iinitend 85 90 ! On procède à l'écriture ou à la définition des nombreuses variables: 86 91 !!! Champs 1D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 88 93 CALL histwrite_phy(o_aire, airephy) 89 94 90 IF ( itap > 0) THEN95 IF (vars_defined) THEN 91 96 DO i=1, klon 92 97 zx_tmp_fi2d(i)=pctsrf(i,is_ter)+pctsrf(i,is_lic) … … 105 110 CALL histwrite_phy(o_t2m_max, zt2m) 106 111 107 IF ( itap > 0) THEN112 IF (vars_defined) THEN 108 113 DO i=1, klon 109 114 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) … … 112 117 CALL histwrite_phy(o_wind10m, zx_tmp_fi2d) 113 118 114 IF ( itap > 0) THEN119 IF (vars_defined) THEN 115 120 DO i=1, klon 116 121 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) … … 119 124 CALL histwrite_phy(o_wind10max, zx_tmp_fi2d) 120 125 121 IF ( itap > 0) THEN126 IF (vars_defined) THEN 122 127 DO i = 1, klon 123 128 zx_tmp_fi2d(i) = pctsrf(i,is_sic) … … 130 135 CALL histwrite_phy(o_v10m, zv10m) 131 136 132 IF ( itap > 0) THEN137 IF (vars_defined) THEN 133 138 DO i = 1, klon 134 139 zx_tmp_fi2d(i) = paprs(i,1) … … 143 148 ENDIF 144 149 145 IF ( itap > 0) THEN150 IF (vars_defined) THEN 146 151 DO i = 1, klon 147 152 zx_tmp_fi2d(i) = rain_fall(i) + snow_fall(i) … … 152 157 CALL histwrite_phy(o_ndayrain, nday_rain) 153 158 154 IF ( itap > 0) THEN159 IF (vars_defined) THEN 155 160 DO i = 1, klon 156 161 zx_tmp_fi2d(i) = rain_lsc(i) + snow_lsc(i) … … 159 164 CALL histwrite_phy(o_plul, zx_tmp_fi2d) 160 165 161 IF ( itap > 0) THEN166 IF (vars_defined) THEN 162 167 DO i = 1, klon 163 168 zx_tmp_fi2d(i) = rain_con(i) + snow_con(i) … … 174 179 CALL histwrite_phy(o_topl0, toplw0) 175 180 176 IF ( itap > 0) THEN181 IF (vars_defined) THEN 177 182 zx_tmp_fi2d(1 : klon) = swup ( 1 : klon, klevp1 ) 178 183 ENDIF 179 184 CALL histwrite_phy(o_SWupTOA, zx_tmp_fi2d) 180 185 181 IF ( itap > 0) THEN186 IF (vars_defined) THEN 182 187 zx_tmp_fi2d(1 : klon) = swup0 ( 1 : klon, klevp1 ) 183 188 ENDIF 184 189 CALL histwrite_phy(o_SWupTOAclr, zx_tmp_fi2d) 185 190 186 IF ( itap > 0) THEN191 IF (vars_defined) THEN 187 192 zx_tmp_fi2d(1 : klon) = swdn ( 1 : klon, klevp1 ) 188 193 ENDIF 189 194 CALL histwrite_phy(o_SWdnTOA, zx_tmp_fi2d) 190 195 191 IF ( itap > 0) THEN196 IF (vars_defined) THEN 192 197 zx_tmp_fi2d(1 : klon) = swdn0 ( 1 : klon, klevp1 ) 193 198 ENDIF 194 199 CALL histwrite_phy(o_SWdnTOAclr, zx_tmp_fi2d) 195 200 196 IF ( itap > 0) THEN201 IF (vars_defined) THEN 197 202 zx_tmp_fi2d(:) = topsw(:)-toplw(:) 198 203 ENDIF … … 212 217 CALL histwrite_phy(o_soll0, sollw0) 213 218 214 IF ( itap > 0) THEN219 IF (vars_defined) THEN 215 220 zx_tmp_fi2d(1 : klon) = swup ( 1 : klon, 1 ) 216 221 ENDIF 217 222 CALL histwrite_phy(o_SWupSFC, zx_tmp_fi2d) 218 223 219 IF ( itap > 0) THEN224 IF (vars_defined) THEN 220 225 zx_tmp_fi2d(1 : klon) = swup0 ( 1 : klon, 1 ) 221 226 ENDIF 222 227 CALL histwrite_phy(o_SWupSFCclr, zx_tmp_fi2d) 223 228 224 IF ( itap > 0) THEN229 IF (vars_defined) THEN 225 230 zx_tmp_fi2d(1 : klon) = swdn ( 1 : klon, 1 ) 226 231 ENDIF 227 232 CALL histwrite_phy(o_SWdnSFC, zx_tmp_fi2d) 228 233 229 IF ( itap > 0) THEN234 IF (vars_defined) THEN 230 235 zx_tmp_fi2d(1 : klon) = swdn0 ( 1 : klon, 1 ) 231 236 ENDIF 232 237 CALL histwrite_phy(o_SWdnSFCclr, zx_tmp_fi2d) 233 238 234 IF ( itap > 0) THEN239 IF (vars_defined) THEN 235 240 zx_tmp_fi2d(1:klon)=sollwdown(1:klon)-sollw(1:klon) 236 241 ENDIF … … 238 243 CALL histwrite_phy(o_LWdnSFC, sollwdown) 239 244 240 IF ( itap > 0) THEN245 IF (vars_defined) THEN 241 246 sollwdownclr(1:klon) = -1.*lwdn0(1:klon,1) 242 247 zx_tmp_fi2d(1:klon)=sollwdownclr(1:klon)-sollw0(1:klon) … … 252 257 CALL histwrite_phy(o_bils_enthalp, bils_enthalp) 253 258 254 IF ( itap > 0) THEN259 IF (vars_defined) THEN 255 260 zx_tmp_fi2d(1:klon)=-1*sens(1:klon) 256 261 ENDIF … … 260 265 CALL histwrite_phy(o_fqcalving, zxfqcalving) 261 266 CALL histwrite_phy(o_fqfonte, zxfqfonte) 262 IF ( itap > 0) THEN267 IF (vars_defined) THEN 263 268 zx_tmp_fi2d=0. 264 269 DO nsrf=1,nbsrf … … 268 273 CALL histwrite_phy(o_taux, zx_tmp_fi2d) 269 274 270 IF ( itap > 0) THEN275 IF (vars_defined) THEN 271 276 zx_tmp_fi2d=0. 272 277 DO nsrf=1,nbsrf … … 278 283 279 284 DO nsrf = 1, nbsrf 280 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf)*100.285 IF (vars_defined) zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf)*100. 281 286 CALL histwrite_phy(o_pourc_srf(nsrf), zx_tmp_fi2d) 282 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf)287 IF (vars_defined) zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf) 283 288 CALL histwrite_phy(o_fract_srf(nsrf), zx_tmp_fi2d) 284 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = fluxu( 1 : klon, 1, nsrf)289 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxu( 1 : klon, 1, nsrf) 285 290 CALL histwrite_phy(o_taux_srf(nsrf), zx_tmp_fi2d) 286 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = fluxv( 1 : klon, 1, nsrf)291 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxv( 1 : klon, 1, nsrf) 287 292 CALL histwrite_phy(o_tauy_srf(nsrf), zx_tmp_fi2d) 288 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = ftsol( 1 : klon, nsrf)293 IF (vars_defined) zx_tmp_fi2d(1 : klon) = ftsol( 1 : klon, nsrf) 289 294 CALL histwrite_phy(o_tsol_srf(nsrf), zx_tmp_fi2d) 290 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = evap_pot( 1 : klon, nsrf)295 IF (vars_defined) zx_tmp_fi2d(1 : klon) = evap_pot( 1 : klon, nsrf) 291 296 CALL histwrite_phy(o_evappot_srf(nsrf), zx_tmp_fi2d) 292 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = ustar(1 : klon, nsrf)297 IF (vars_defined) zx_tmp_fi2d(1 : klon) = ustar(1 : klon, nsrf) 293 298 CALL histwrite_phy(o_ustar_srf(nsrf), zx_tmp_fi2d) 294 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = u10m(1 : klon, nsrf)299 IF (vars_defined) zx_tmp_fi2d(1 : klon) = u10m(1 : klon, nsrf) 295 300 CALL histwrite_phy(o_u10m_srf(nsrf), zx_tmp_fi2d) 296 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = v10m(1 : klon, nsrf)301 IF (vars_defined) zx_tmp_fi2d(1 : klon) = v10m(1 : klon, nsrf) 297 302 CALL histwrite_phy(o_v10m_srf(nsrf), zx_tmp_fi2d) 298 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = t2m(1 : klon, nsrf)303 IF (vars_defined) zx_tmp_fi2d(1 : klon) = t2m(1 : klon, nsrf) 299 304 CALL histwrite_phy(o_t2m_srf(nsrf), zx_tmp_fi2d) 300 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = fevap(1 : klon, nsrf)305 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fevap(1 : klon, nsrf) 301 306 CALL histwrite_phy(o_evap_srf(nsrf), zx_tmp_fi2d) 302 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = fluxt( 1 : klon, 1, nsrf)307 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxt( 1 : klon, 1, nsrf) 303 308 CALL histwrite_phy(o_sens_srf(nsrf), zx_tmp_fi2d) 304 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = fluxlat( 1 : klon, nsrf)309 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxlat( 1 : klon, nsrf) 305 310 CALL histwrite_phy(o_lat_srf(nsrf), zx_tmp_fi2d) 306 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = fsollw( 1 : klon, nsrf)311 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fsollw( 1 : klon, nsrf) 307 312 CALL histwrite_phy(o_flw_srf(nsrf), zx_tmp_fi2d) 308 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, nsrf)313 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, nsrf) 309 314 CALL histwrite_phy(o_fsw_srf(nsrf), zx_tmp_fi2d) 310 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = wfbils( 1 : klon, nsrf)315 IF (vars_defined) zx_tmp_fi2d(1 : klon) = wfbils( 1 : klon, nsrf) 311 316 CALL histwrite_phy(o_wbils_srf(nsrf), zx_tmp_fi2d) 312 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = wfbilo( 1 : klon, nsrf)317 IF (vars_defined) zx_tmp_fi2d(1 : klon) = wfbilo( 1 : klon, nsrf) 313 318 CALL histwrite_phy(o_wbilo_srf(nsrf), zx_tmp_fi2d) 314 319 … … 330 335 CALL histwrite_phy(o_cldt, cldt) 331 336 CALL histwrite_phy(o_cldq, cldq) 332 IF ( itap > 0) zx_tmp_fi2d(1:klon) = flwp(1:klon)337 IF (vars_defined) zx_tmp_fi2d(1:klon) = flwp(1:klon) 333 338 CALL histwrite_phy(o_lwp, zx_tmp_fi2d) 334 IF ( itap > 0) zx_tmp_fi2d(1:klon) = fiwp(1:klon)339 IF (vars_defined) zx_tmp_fi2d(1:klon) = fiwp(1:klon) 335 340 CALL histwrite_phy(o_iwp, zx_tmp_fi2d) 336 341 CALL histwrite_phy(o_ue, ue) … … 355 360 CALL histwrite_phy(o_dnwd, dnwd) 356 361 CALL histwrite_phy(o_dnwd0, dnwd0) 357 IF ( itap > 0) zx_tmp_fi2d=float(itau_con)/float(itap)362 IF (vars_defined) zx_tmp_fi2d=float(itau_con)/float(itap) 358 363 CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d) 359 IF ( itap > 0) THEN364 IF (vars_defined) THEN 360 365 IF(iflag_thermals>=1)THEN 361 366 zx_tmp_fi3d=dnwd+dnwd0+upwd+fm_therm(:,1:klev) … … 425 430 426 431 427 IF ( itap > 0) THEN432 IF (vars_defined) THEN 428 433 DO i=1, klon 429 434 IF (pctsrf(i,is_oce).GT.epsfra.OR. & … … 460 465 CALL histwrite_phy(o_wake_deltaq, wake_deltaq) 461 466 CALL histwrite_phy(o_wake_omg, wake_omg) 462 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_t_wake(1:klon,1:klev) &467 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_wake(1:klon,1:klev) & 463 468 /pdtphys 464 469 CALL histwrite_phy(o_dtwak, zx_tmp_fi3d) 465 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_q_wake(1:klon,1:klev)/pdtphys470 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_wake(1:klon,1:klev)/pdtphys 466 471 CALL histwrite_phy(o_dqwak, zx_tmp_fi3d) 467 472 ENDIF ! iflag_wake>=1 … … 506 511 CALL histwrite_phy(o_re, re) 507 512 CALL histwrite_phy(o_fl, fl) 508 IF ( itap > 0) THEN513 IF (vars_defined) THEN 509 514 DO i=1, klon 510 515 zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.) … … 513 518 CALL histwrite_phy(o_rh2m, zx_tmp_fi2d) 514 519 515 IF ( itap > 0) THEN520 IF (vars_defined) THEN 516 521 DO i=1, klon 517 522 zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.) … … 520 525 CALL histwrite_phy(o_rh2m_min, zx_tmp_fi2d) 521 526 522 IF ( itap > 0) THEN527 IF (vars_defined) THEN 523 528 DO i=1, klon 524 529 zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.) … … 530 535 CALL histwrite_phy(o_tpot, tpot) 531 536 CALL histwrite_phy(o_tpote, tpote) 532 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, is_ter)537 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, is_ter) 533 538 CALL histwrite_phy(o_SWnetOR, zx_tmp_fi2d) 534 IF ( itap > 0) zx_tmp_fi2d(1:klon) = solsw(1:klon)/(1.-albsol1(1:klon))539 IF (vars_defined) zx_tmp_fi2d(1:klon) = solsw(1:klon)/(1.-albsol1(1:klon)) 535 540 CALL histwrite_phy(o_SWdownOR, zx_tmp_fi2d) 536 541 CALL histwrite_phy(o_LWdownOR, sollwdown) … … 632 637 CALL histwrite_phy(o_pres, pplay) 633 638 CALL histwrite_phy(o_paprs, paprs(:,1:klev)) 634 IF ( itap > 0) THEN639 IF (vars_defined) THEN 635 640 DO i=1, klon 636 641 zx_tmp_fi3d1(i,1)= pphis(i)/RG … … 649 654 !020611 $o_zfull%name,itau_w,zx_tmp_fi3d) 650 655 651 IF ( itap > 0) THEN656 IF (vars_defined) THEN 652 657 DO i=1, klon 653 658 zx_tmp_fi3d(i,1)= pphis(i)/RG - ( & … … 679 684 CALL histwrite_phy(o_dqphy, d_qx(:,:,ivap)) 680 685 DO nsrf=1, nbsrf 681 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = falb1( 1 : klon, nsrf)686 IF (vars_defined) zx_tmp_fi2d(1 : klon) = falb1( 1 : klon, nsrf) 682 687 CALL histwrite_phy(o_albe_srf(nsrf), zx_tmp_fi2d) 683 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = frugs( 1 : klon, nsrf)688 IF (vars_defined) zx_tmp_fi2d(1 : klon) = frugs( 1 : klon, nsrf) 684 689 CALL histwrite_phy(o_rugs_srf(nsrf), zx_tmp_fi2d) 685 IF ( itap > 0) zx_tmp_fi2d(1 : klon) = agesno( 1 : klon, nsrf)690 IF (vars_defined) zx_tmp_fi2d(1 : klon) = agesno( 1 : klon, nsrf) 686 691 CALL histwrite_phy(o_ages_srf(nsrf), zx_tmp_fi2d) 687 692 ENDDO !nsrf=1, nbsrf … … 691 696 if (iflag_pbl>1) then 692 697 zx_tmp_fi3d=0. 693 IF ( itap > 0) THEN698 IF (vars_defined) THEN 694 699 do nsrf=1,nbsrf 695 700 do k=1,klev … … 714 719 CALL histwrite_phy(o_dvdyn, d_v_dyn) 715 720 716 IF ( itap > 0) THEN721 IF (vars_defined) THEN 717 722 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys 718 723 ENDIF 719 724 CALL histwrite_phy(o_dtcon, zx_tmp_fi3d) 720 725 if(iflag_thermals.eq.1)then 721 IF ( itap > 0) THEN726 IF (vars_defined) THEN 722 727 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & 723 728 d_t_ajsb(1:klon,1:klev)/pdtphys … … 725 730 CALL histwrite_phy(o_tntc, zx_tmp_fi3d) 726 731 else if(iflag_thermals.gt.1.and.iflag_wake.EQ.1)then 727 IF ( itap > 0) THEN732 IF (vars_defined) THEN 728 733 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & 729 734 d_t_ajs(1:klon,1:klev)/pdtphys + & … … 732 737 CALL histwrite_phy(o_tntc, zx_tmp_fi3d) 733 738 endif 734 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_u_con(1:klon,1:klev)/pdtphys739 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_con(1:klon,1:klev)/pdtphys 735 740 CALL histwrite_phy(o_ducon, zx_tmp_fi3d) 736 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_v_con(1:klon,1:klev)/pdtphys741 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_con(1:klon,1:klev)/pdtphys 737 742 CALL histwrite_phy(o_dvcon, zx_tmp_fi3d) 738 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys743 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys 739 744 CALL histwrite_phy(o_dqcon, zx_tmp_fi3d) 740 745 741 746 IF(iflag_thermals.EQ.1) THEN 742 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys747 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys 743 748 CALL histwrite_phy(o_tnhusc, zx_tmp_fi3d) 744 749 ELSE IF(iflag_thermals.GT.1.AND.iflag_wake.EQ.1) THEN 745 IF ( itap > 0) THEN750 IF (vars_defined) THEN 746 751 zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys + & 747 752 d_q_ajs(1:klon,1:klev)/pdtphys + & … … 751 756 ENDIF 752 757 753 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_t_lsc(1:klon,1:klev)/pdtphys758 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lsc(1:klon,1:klev)/pdtphys 754 759 CALL histwrite_phy(o_dtlsc, zx_tmp_fi3d) 755 IF ( itap > 0) zx_tmp_fi3d(1:klon, 1:klev)=(d_t_lsc(1:klon,1:klev)+ &760 IF (vars_defined) zx_tmp_fi3d(1:klon, 1:klev)=(d_t_lsc(1:klon,1:klev)+ & 756 761 d_t_eva(1:klon,1:klev))/pdtphys 757 762 CALL histwrite_phy(o_dtlschr, zx_tmp_fi3d) 758 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys763 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys 759 764 CALL histwrite_phy(o_dqlsc, zx_tmp_fi3d) 760 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=beta_prec(1:klon,1:klev)765 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=beta_prec(1:klon,1:klev) 761 766 CALL histwrite_phy(o_beta_prec, zx_tmp_fi3d) 762 767 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 763 768 ! Sorties specifiques a la separation thermiques/non thermiques 764 769 if (iflag_thermals>=1) then 765 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscth(1:klon,1:klev)/pdtphys770 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscth(1:klon,1:klev)/pdtphys 766 771 CALL histwrite_phy(o_dtlscth, zx_tmp_fi3d) 767 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscst(1:klon,1:klev)/pdtphys772 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscst(1:klon,1:klev)/pdtphys 768 773 CALL histwrite_phy(o_dtlscst, zx_tmp_fi3d) 769 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscth(1:klon,1:klev)/pdtphys774 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscth(1:klon,1:klev)/pdtphys 770 775 CALL histwrite_phy(o_dqlscth, zx_tmp_fi3d) 771 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscst(1:klon,1:klev)/pdtphys776 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscst(1:klon,1:klev)/pdtphys 772 777 CALL histwrite_phy(o_dqlscst, zx_tmp_fi3d) 773 778 CALL histwrite_phy(o_plulth, plul_th) 774 779 CALL histwrite_phy(o_plulst, plul_st) 775 IF ( itap > 0) THEN780 IF (vars_defined) THEN 776 781 do k=1,klev 777 782 do i=1,klon … … 785 790 ENDIF 786 791 CALL histwrite_phy(o_ptconvth, zx_tmp_fi3d) 787 IF ( itap > 0) THEN792 IF (vars_defined) THEN 788 793 do i=1,klon 789 794 zx_tmp_fi2d(1:klon)=lmax_th(:) … … 793 798 endif ! iflag_thermals>=1 794 799 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 795 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev)/pdtphys800 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev)/pdtphys 796 801 CALL histwrite_phy(o_dtvdf, zx_tmp_fi3d) 797 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_t_diss(1:klon,1:klev)/pdtphys802 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_diss(1:klon,1:klev)/pdtphys 798 803 CALL histwrite_phy(o_dtdis, zx_tmp_fi3d) 799 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys804 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys 800 805 CALL histwrite_phy(o_dqvdf, zx_tmp_fi3d) 801 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_t_eva(1:klon,1:klev)/pdtphys806 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_eva(1:klon,1:klev)/pdtphys 802 807 CALL histwrite_phy(o_dteva, zx_tmp_fi3d) 803 IF ( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_q_eva(1:klon,1:klev)/pdtphys808 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_eva(1:klon,1:klev)/pdtphys 804 809 CALL histwrite_phy(o_dqeva, zx_tmp_fi3d) 805 810 zpt_conv = 0. … … 807 812 CALL histwrite_phy(o_ptconv, zpt_conv) 808 813 CALL histwrite_phy(o_ratqs, ratqs) 809 IF ( itap > 0) THEN814 IF (vars_defined) THEN 810 815 zx_tmp_fi3d(1:klon,1:klev)=d_t_ajs(1:klon,1:klev)/pdtphys - & 811 816 d_t_ajsb(1:klon,1:klev)/pdtphys … … 824 829 CALL histwrite_phy(o_f0_th, f0) 825 830 CALL histwrite_phy(o_zmax_th, zmax_th) 826 IF ( itap > 0) THEN831 IF (vars_defined) THEN 827 832 zx_tmp_fi3d(1:klon,1:klev)=d_q_ajs(1:klon,1:klev)/pdtphys - & 828 833 d_q_ajsb(1:klon,1:klev)/pdtphys … … 830 835 CALL histwrite_phy(o_dqthe, zx_tmp_fi3d) 831 836 ENDIF !iflag_thermals 832 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_t_ajsb(1:klon,1:klev)/pdtphys837 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ajsb(1:klon,1:klev)/pdtphys 833 838 CALL histwrite_phy(o_dtajs, zx_tmp_fi3d) 834 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys839 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys 835 840 CALL histwrite_phy(o_dqajs, zx_tmp_fi3d) 836 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=heat(1:klon,1:klev)/RDAY841 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=heat(1:klon,1:klev)/RDAY 837 842 CALL histwrite_phy(o_dtswr, zx_tmp_fi3d) 838 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=heat0(1:klon,1:klev)/RDAY843 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=heat0(1:klon,1:klev)/RDAY 839 844 CALL histwrite_phy(o_dtsw0, zx_tmp_fi3d) 840 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=-1.*cool(1:klon,1:klev)/RDAY845 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=-1.*cool(1:klon,1:klev)/RDAY 841 846 CALL histwrite_phy(o_dtlwr, zx_tmp_fi3d) 842 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=-1.*cool0(1:klon,1:klev)/RDAY847 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=-1.*cool0(1:klon,1:klev)/RDAY 843 848 CALL histwrite_phy(o_dtlw0, zx_tmp_fi3d) 844 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev)/pdtphys849 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev)/pdtphys 845 850 CALL histwrite_phy(o_dtec, zx_tmp_fi3d) 846 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_u_vdf(1:klon,1:klev)/pdtphys851 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_vdf(1:klon,1:klev)/pdtphys 847 852 CALL histwrite_phy(o_duvdf, zx_tmp_fi3d) 848 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_v_vdf(1:klon,1:klev)/pdtphys853 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_vdf(1:klon,1:klev)/pdtphys 849 854 CALL histwrite_phy(o_dvvdf, zx_tmp_fi3d) 850 855 IF (ok_orodr) THEN 851 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_u_oro(1:klon,1:klev)/pdtphys856 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_oro(1:klon,1:klev)/pdtphys 852 857 CALL histwrite_phy(o_duoro, zx_tmp_fi3d) 853 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_v_oro(1:klon,1:klev)/pdtphys858 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_oro(1:klon,1:klev)/pdtphys 854 859 CALL histwrite_phy(o_dvoro, zx_tmp_fi3d) 855 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_t_oro(1:klon,1:klev)/pdtphys860 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_oro(1:klon,1:klev)/pdtphys 856 861 CALL histwrite_phy(o_dtoro, zx_tmp_fi3d) 857 862 ENDIF 858 863 IF (ok_orolf) THEN 859 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_u_lif(1:klon,1:klev)/pdtphys864 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_lif(1:klon,1:klev)/pdtphys 860 865 CALL histwrite_phy(o_dulif, zx_tmp_fi3d) 861 866 ENDIF 862 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_v_lif(1:klon,1:klev)/pdtphys867 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_lif(1:klon,1:klev)/pdtphys 863 868 CALL histwrite_phy(o_dvlif, zx_tmp_fi3d) 864 869 865 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_t_lif(1:klon,1:klev)/pdtphys870 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lif(1:klon,1:klev)/pdtphys 866 871 CALL histwrite_phy(o_dtlif, zx_tmp_fi3d) 867 872 868 873 IF (ok_hines) THEN 869 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_u_hin(1:klon,1:klev)/pdtphys874 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_hin(1:klon,1:klev)/pdtphys 870 875 CALL histwrite_phy(o_duhin, zx_tmp_fi3d) 871 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_v_hin(1:klon,1:klev)/pdtphys876 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_hin(1:klon,1:klev)/pdtphys 872 877 CALL histwrite_phy(o_dvhin, zx_tmp_fi3d) 873 IF( itap > 0) zx_tmp_fi3d(1:klon,1:klev)=d_t_hin(1:klon,1:klev)/pdtphys878 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_hin(1:klon,1:klev)/pdtphys 874 879 CALL histwrite_phy(o_dthin, zx_tmp_fi3d) 875 880 ENDIF … … 882 887 CALL histwrite_phy(o_rlucs, lwup0) 883 888 CALL histwrite_phy(o_rldcs, lwdn0) 884 IF( itap > 0) THEN889 IF(vars_defined) THEN 885 890 zx_tmp_fi3d(1:klon,1:klev)=d_t(1:klon,1:klev)+ & 886 891 d_t_dyn(1:klon,1:klev) 887 892 ENDIF 888 893 CALL histwrite_phy(o_tnt, zx_tmp_fi3d) 889 IF( itap > 0) THEN894 IF(vars_defined) THEN 890 895 zx_tmp_fi3d(1:klon,1:klev)=heat(1:klon,1:klev)/RDAY - & 891 896 cool(1:klon,1:klev)/RDAY 892 897 ENDIF 893 898 CALL histwrite_phy(o_tntr, zx_tmp_fi3d) 894 IF( itap > 0) THEN899 IF(vars_defined) THEN 895 900 zx_tmp_fi3d(1:klon,1:klev)= (d_t_lsc(1:klon,1:klev)+ & 896 901 d_t_eva(1:klon,1:klev)+ & … … 898 903 ENDIF 899 904 CALL histwrite_phy(o_tntscpbl, zx_tmp_fi3d) 900 IF( itap > 0) THEN905 IF(vars_defined) THEN 901 906 zx_tmp_fi3d(1:klon,1:klev)=d_qx(1:klon,1:klev,ivap)+ & 902 907 d_q_dyn(1:klon,1:klev) 903 908 ENDIF 904 909 CALL histwrite_phy(o_tnhus, zx_tmp_fi3d) 905 IF( itap > 0) THEN910 IF(vars_defined) THEN 906 911 zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys+ & 907 912 d_q_eva(1:klon,1:klev)/pdtphys … … 909 914 CALL histwrite_phy(o_tnhusscpbl, zx_tmp_fi3d) 910 915 CALL histwrite_phy(o_evu, coefm(:,:,is_ave)) 911 IF( itap > 0) THEN916 IF(vars_defined) THEN 912 917 zx_tmp_fi3d(1:klon,1:klev)=q_seri(1:klon,1:klev)+ & 913 918 ql_seri(1:klon,1:klev) … … 915 920 CALL histwrite_phy(o_h2o, zx_tmp_fi3d) 916 921 if (iflag_con >= 3) then 917 IF( itap > 0) THEN922 IF(vars_defined) THEN 918 923 zx_tmp_fi3d(1:klon,1:klev)=-1 * (dnwd(1:klon,1:klev)+ & 919 924 dnwd0(1:klon,1:klev)) 920 925 ENDIF 921 926 CALL histwrite_phy(o_mcd, zx_tmp_fi3d) 922 IF( itap > 0) THEN927 IF(vars_defined) THEN 923 928 zx_tmp_fi3d(1:klon,1:klev)=upwd(1:klon,1:klev) + & 924 929 dnwd(1:klon,1:klev)+ dnwd0(1:klon,1:klev) … … 934 939 RN2O_per.NE.RN2O_act.OR.RCFC11_per.NE.RCFC11_act.OR. & 935 940 RCFC12_per.NE.RCFC12_act) THEN 936 IF( itap > 0) zx_tmp_fi2d(1 : klon) = swupp ( 1 : klon, klevp1 )941 IF(vars_defined) zx_tmp_fi2d(1 : klon) = swupp ( 1 : klon, klevp1 ) 937 942 CALL histwrite_phy(o_rsut4co2, zx_tmp_fi2d) 938 IF( itap > 0) zx_tmp_fi2d(1 : klon) = lwupp ( 1 : klon, klevp1 )943 IF(vars_defined) zx_tmp_fi2d(1 : klon) = lwupp ( 1 : klon, klevp1 ) 939 944 CALL histwrite_phy(o_rlut4co2, zx_tmp_fi2d) 940 IF( itap > 0) zx_tmp_fi2d(1 : klon) = swup0p ( 1 : klon, klevp1 )945 IF(vars_defined) zx_tmp_fi2d(1 : klon) = swup0p ( 1 : klon, klevp1 ) 941 946 CALL histwrite_phy(o_rsutcs4co2, zx_tmp_fi2d) 942 IF( itap > 0) zx_tmp_fi2d(1 : klon) = lwup0p ( 1 : klon, klevp1 )947 IF(vars_defined) zx_tmp_fi2d(1 : klon) = lwup0p ( 1 : klon, klevp1 ) 943 948 CALL histwrite_phy(o_rlutcs4co2, zx_tmp_fi2d) 944 949 CALL histwrite_phy(o_rsu4co2, swupp) … … 968 973 CALL histwrite_phy(o_dtr_uscav(iq-2),d_tr_uscav(:,:,iq-2)) 969 974 zx_tmp_fi2d=0. 970 IF( itap > 0) THEN975 IF(vars_defined) THEN 971 976 DO k=1,klev 972 977 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*qx(:,k,iq) … … 978 983 979 984 985 IF(.NOT.vars_defined) THEN 986 !$OMP MASTER 987 DO iff=1,nfiles 988 IF (clef_files(iff)) THEN 989 CALL histend(nid_files(iff)) 990 ndex2d = 0 991 ndex3d = 0 992 993 ENDIF ! clef_files 994 ENDDO ! iff 995 !$OMP END MASTER 996 !$OMP BARRIER 997 vars_defined = .TRUE. 998 999 1000 END IF 1001 1002 END DO 1003 980 1004 IF(vars_defined) THEN 981 1005 ! On synchronise les fichiers pour IOIPSL 1006 !$OMP MASTER 982 1007 DO iff=1,nfiles 983 1008 IF (ok_sync .AND. clef_files(iff)) THEN 984 !$OMP MASTER985 1009 CALL histsync(nid_files(iff)) 986 !$OMP END MASTER987 1010 ENDIF 988 1011 END DO 989 990 ELSE 991 vars_defined = .TRUE. 1012 !$OMP END MASTER 992 1013 ENDIF 993 1014
Note: See TracChangeset
for help on using the changeset viewer.