- Timestamp:
- Nov 21, 2019, 4:43:45 PM (5 years ago)
- Location:
- LMDZ6/branches/Ocean_skin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Ocean_skin
-
LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_write_mod.F90
r3601 r3605 17 17 SUBROUTINE phys_output_write(itap, pdtphys, paprs, pphis, & 18 18 pplay, lmax_th, aerosol_couple, & 19 ok_ade, ok_aie, ivap, iliq, isol, new_aod, ok_sync, &19 ok_ade, ok_aie, ok_volcan, ivap, iliq, isol, new_aod, ok_sync, & 20 20 ptconv, read_climoz, clevSTD, ptconvth, & 21 21 d_u, d_t, qx, d_qx, zmasse, flag_aerosol, flag_aerosol_strat, ok_cdnc) … … 32 32 USE phys_output_ctrlout_mod, ONLY: o_phis, o_aire, is_ter, is_lic, is_oce, & 33 33 o_longitude, o_latitude, & 34 o_Ahyb, o_Bhyb,o_Ahyb_inter, o_Bhyb_inter, & 34 o_Ahyb, o_Bhyb,o_Ahyb_bounds, o_Bhyb_bounds, & 35 o_Ahyb_mid, o_Bhyb_mid,o_Ahyb_mid_bounds, o_Bhyb_mid_bounds, & 35 36 is_ave, is_sic, o_contfracATM, o_contfracOR, & 36 37 o_aireTER, o_flat, o_slp, o_ptstar, o_pt0, o_tsol, & … … 72 73 o_uwat, o_vwat, & 73 74 o_ptop, o_fbase, o_plcl, o_plfc, & 74 o_wbeff, o_convoccur, o_cape_max, o_upwd, o_ep,o_epmax_diag, o_Ma, & 75 o_wbeff, o_convoccur, o_cape_max, o_upwd, o_ep,o_epmax_diag, & 76 o_Mipsh, o_Ma, & 75 77 o_dnwd, o_dnwd0, o_ftime_deepcv, o_ftime_con, o_mc, & 76 78 o_prw, o_prlw, o_prsw, o_s_pblh, o_s_pblt, o_s_lcl, & … … 87 89 o_wake_s, o_wake_deltat, o_wake_deltaq, & 88 90 o_wake_omg, o_dtwak, o_dqwak, o_dqwak2d, o_Vprecip, & 89 o_ftd, o_fqd, o_wdtrainA, o_wdtrainM, & 91 o_qtaa, o_Clwaa, & 92 o_ftd, o_fqd, o_wdtrainA, o_wdtrainS, o_wdtrainM, & 90 93 o_n2, o_s2, o_proba_notrig, & 91 94 o_random_notrig, o_ale_bl_stat, & … … 196 199 ! Tropopause 197 200 o_p_tropopause, o_z_tropopause, o_t_tropopause, & 198 o_col_O3_strato, o_col_O3_tropo, & ! Added ThL 201 o_col_O3_strato, o_col_O3_tropo, & 202 !--interactive CO2 203 o_flx_co2_ocean, o_flx_co2_land, o_flx_co2_ff, o_flx_co2_bb, & 199 204 o_t_int, o_s_int, o_ds_ns, o_dt_ns, o_dter, o_dser, o_tkt, o_tks, & 200 205 o_rf, o_taur … … 214 219 o_vsed_aer, o_tau_strat_1020, o_ext_strat_1020, o_f_r_wet 215 220 #endif 221 222 USE phys_output_ctrlout_mod, ONLY: o_heat_volc, o_cool_volc !NL 223 USE phys_state_var_mod, ONLY: heat_volc, cool_volc !NL 216 224 217 225 USE phys_state_var_mod, ONLY: pctsrf, rain_fall, snow_fall, & … … 227 235 delta_tsurf, & 228 236 wstar, cape, ema_pcb, ema_pct, & 229 ema_cbmf, M a, fm_therm, ale_bl, alp_bl, ale, &237 ema_cbmf, Mipsh, Ma, fm_therm, ale_bl, alp_bl, ale, & 230 238 alp, cin, wake_pe, wake_dens, wake_s, wake_deltat, & 231 239 wake_deltaq, ftd, fqd, ale_bl_trig, albsol1, & … … 244 252 245 253 USE phys_local_var_mod, ONLY: zxfluxlat, slp, ptstar, pt0, zxtsol, zt2m, & 254 zt2m_cor,zq2m_cor,zu10m_cor,zv10m_cor, zrh2m_cor, zqsat2m_cor, & 246 255 t2m_min_mon, t2m_max_mon, evap, & 247 256 l_mixmin,l_mix, & … … 267 276 kh ,kh_x ,kh_w , & 268 277 cv_gen, wake_h, & 269 wake_omg, d_t_wake, d_q_wake, Vprecip, &270 wdtrainA, wdtrain M, n2, s2, proba_notrig, &278 wake_omg, d_t_wake, d_q_wake, Vprecip, qtaa, Clw, & 279 wdtrainA, wdtrainS, wdtrainM, n2, s2, proba_notrig, & 271 280 random_notrig, & 272 281 alp_bl_det, alp_bl_fluct_m, alp_bl_conv, & … … 329 338 #endif 330 339 340 USE carbon_cycle_mod, ONLY: fco2_ff, fco2_bb, fco2_land, fco2_ocean 341 331 342 USE phys_output_var_mod, ONLY: vars_defined, snow_o, zfra_o, bils_diss, & 332 343 bils_ec,bils_ech, bils_tke, bils_kinetic, bils_latent, bils_enthalp, & … … 368 379 ! ug Pour les sorties XIOS 369 380 USE xios 370 USE wxios, ONLY: wxios_closedef, missing_val 381 USE wxios, ONLY: wxios_closedef, missing_val, wxios_set_context 371 382 #endif 372 383 USE phys_cal_mod, ONLY : mth_len … … 390 401 INTEGER, DIMENSION(klon) :: lmax_th 391 402 LOGICAL :: aerosol_couple, ok_sync 392 LOGICAL :: ok_ade, ok_aie, new_aod403 LOGICAL :: ok_ade, ok_aie, ok_volcan, new_aod 393 404 LOGICAL, DIMENSION(klon, klev) :: ptconv, ptconvth 394 405 REAL :: pdtphys … … 417 428 REAL, PARAMETER :: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2 418 429 ! REAL, PARAMETER :: missing_val=nf90_fill_real 419 REAL, DIMENSION(klev,2) :: Ahyb_bounds, Bhyb_bounds 430 REAL, DIMENSION(klev+1,2) :: Ahyb_bounds, Bhyb_bounds 431 REAL, DIMENSION(klev,2) :: Ahyb_mid_bounds, Bhyb_mid_bounds 420 432 INTEGER :: ilev 421 433 #ifndef CPP_XIOS … … 440 452 CALL set_itau_iophy(itau_w) 441 453 442 IF (.NOT.vars_defined) THEN 443 iinitend = 2 444 ELSE 454 ! IF (.NOT.vars_defined) THEN 445 455 iinitend = 1 446 ENDIF 447 448 DO ilev=1,klev 449 Ahyb_bounds(ilev,1) = ap(ilev) 450 Ahyb_bounds(ilev,2) = ap(ilev+1) 451 Bhyb_bounds(ilev,1) = bp(ilev) 452 Bhyb_bounds(ilev,2) = bp(ilev+1) 456 ! ELSE 457 ! iinitend = 1 458 ! ENDIF 459 460 #ifdef CPP_XIOS 461 CALL wxios_set_context 462 #endif 463 464 Ahyb_bounds(1,1) = 0. 465 Ahyb_bounds(1,2) = aps(1) 466 Bhyb_bounds(1,1) = 1. 467 Bhyb_bounds(1,2) = bps(1) 468 DO ilev=2,klev 469 Ahyb_bounds(ilev,1) = aps(ilev-1) 470 Ahyb_bounds(ilev,2) = aps(ilev) 471 Bhyb_bounds(ilev,1) = bps(ilev-1) 472 Bhyb_bounds(ilev,2) = bps(ilev) 473 ENDDO 474 Ahyb_bounds(klev+1,1) = aps(klev) 475 Ahyb_bounds(klev+1,2) = 0. 476 Bhyb_bounds(klev+1,1) = bps(klev) 477 Bhyb_bounds(klev+1,2) = 0. 478 479 DO ilev=1, klev 480 Ahyb_mid_bounds(ilev,1) = ap(ilev) 481 Ahyb_mid_bounds(ilev,2) = ap(ilev+1) 482 Bhyb_mid_bounds(ilev,1) = bp(ilev) 483 Bhyb_mid_bounds(ilev,2) = bp(ilev+1) 453 484 END DO 454 485 … … 565 596 CALL histwrite_phy("R_incl",R_incl) 566 597 CALL histwrite_phy("solaire",solaire) 567 CALL histwrite_phy(o_Ahyb, aps) 568 CALL histwrite_phy(o_Bhyb, bps) 569 CALL histwrite_phy(o_Ahyb_inter, Ahyb_bounds) 570 CALL histwrite_phy(o_Bhyb_inter, Bhyb_bounds) 598 CALL histwrite_phy(o_Ahyb, ap) 599 CALL histwrite_phy(o_Bhyb, bp) 600 CALL histwrite_phy(o_Ahyb_bounds, Ahyb_bounds) 601 CALL histwrite_phy(o_Bhyb_bounds, Bhyb_bounds) 602 CALL histwrite_phy(o_Ahyb_mid, aps) 603 CALL histwrite_phy(o_Bhyb_mid, bps) 604 CALL histwrite_phy(o_Ahyb_mid_bounds, Ahyb_mid_bounds) 605 CALL histwrite_phy(o_Bhyb_mid_bounds, Bhyb_mid_bounds) 571 606 CALL histwrite_phy(o_longitude, longitude_deg) 572 607 CALL histwrite_phy(o_latitude, latitude_deg) … … 636 671 CALL histwrite_phy(o_slp, slp) 637 672 CALL histwrite_phy(o_tsol, zxtsol) 638 CALL histwrite_phy(o_t2m, zt2m )639 CALL histwrite_phy(o_t2m_min, zt2m )640 CALL histwrite_phy(o_t2m_max, zt2m )673 CALL histwrite_phy(o_t2m, zt2m_cor) 674 CALL histwrite_phy(o_t2m_min, zt2m_cor) 675 CALL histwrite_phy(o_t2m_max, zt2m_cor) 641 676 CALL histwrite_phy(o_t2m_max_mon, t2m_max_mon) 642 677 CALL histwrite_phy(o_t2m_min_mon, t2m_min_mon) … … 644 679 IF (vars_defined) THEN 645 680 DO i=1, klon 646 zx_tmp_fi2d(i)=SQRT(zu10m (i)*zu10m(i)+zv10m(i)*zv10m(i))681 zx_tmp_fi2d(i)=SQRT(zu10m_cor(i)*zu10m_cor(i)+zv10m_cor(i)*zv10m_cor(i)) 647 682 ENDDO 648 683 ENDIF … … 651 686 IF (vars_defined) THEN 652 687 DO i=1, klon 653 zx_tmp_fi2d(i)=SQRT(zu10m (i)*zu10m(i)+zv10m(i)*zv10m(i))688 zx_tmp_fi2d(i)=SQRT(zu10m_cor(i)*zu10m_cor(i)+zv10m_cor(i)*zv10m_cor(i)) 654 689 ENDDO 655 690 ENDIF … … 664 699 ENDIF 665 700 CALL histwrite_phy(o_sicf, zx_tmp_fi2d) 666 CALL histwrite_phy(o_q2m, zq2m )701 CALL histwrite_phy(o_q2m, zq2m_cor) 667 702 CALL histwrite_phy(o_ustar, zustar) 668 CALL histwrite_phy(o_u10m, zu10m )669 CALL histwrite_phy(o_v10m, zv10m )703 CALL histwrite_phy(o_u10m, zu10m_cor) 704 CALL histwrite_phy(o_v10m, zv10m_cor) 670 705 671 706 IF (vars_defined) THEN … … 716 751 CALL histwrite_phy(o_fsnow, zfra_o) 717 752 CALL histwrite_phy(o_evap, evap) 718 CALL histwrite_phy(o_tops, topsw*swradcorr) 719 CALL histwrite_phy(o_tops0, topsw0*swradcorr) 753 754 IF (vars_defined) THEN 755 zx_tmp_fi2d = topsw*swradcorr 756 ENDIF 757 CALL histwrite_phy(o_tops, zx_tmp_fi2d) 758 759 IF (vars_defined) THEN 760 zx_tmp_fi2d = topsw0*swradcorr 761 ENDIF 762 CALL histwrite_phy(o_tops0, zx_tmp_fi2d) 763 720 764 CALL histwrite_phy(o_topl, toplw) 721 765 CALL histwrite_phy(o_topl0, toplw0) … … 750 794 ENDIF 751 795 CALL histwrite_phy(o_nettop, zx_tmp_fi2d) 752 CALL histwrite_phy(o_SWup200, SWup200*swradcorr) 753 CALL histwrite_phy(o_SWup200clr, SWup200clr*swradcorr) 754 CALL histwrite_phy(o_SWdn200, SWdn200*swradcorr) 755 CALL histwrite_phy(o_SWdn200clr, SWdn200clr*swradcorr) 796 797 IF (vars_defined) THEN 798 zx_tmp_fi2d = SWup200*swradcorr 799 ENDIF 800 CALL histwrite_phy(o_SWup200, zx_tmp_fi2d) 801 802 IF (vars_defined) THEN 803 zx_tmp_fi2d = SWup200clr*swradcorr 804 ENDIF 805 CALL histwrite_phy(o_SWup200clr, zx_tmp_fi2d) 806 807 IF (vars_defined) THEN 808 zx_tmp_fi2d = SWdn200*swradcorr 809 ENDIF 810 CALL histwrite_phy(o_SWdn200, zx_tmp_fi2d) 811 812 813 IF (vars_defined) THEN 814 zx_tmp_fi2d = SWdn200clr*swradcorr 815 ENDIF 816 CALL histwrite_phy(o_SWdn200clr, zx_tmp_fi2d) 817 756 818 CALL histwrite_phy(o_LWup200, LWup200) 757 819 CALL histwrite_phy(o_LWup200clr, LWup200clr) 758 820 CALL histwrite_phy(o_LWdn200, LWdn200) 759 821 CALL histwrite_phy(o_LWdn200clr, LWdn200clr) 760 CALL histwrite_phy(o_sols, solsw*swradcorr) 761 CALL histwrite_phy(o_sols0, solsw0*swradcorr) 822 823 IF (vars_defined) THEN 824 zx_tmp_fi2d = solsw*swradcorr 825 ENDIF 826 CALL histwrite_phy(o_sols, zx_tmp_fi2d) 827 828 829 IF (vars_defined) THEN 830 zx_tmp_fi2d = solsw0*swradcorr 831 ENDIF 832 CALL histwrite_phy(o_sols0, zx_tmp_fi2d) 762 833 CALL histwrite_phy(o_soll, sollw) 763 834 CALL histwrite_phy(o_soll0, sollw0) … … 909 980 IF (iflag_pbl > 1) THEN 910 981 CALL histwrite_phy(o_tke_srf(nsrf), pbl_tke(:,1:klev,nsrf)) 911 CALL histwrite_phy(o_l_mix(nsrf), l_mix(:,1:klev,nsrf))982 !CALL histwrite_phy(o_l_mix(nsrf), l_mix(:,1:klev,nsrf)) 912 983 CALL histwrite_phy(o_l_mixmin(nsrf), l_mixmin(:,1:klev,nsrf)) 913 984 CALL histwrite_phy(o_tke_max_srf(nsrf), pbl_tke(:,1:klev,nsrf)) … … 954 1025 CALL histwrite_phy(o_cldt, cldt) 955 1026 CALL histwrite_phy(o_JrNt, JrNt) 956 CALL histwrite_phy(o_cldljn, cldl*JrNt) 957 CALL histwrite_phy(o_cldmjn, cldm*JrNt) 958 CALL histwrite_phy(o_cldhjn, cldh*JrNt) 959 CALL histwrite_phy(o_cldtjn, cldt*JrNt) 1027 1028 IF (vars_defined) zx_tmp_fi2d=cldl*JrNt 1029 CALL histwrite_phy(o_cldljn, zx_tmp_fi2d) 1030 1031 IF (vars_defined) zx_tmp_fi2d=cldm*JrNt 1032 CALL histwrite_phy(o_cldmjn, zx_tmp_fi2d) 1033 1034 IF (vars_defined) zx_tmp_fi2d=cldh*JrNt 1035 CALL histwrite_phy(o_cldhjn, zx_tmp_fi2d) 1036 1037 IF (vars_defined) zx_tmp_fi2d=cldt*JrNt 1038 CALL histwrite_phy(o_cldtjn, zx_tmp_fi2d) 1039 960 1040 CALL histwrite_phy(o_cldq, cldq) 961 1041 IF (vars_defined) zx_tmp_fi2d(1:klon) = flwp(1:klon) … … 1108 1188 ! Wakes 1109 1189 IF (iflag_con.EQ.3) THEN 1190 CALL histwrite_phy(o_Mipsh, Mipsh) 1110 1191 IF (iflag_wake>=1) THEN 1111 1192 CALL histwrite_phy(o_ale_wk, ale_wake) … … 1158 1239 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_wake(1:klon,1:klev)/pdtphys 1159 1240 CALL histwrite_phy(o_dqwak, zx_tmp_fi3d) 1160 CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)1241 IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d) 1161 1242 CALL histwrite_phy(o_dqwak2d, zx_tmp_fi2d) 1162 1243 ENDIF ! iflag_wake>=1 … … 1168 1249 ! etendue a iflag_con=3 (jyg) 1169 1250 CALL histwrite_phy(o_Vprecip, Vprecip) 1251 CALL histwrite_phy(o_qtaa, qtaa) 1252 CALL histwrite_phy(o_clwaa, clw) 1170 1253 CALL histwrite_phy(o_wdtrainA, wdtrainA) 1254 CALL histwrite_phy(o_wdtrainS, wdtrainS) 1171 1255 CALL histwrite_phy(o_wdtrainM, wdtrainM) 1172 1256 ENDIF !(iflag_con.EQ.3.or.iflag_con.EQ.30) … … 1208 1292 IF (slab_gm) THEN 1209 1293 CALL histwrite_phy(o_slab_gm, dt_gm(:,1:nslay)) 1210 END 1294 ENDIF 1211 1295 IF (slab_hdiff) THEN 1212 1296 IF (nslay.EQ.1) THEN … … 1257 1341 ! CALL histwrite_phy(o_rh2m_max, zx_tmp_fi2d) 1258 1342 1259 CALL histwrite_phy(o_qsat2m, qsat2m)1343 CALL histwrite_phy(o_qsat2m, zqsat2m_cor) 1260 1344 CALL histwrite_phy(o_tpot, tpot) 1261 1345 CALL histwrite_phy(o_tpote, tpote) … … 1322 1406 1323 1407 ! ThL -- In the following, we assume read_climoz == 1 1324 zx_tmp_fi2d = 0.0 ! Computation for strato, added ThL 1325 DO k=1, klev 1326 zx_tmp_fi2d(:) = zx_tmp_fi2d(:) + wo(:,k,1) * stratomask(:,k) * 1.e3 1327 END DO 1408 IF (vars_defined) THEN 1409 zx_tmp_fi2d = 0.0 ! Computation for strato, added ThL 1410 DO k=1, klev 1411 zx_tmp_fi2d(:) = zx_tmp_fi2d(:) + wo(:,k,1) * stratomask(:,k) * 1.e3 1412 END DO 1413 ENDIF 1328 1414 CALL histwrite_phy(o_col_O3_strato, zx_tmp_fi2d) ! Added ThL 1329 zx_tmp_fi2d = 0.0 ! Computation for tropo, added ThL 1330 DO k=1, klev 1331 zx_tmp_fi2d(:) = zx_tmp_fi2d(:) + wo(:,k,1) * (1.0-stratomask(:,k)) * 1.e3 1332 END DO 1415 1416 IF (vars_defined) THEN 1417 zx_tmp_fi2d = 0.0 ! Computation for tropo, added ThL 1418 DO k=1, klev 1419 zx_tmp_fi2d(:) = zx_tmp_fi2d(:) + wo(:,k,1) * (1.0-stratomask(:,k)) * 1.e3 1420 END DO 1421 ENDIF 1333 1422 CALL histwrite_phy(o_col_O3_tropo, zx_tmp_fi2d) ! Added ThL 1334 1423 ! end add ThL … … 1370 1459 ENDIF 1371 1460 #endif 1461 !NL 1462 IF (ok_volcan .AND. ok_ade) THEN 1463 DO k=1, klev 1464 IF (vars_defined) zx_tmp_fi3d(:,k)=heat_volc(:,k)*swradcorr(:) 1465 ENDDO 1466 CALL histwrite_phy(o_heat_volc, zx_tmp_fi3d) 1467 DO k=1, klev 1468 IF (vars_defined) zx_tmp_fi3d(:,k)=cool_volc(:,k) 1469 ENDDO 1470 CALL histwrite_phy(o_cool_volc, zx_tmp_fi3d) 1471 ENDIF 1372 1472 IF (ok_ade) THEN 1373 CALL histwrite_phy(o_topswad, topswad_aero*swradcorr) 1374 CALL histwrite_phy(o_topswad0, topswad0_aero*swradcorr) 1375 CALL histwrite_phy(o_solswad, solswad_aero*swradcorr) 1376 CALL histwrite_phy(o_solswad0, solswad0_aero*swradcorr) 1473 IF (vars_defined) zx_tmp_fi2d(:)=topswad_aero*swradcorr 1474 CALL histwrite_phy(o_topswad, zx_tmp_fi2d) 1475 1476 IF (vars_defined) zx_tmp_fi2d(:)=topswad0_aero*swradcorr 1477 CALL histwrite_phy(o_topswad0, zx_tmp_fi2d) 1478 1479 IF (vars_defined) zx_tmp_fi2d(:)=solswad_aero*swradcorr 1480 CALL histwrite_phy(o_solswad, zx_tmp_fi2d) 1481 1482 IF (vars_defined) zx_tmp_fi2d(:)=solswad0_aero*swradcorr 1483 CALL histwrite_phy(o_solswad0, zx_tmp_fi2d) 1484 1377 1485 CALL histwrite_phy(o_toplwad, toplwad_aero) 1378 1486 CALL histwrite_phy(o_toplwad0, toplwad0_aero) … … 1381 1489 !====MS forcing diagnostics 1382 1490 IF (new_aod) THEN 1383 zx_tmp_fi2d(:)=topsw_aero(:,1)*swradcorr(:) 1491 !ym warning : topsw_aero, solsw_aero, topsw0_aero, solsw0_aero are not defined by model 1492 !ym => init to 0 in radlwsw_m.F90 ztopsw_aero, zsolsw_aero, ztopsw0_aero, zsolsw0_aero 1493 1494 IF (vars_defined) zx_tmp_fi2d(:)=topsw_aero(:,1)*swradcorr(:) 1384 1495 CALL histwrite_phy(o_swtoaas_nat,zx_tmp_fi2d) 1385 zx_tmp_fi2d(:)=solsw_aero(:,1)*swradcorr(:)1496 IF (vars_defined) zx_tmp_fi2d(:)=solsw_aero(:,1)*swradcorr(:) 1386 1497 CALL histwrite_phy(o_swsrfas_nat,zx_tmp_fi2d) 1387 zx_tmp_fi2d(:)=topsw0_aero(:,1)*swradcorr(:)1498 IF (vars_defined) zx_tmp_fi2d(:)=topsw0_aero(:,1)*swradcorr(:) 1388 1499 CALL histwrite_phy(o_swtoacs_nat,zx_tmp_fi2d) 1389 zx_tmp_fi2d(:)=solsw0_aero(:,1)*swradcorr(:)1500 IF (vars_defined) zx_tmp_fi2d(:)=solsw0_aero(:,1)*swradcorr(:) 1390 1501 CALL histwrite_phy(o_swsrfcs_nat,zx_tmp_fi2d) 1391 1502 !ant 1392 zx_tmp_fi2d(:)=topsw_aero(:,2)*swradcorr(:)1503 IF (vars_defined) zx_tmp_fi2d(:)=topsw_aero(:,2)*swradcorr(:) 1393 1504 CALL histwrite_phy(o_swtoaas_ant,zx_tmp_fi2d) 1394 zx_tmp_fi2d(:)=solsw_aero(:,2)*swradcorr(:)1505 IF (vars_defined) zx_tmp_fi2d(:)=solsw_aero(:,2)*swradcorr(:) 1395 1506 CALL histwrite_phy(o_swsrfas_ant,zx_tmp_fi2d) 1396 zx_tmp_fi2d(:)=topsw0_aero(:,2)*swradcorr(:)1507 IF (vars_defined) zx_tmp_fi2d(:)=topsw0_aero(:,2)*swradcorr(:) 1397 1508 CALL histwrite_phy(o_swtoacs_ant,zx_tmp_fi2d) 1398 zx_tmp_fi2d(:)=solsw0_aero(:,2)*swradcorr(:)1509 IF (vars_defined) zx_tmp_fi2d(:)=solsw0_aero(:,2)*swradcorr(:) 1399 1510 CALL histwrite_phy(o_swsrfcs_ant,zx_tmp_fi2d) 1400 1511 !cf 1401 1512 IF (.not. aerosol_couple) THEN 1402 zx_tmp_fi2d(:)=topswcf_aero(:,1)*swradcorr(:)1513 IF (vars_defined) zx_tmp_fi2d(:)=topswcf_aero(:,1)*swradcorr(:) 1403 1514 CALL histwrite_phy(o_swtoacf_nat,zx_tmp_fi2d) 1404 zx_tmp_fi2d(:)=solswcf_aero(:,1)*swradcorr(:)1515 IF (vars_defined) zx_tmp_fi2d(:)=solswcf_aero(:,1)*swradcorr(:) 1405 1516 CALL histwrite_phy(o_swsrfcf_nat,zx_tmp_fi2d) 1406 zx_tmp_fi2d(:)=topswcf_aero(:,2)*swradcorr(:)1517 IF (vars_defined) zx_tmp_fi2d(:)=topswcf_aero(:,2)*swradcorr(:) 1407 1518 CALL histwrite_phy(o_swtoacf_ant,zx_tmp_fi2d) 1408 zx_tmp_fi2d(:)=solswcf_aero(:,2)*swradcorr(:)1519 IF (vars_defined) zx_tmp_fi2d(:)=solswcf_aero(:,2)*swradcorr(:) 1409 1520 CALL histwrite_phy(o_swsrfcf_ant,zx_tmp_fi2d) 1410 zx_tmp_fi2d(:)=topswcf_aero(:,3)*swradcorr(:)1521 IF (vars_defined) zx_tmp_fi2d(:)=topswcf_aero(:,3)*swradcorr(:) 1411 1522 CALL histwrite_phy(o_swtoacf_zero,zx_tmp_fi2d) 1412 zx_tmp_fi2d(:)=solswcf_aero(:,3)*swradcorr(:)1523 IF (vars_defined) zx_tmp_fi2d(:)=solswcf_aero(:,3)*swradcorr(:) 1413 1524 CALL histwrite_phy(o_swsrfcf_zero,zx_tmp_fi2d) 1414 1525 ENDIF … … 1417 1528 ENDIF 1418 1529 IF (ok_aie) THEN 1419 CALL histwrite_phy(o_topswai, topswai_aero*swradcorr) 1420 CALL histwrite_phy(o_toplwai, toplwai_aero*swradcorr) 1421 CALL histwrite_phy(o_solswai, solswai_aero*swradcorr) 1422 CALL histwrite_phy(o_sollwai, sollwai_aero*swradcorr) 1530 IF (vars_defined) zx_tmp_fi2d(:)= topswai_aero*swradcorr 1531 CALL histwrite_phy(o_topswai, zx_tmp_fi2d) 1532 1533 IF (vars_defined) zx_tmp_fi2d(:)=toplwai_aero*swradcorr 1534 CALL histwrite_phy(o_toplwai, zx_tmp_fi2d) 1535 1536 IF (vars_defined) zx_tmp_fi2d(:)=solswai_aero*swradcorr 1537 CALL histwrite_phy(o_solswai, zx_tmp_fi2d) 1538 1539 IF (vars_defined) zx_tmp_fi2d(:)=sollwai_aero*swradcorr 1540 CALL histwrite_phy(o_sollwai, zx_tmp_fi2d) 1423 1541 ENDIF 1424 1542 IF (flag_aerosol.GT.0.AND.ok_cdnc) THEN … … 1435 1553 CALL histwrite_phy(o_icc3dstra, icc3dstra) 1436 1554 CALL histwrite_phy(o_cldicemxrat, zfice) 1437 zx_tmp_fi3d(:,:)=1-zfice(:,:)1555 IF (vars_defined) zx_tmp_fi3d(:,:)=1-zfice(:,:) 1438 1556 CALL histwrite_phy(o_cldwatmxrat, zx_tmp_fi3d) 1439 1557 CALL histwrite_phy(o_reffclwtop, reffclwtop) … … 1450 1568 CALL histwrite_phy(o_ovap, q_seri) 1451 1569 CALL histwrite_phy(o_oliq, ql_seri) 1452 CALL histwrite_phy(o_ocond, ql_seri+qs_seri) 1570 1571 IF (vars_defined) zx_tmp_fi3d = ql_seri+qs_seri 1572 CALL histwrite_phy(o_ocond, zx_tmp_fi3d) 1573 1453 1574 CALL histwrite_phy(o_geop, zphi) 1454 1575 CALL histwrite_phy(o_vitu, u_seri) … … 1457 1578 CALL histwrite_phy(o_pres, pplay) 1458 1579 CALL histwrite_phy(o_paprs, paprs(:,1:klev)) 1459 CALL histwrite_phy(o_zfull,zphi/RG) 1580 1581 IF (vars_defined) zx_tmp_fi3d = zphi/RG 1582 CALL histwrite_phy(o_zfull,zx_tmp_fi3d) 1460 1583 1461 1584 #ifdef CPP_XIOS … … 1502 1625 CALL histwrite_phy(o_rnebjn, zx_tmp_fi3d) 1503 1626 CALL histwrite_phy(o_rhum, zx_rh) 1504 CALL histwrite_phy(o_ozone, & 1505 wo(:, :, 1) * dobson_u * 1e3 / zmasse / rmo3 * rmd) 1627 1628 IF (vars_defined) zx_tmp_fi3d = wo(:, :, 1) * dobson_u * 1e3 / zmasse / rmo3 * rmd 1629 CALL histwrite_phy(o_ozone, zx_tmp_fi3d) 1506 1630 1507 1631 IF (read_climoz == 2) THEN 1508 CALL histwrite_phy(o_ozone_light, &1509 wo(:, :, 2) * dobson_u * 1e3 / zmasse / rmo3 * rmd)1632 IF (vars_defined) zx_tmp_fi3d = wo(:, :, 2) * dobson_u * 1e3 / zmasse / rmo3 * rmd 1633 CALL histwrite_phy(o_ozone_light, zx_tmp_fi3d) 1510 1634 ENDIF 1511 1635 … … 1515 1639 1516 1640 CALL histwrite_phy(o_dqphy, d_qx(:,:,ivap)) 1517 CALL water_int(klon,klev,d_qx(:,:,ivap),zmasse,zx_tmp_fi2d)1641 IF (vars_defined) CALL water_int(klon,klev,d_qx(:,:,ivap),zmasse,zx_tmp_fi2d) 1518 1642 CALL histwrite_phy(o_dqphy2d, zx_tmp_fi2d) 1519 1643 1520 1644 CALL histwrite_phy(o_dqlphy, d_qx(:,:,iliq)) 1521 CALL water_int(klon,klev,d_qx(:,:,iliq),zmasse,zx_tmp_fi2d)1645 IF (vars_defined) CALL water_int(klon,klev,d_qx(:,:,iliq),zmasse,zx_tmp_fi2d) 1522 1646 CALL histwrite_phy(o_dqlphy2d, zx_tmp_fi2d) 1523 1647 1524 1648 IF (nqo.EQ.3) THEN 1525 1649 CALL histwrite_phy(o_dqsphy, d_qx(:,:,isol)) 1526 CALL water_int(klon,klev,d_qx(:,:,isol),zmasse,zx_tmp_fi2d)1650 IF (vars_defined) CALL water_int(klon,klev,d_qx(:,:,isol),zmasse,zx_tmp_fi2d) 1527 1651 CALL histwrite_phy(o_dqsphy2d, zx_tmp_fi2d) 1528 1652 ELSE … … 1589 1713 ENDIF 1590 1714 CALL histwrite_phy(o_dtcon, zx_tmp_fi3d) 1591 if(iflag_thermals.eq.0)then1715 IF (iflag_thermals.EQ.0) THEN 1592 1716 IF (vars_defined) THEN 1593 1717 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & … … 1595 1719 ENDIF 1596 1720 CALL histwrite_phy(o_tntc, zx_tmp_fi3d) 1597 else if(iflag_thermals.ge.1.and.iflag_wake.EQ.1)then1721 ELSE IF(iflag_thermals.GE.1.AND.iflag_wake.EQ.1) THEN 1598 1722 IF (vars_defined) THEN 1599 1723 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & … … 1602 1726 ENDIF 1603 1727 CALL histwrite_phy(o_tntc, zx_tmp_fi3d) 1604 endif1728 ENDIF 1605 1729 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_con(1:klon,1:klev)/pdtphys 1606 1730 CALL histwrite_phy(o_ducon, zx_tmp_fi3d) … … 1609 1733 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys 1610 1734 CALL histwrite_phy(o_dqcon, zx_tmp_fi3d) 1611 CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)1735 IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d) 1612 1736 CALL histwrite_phy(o_dqcon2d, zx_tmp_fi2d) 1613 1737 … … 1631 1755 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys 1632 1756 CALL histwrite_phy(o_dqlsc, zx_tmp_fi3d) 1633 CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)1757 IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d) 1634 1758 CALL histwrite_phy(o_dqlsc2d, zx_tmp_fi2d) 1635 1759 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=beta_prec(1:klon,1:klev) … … 1644 1768 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscth(1:klon,1:klev)/pdtphys 1645 1769 CALL histwrite_phy(o_dqlscth, zx_tmp_fi3d) 1646 CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)1770 IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d) 1647 1771 CALL histwrite_phy(o_dqlscth2d, zx_tmp_fi2d) 1648 1772 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscst(1:klon,1:klev)/pdtphys 1649 1773 CALL histwrite_phy(o_dqlscst, zx_tmp_fi3d) 1650 CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)1774 IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d) 1651 1775 CALL histwrite_phy(o_dqlscst2d, zx_tmp_fi2d) 1652 1776 CALL histwrite_phy(o_plulth, plul_th) 1653 1777 CALL histwrite_phy(o_plulst, plul_st) 1654 1778 IF (vars_defined) THEN 1655 doi=1,klon1779 DO i=1,klon 1656 1780 zx_tmp_fi2d(1:klon)=lmax_th(:) 1657 enddo1781 ENDDO 1658 1782 ENDIF 1659 1783 CALL histwrite_phy(o_lmaxth, zx_tmp_fi2d) … … 1702 1826 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys 1703 1827 CALL histwrite_phy(o_dqvdf, zx_tmp_fi3d) 1704 CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)1828 IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d) 1705 1829 CALL histwrite_phy(o_dqvdf2d, zx_tmp_fi2d) 1706 1830 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_eva(1:klon,1:klev)/pdtphys … … 1708 1832 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_eva(1:klon,1:klev)/pdtphys 1709 1833 CALL histwrite_phy(o_dqeva, zx_tmp_fi3d) 1710 CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)1834 IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d) 1711 1835 CALL histwrite_phy(o_dqeva2d, zx_tmp_fi2d) 1712 1836 CALL histwrite_phy(o_ratqs, ratqs) … … 1747 1871 ENDIF 1748 1872 CALL histwrite_phy(o_dqthe, zx_tmp_fi3d) 1749 CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)1873 IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d) 1750 1874 CALL histwrite_phy(o_dqthe2d, zx_tmp_fi2d) 1751 1875 ENDIF !iflag_thermals … … 1754 1878 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys 1755 1879 CALL histwrite_phy(o_dqajs, zx_tmp_fi3d) 1756 CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)1880 IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d) 1757 1881 CALL histwrite_phy(o_dqajs2d, zx_tmp_fi2d) 1758 1882 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_swr(1:klon,1:klev)/pdtphys … … 1790 1914 1791 1915 IF (ok_hines) THEN 1792 CALL histwrite_phy(o_du_gwd_hines, du_gwd_hines/pdtphys) 1793 CALL histwrite_phy(o_dv_gwd_hines, dv_gwd_hines/pdtphys) 1916 IF (vars_defined) zx_tmp_fi3d=du_gwd_hines/pdtphys 1917 CALL histwrite_phy(o_du_gwd_hines, zx_tmp_fi3d) 1918 1919 IF (vars_defined) zx_tmp_fi3d= dv_gwd_hines/pdtphys 1920 CALL histwrite_phy(o_dv_gwd_hines, zx_tmp_fi3d) 1921 1794 1922 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_hin(1:klon,1:klev)/pdtphys 1795 1923 CALL histwrite_phy(o_dthin, zx_tmp_fi3d) … … 1799 1927 1800 1928 IF (.not. ok_hines .and. ok_gwd_rando) THEN 1801 CALL histwrite_phy(o_du_gwd_front, du_gwd_front / pdtphys) 1802 CALL histwrite_phy(o_dv_gwd_front, dv_gwd_front / pdtphys) 1929 IF (vars_defined) zx_tmp_fi3d=du_gwd_front / pdtphys 1930 CALL histwrite_phy(o_du_gwd_front, zx_tmp_fi3d) 1931 1932 IF (vars_defined) zx_tmp_fi3d=dv_gwd_front / pdtphys 1933 CALL histwrite_phy(o_dv_gwd_front, zx_tmp_fi3d) 1934 1803 1935 CALL histwrite_phy(o_ustr_gwd_front, zustr_gwd_front) 1804 1936 CALL histwrite_phy(o_vstr_gwd_front, zvstr_gwd_front) … … 1806 1938 1807 1939 IF (ok_gwd_rando) THEN 1808 CALL histwrite_phy(o_du_gwd_rando, du_gwd_rando / pdtphys) 1809 CALL histwrite_phy(o_dv_gwd_rando, dv_gwd_rando / pdtphys) 1940 IF (vars_defined) zx_tmp_fi3d=du_gwd_rando / pdtphys 1941 CALL histwrite_phy(o_du_gwd_rando, zx_tmp_fi3d) 1942 1943 IF (vars_defined) zx_tmp_fi3d=dv_gwd_rando / pdtphys 1944 CALL histwrite_phy(o_dv_gwd_rando, zx_tmp_fi3d) 1810 1945 CALL histwrite_phy(o_ustr_gwd_rando, zustr_gwd_rando) 1811 1946 CALL histwrite_phy(o_vstr_gwd_rando, zvstr_gwd_rando) … … 1815 1950 1816 1951 IF (ok_qch4) THEN 1817 CALL histwrite_phy(o_dqch4, d_q_ch4 / pdtphys) 1818 ENDIF 1819 1820 DO k=1, klevp1 1821 zx_tmp_fi3d1(:,k)=swup(:,k)*swradcorr(:) 1822 ENDDO 1952 IF (vars_defined) zx_tmp_fi3d=d_q_ch4 / pdtphys 1953 CALL histwrite_phy(o_dqch4, zx_tmp_fi3d) 1954 ENDIF 1955 1956 IF (vars_defined) THEN 1957 DO k=1, klevp1 1958 zx_tmp_fi3d1(:,k)=swup(:,k)*swradcorr(:) 1959 ENDDO 1960 ENDIF 1961 1823 1962 CALL histwrite_phy(o_rsu, zx_tmp_fi3d1) 1824 DO k=1, klevp1 1825 zx_tmp_fi3d1(:,k)=swdn(:,k)*swradcorr(:) 1826 ENDDO 1963 1964 1965 IF (vars_defined) THEN 1966 DO k=1, klevp1 1967 zx_tmp_fi3d1(:,k)=swdn(:,k)*swradcorr(:) 1968 ENDDO 1969 ENDIF 1970 1827 1971 CALL histwrite_phy(o_rsd, zx_tmp_fi3d1) 1828 DO k=1, klevp1 1829 zx_tmp_fi3d1(:,k)=swup0(:,k)*swradcorr(:) 1830 ENDDO 1972 1973 IF (vars_defined) THEN 1974 DO k=1, klevp1 1975 zx_tmp_fi3d1(:,k)=swup0(:,k)*swradcorr(:) 1976 ENDDO 1977 ENDIF 1978 1831 1979 CALL histwrite_phy(o_rsucs, zx_tmp_fi3d1) 1832 DO k=1, klevp1 1833 zx_tmp_fi3d1(:,k)=swupc0(:,k)*swradcorr(:) 1834 ENDDO 1980 1981 IF (vars_defined) THEN 1982 DO k=1, klevp1 1983 zx_tmp_fi3d1(:,k)=swupc0(:,k)*swradcorr(:) 1984 ENDDO 1985 ENDIF 1835 1986 CALL histwrite_phy(o_rsucsaf, zx_tmp_fi3d1) 1836 DO k=1, klevp1 1837 zx_tmp_fi3d1(:,k)=swdn0(:,k)*swradcorr(:) 1838 ENDDO 1987 1988 IF (vars_defined) THEN 1989 DO k=1, klevp1 1990 zx_tmp_fi3d1(:,k)=swdn0(:,k)*swradcorr(:) 1991 ENDDO 1992 ENDIF 1839 1993 CALL histwrite_phy(o_rsdcs, zx_tmp_fi3d1) 1840 DO k=1, klevp1 1841 zx_tmp_fi3d1(:,k)=swdnc0(:,k)*swradcorr(:) 1842 ENDDO 1994 1995 1996 IF (vars_defined) THEN 1997 DO k=1, klevp1 1998 zx_tmp_fi3d1(:,k)=swdnc0(:,k)*swradcorr(:) 1999 ENDDO 2000 ENDIF 1843 2001 CALL histwrite_phy(o_rsdcsaf, zx_tmp_fi3d1) 1844 2002 … … 1894 2052 ELSE IF (iflag_con == 2) THEN 1895 2053 CALL histwrite_phy(o_mcd, pmfd) 1896 CALL histwrite_phy(o_dmc, pmfu + pmfd) 2054 IF (vars_defined) zx_tmp_fi3d = pmfu + pmfd 2055 CALL histwrite_phy(o_dmc, zx_tmp_fi3d) 1897 2056 ENDIF 1898 2057 CALL histwrite_phy(o_ref_liq, ref_liq) … … 1908 2067 IF (vars_defined) zx_tmp_fi2d(:) = lwup0p(:,klevp1) 1909 2068 CALL histwrite_phy(o_rlutcs4co2, zx_tmp_fi2d) 1910 DO k=1, klevp1 1911 zx_tmp_fi3d1(:,k)=swupp(:,k)*swradcorr(:) 1912 ENDDO 2069 IF (vars_defined) THEN 2070 DO k=1, klevp1 2071 zx_tmp_fi3d1(:,k)=swupp(:,k)*swradcorr(:) 2072 ENDDO 2073 ENDIF 1913 2074 CALL histwrite_phy(o_rsu4co2, zx_tmp_fi3d1) 1914 DO k=1, klevp1 1915 zx_tmp_fi3d1(:,k)=swup0p(:,k)*swradcorr(:) 1916 ENDDO 2075 IF (vars_defined) THEN 2076 DO k=1, klevp1 2077 zx_tmp_fi3d1(:,k)=swup0p(:,k)*swradcorr(:) 2078 ENDDO 2079 ENDIF 1917 2080 CALL histwrite_phy(o_rsucs4co2, zx_tmp_fi3d1) 1918 DO k=1, klevp1 1919 zx_tmp_fi3d1(:,k)=swdnp(:,k)*swradcorr(:) 1920 ENDDO 2081 IF (vars_defined) THEN 2082 DO k=1, klevp1 2083 zx_tmp_fi3d1(:,k)=swdnp(:,k)*swradcorr(:) 2084 ENDDO 2085 ENDIF 1921 2086 CALL histwrite_phy(o_rsd4co2, zx_tmp_fi3d1) 1922 DO k=1, klevp1 1923 zx_tmp_fi3d1(:,k)=swdn0p(:,k)*swradcorr(:) 1924 ENDDO 2087 IF (vars_defined) THEN 2088 DO k=1, klevp1 2089 zx_tmp_fi3d1(:,k)=swdn0p(:,k)*swradcorr(:) 2090 ENDDO 2091 ENDIF 1925 2092 CALL histwrite_phy(o_rsdcs4co2, zx_tmp_fi3d1) 1926 2093 CALL histwrite_phy(o_rlu4co2, lwupp) … … 2071 2238 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 2072 2239 IF (iflag_phytrac == 1 ) then 2073 IF (nqtot.GE.nqo+1) THEN 2074 DO iq=nqo+1, nqtot 2075 IF (type_trac == 'lmdz' .OR. type_trac == 'repr' .OR. type_trac == 'coag') THEN 2240 IF (type_trac == 'lmdz' .OR. type_trac == 'repr' .OR. type_trac == 'coag') THEN 2241 DO iq=nqo+1, nqtot 2076 2242 !--3D fields 2077 2243 CALL histwrite_phy(o_trac(iq-nqo), tr_seri(:,:,iq-nqo)) … … 2089 2255 CALL histwrite_phy(o_dtr_sat(iq-nqo),d_tr_sat(:,:,iq-nqo)) 2090 2256 CALL histwrite_phy(o_dtr_uscav(iq-nqo),d_tr_uscav(:,:,iq-nqo)) 2091 2257 !--2D fields 2092 2258 CALL histwrite_phy(o_dtr_dry(iq-nqo), flux_tr_dry(:,iq-nqo)) 2093 2259 zx_tmp_fi2d=0. … … 2100 2266 CALL histwrite_phy(o_trac_cum(iq-nqo), zx_tmp_fi2d) 2101 2267 #endif 2102 ENDIF 2103 ENDDO 2104 ENDIF 2105 2106 IF (type_trac == 'repr') THEN 2268 ENDDO !--iq 2269 ENDIF !--type_trac 2270 ! 2271 IF (type_trac == 'co2i') THEN 2272 DO iq=nqo+1, nqtot 2273 !--3D fields 2274 CALL histwrite_phy(o_trac(iq-nqo), tr_seri(:,:,iq-nqo)) 2275 CALL histwrite_phy(o_dtr_vdf(iq-nqo),d_tr_cl(:,:,iq-nqo)) 2276 CALL histwrite_phy(o_dtr_the(iq-nqo),d_tr_th(:,:,iq-nqo)) 2277 CALL histwrite_phy(o_dtr_con(iq-nqo),d_tr_cv(:,:,iq-nqo)) 2278 !--2D fields 2279 !--CO2 burden 2280 zx_tmp_fi2d=0. 2281 IF (vars_defined) THEN 2282 DO k=1,klev 2283 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,iq-nqo) 2284 ENDDO 2285 ENDIF 2286 CALL histwrite_phy(o_trac_cum(iq-nqo), zx_tmp_fi2d) 2287 ENDDO !--iq 2288 !--CO2 net fluxes 2289 CALL histwrite_phy(o_flx_co2_land, fco2_land) 2290 CALL histwrite_phy(o_flx_co2_ocean, fco2_ocean) 2291 CALL histwrite_phy(o_flx_co2_ff, fco2_ff) 2292 CALL histwrite_phy(o_flx_co2_bb, fco2_bb) 2293 ENDIF !--type_trac co2i 2294 2295 IF (type_trac == 'repr') THEN 2107 2296 #ifdef REPROBUS 2108 2297 DO iq=1,nbnas … … 2110 2299 ENDDO 2111 2300 #endif 2112 ENDIF2301 ENDIF 2113 2302 2114 2303 ENDIF !(iflag_phytrac==1)
Note: See TracChangeset
for help on using the changeset viewer.