Changeset 1898
- Timestamp:
- Oct 31, 2013, 5:05:33 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90
r1897 r1898 4 4 MODULE phys_output_write_mod 5 5 6 USE phytrac_mod, ONLY : d_tr_cl, d_tr_th, d_tr_cv, d_tr_lessi_impa, & 7 d_tr_lessi_nucl, d_tr_insc, d_tr_bcscav, d_tr_evapls, d_tr_ls, & 8 d_tr_trsp, d_tr_sscav, d_tr_sat, d_tr_uscav 9 10 11 ! Author: Abderrahmane IDELKADI (original include file) 12 ! Author: Laurent FAIRHEAD (transformation to module/subroutine) 13 ! Author: Ulysse GERARD (effective implementation) 14 15 16 CONTAINS 17 18 ! ug Routine pour définir (los du premier passageà) ET sortir les variables 19 SUBROUTINE phys_output_write(itap, pdtphys, paprs, pphis, & 20 & pplay, lmax_th, aerosol_couple, & 21 & ok_ade, ok_aie, ivap, new_aod, ok_sync, & 22 & ptconv, read_climoz, clevSTD, freq_moyNMC, ptconvth, & 23 & d_t, qx, d_qx, zmasse, flag_aerosol_strat) 24 25 ! This subroutine does the actual writing of diagnostics that were 26 ! defined and initialised in phys_output_mod.F90 6 USE phytrac_mod, ONLY : d_tr_cl, d_tr_th, d_tr_cv, d_tr_lessi_impa, & 7 d_tr_lessi_nucl, d_tr_insc, d_tr_bcscav, d_tr_evapls, d_tr_ls, & 8 d_tr_trsp, d_tr_sscav, d_tr_sat, d_tr_uscav 9 10 ! Author: Abderrahmane IDELKADI (original include file) 11 ! Author: Laurent FAIRHEAD (transformation to module/subroutine) 12 ! Author: Ulysse GERARD (effective implementation) 13 14 CONTAINS 15 16 ! ug Routine pour définir (los du premier passageà) ET sortir les variables 17 SUBROUTINE phys_output_write(itap, pdtphys, paprs, pphis, & 18 pplay, lmax_th, aerosol_couple, & 19 ok_ade, ok_aie, ivap, new_aod, ok_sync, & 20 ptconv, read_climoz, clevSTD, freq_moyNMC, ptconvth, & 21 d_t, qx, d_qx, zmasse, flag_aerosol_strat) 22 23 ! This subroutine does the actual writing of diagnostics that were 24 ! defined and initialised in phys_output_mod.F90 27 25 28 26 USE dimphy, only: klon, klev, klevp1 29 27 USE control_mod, only: day_step, iphysiq 30 28 USE phys_output_ctrlout_mod, only: o_phis, o_aire, is_ter, is_lic, is_oce, & 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 29 is_ave, is_sic, o_contfracATM, o_contfracOR, & 30 o_aireTER, o_flat, o_slp, o_tsol, & 31 o_t2m, o_t2m_min, o_t2m_max, & 32 o_q2m, o_ustar, o_u10m, o_v10m, & 33 o_wind10m, o_wind10max, o_sicf, & 34 o_psol, o_mass, o_qsurf, o_qsol, & 35 o_precip, o_ndayrain, o_plul, o_pluc, & 36 o_snow, o_msnow, o_fsnow, o_evap, & 37 o_tops, o_tops0, o_topl, o_topl0, & 38 o_SWupTOA, o_SWupTOAclr, o_SWdnTOA, & 39 o_SWdnTOAclr, o_nettop, o_SWup200, & 40 o_SWup200clr, o_SWdn200, o_SWdn200clr, & 41 o_LWup200, o_LWup200clr, o_LWdn200, & 42 o_LWdn200clr, o_sols, o_sols0, & 43 o_soll, o_radsol, o_soll0, o_SWupSFC, & 44 o_SWupSFCclr, o_SWdnSFC, o_SWdnSFCclr, & 45 o_LWupSFC, o_LWdnSFC, o_LWupSFCclr, & 46 o_LWdnSFCclr, o_bils, o_bils_diss, & 47 o_bils_ec, o_bils_tke, o_bils_kinetic, & 48 o_bils_latent, o_bils_enthalp, o_sens, & 49 o_fder, o_ffonte, o_fqcalving, o_fqfonte, & 50 o_taux, o_tauy, o_snowsrf, o_qsnow, & 51 o_snowhgt, o_toice, o_sissnow, o_runoff, & 52 o_albslw3, o_pourc_srf, o_fract_srf, & 53 o_taux_srf, o_tauy_srf, o_tsol_srf, & 54 o_evappot_srf, o_ustar_srf, o_u10m_srf, & 55 o_v10m_srf, o_t2m_srf, o_evap_srf, & 56 o_sens_srf, o_lat_srf, o_flw_srf, & 57 o_fsw_srf, o_wbils_srf, o_wbilo_srf, & 58 o_tke_srf, o_tke_max_srf, o_wstar, & 59 o_cdrm, o_cdrh, o_cldl, o_cldm, o_cldh, & 60 o_cldt, o_cldq, o_lwp, o_iwp, o_ue, & 61 o_ve, o_uq, o_vq, o_cape, o_pbase, & 62 o_ptop, o_fbase, o_plcl, o_plfc, & 63 o_wbeff, o_cape_max, o_upwd, o_Ma, & 64 o_dnwd, o_dnwd0, o_ftime_con, o_mc, & 65 o_prw, o_s_pblh, o_s_pblt, o_s_lcl, & 66 o_s_therm, o_uSTDlevs, o_vSTDlevs, & 67 o_wSTDlevs, o_zSTDlevs, o_qSTDlevs, & 68 o_tSTDlevs, epsfra, o_t_oce_sic, & 69 o_ale_bl, o_alp_bl, o_ale_wk, o_alp_wk, & 70 o_ale, o_alp, o_cin, o_WAPE, o_wake_h, & 71 o_wake_s, o_wake_deltat, o_wake_deltaq, & 72 o_wake_omg, o_dtwak, o_dqwak, o_Vprecip, & 73 o_ftd, o_fqd, o_wdtrainA, o_wdtrainM, & 74 o_n2, o_s2, o_proba_notrig, & 75 o_random_notrig, o_ale_bl_stat, & 76 o_ale_bl_trig, o_alp_bl_det, & 77 o_alp_bl_fluct_m, o_alp_bl_fluct_tke, & 78 o_alp_bl_conv, o_alp_bl_stat, o_slab_bils, & 79 o_weakinv, o_dthmin, o_cldtau, & 80 o_cldemi, o_pr_con_l, o_pr_con_i, & 81 o_pr_lsc_l, o_pr_lsc_i, o_re, o_fl, & 82 o_rh2m, o_rh2m_min, o_rh2m_max, & 83 o_qsat2m, o_tpot, o_tpote, o_SWnetOR, & 84 o_SWdownOR, o_LWdownOR, o_snowl, & 85 o_solldown, o_dtsvdfo, o_dtsvdft, & 86 o_dtsvdfg, o_dtsvdfi, o_rugs, o_od550aer, & 87 o_od865aer, o_absvisaer, o_od550lt1aer, & 88 o_sconcso4, o_sconcoa, o_sconcbc, & 89 o_sconcss, o_sconcdust, o_concso4, & 90 o_concoa, o_concbc, o_concss, o_concdust, & 91 o_loadso4, o_loadoa, o_loadbc, o_loadss, & 92 o_loaddust, o_tausumaero, o_topswad, & 93 o_topswad0, o_solswad, o_solswad0, & 94 o_swtoaas_nat, o_swsrfas_nat, & 95 o_swtoacs_nat, o_swtoaas_ant, & 96 o_swsrfas_ant, o_swtoacs_ant, & 97 o_swsrfcs_ant, o_swtoacf_nat, & 98 o_swsrfcf_nat, o_swtoacf_ant, & 99 o_swsrfcs_nat, o_swsrfcf_ant, & 100 o_swtoacf_zero, o_swsrfcf_zero, & 101 o_topswai, o_solswai, o_scdnc, & 102 o_cldncl, o_reffclws, o_reffclwc, & 103 o_cldnvi, o_lcc, o_lcc3d, o_lcc3dcon, & 104 o_lcc3dstra, o_reffclwtop, o_ec550aer, & 105 o_lwcon, o_iwcon, o_temp, o_theta, & 106 o_ovapinit, o_ovap, o_oliq, o_geop, & 107 o_vitu, o_vitv, o_vitw, o_pres, o_paprs, & 108 o_zfull, o_zhalf, o_rneb, o_rnebcon, & 109 o_rnebls, o_rhum, o_ozone, o_ozone_light, & 110 o_dtphy, o_dqphy, o_albe_srf, o_rugs_srf, & 111 o_ages_srf, o_alb1, o_alb2, o_tke, & 112 o_tke_max, o_kz, o_kz_max, o_clwcon, & 113 o_dtdyn, o_dqdyn, o_dudyn, o_dvdyn, & 114 o_dtcon, o_tntc, o_ducon, o_dvcon, & 115 o_dqcon, o_tnhusc, o_tnhusc, o_dtlsc, & 116 o_dtlschr, o_dqlsc, o_beta_prec, & 117 o_dtlscth, o_dtlscst, o_dqlscth, & 118 o_dqlscst, o_plulth, o_plulst, & 119 o_ptconvth, o_lmaxth, o_dtvdf, & 120 o_dtdis, o_dqvdf, o_dteva, o_dqeva, & 121 o_ptconv, o_ratqs, o_dtthe, o_ftime_th, & 122 o_f_th, o_e_th, o_w_th, o_q_th, & 123 o_a_th, o_d_th, o_f0_th, o_zmax_th, & 124 o_dqthe, o_dtajs, o_dqajs, o_dtswr, & 125 o_dtsw0, o_dtlwr, o_dtlw0, o_dtec, & 126 o_duvdf, o_dvvdf, o_duoro, o_dvoro, & 127 o_dtoro, o_dulif, o_dvlif, o_dtlif, & 128 o_duhin, o_dvhin, o_dthin, o_rsu, & 129 o_rsd, o_rlu, o_rld, o_rsucs, o_rsdcs, & 130 o_rlucs, o_rldcs, o_tnt, o_tntr, & 131 o_tntscpbl, o_tnhus, o_tnhusscpbl, & 132 o_evu, o_h2o, o_mcd, o_dmc, o_ref_liq, & 133 o_ref_ice, o_rsut4co2, o_rlut4co2, & 134 o_rsutcs4co2, o_rlutcs4co2, o_rsu4co2, & 135 o_rlu4co2, o_rsucs4co2, o_rlucs4co2, & 136 o_rsd4co2, o_rld4co2, o_rsdcs4co2, & 137 o_rldcs4co2, o_tnondef, o_ta, o_zg, & 138 o_hus, o_hur, o_ua, o_va, o_wap, & 139 o_psbg, o_tro3, o_tro3_daylight, & 140 o_uxv, o_vxq, o_vxT, o_wxq, o_vxphi, & 141 o_wxT, o_uxu, o_vxv, o_TxT, o_trac, & 142 o_dtr_vdf, o_dtr_the, o_dtr_con, & 143 o_dtr_lessi_impa, o_dtr_lessi_nucl, & 144 o_dtr_insc, o_dtr_bcscav, o_dtr_evapls, & 145 o_dtr_ls, o_dtr_trsp, o_dtr_sscav, & 146 o_dtr_sat, o_dtr_uscav, o_trac_cum 149 147 150 148 USE phys_state_var_mod, only: pctsrf, paire_ter, rain_fall, snow_fall, & 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 149 nday_rain, rain_con, snow_con, & 150 topsw, toplw, toplw0, swup, swdn, & 151 topsw0, swup0, swdn0, SWup200, SWup200clr, & 152 SWdn200, SWdn200clr, LWup200, LWup200clr, & 153 LWdn200, LWdn200clr, solsw, solsw0, sollw, & 154 radsol, sollw0, sollwdown, sollw, & 155 sollwdownclr, lwdn0, ftsol, ustar, u10m, & 156 v10m, pbl_tke, wstar, cape, ema_pcb, ema_pct, & 157 ema_cbmf, Ma, fm_therm, ale_bl, alp_bl, ale, & 158 alp, cin, wake_pe, wake_s, wake_deltat, & 159 wake_deltaq, ftd, fqd, ale_bl_trig, albsol1, & 160 rnebcon, wo, falb1, albsol2, coefh, clwcon0, & 161 ratqs, entr_therm, zqasc, detr_therm, f0, heat, & 162 heat0, cool, cool0, lwup, lwdn, lwup0, coefm, & 163 swupp, lwupp, swup0p, lwup0p, swdnp, lwdnp, & 164 swdn0p, lwdn0p, tnondef, O3sumSTD, uvsumSTD, & 165 vqsumSTD, vTsumSTD, O3daysumSTD, wqsumSTD, & 166 vphisumSTD, wTsumSTD, u2sumSTD, v2sumSTD, & 167 T2sumSTD, nlevSTD 168 171 169 USE phys_local_var_mod, only: zxfluxlat, slp, zxtsol, zt2m, & 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 170 zu10m, zv10m, zq2m, zustar, zxqsurf, qsol, & 171 rain_lsc, snow_lsc, evap, bils, sens, fder, & 172 zxffonte, zxfqcalving, zxfqfonte, fluxu, & 173 fluxv, zxsnow, qsnow, snowhgt, to_ice, & 174 sissnow, runoff, albsol3_lic, evap_pot, & 175 t2m, fevap, fluxt, fluxlat, fsollw, fsolsw, & 176 wfbils, wfbilo, cdragm, cdragh, cldl, cldm, & 177 cldh, cldt, cldq, flwp, fiwp, ue, ve, uq, vq, & 178 plcl, plfc, wbeff, upwd, dnwd, dnwd0, prw, & 179 s_pblh, s_pblt, s_lcl, s_therm, uwriteSTD, & 180 vwriteSTD, wwriteSTD, phiwriteSTD, qwriteSTD, & 181 twriteSTD, ale_wake, alp_wake, wake_h, & 182 wake_omg, d_t_wake, d_q_wake, Vprecip, & 183 wdtrainA, wdtrainM, n2, s2, proba_notrig, & 184 random_notrig, ale_bl_stat, & 185 alp_bl_det, alp_bl_fluct_m, alp_bl_conv, & 186 alp_bl_stat, alp_bl_fluct_tke, slab_wfbils, & 187 weak_inversion, dthmin, cldtau, cldemi, & 188 pmflxr, pmflxs, prfl, psfl, re, fl, rh2m, & 189 qsat2m, tpote, tpot, d_ts, zxrugs, od550aer, & 190 od865aer, absvisaer, od550lt1aer, sconcso4, & 191 sconcoa, sconcbc, sconcss, sconcdust, concso4, & 192 concoa, concbc, concss, concdust, loadso4, & 193 loadoa, loadbc, loadss, loaddust, tausum_aero, & 194 topswad_aero, topswad0_aero, solswad_aero, & 195 solswad0_aero, topsw_aero, solsw_aero, & 196 topsw0_aero, solsw0_aero, topswcf_aero, & 197 solswcf_aero, topswai_aero, solswai_aero, & 198 scdnc, cldncl, reffclws, reffclwc, cldnvi, & 199 lcc, lcc3d, lcc3dcon, lcc3dstra, reffclwtop, & 200 ec550aer, flwc, fiwc, t_seri, theta, q_seri, & 201 ql_seri, zphi, u_seri, v_seri, omega, cldfra, & 202 rneb, zx_rh, frugs, agesno, d_t_dyn, d_q_dyn, & 203 d_u_dyn, d_v_dyn, d_t_con, d_t_ajsb, d_t_ajs, & 204 d_u_con, d_v_con, d_q_con, d_q_ajs, d_t_lsc, & 205 d_t_eva, d_q_lsc, beta_prec, d_t_lscth, & 206 d_t_lscst, d_q_lscth, d_q_lscst, plul_th, & 207 plul_st, d_t_vdf, d_t_diss, d_q_vdf, d_q_eva, & 208 zw2, fraca, zmax_th, d_q_ajsb, d_t_ec, d_u_vdf, & 209 d_v_vdf, d_u_oro, d_v_oro, d_t_oro, d_u_lif, & 210 d_v_lif, d_t_lif, d_u_hin, d_v_hin, d_t_hin, & 211 pmfd, pmfu, ref_liq, ref_ice, rhwriteSTD 212 215 213 USE phys_output_var_mod, only: vars_defined, snow_o, zfra_o, bils_diss, & 216 217 218 214 bils_ec, bils_tke, bils_kinetic, bils_latent, & 215 bils_enthalp, itau_con, nfiles, clef_files, & 216 nid_files 219 217 USE indice_sol_mod, only: nbsrf 220 218 USE infotrac, only: nqtot … … 228 226 #ifdef CPP_XIOS 229 227 ! ug Pour les sorties XIOS 230 228 USE wxios, only: wxios_update_calendar, wxios_closedef 231 229 #endif 232 230 … … 241 239 include "iniprint.h" 242 240 243 ! Input241 ! Input 244 242 INTEGER :: itap, ivap, read_climoz 245 243 INTEGER, DIMENSION(klon) :: lmax_th … … 257 255 REAL, DIMENSION(3) :: freq_moyNMC 258 256 259 ! Local257 ! Local 260 258 INTEGER, PARAMETER :: jjmp1=jjm+1-1/jjm 261 259 INTEGER :: itau_w … … 270 268 REAL, PARAMETER :: missing_val=nf90_fill_real 271 269 272 273 274 275 276 270 ! On calcul le nouveau tau: 271 itau_w = itau_phy + itap + start_time * day_step / iphysiq 272 ! On le donne à iophy pour que les histwrite y aient accès: 273 CALL set_itau_iophy(itau_w) 274 277 275 IF(.NOT.vars_defined) THEN 278 276 iinitend = 2 279 277 ELSE 280 278 iinitend = 1 281 279 ENDIF 282 283 ! ug la boucle qui suit ne sert qu'une fois, pour l'initialisation, sinon il n'y a toujours qu'un seul passage:284 DO iinit=1, iinitend280 281 ! ug la boucle qui suit ne sert qu'une fois, pour l'initialisation, sinon il n'y a toujours qu'un seul passage: 282 DO iinit=1, iinitend 285 283 #ifdef CPP_XIOS 286 !$OMP MASTER287 IF (vars_defined) THEN288 if (prt_level >= 10) then289 write(lunout,*)"phys_output_write: call wxios_update_calendar, itau_w=",itau_w290 endif291 CALL wxios_update_calendar(itau_w)292 END IF293 !$OMP END MASTER294 !$OMP BARRIER284 !$OMP MASTER 285 IF (vars_defined) THEN 286 if (prt_level >= 10) then 287 write(lunout,*)"phys_output_write: call wxios_update_calendar, itau_w=",itau_w 288 endif 289 CALL wxios_update_calendar(itau_w) 290 END IF 291 !$OMP END MASTER 292 !$OMP BARRIER 295 293 #endif 296 ! On procède à l'écriture ou à la définition des nombreuses variables:294 ! On procède à l'écriture ou à la définition des nombreuses variables: 297 295 !!! Champs 1D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 298 CALL histwrite_phy(o_phis, pphis)299 CALL histwrite_phy(o_aire, airephy)300 301 IF (vars_defined) THEN302 DO i=1, klon303 zx_tmp_fi2d(i)=pctsrf(i,is_ter)+pctsrf(i,is_lic)304 ENDDO305 ENDIF306 307 CALL histwrite_phy(o_contfracATM, zx_tmp_fi2d)308 CALL histwrite_phy(o_contfracOR, pctsrf(:,is_ter))309 CALL histwrite_phy(o_aireTER, paire_ter)296 CALL histwrite_phy(o_phis, pphis) 297 CALL histwrite_phy(o_aire, airephy) 298 299 IF (vars_defined) THEN 300 DO i=1, klon 301 zx_tmp_fi2d(i)=pctsrf(i,is_ter)+pctsrf(i,is_lic) 302 ENDDO 303 ENDIF 304 305 CALL histwrite_phy(o_contfracATM, zx_tmp_fi2d) 306 CALL histwrite_phy(o_contfracOR, pctsrf(:,is_ter)) 307 CALL histwrite_phy(o_aireTER, paire_ter) 310 308 !!! Champs 2D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 311 CALL histwrite_phy(o_flat, zxfluxlat) 312 CALL histwrite_phy(o_slp, slp) 313 CALL histwrite_phy(o_tsol, zxtsol) 314 CALL histwrite_phy(o_t2m, zt2m) 315 CALL histwrite_phy(o_t2m_min, zt2m) 316 CALL histwrite_phy(o_t2m_max, zt2m) 317 318 IF (vars_defined) THEN 319 DO i=1, klon 320 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) 321 ENDDO 322 ENDIF 323 CALL histwrite_phy(o_wind10m, zx_tmp_fi2d) 324 325 IF (vars_defined) THEN 326 DO i=1, klon 327 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) 328 ENDDO 329 ENDIF 330 CALL histwrite_phy(o_wind10max, zx_tmp_fi2d) 331 332 IF (vars_defined) THEN 333 DO i = 1, klon 334 zx_tmp_fi2d(i) = pctsrf(i,is_sic) 335 ENDDO 336 ENDIF 337 CALL histwrite_phy(o_sicf, zx_tmp_fi2d) 338 CALL histwrite_phy(o_q2m, zq2m) 339 CALL histwrite_phy(o_ustar, zustar) 340 CALL histwrite_phy(o_u10m, zu10m) 341 CALL histwrite_phy(o_v10m, zv10m) 342 343 IF (vars_defined) THEN 344 DO i = 1, klon 345 zx_tmp_fi2d(i) = paprs(i,1) 346 ENDDO 347 ENDIF 348 CALL histwrite_phy(o_psol, zx_tmp_fi2d) 349 CALL histwrite_phy(o_mass, zmasse) 350 CALL histwrite_phy(o_qsurf, zxqsurf) 351 352 IF (.NOT. ok_veget) THEN 353 CALL histwrite_phy(o_qsol, qsol) 354 ENDIF 355 356 IF (vars_defined) THEN 357 DO i = 1, klon 358 zx_tmp_fi2d(i) = rain_fall(i) + snow_fall(i) 309 CALL histwrite_phy(o_flat, zxfluxlat) 310 CALL histwrite_phy(o_slp, slp) 311 CALL histwrite_phy(o_tsol, zxtsol) 312 CALL histwrite_phy(o_t2m, zt2m) 313 CALL histwrite_phy(o_t2m_min, zt2m) 314 CALL histwrite_phy(o_t2m_max, zt2m) 315 316 IF (vars_defined) THEN 317 DO i=1, klon 318 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) 319 ENDDO 320 ENDIF 321 CALL histwrite_phy(o_wind10m, zx_tmp_fi2d) 322 323 IF (vars_defined) THEN 324 DO i=1, klon 325 zx_tmp_fi2d(i)=SQRT(zu10m(i)*zu10m(i)+zv10m(i)*zv10m(i)) 326 ENDDO 327 ENDIF 328 CALL histwrite_phy(o_wind10max, zx_tmp_fi2d) 329 330 IF (vars_defined) THEN 331 DO i = 1, klon 332 zx_tmp_fi2d(i) = pctsrf(i,is_sic) 333 ENDDO 334 ENDIF 335 CALL histwrite_phy(o_sicf, zx_tmp_fi2d) 336 CALL histwrite_phy(o_q2m, zq2m) 337 CALL histwrite_phy(o_ustar, zustar) 338 CALL histwrite_phy(o_u10m, zu10m) 339 CALL histwrite_phy(o_v10m, zv10m) 340 341 IF (vars_defined) THEN 342 DO i = 1, klon 343 zx_tmp_fi2d(i) = paprs(i,1) 344 ENDDO 345 ENDIF 346 CALL histwrite_phy(o_psol, zx_tmp_fi2d) 347 CALL histwrite_phy(o_mass, zmasse) 348 CALL histwrite_phy(o_qsurf, zxqsurf) 349 350 IF (.NOT. ok_veget) THEN 351 CALL histwrite_phy(o_qsol, qsol) 352 ENDIF 353 354 IF (vars_defined) THEN 355 DO i = 1, klon 356 zx_tmp_fi2d(i) = rain_fall(i) + snow_fall(i) 357 ENDDO 358 ENDIF 359 360 CALL histwrite_phy(o_precip, zx_tmp_fi2d) 361 CALL histwrite_phy(o_ndayrain, nday_rain) 362 363 IF (vars_defined) THEN 364 DO i = 1, klon 365 zx_tmp_fi2d(i) = rain_lsc(i) + snow_lsc(i) 366 ENDDO 367 ENDIF 368 CALL histwrite_phy(o_plul, zx_tmp_fi2d) 369 370 IF (vars_defined) THEN 371 DO i = 1, klon 372 zx_tmp_fi2d(i) = rain_con(i) + snow_con(i) 373 ENDDO 374 ENDIF 375 CALL histwrite_phy(o_pluc, zx_tmp_fi2d) 376 CALL histwrite_phy(o_snow, snow_fall) 377 CALL histwrite_phy(o_msnow, snow_o) 378 CALL histwrite_phy(o_fsnow, zfra_o) 379 CALL histwrite_phy(o_evap, evap) 380 CALL histwrite_phy(o_tops, topsw) 381 CALL histwrite_phy(o_tops0, topsw0) 382 CALL histwrite_phy(o_topl, toplw) 383 CALL histwrite_phy(o_topl0, toplw0) 384 385 IF (vars_defined) THEN 386 zx_tmp_fi2d(1 : klon) = swup ( 1 : klon, klevp1 ) 387 ENDIF 388 CALL histwrite_phy(o_SWupTOA, zx_tmp_fi2d) 389 390 IF (vars_defined) THEN 391 zx_tmp_fi2d(1 : klon) = swup0 ( 1 : klon, klevp1 ) 392 ENDIF 393 CALL histwrite_phy(o_SWupTOAclr, zx_tmp_fi2d) 394 395 IF (vars_defined) THEN 396 zx_tmp_fi2d(1 : klon) = swdn ( 1 : klon, klevp1 ) 397 ENDIF 398 CALL histwrite_phy(o_SWdnTOA, zx_tmp_fi2d) 399 400 IF (vars_defined) THEN 401 zx_tmp_fi2d(1 : klon) = swdn0 ( 1 : klon, klevp1 ) 402 ENDIF 403 CALL histwrite_phy(o_SWdnTOAclr, zx_tmp_fi2d) 404 405 IF (vars_defined) THEN 406 zx_tmp_fi2d(:) = topsw(:)-toplw(:) 407 ENDIF 408 CALL histwrite_phy(o_nettop, zx_tmp_fi2d) 409 CALL histwrite_phy(o_SWup200, SWup200) 410 CALL histwrite_phy(o_SWup200clr, SWup200clr) 411 CALL histwrite_phy(o_SWdn200, SWdn200) 412 CALL histwrite_phy(o_SWdn200clr, SWdn200clr) 413 CALL histwrite_phy(o_LWup200, LWup200) 414 CALL histwrite_phy(o_LWup200clr, LWup200clr) 415 CALL histwrite_phy(o_LWdn200, LWdn200) 416 CALL histwrite_phy(o_LWdn200clr, LWdn200clr) 417 CALL histwrite_phy(o_sols, solsw) 418 CALL histwrite_phy(o_sols0, solsw0) 419 CALL histwrite_phy(o_soll, sollw) 420 CALL histwrite_phy(o_radsol, radsol) 421 CALL histwrite_phy(o_soll0, sollw0) 422 423 IF (vars_defined) THEN 424 zx_tmp_fi2d(1 : klon) = swup ( 1 : klon, 1 ) 425 ENDIF 426 CALL histwrite_phy(o_SWupSFC, zx_tmp_fi2d) 427 428 IF (vars_defined) THEN 429 zx_tmp_fi2d(1 : klon) = swup0 ( 1 : klon, 1 ) 430 ENDIF 431 CALL histwrite_phy(o_SWupSFCclr, zx_tmp_fi2d) 432 433 IF (vars_defined) THEN 434 zx_tmp_fi2d(1 : klon) = swdn ( 1 : klon, 1 ) 435 ENDIF 436 CALL histwrite_phy(o_SWdnSFC, zx_tmp_fi2d) 437 438 IF (vars_defined) THEN 439 zx_tmp_fi2d(1 : klon) = swdn0 ( 1 : klon, 1 ) 440 ENDIF 441 CALL histwrite_phy(o_SWdnSFCclr, zx_tmp_fi2d) 442 443 IF (vars_defined) THEN 444 zx_tmp_fi2d(1:klon)=sollwdown(1:klon)-sollw(1:klon) 445 ENDIF 446 CALL histwrite_phy(o_LWupSFC, zx_tmp_fi2d) 447 CALL histwrite_phy(o_LWdnSFC, sollwdown) 448 449 IF (vars_defined) THEN 450 sollwdownclr(1:klon) = -1.*lwdn0(1:klon,1) 451 zx_tmp_fi2d(1:klon)=sollwdownclr(1:klon)-sollw0(1:klon) 452 ENDIF 453 CALL histwrite_phy(o_LWupSFCclr, zx_tmp_fi2d) 454 CALL histwrite_phy(o_LWdnSFCclr, sollwdownclr) 455 CALL histwrite_phy(o_bils, bils) 456 CALL histwrite_phy(o_bils_diss, bils_diss) 457 CALL histwrite_phy(o_bils_ec, bils_ec) 458 CALL histwrite_phy(o_bils_tke, bils_tke) 459 CALL histwrite_phy(o_bils_kinetic, bils_kinetic) 460 CALL histwrite_phy(o_bils_latent, bils_latent) 461 CALL histwrite_phy(o_bils_enthalp, bils_enthalp) 462 463 IF (vars_defined) THEN 464 zx_tmp_fi2d(1:klon)=-1*sens(1:klon) 465 ENDIF 466 CALL histwrite_phy(o_sens, zx_tmp_fi2d) 467 CALL histwrite_phy(o_fder, fder) 468 CALL histwrite_phy(o_ffonte, zxffonte) 469 CALL histwrite_phy(o_fqcalving, zxfqcalving) 470 CALL histwrite_phy(o_fqfonte, zxfqfonte) 471 IF (vars_defined) THEN 472 zx_tmp_fi2d=0. 473 DO nsrf=1,nbsrf 474 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+pctsrf(:,nsrf)*fluxu(:,1,nsrf) 475 ENDDO 476 ENDIF 477 CALL histwrite_phy(o_taux, zx_tmp_fi2d) 478 479 IF (vars_defined) THEN 480 zx_tmp_fi2d=0. 481 DO nsrf=1,nbsrf 482 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+pctsrf(:,nsrf)*fluxv(:,1,nsrf) 483 ENDDO 484 ENDIF 485 CALL histwrite_phy(o_tauy, zx_tmp_fi2d) 486 487 IF (ok_snow) THEN 488 CALL histwrite_phy(o_snowsrf, zxsnow) 489 CALL histwrite_phy(o_qsnow, qsnow) 490 CALL histwrite_phy(o_snowhgt,snowhgt) 491 CALL histwrite_phy(o_toice,to_ice) 492 CALL histwrite_phy(o_sissnow,sissnow) 493 CALL histwrite_phy(o_runoff,runoff) 494 CALL histwrite_phy(o_albslw3,albsol3_lic) 495 ENDIF 496 497 DO nsrf = 1, nbsrf 498 IF (vars_defined) zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf)*100. 499 CALL histwrite_phy(o_pourc_srf(nsrf), zx_tmp_fi2d) 500 IF (vars_defined) zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf) 501 CALL histwrite_phy(o_fract_srf(nsrf), zx_tmp_fi2d) 502 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxu( 1 : klon, 1, nsrf) 503 CALL histwrite_phy(o_taux_srf(nsrf), zx_tmp_fi2d) 504 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxv( 1 : klon, 1, nsrf) 505 CALL histwrite_phy(o_tauy_srf(nsrf), zx_tmp_fi2d) 506 IF (vars_defined) zx_tmp_fi2d(1 : klon) = ftsol( 1 : klon, nsrf) 507 CALL histwrite_phy(o_tsol_srf(nsrf), zx_tmp_fi2d) 508 IF (vars_defined) zx_tmp_fi2d(1 : klon) = evap_pot( 1 : klon, nsrf) 509 CALL histwrite_phy(o_evappot_srf(nsrf), zx_tmp_fi2d) 510 IF (vars_defined) zx_tmp_fi2d(1 : klon) = ustar(1 : klon, nsrf) 511 CALL histwrite_phy(o_ustar_srf(nsrf), zx_tmp_fi2d) 512 IF (vars_defined) zx_tmp_fi2d(1 : klon) = u10m(1 : klon, nsrf) 513 CALL histwrite_phy(o_u10m_srf(nsrf), zx_tmp_fi2d) 514 IF (vars_defined) zx_tmp_fi2d(1 : klon) = v10m(1 : klon, nsrf) 515 CALL histwrite_phy(o_v10m_srf(nsrf), zx_tmp_fi2d) 516 IF (vars_defined) zx_tmp_fi2d(1 : klon) = t2m(1 : klon, nsrf) 517 CALL histwrite_phy(o_t2m_srf(nsrf), zx_tmp_fi2d) 518 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fevap(1 : klon, nsrf) 519 CALL histwrite_phy(o_evap_srf(nsrf), zx_tmp_fi2d) 520 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxt( 1 : klon, 1, nsrf) 521 CALL histwrite_phy(o_sens_srf(nsrf), zx_tmp_fi2d) 522 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxlat( 1 : klon, nsrf) 523 CALL histwrite_phy(o_lat_srf(nsrf), zx_tmp_fi2d) 524 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fsollw( 1 : klon, nsrf) 525 CALL histwrite_phy(o_flw_srf(nsrf), zx_tmp_fi2d) 526 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, nsrf) 527 CALL histwrite_phy(o_fsw_srf(nsrf), zx_tmp_fi2d) 528 IF (vars_defined) zx_tmp_fi2d(1 : klon) = wfbils( 1 : klon, nsrf) 529 CALL histwrite_phy(o_wbils_srf(nsrf), zx_tmp_fi2d) 530 IF (vars_defined) zx_tmp_fi2d(1 : klon) = wfbilo( 1 : klon, nsrf) 531 CALL histwrite_phy(o_wbilo_srf(nsrf), zx_tmp_fi2d) 532 533 IF (iflag_pbl > 1) THEN 534 CALL histwrite_phy(o_tke_srf(nsrf), pbl_tke(:,1:klev,nsrf)) 535 CALL histwrite_phy(o_tke_max_srf(nsrf), pbl_tke(:,1:klev,nsrf)) 536 ENDIF 537 359 538 ENDDO 360 ENDIF 361 362 CALL histwrite_phy(o_precip, zx_tmp_fi2d) 363 CALL histwrite_phy(o_ndayrain, nday_rain) 364 365 IF (vars_defined) THEN 366 DO i = 1, klon 367 zx_tmp_fi2d(i) = rain_lsc(i) + snow_lsc(i) 539 DO nsrf=1,nbsrf+1 540 CALL histwrite_phy(o_wstar(nsrf), wstar(1 : klon, nsrf)) 368 541 ENDDO 369 ENDIF 370 CALL histwrite_phy(o_plul, zx_tmp_fi2d) 371 372 IF (vars_defined) THEN 373 DO i = 1, klon 374 zx_tmp_fi2d(i) = rain_con(i) + snow_con(i) 375 ENDDO 376 ENDIF 377 CALL histwrite_phy(o_pluc, zx_tmp_fi2d) 378 CALL histwrite_phy(o_snow, snow_fall) 379 CALL histwrite_phy(o_msnow, snow_o) 380 CALL histwrite_phy(o_fsnow, zfra_o) 381 CALL histwrite_phy(o_evap, evap) 382 CALL histwrite_phy(o_tops, topsw) 383 CALL histwrite_phy(o_tops0, topsw0) 384 CALL histwrite_phy(o_topl, toplw) 385 CALL histwrite_phy(o_topl0, toplw0) 386 387 IF (vars_defined) THEN 388 zx_tmp_fi2d(1 : klon) = swup ( 1 : klon, klevp1 ) 389 ENDIF 390 CALL histwrite_phy(o_SWupTOA, zx_tmp_fi2d) 391 392 IF (vars_defined) THEN 393 zx_tmp_fi2d(1 : klon) = swup0 ( 1 : klon, klevp1 ) 394 ENDIF 395 CALL histwrite_phy(o_SWupTOAclr, zx_tmp_fi2d) 396 397 IF (vars_defined) THEN 398 zx_tmp_fi2d(1 : klon) = swdn ( 1 : klon, klevp1 ) 399 ENDIF 400 CALL histwrite_phy(o_SWdnTOA, zx_tmp_fi2d) 401 402 IF (vars_defined) THEN 403 zx_tmp_fi2d(1 : klon) = swdn0 ( 1 : klon, klevp1 ) 404 ENDIF 405 CALL histwrite_phy(o_SWdnTOAclr, zx_tmp_fi2d) 406 407 IF (vars_defined) THEN 408 zx_tmp_fi2d(:) = topsw(:)-toplw(:) 409 ENDIF 410 CALL histwrite_phy(o_nettop, zx_tmp_fi2d) 411 CALL histwrite_phy(o_SWup200, SWup200) 412 CALL histwrite_phy(o_SWup200clr, SWup200clr) 413 CALL histwrite_phy(o_SWdn200, SWdn200) 414 CALL histwrite_phy(o_SWdn200clr, SWdn200clr) 415 CALL histwrite_phy(o_LWup200, LWup200) 416 CALL histwrite_phy(o_LWup200clr, LWup200clr) 417 CALL histwrite_phy(o_LWdn200, LWdn200) 418 CALL histwrite_phy(o_LWdn200clr, LWdn200clr) 419 CALL histwrite_phy(o_sols, solsw) 420 CALL histwrite_phy(o_sols0, solsw0) 421 CALL histwrite_phy(o_soll, sollw) 422 CALL histwrite_phy(o_radsol, radsol) 423 CALL histwrite_phy(o_soll0, sollw0) 424 425 IF (vars_defined) THEN 426 zx_tmp_fi2d(1 : klon) = swup ( 1 : klon, 1 ) 427 ENDIF 428 CALL histwrite_phy(o_SWupSFC, zx_tmp_fi2d) 429 430 IF (vars_defined) THEN 431 zx_tmp_fi2d(1 : klon) = swup0 ( 1 : klon, 1 ) 432 ENDIF 433 CALL histwrite_phy(o_SWupSFCclr, zx_tmp_fi2d) 434 435 IF (vars_defined) THEN 436 zx_tmp_fi2d(1 : klon) = swdn ( 1 : klon, 1 ) 437 ENDIF 438 CALL histwrite_phy(o_SWdnSFC, zx_tmp_fi2d) 439 440 IF (vars_defined) THEN 441 zx_tmp_fi2d(1 : klon) = swdn0 ( 1 : klon, 1 ) 442 ENDIF 443 CALL histwrite_phy(o_SWdnSFCclr, zx_tmp_fi2d) 444 445 IF (vars_defined) THEN 446 zx_tmp_fi2d(1:klon)=sollwdown(1:klon)-sollw(1:klon) 447 ENDIF 448 CALL histwrite_phy(o_LWupSFC, zx_tmp_fi2d) 449 CALL histwrite_phy(o_LWdnSFC, sollwdown) 450 451 IF (vars_defined) THEN 452 sollwdownclr(1:klon) = -1.*lwdn0(1:klon,1) 453 zx_tmp_fi2d(1:klon)=sollwdownclr(1:klon)-sollw0(1:klon) 454 ENDIF 455 CALL histwrite_phy(o_LWupSFCclr, zx_tmp_fi2d) 456 CALL histwrite_phy(o_LWdnSFCclr, sollwdownclr) 457 CALL histwrite_phy(o_bils, bils) 458 CALL histwrite_phy(o_bils_diss, bils_diss) 459 CALL histwrite_phy(o_bils_ec, bils_ec) 460 CALL histwrite_phy(o_bils_tke, bils_tke) 461 CALL histwrite_phy(o_bils_kinetic, bils_kinetic) 462 CALL histwrite_phy(o_bils_latent, bils_latent) 463 CALL histwrite_phy(o_bils_enthalp, bils_enthalp) 464 465 IF (vars_defined) THEN 466 zx_tmp_fi2d(1:klon)=-1*sens(1:klon) 467 ENDIF 468 CALL histwrite_phy(o_sens, zx_tmp_fi2d) 469 CALL histwrite_phy(o_fder, fder) 470 CALL histwrite_phy(o_ffonte, zxffonte) 471 CALL histwrite_phy(o_fqcalving, zxfqcalving) 472 CALL histwrite_phy(o_fqfonte, zxfqfonte) 473 IF (vars_defined) THEN 474 zx_tmp_fi2d=0. 475 DO nsrf=1,nbsrf 476 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+pctsrf(:,nsrf)*fluxu(:,1,nsrf) 477 ENDDO 478 ENDIF 479 CALL histwrite_phy(o_taux, zx_tmp_fi2d) 480 481 IF (vars_defined) THEN 482 zx_tmp_fi2d=0. 483 DO nsrf=1,nbsrf 484 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+pctsrf(:,nsrf)*fluxv(:,1,nsrf) 485 ENDDO 486 ENDIF 487 CALL histwrite_phy(o_tauy, zx_tmp_fi2d) 488 489 IF (ok_snow) THEN 490 CALL histwrite_phy(o_snowsrf, zxsnow) 491 CALL histwrite_phy(o_qsnow, qsnow) 492 CALL histwrite_phy(o_snowhgt,snowhgt) 493 CALL histwrite_phy(o_toice,to_ice) 494 CALL histwrite_phy(o_sissnow,sissnow) 495 CALL histwrite_phy(o_runoff,runoff) 496 CALL histwrite_phy(o_albslw3,albsol3_lic) 497 ENDIF 498 499 500 DO nsrf = 1, nbsrf 501 IF (vars_defined) zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf)*100. 502 CALL histwrite_phy(o_pourc_srf(nsrf), zx_tmp_fi2d) 503 IF (vars_defined) zx_tmp_fi2d(1 : klon) = pctsrf( 1 : klon, nsrf) 504 CALL histwrite_phy(o_fract_srf(nsrf), zx_tmp_fi2d) 505 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxu( 1 : klon, 1, nsrf) 506 CALL histwrite_phy(o_taux_srf(nsrf), zx_tmp_fi2d) 507 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxv( 1 : klon, 1, nsrf) 508 CALL histwrite_phy(o_tauy_srf(nsrf), zx_tmp_fi2d) 509 IF (vars_defined) zx_tmp_fi2d(1 : klon) = ftsol( 1 : klon, nsrf) 510 CALL histwrite_phy(o_tsol_srf(nsrf), zx_tmp_fi2d) 511 IF (vars_defined) zx_tmp_fi2d(1 : klon) = evap_pot( 1 : klon, nsrf) 512 CALL histwrite_phy(o_evappot_srf(nsrf), zx_tmp_fi2d) 513 IF (vars_defined) zx_tmp_fi2d(1 : klon) = ustar(1 : klon, nsrf) 514 CALL histwrite_phy(o_ustar_srf(nsrf), zx_tmp_fi2d) 515 IF (vars_defined) zx_tmp_fi2d(1 : klon) = u10m(1 : klon, nsrf) 516 CALL histwrite_phy(o_u10m_srf(nsrf), zx_tmp_fi2d) 517 IF (vars_defined) zx_tmp_fi2d(1 : klon) = v10m(1 : klon, nsrf) 518 CALL histwrite_phy(o_v10m_srf(nsrf), zx_tmp_fi2d) 519 IF (vars_defined) zx_tmp_fi2d(1 : klon) = t2m(1 : klon, nsrf) 520 CALL histwrite_phy(o_t2m_srf(nsrf), zx_tmp_fi2d) 521 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fevap(1 : klon, nsrf) 522 CALL histwrite_phy(o_evap_srf(nsrf), zx_tmp_fi2d) 523 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxt( 1 : klon, 1, nsrf) 524 CALL histwrite_phy(o_sens_srf(nsrf), zx_tmp_fi2d) 525 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fluxlat( 1 : klon, nsrf) 526 CALL histwrite_phy(o_lat_srf(nsrf), zx_tmp_fi2d) 527 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fsollw( 1 : klon, nsrf) 528 CALL histwrite_phy(o_flw_srf(nsrf), zx_tmp_fi2d) 529 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, nsrf) 530 CALL histwrite_phy(o_fsw_srf(nsrf), zx_tmp_fi2d) 531 IF (vars_defined) zx_tmp_fi2d(1 : klon) = wfbils( 1 : klon, nsrf) 532 CALL histwrite_phy(o_wbils_srf(nsrf), zx_tmp_fi2d) 533 IF (vars_defined) zx_tmp_fi2d(1 : klon) = wfbilo( 1 : klon, nsrf) 534 CALL histwrite_phy(o_wbilo_srf(nsrf), zx_tmp_fi2d) 535 536 IF (iflag_pbl > 1) THEN 537 CALL histwrite_phy(o_tke_srf(nsrf), pbl_tke(:,1:klev,nsrf)) 538 CALL histwrite_phy(o_tke_max_srf(nsrf), pbl_tke(:,1:klev,nsrf)) 539 ENDIF 540 541 ENDDO 542 DO nsrf=1,nbsrf+1 543 CALL histwrite_phy(o_wstar(nsrf), wstar(1 : klon, nsrf)) 544 ENDDO 545 546 CALL histwrite_phy(o_cdrm, cdragm) 547 CALL histwrite_phy(o_cdrh, cdragh) 548 CALL histwrite_phy(o_cldl, cldl) 549 CALL histwrite_phy(o_cldm, cldm) 550 CALL histwrite_phy(o_cldh, cldh) 551 CALL histwrite_phy(o_cldt, cldt) 552 CALL histwrite_phy(o_cldq, cldq) 553 IF (vars_defined) zx_tmp_fi2d(1:klon) = flwp(1:klon) 554 CALL histwrite_phy(o_lwp, zx_tmp_fi2d) 555 IF (vars_defined) zx_tmp_fi2d(1:klon) = fiwp(1:klon) 556 CALL histwrite_phy(o_iwp, zx_tmp_fi2d) 557 CALL histwrite_phy(o_ue, ue) 558 CALL histwrite_phy(o_ve, ve) 559 CALL histwrite_phy(o_uq, uq) 560 CALL histwrite_phy(o_vq, vq) 561 IF(iflag_con.GE.3) THEN ! sb 562 CALL histwrite_phy(o_cape, cape) 563 CALL histwrite_phy(o_pbase, ema_pcb) 564 CALL histwrite_phy(o_ptop, ema_pct) 565 CALL histwrite_phy(o_fbase, ema_cbmf) 566 if (iflag_con /= 30) then 567 CALL histwrite_phy(o_plcl, plcl) 568 CALL histwrite_phy(o_plfc, plfc) 569 CALL histwrite_phy(o_wbeff, wbeff) 570 end if 571 572 CALL histwrite_phy(o_cape_max, cape) 573 574 CALL histwrite_phy(o_upwd, upwd) 575 CALL histwrite_phy(o_Ma, Ma) 576 CALL histwrite_phy(o_dnwd, dnwd) 577 CALL histwrite_phy(o_dnwd0, dnwd0) 578 IF (vars_defined) zx_tmp_fi2d=float(itau_con)/float(itap) 579 CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d) 580 IF (vars_defined) THEN 581 IF(iflag_thermals>=1)THEN 582 zx_tmp_fi3d=dnwd+dnwd0+upwd+fm_therm(:,1:klev) 583 ELSE 584 zx_tmp_fi3d=dnwd+dnwd0+upwd 585 ENDIF 586 ENDIF 587 CALL histwrite_phy(o_mc, zx_tmp_fi3d) 588 ENDIF !iflag_con .GE. 3 589 CALL histwrite_phy(o_prw, prw) 590 CALL histwrite_phy(o_s_pblh, s_pblh) 591 CALL histwrite_phy(o_s_pblt, s_pblt) 592 CALL histwrite_phy(o_s_lcl, s_lcl) 593 CALL histwrite_phy(o_s_therm, s_therm) 594 !IM : Les champs suivants (s_capCL, s_oliqCL, s_cteiCL, s_trmb1, s_trmb2, s_trmb3) ne sont pas definis dans HBTM.F 595 ! IF (o_s_capCL%flag(iff)<=lev_files(iff)) THEN 596 ! CALL histwrite_phy(nid_files(iff),clef_stations(iff), 597 ! $o_s_capCL%name,itau_w,s_capCL) 598 ! ENDIF 599 ! IF (o_s_oliqCL%flag(iff)<=lev_files(iff)) THEN 600 ! CALL histwrite_phy(nid_files(iff),clef_stations(iff), 601 ! $o_s_oliqCL%name,itau_w,s_oliqCL) 602 ! ENDIF 603 ! IF (o_s_cteiCL%flag(iff)<=lev_files(iff)) THEN 604 ! CALL histwrite_phy(nid_files(iff),clef_stations(iff), 605 ! $o_s_cteiCL%name,itau_w,s_cteiCL) 606 ! ENDIF 607 ! IF (o_s_trmb1%flag(iff)<=lev_files(iff)) THEN 608 ! CALL histwrite_phy(nid_files(iff),clef_stations(iff), 609 ! $o_s_trmb1%name,itau_w,s_trmb1) 610 ! ENDIF 611 ! IF (o_s_trmb2%flag(iff)<=lev_files(iff)) THEN 612 ! CALL histwrite_phy(nid_files(iff),clef_stations(iff), 613 ! $o_s_trmb2%name,itau_w,s_trmb2) 614 ! ENDIF 615 ! IF (o_s_trmb3%flag(iff)<=lev_files(iff)) THEN 616 ! CALL histwrite_phy(nid_files(iff),clef_stations(iff), 617 ! $o_s_trmb3%name,itau_w,s_trmb3) 618 ! ENDIF 619 620 621 622 ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX: 623 ! Champs interpolles sur des niveaux de pression 624 DO iff=1, nfiles 625 ll=0 626 DO k=1, nlevSTD 627 bb2=clevSTD(k) 628 IF(bb2.EQ."850".OR.bb2.EQ."700".OR. & 629 bb2.EQ."500".OR.bb2.EQ."200".OR. & 630 bb2.EQ."100".OR. & 631 bb2.EQ."50".OR.bb2.EQ."10") THEN 632 633 ! a refaire correctement !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 634 ll=ll+1 635 CALL histwrite_phy(o_uSTDlevs(ll),uwriteSTD(:,k,iff), iff) 636 CALL histwrite_phy(o_vSTDlevs(ll),vwriteSTD(:,k,iff), iff) 637 CALL histwrite_phy(o_wSTDlevs(ll),wwriteSTD(:,k,iff), iff) 638 CALL histwrite_phy(o_zSTDlevs(ll),phiwriteSTD(:,k,iff), iff) 639 CALL histwrite_phy(o_qSTDlevs(ll),qwriteSTD(:,k,iff), iff) 640 CALL histwrite_phy(o_tSTDlevs(ll),twriteSTD(:,k,iff), iff) 641 642 ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR. 542 543 CALL histwrite_phy(o_cdrm, cdragm) 544 CALL histwrite_phy(o_cdrh, cdragh) 545 CALL histwrite_phy(o_cldl, cldl) 546 CALL histwrite_phy(o_cldm, cldm) 547 CALL histwrite_phy(o_cldh, cldh) 548 CALL histwrite_phy(o_cldt, cldt) 549 CALL histwrite_phy(o_cldq, cldq) 550 IF (vars_defined) zx_tmp_fi2d(1:klon) = flwp(1:klon) 551 CALL histwrite_phy(o_lwp, zx_tmp_fi2d) 552 IF (vars_defined) zx_tmp_fi2d(1:klon) = fiwp(1:klon) 553 CALL histwrite_phy(o_iwp, zx_tmp_fi2d) 554 CALL histwrite_phy(o_ue, ue) 555 CALL histwrite_phy(o_ve, ve) 556 CALL histwrite_phy(o_uq, uq) 557 CALL histwrite_phy(o_vq, vq) 558 IF(iflag_con.GE.3) THEN ! sb 559 CALL histwrite_phy(o_cape, cape) 560 CALL histwrite_phy(o_pbase, ema_pcb) 561 CALL histwrite_phy(o_ptop, ema_pct) 562 CALL histwrite_phy(o_fbase, ema_cbmf) 563 if (iflag_con /= 30) then 564 CALL histwrite_phy(o_plcl, plcl) 565 CALL histwrite_phy(o_plfc, plfc) 566 CALL histwrite_phy(o_wbeff, wbeff) 567 end if 568 569 CALL histwrite_phy(o_cape_max, cape) 570 571 CALL histwrite_phy(o_upwd, upwd) 572 CALL histwrite_phy(o_Ma, Ma) 573 CALL histwrite_phy(o_dnwd, dnwd) 574 CALL histwrite_phy(o_dnwd0, dnwd0) 575 IF (vars_defined) zx_tmp_fi2d=float(itau_con)/float(itap) 576 CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d) 577 IF (vars_defined) THEN 578 IF(iflag_thermals>=1)THEN 579 zx_tmp_fi3d=dnwd+dnwd0+upwd+fm_therm(:,1:klev) 580 ELSE 581 zx_tmp_fi3d=dnwd+dnwd0+upwd 582 ENDIF 583 ENDIF 584 CALL histwrite_phy(o_mc, zx_tmp_fi3d) 585 ENDIF !iflag_con .GE. 3 586 CALL histwrite_phy(o_prw, prw) 587 CALL histwrite_phy(o_s_pblh, s_pblh) 588 CALL histwrite_phy(o_s_pblt, s_pblt) 589 CALL histwrite_phy(o_s_lcl, s_lcl) 590 CALL histwrite_phy(o_s_therm, s_therm) 591 !IM : Les champs suivants (s_capCL, s_oliqCL, s_cteiCL, s_trmb1, s_trmb2, s_trmb3) ne sont pas definis dans HBTM.F 592 ! IF (o_s_capCL%flag(iff)<=lev_files(iff)) THEN 593 ! CALL histwrite_phy(nid_files(iff),clef_stations(iff), 594 ! $o_s_capCL%name,itau_w,s_capCL) 595 ! ENDIF 596 ! IF (o_s_oliqCL%flag(iff)<=lev_files(iff)) THEN 597 ! CALL histwrite_phy(nid_files(iff),clef_stations(iff), 598 ! $o_s_oliqCL%name,itau_w,s_oliqCL) 599 ! ENDIF 600 ! IF (o_s_cteiCL%flag(iff)<=lev_files(iff)) THEN 601 ! CALL histwrite_phy(nid_files(iff),clef_stations(iff), 602 ! $o_s_cteiCL%name,itau_w,s_cteiCL) 603 ! ENDIF 604 ! IF (o_s_trmb1%flag(iff)<=lev_files(iff)) THEN 605 ! CALL histwrite_phy(nid_files(iff),clef_stations(iff), 606 ! $o_s_trmb1%name,itau_w,s_trmb1) 607 ! ENDIF 608 ! IF (o_s_trmb2%flag(iff)<=lev_files(iff)) THEN 609 ! CALL histwrite_phy(nid_files(iff),clef_stations(iff), 610 ! $o_s_trmb2%name,itau_w,s_trmb2) 611 ! ENDIF 612 ! IF (o_s_trmb3%flag(iff)<=lev_files(iff)) THEN 613 ! CALL histwrite_phy(nid_files(iff),clef_stations(iff), 614 ! $o_s_trmb3%name,itau_w,s_trmb3) 615 ! ENDIF 616 617 ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX: 618 ! Champs interpolles sur des niveaux de pression 619 DO iff=1, nfiles 620 ll=0 621 DO k=1, nlevSTD 622 bb2=clevSTD(k) 623 IF(bb2.EQ."850".OR.bb2.EQ."700".OR. & 624 bb2.EQ."500".OR.bb2.EQ."200".OR. & 625 bb2.EQ."100".OR. & 626 bb2.EQ."50".OR.bb2.EQ."10") THEN 627 628 ! a refaire correctement !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 629 ll=ll+1 630 CALL histwrite_phy(o_uSTDlevs(ll),uwriteSTD(:,k,iff), iff) 631 CALL histwrite_phy(o_vSTDlevs(ll),vwriteSTD(:,k,iff), iff) 632 CALL histwrite_phy(o_wSTDlevs(ll),wwriteSTD(:,k,iff), iff) 633 CALL histwrite_phy(o_zSTDlevs(ll),phiwriteSTD(:,k,iff), iff) 634 CALL histwrite_phy(o_qSTDlevs(ll),qwriteSTD(:,k,iff), iff) 635 CALL histwrite_phy(o_tSTDlevs(ll),twriteSTD(:,k,iff), iff) 636 637 ENDIF !(bb2.EQ."850".OR.bb2.EQ."700".OR. 638 ENDDO 643 639 ENDDO 644 ENDDO 645 646 647 648 IF (vars_defined) THEN 649 DO i=1, klon 650 IF (pctsrf(i,is_oce).GT.epsfra.OR. & 651 pctsrf(i,is_sic).GT.epsfra) THEN 652 zx_tmp_fi2d(i) = (ftsol(i, is_oce) * pctsrf(i,is_oce)+ & 653 ftsol(i, is_sic) * pctsrf(i,is_sic))/ & 654 (pctsrf(i,is_oce)+pctsrf(i,is_sic)) 655 ELSE 656 zx_tmp_fi2d(i) = 273.15 657 ENDIF 658 ENDDO 659 ENDIF 660 CALL histwrite_phy(o_t_oce_sic, zx_tmp_fi2d) 661 662 ! Couplage convection-couche limite 663 IF (iflag_con.GE.3) THEN 664 IF (iflag_coupl>=1) THEN 665 CALL histwrite_phy(o_ale_bl, ale_bl) 666 CALL histwrite_phy(o_alp_bl, alp_bl) 667 ENDIF !iflag_coupl>=1 668 ENDIF !(iflag_con.GE.3) 669 ! Wakes 670 IF (iflag_con.EQ.3) THEN 671 IF (iflag_wake>=1) THEN 672 CALL histwrite_phy(o_ale_wk, ale_wake) 673 CALL histwrite_phy(o_alp_wk, alp_wake) 674 CALL histwrite_phy(o_ale, ale) 675 CALL histwrite_phy(o_alp, alp) 676 CALL histwrite_phy(o_cin, cin) 677 CALL histwrite_phy(o_WAPE, wake_pe) 678 CALL histwrite_phy(o_wake_h, wake_h) 679 CALL histwrite_phy(o_wake_s, wake_s) 680 CALL histwrite_phy(o_wake_deltat, wake_deltat) 681 CALL histwrite_phy(o_wake_deltaq, wake_deltaq) 682 CALL histwrite_phy(o_wake_omg, wake_omg) 683 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_wake(1:klon,1:klev) & 684 /pdtphys 685 CALL histwrite_phy(o_dtwak, zx_tmp_fi3d) 686 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_wake(1:klon,1:klev)/pdtphys 687 CALL histwrite_phy(o_dqwak, zx_tmp_fi3d) 688 ENDIF ! iflag_wake>=1 689 CALL histwrite_phy(o_Vprecip, Vprecip) 690 CALL histwrite_phy(o_ftd, ftd) 691 CALL histwrite_phy(o_fqd, fqd) 692 ELSEIF (iflag_con.EQ.30) THEN 693 ! sortie RomP convection descente insaturee iflag_con=30 694 CALL histwrite_phy(o_Vprecip, Vprecip) 695 CALL histwrite_phy(o_wdtrainA, wdtrainA) 696 CALL histwrite_phy(o_wdtrainM, wdtrainM) 697 ENDIF !(iflag_con.EQ.3.or.iflag_con.EQ.30) 640 641 IF (vars_defined) THEN 642 DO i=1, klon 643 IF (pctsrf(i,is_oce).GT.epsfra.OR. & 644 pctsrf(i,is_sic).GT.epsfra) THEN 645 zx_tmp_fi2d(i) = (ftsol(i, is_oce) * pctsrf(i,is_oce)+ & 646 ftsol(i, is_sic) * pctsrf(i,is_sic))/ & 647 (pctsrf(i,is_oce)+pctsrf(i,is_sic)) 648 ELSE 649 zx_tmp_fi2d(i) = 273.15 650 ENDIF 651 ENDDO 652 ENDIF 653 CALL histwrite_phy(o_t_oce_sic, zx_tmp_fi2d) 654 655 ! Couplage convection-couche limite 656 IF (iflag_con.GE.3) THEN 657 IF (iflag_coupl>=1) THEN 658 CALL histwrite_phy(o_ale_bl, ale_bl) 659 CALL histwrite_phy(o_alp_bl, alp_bl) 660 ENDIF !iflag_coupl>=1 661 ENDIF !(iflag_con.GE.3) 662 ! Wakes 663 IF (iflag_con.EQ.3) THEN 664 IF (iflag_wake>=1) THEN 665 CALL histwrite_phy(o_ale_wk, ale_wake) 666 CALL histwrite_phy(o_alp_wk, alp_wake) 667 CALL histwrite_phy(o_ale, ale) 668 CALL histwrite_phy(o_alp, alp) 669 CALL histwrite_phy(o_cin, cin) 670 CALL histwrite_phy(o_WAPE, wake_pe) 671 CALL histwrite_phy(o_wake_h, wake_h) 672 CALL histwrite_phy(o_wake_s, wake_s) 673 CALL histwrite_phy(o_wake_deltat, wake_deltat) 674 CALL histwrite_phy(o_wake_deltaq, wake_deltaq) 675 CALL histwrite_phy(o_wake_omg, wake_omg) 676 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_wake(1:klon,1:klev) & 677 /pdtphys 678 CALL histwrite_phy(o_dtwak, zx_tmp_fi3d) 679 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_wake(1:klon,1:klev)/pdtphys 680 CALL histwrite_phy(o_dqwak, zx_tmp_fi3d) 681 ENDIF ! iflag_wake>=1 682 CALL histwrite_phy(o_Vprecip, Vprecip) 683 CALL histwrite_phy(o_ftd, ftd) 684 CALL histwrite_phy(o_fqd, fqd) 685 ELSEIF (iflag_con.EQ.30) THEN 686 ! sortie RomP convection descente insaturee iflag_con=30 687 CALL histwrite_phy(o_Vprecip, Vprecip) 688 CALL histwrite_phy(o_wdtrainA, wdtrainA) 689 CALL histwrite_phy(o_wdtrainM, wdtrainM) 690 ENDIF !(iflag_con.EQ.3.or.iflag_con.EQ.30) 698 691 !!! nrlmd le 10/04/2012 699 700 CALL histwrite_phy(o_n2, n2)701 CALL histwrite_phy(o_s2, s2)702 CALL histwrite_phy(o_proba_notrig, proba_notrig)703 CALL histwrite_phy(o_random_notrig, random_notrig)704 CALL histwrite_phy(o_ale_bl_stat, ale_bl_stat)705 CALL histwrite_phy(o_ale_bl_trig, ale_bl_trig)692 IF (iflag_trig_bl>=1) THEN 693 CALL histwrite_phy(o_n2, n2) 694 CALL histwrite_phy(o_s2, s2) 695 CALL histwrite_phy(o_proba_notrig, proba_notrig) 696 CALL histwrite_phy(o_random_notrig, random_notrig) 697 CALL histwrite_phy(o_ale_bl_stat, ale_bl_stat) 698 CALL histwrite_phy(o_ale_bl_trig, ale_bl_trig) 706 699 ENDIF !(iflag_trig_bl>=1) 707 708 CALL histwrite_phy(o_alp_bl_det, alp_bl_det)709 CALL histwrite_phy(o_alp_bl_fluct_m, alp_bl_fluct_m)710 CALL histwrite_phy(o_alp_bl_fluct_tke, &711 alp_bl_fluct_tke)712 CALL histwrite_phy(o_alp_bl_conv, alp_bl_conv)713 CALL histwrite_phy(o_alp_bl_stat, alp_bl_stat)700 IF (iflag_clos_bl>=1) THEN 701 CALL histwrite_phy(o_alp_bl_det, alp_bl_det) 702 CALL histwrite_phy(o_alp_bl_fluct_m, alp_bl_fluct_m) 703 CALL histwrite_phy(o_alp_bl_fluct_tke, & 704 alp_bl_fluct_tke) 705 CALL histwrite_phy(o_alp_bl_conv, alp_bl_conv) 706 CALL histwrite_phy(o_alp_bl_stat, alp_bl_stat) 714 707 ENDIF !(iflag_clos_bl>=1) 715 708 !!! fin nrlmd le 10/04/2012 716 IF (type_ocean=='slab ') THEN717 CALL histwrite_phy(o_slab_bils, slab_wfbils)718 ENDIF !type_ocean == force/slab719 CALL histwrite_phy(o_weakinv, weak_inversion)720 CALL histwrite_phy(o_dthmin, dthmin)721 CALL histwrite_phy(o_cldtau, cldtau)722 CALL histwrite_phy(o_cldemi, cldemi)723 CALL histwrite_phy(o_pr_con_l, pmflxr(:,1:klev))724 CALL histwrite_phy(o_pr_con_i, pmflxs(:,1:klev))725 CALL histwrite_phy(o_pr_lsc_l, prfl(:,1:klev))726 CALL histwrite_phy(o_pr_lsc_i, psfl(:,1:klev))727 CALL histwrite_phy(o_re, re)728 CALL histwrite_phy(o_fl, fl)729 IF (vars_defined) THEN730 DO i=1, klon731 zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.)732 ENDDO733 ENDIF734 CALL histwrite_phy(o_rh2m, zx_tmp_fi2d)735 736 IF (vars_defined) THEN737 DO i=1, klon738 zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.)739 ENDDO740 ENDIF741 CALL histwrite_phy(o_rh2m_min, zx_tmp_fi2d)742 743 IF (vars_defined) THEN744 DO i=1, klon745 zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.)746 ENDDO747 ENDIF748 CALL histwrite_phy(o_rh2m_max, zx_tmp_fi2d)749 750 CALL histwrite_phy(o_qsat2m, qsat2m)751 CALL histwrite_phy(o_tpot, tpot)752 CALL histwrite_phy(o_tpote, tpote)753 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, is_ter)754 CALL histwrite_phy(o_SWnetOR, zx_tmp_fi2d)755 IF (vars_defined) zx_tmp_fi2d(1:klon) = solsw(1:klon)/(1.-albsol1(1:klon))756 CALL histwrite_phy(o_SWdownOR, zx_tmp_fi2d)757 CALL histwrite_phy(o_LWdownOR, sollwdown)758 CALL histwrite_phy(o_snowl, snow_lsc)759 CALL histwrite_phy(o_solldown, sollwdown)760 CALL histwrite_phy(o_dtsvdfo, d_ts(:,is_oce))761 CALL histwrite_phy(o_dtsvdft, d_ts(:,is_ter))762 CALL histwrite_phy(o_dtsvdfg, d_ts(:,is_lic))763 CALL histwrite_phy(o_dtsvdfi, d_ts(:,is_sic))764 CALL histwrite_phy(o_rugs, zxrugs)765 ! OD550 per species766 IF (new_aod .and. (.not. aerosol_couple)) THEN709 IF (type_ocean=='slab ') THEN 710 CALL histwrite_phy(o_slab_bils, slab_wfbils) 711 ENDIF !type_ocean == force/slab 712 CALL histwrite_phy(o_weakinv, weak_inversion) 713 CALL histwrite_phy(o_dthmin, dthmin) 714 CALL histwrite_phy(o_cldtau, cldtau) 715 CALL histwrite_phy(o_cldemi, cldemi) 716 CALL histwrite_phy(o_pr_con_l, pmflxr(:,1:klev)) 717 CALL histwrite_phy(o_pr_con_i, pmflxs(:,1:klev)) 718 CALL histwrite_phy(o_pr_lsc_l, prfl(:,1:klev)) 719 CALL histwrite_phy(o_pr_lsc_i, psfl(:,1:klev)) 720 CALL histwrite_phy(o_re, re) 721 CALL histwrite_phy(o_fl, fl) 722 IF (vars_defined) THEN 723 DO i=1, klon 724 zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.) 725 ENDDO 726 ENDIF 727 CALL histwrite_phy(o_rh2m, zx_tmp_fi2d) 728 729 IF (vars_defined) THEN 730 DO i=1, klon 731 zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.) 732 ENDDO 733 ENDIF 734 CALL histwrite_phy(o_rh2m_min, zx_tmp_fi2d) 735 736 IF (vars_defined) THEN 737 DO i=1, klon 738 zx_tmp_fi2d(i)=MIN(100.,rh2m(i)*100.) 739 ENDDO 740 ENDIF 741 CALL histwrite_phy(o_rh2m_max, zx_tmp_fi2d) 742 743 CALL histwrite_phy(o_qsat2m, qsat2m) 744 CALL histwrite_phy(o_tpot, tpot) 745 CALL histwrite_phy(o_tpote, tpote) 746 IF (vars_defined) zx_tmp_fi2d(1 : klon) = fsolsw( 1 : klon, is_ter) 747 CALL histwrite_phy(o_SWnetOR, zx_tmp_fi2d) 748 IF (vars_defined) zx_tmp_fi2d(1:klon) = solsw(1:klon)/(1.-albsol1(1:klon)) 749 CALL histwrite_phy(o_SWdownOR, zx_tmp_fi2d) 750 CALL histwrite_phy(o_LWdownOR, sollwdown) 751 CALL histwrite_phy(o_snowl, snow_lsc) 752 CALL histwrite_phy(o_solldown, sollwdown) 753 CALL histwrite_phy(o_dtsvdfo, d_ts(:,is_oce)) 754 CALL histwrite_phy(o_dtsvdft, d_ts(:,is_ter)) 755 CALL histwrite_phy(o_dtsvdfg, d_ts(:,is_lic)) 756 CALL histwrite_phy(o_dtsvdfi, d_ts(:,is_sic)) 757 CALL histwrite_phy(o_rugs, zxrugs) 758 ! OD550 per species 759 IF (new_aod .and. (.not. aerosol_couple)) THEN 767 760 IF (ok_ade.OR.ok_aie) THEN 768 CALL histwrite_phy(o_od550aer, od550aer)769 CALL histwrite_phy(o_od865aer, od865aer)770 CALL histwrite_phy(o_absvisaer, absvisaer)771 CALL histwrite_phy(o_od550lt1aer, od550lt1aer)772 CALL histwrite_phy(o_sconcso4, sconcso4)773 CALL histwrite_phy(o_sconcoa, sconcoa)774 CALL histwrite_phy(o_sconcbc, sconcbc)775 CALL histwrite_phy(o_sconcss, sconcss)776 CALL histwrite_phy(o_sconcdust, sconcdust)777 CALL histwrite_phy(o_concso4, concso4)778 CALL histwrite_phy(o_concoa, concoa)779 CALL histwrite_phy(o_concbc, concbc)780 CALL histwrite_phy(o_concss, concss)781 CALL histwrite_phy(o_concdust, concdust)782 CALL histwrite_phy(o_loadso4, loadso4)783 CALL histwrite_phy(o_loadoa, loadoa)784 CALL histwrite_phy(o_loadbc, loadbc)785 CALL histwrite_phy(o_loadss, loadss)786 CALL histwrite_phy(o_loaddust, loaddust)787 !--STRAT AER761 CALL histwrite_phy(o_od550aer, od550aer) 762 CALL histwrite_phy(o_od865aer, od865aer) 763 CALL histwrite_phy(o_absvisaer, absvisaer) 764 CALL histwrite_phy(o_od550lt1aer, od550lt1aer) 765 CALL histwrite_phy(o_sconcso4, sconcso4) 766 CALL histwrite_phy(o_sconcoa, sconcoa) 767 CALL histwrite_phy(o_sconcbc, sconcbc) 768 CALL histwrite_phy(o_sconcss, sconcss) 769 CALL histwrite_phy(o_sconcdust, sconcdust) 770 CALL histwrite_phy(o_concso4, concso4) 771 CALL histwrite_phy(o_concoa, concoa) 772 CALL histwrite_phy(o_concbc, concbc) 773 CALL histwrite_phy(o_concss, concss) 774 CALL histwrite_phy(o_concdust, concdust) 775 CALL histwrite_phy(o_loadso4, loadso4) 776 CALL histwrite_phy(o_loadoa, loadoa) 777 CALL histwrite_phy(o_loadbc, loadbc) 778 CALL histwrite_phy(o_loadss, loadss) 779 CALL histwrite_phy(o_loaddust, loaddust) 780 !--STRAT AER 788 781 ENDIF 789 782 IF (ok_ade.OR.ok_aie.OR.flag_aerosol_strat) THEN 790 DO naero = 1, naero_spc791 CALL histwrite_phy(o_tausumaero(naero), &792 tausum_aero(:,2,naero) )793 END DO794 ENDIF 795 ENDIF783 DO naero = 1, naero_spc 784 CALL histwrite_phy(o_tausumaero(naero), & 785 tausum_aero(:,2,naero) ) 786 END DO 787 ENDIF 788 ENDIF 796 789 IF (ok_ade) THEN 797 CALL histwrite_phy(o_topswad, topswad_aero)798 CALL histwrite_phy(o_topswad0, topswad0_aero)799 CALL histwrite_phy(o_solswad, solswad_aero)800 CALL histwrite_phy(o_solswad0, solswad0_aero)801 !====MS forcing diagnostics802 if (new_aod) then803 CALL histwrite_phy(o_swtoaas_nat, topsw_aero(:,1))804 CALL histwrite_phy(o_swsrfas_nat, solsw_aero(:,1))805 CALL histwrite_phy(o_swtoacs_nat, topsw0_aero(:,1))806 CALL histwrite_phy(o_swsrfcs_nat, solsw0_aero(:,1))807 !ant808 CALL histwrite_phy(o_swtoaas_ant, topsw_aero(:,2))809 CALL histwrite_phy(o_swsrfas_ant, solsw_aero(:,2))810 CALL histwrite_phy(o_swtoacs_ant, topsw0_aero(:,2))811 CALL histwrite_phy(o_swsrfcs_ant, solsw0_aero(:,2))812 !cf813 if (.not. aerosol_couple) then814 CALL histwrite_phy(o_swtoacf_nat, topswcf_aero(:,1))815 CALL histwrite_phy(o_swsrfcf_nat, solswcf_aero(:,1))816 CALL histwrite_phy(o_swtoacf_ant, topswcf_aero(:,2))817 CALL histwrite_phy(o_swsrfcf_ant, solswcf_aero(:,2))818 CALL histwrite_phy(o_swtoacf_zero,topswcf_aero(:,3))819 CALL histwrite_phy(o_swsrfcf_zero,solswcf_aero(:,3))820 endif821 endif ! new_aod822 !====MS forcing diagnostics790 CALL histwrite_phy(o_topswad, topswad_aero) 791 CALL histwrite_phy(o_topswad0, topswad0_aero) 792 CALL histwrite_phy(o_solswad, solswad_aero) 793 CALL histwrite_phy(o_solswad0, solswad0_aero) 794 !====MS forcing diagnostics 795 if (new_aod) then 796 CALL histwrite_phy(o_swtoaas_nat, topsw_aero(:,1)) 797 CALL histwrite_phy(o_swsrfas_nat, solsw_aero(:,1)) 798 CALL histwrite_phy(o_swtoacs_nat, topsw0_aero(:,1)) 799 CALL histwrite_phy(o_swsrfcs_nat, solsw0_aero(:,1)) 800 !ant 801 CALL histwrite_phy(o_swtoaas_ant, topsw_aero(:,2)) 802 CALL histwrite_phy(o_swsrfas_ant, solsw_aero(:,2)) 803 CALL histwrite_phy(o_swtoacs_ant, topsw0_aero(:,2)) 804 CALL histwrite_phy(o_swsrfcs_ant, solsw0_aero(:,2)) 805 !cf 806 if (.not. aerosol_couple) then 807 CALL histwrite_phy(o_swtoacf_nat, topswcf_aero(:,1)) 808 CALL histwrite_phy(o_swsrfcf_nat, solswcf_aero(:,1)) 809 CALL histwrite_phy(o_swtoacf_ant, topswcf_aero(:,2)) 810 CALL histwrite_phy(o_swsrfcf_ant, solswcf_aero(:,2)) 811 CALL histwrite_phy(o_swtoacf_zero,topswcf_aero(:,3)) 812 CALL histwrite_phy(o_swsrfcf_zero,solswcf_aero(:,3)) 813 endif 814 endif ! new_aod 815 !====MS forcing diagnostics 823 816 ENDIF 824 817 IF (ok_aie) THEN 825 CALL histwrite_phy(o_topswai, topswai_aero)826 CALL histwrite_phy(o_solswai, solswai_aero)827 CALL histwrite_phy(o_scdnc, scdnc)828 CALL histwrite_phy(o_cldncl, cldncl)829 CALL histwrite_phy(o_reffclws, reffclws)830 CALL histwrite_phy(o_reffclwc, reffclwc)831 CALL histwrite_phy(o_cldnvi, cldnvi)832 CALL histwrite_phy(o_lcc, lcc)833 CALL histwrite_phy(o_lcc3d, lcc3d)834 CALL histwrite_phy(o_lcc3dcon, lcc3dcon)835 CALL histwrite_phy(o_lcc3dstra, lcc3dstra)836 CALL histwrite_phy(o_reffclwtop, reffclwtop)837 ENDIF 838 ! Champs 3D:818 CALL histwrite_phy(o_topswai, topswai_aero) 819 CALL histwrite_phy(o_solswai, solswai_aero) 820 CALL histwrite_phy(o_scdnc, scdnc) 821 CALL histwrite_phy(o_cldncl, cldncl) 822 CALL histwrite_phy(o_reffclws, reffclws) 823 CALL histwrite_phy(o_reffclwc, reffclwc) 824 CALL histwrite_phy(o_cldnvi, cldnvi) 825 CALL histwrite_phy(o_lcc, lcc) 826 CALL histwrite_phy(o_lcc3d, lcc3d) 827 CALL histwrite_phy(o_lcc3dcon, lcc3dcon) 828 CALL histwrite_phy(o_lcc3dstra, lcc3dstra) 829 CALL histwrite_phy(o_reffclwtop, reffclwtop) 830 ENDIF 831 ! Champs 3D: 839 832 IF (ok_ade .OR. ok_aie) then 840 CALL histwrite_phy(o_ec550aer, ec550aer)841 ENDIF 842 CALL histwrite_phy(o_lwcon, flwc)843 CALL histwrite_phy(o_iwcon, fiwc)844 CALL histwrite_phy(o_temp, t_seri)845 CALL histwrite_phy(o_theta, theta)846 CALL histwrite_phy(o_ovapinit, qx(:,:,ivap))847 CALL histwrite_phy(o_ovap, q_seri)848 CALL histwrite_phy(o_oliq, ql_seri)849 CALL histwrite_phy(o_geop, zphi)850 CALL histwrite_phy(o_vitu, u_seri)851 CALL histwrite_phy(o_vitv, v_seri)852 CALL histwrite_phy(o_vitw, omega)853 CALL histwrite_phy(o_pres, pplay)854 CALL histwrite_phy(o_paprs, paprs(:,1:klev))855 IF (vars_defined) THEN856 DO i=1, klon857 zx_tmp_fi3d1(i,1)= pphis(i)/RG858 !020611 zx_tmp_fi3d(i,1)= pphis(i)/RG859 ENDDO860 DO k=1, klev861 !020611 DO k=1, klev-1862 DO i=1, klon863 !020611 zx_tmp_fi3d(i,k+1)= zx_tmp_fi3d(i,k) - (t_seri(i,k) *RD *864 zx_tmp_fi3d1(i,k+1)= zx_tmp_fi3d1(i,k) - (t_seri(i,k) *RD * &865 (paprs(i,k+1) - paprs(i,k))) / ( pplay(i,k) * RG )866 ENDDO867 ENDDO868 ENDIF869 CALL histwrite_phy(o_zfull,zx_tmp_fi3d1(:,2:klevp1))870 !020611 $o_zfull%name,itau_w,zx_tmp_fi3d)871 872 IF (vars_defined) THEN873 DO i=1, klon874 zx_tmp_fi3d(i,1)= pphis(i)/RG - ( &875 (t_seri(i,1)+zxtsol(i))/2. *RD * &876 (pplay(i,1) - paprs(i,1)))/( (paprs(i,1)+pplay(i,1))/2.* RG)877 ENDDO878 DO k=1, klev-1879 DO i=1, klon880 zx_tmp_fi3d(i,k+1)= zx_tmp_fi3d(i,k) - ( &881 (t_seri(i,k)+t_seri(i,k+1))/2. *RD * &882 (pplay(i,k+1) - pplay(i,k))) / ( paprs(i,k) * RG )883 ENDDO884 ENDDO885 ENDIF886 CALL histwrite_phy(o_zhalf, zx_tmp_fi3d)887 CALL histwrite_phy(o_rneb, cldfra)888 CALL histwrite_phy(o_rnebcon, rnebcon)889 CALL histwrite_phy(o_rnebls, rneb)890 CALL histwrite_phy(o_rhum, zx_rh)891 CALL histwrite_phy(o_ozone, &892 wo(:, :, 1) * dobson_u * 1e3 / zmasse / rmo3 * rmd)893 894 IF (read_climoz == 2) THEN895 CALL histwrite_phy(o_ozone_light, &896 wo(:, :, 2) * dobson_u * 1e3 / zmasse / rmo3 * rmd)897 ENDIF898 899 CALL histwrite_phy(o_dtphy, d_t)900 CALL histwrite_phy(o_dqphy, d_qx(:,:,ivap))901 902 IF (vars_defined) zx_tmp_fi2d(1 : klon) = falb1( 1 : klon, nsrf)903 CALL histwrite_phy(o_albe_srf(nsrf), zx_tmp_fi2d)904 IF (vars_defined) zx_tmp_fi2d(1 : klon) = frugs( 1 : klon, nsrf)905 CALL histwrite_phy(o_rugs_srf(nsrf), zx_tmp_fi2d)906 IF (vars_defined) zx_tmp_fi2d(1 : klon) = agesno( 1 : klon, nsrf)907 CALL histwrite_phy(o_ages_srf(nsrf), zx_tmp_fi2d)908 909 CALL histwrite_phy(o_alb1, albsol1)910 CALL histwrite_phy(o_alb2, albsol2)911 !FH Sorties pour la couche limite912 if (iflag_pbl>1) then913 zx_tmp_fi3d=0.914 IF (vars_defined) THEN915 do nsrf=1,nbsrf916 do k=1,klev917 zx_tmp_fi3d(:,k)=zx_tmp_fi3d(:,k) &918 +pctsrf(:,nsrf)*pbl_tke(:,k,nsrf)919 enddo920 enddo921 ENDIF922 CALL histwrite_phy(o_tke, zx_tmp_fi3d)923 924 CALL histwrite_phy(o_tke_max, zx_tmp_fi3d)925 ENDIF926 927 CALL histwrite_phy(o_kz, coefh(:,:,is_ave))928 929 CALL histwrite_phy(o_kz_max, coefh(:,:,is_ave))930 931 CALL histwrite_phy(o_clwcon, clwcon0)932 CALL histwrite_phy(o_dtdyn, d_t_dyn)933 CALL histwrite_phy(o_dqdyn, d_q_dyn)934 CALL histwrite_phy(o_dudyn, d_u_dyn)935 CALL histwrite_phy(o_dvdyn, d_v_dyn)936 937 IF (vars_defined) THEN938 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys939 ENDIF940 CALL histwrite_phy(o_dtcon, zx_tmp_fi3d)941 if(iflag_thermals.eq.1)then942 IF (vars_defined) THEN943 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + &944 945 ENDIF946 CALL histwrite_phy(o_tntc, zx_tmp_fi3d)947 else if(iflag_thermals.gt.1.and.iflag_wake.EQ.1)then948 IF (vars_defined) THEN949 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + &950 951 952 ENDIF953 CALL histwrite_phy(o_tntc, zx_tmp_fi3d)954 endif955 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_con(1:klon,1:klev)/pdtphys956 CALL histwrite_phy(o_ducon, zx_tmp_fi3d)957 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_con(1:klon,1:klev)/pdtphys958 CALL histwrite_phy(o_dvcon, zx_tmp_fi3d)959 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys960 CALL histwrite_phy(o_dqcon, zx_tmp_fi3d)961 962 IF(iflag_thermals.EQ.1) THEN963 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys964 CALL histwrite_phy(o_tnhusc, zx_tmp_fi3d)965 ELSE IF(iflag_thermals.GT.1.AND.iflag_wake.EQ.1) THEN966 IF (vars_defined) THEN967 zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys + &968 969 970 ENDIF971 CALL histwrite_phy(o_tnhusc, zx_tmp_fi3d)972 ENDIF973 974 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lsc(1:klon,1:klev)/pdtphys975 CALL histwrite_phy(o_dtlsc, zx_tmp_fi3d)976 IF (vars_defined) zx_tmp_fi3d(1:klon, 1:klev)=(d_t_lsc(1:klon,1:klev)+ &977 978 CALL histwrite_phy(o_dtlschr, zx_tmp_fi3d)979 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys980 CALL histwrite_phy(o_dqlsc, zx_tmp_fi3d)981 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=beta_prec(1:klon,1:klev)982 CALL histwrite_phy(o_beta_prec, zx_tmp_fi3d)833 CALL histwrite_phy(o_ec550aer, ec550aer) 834 ENDIF 835 CALL histwrite_phy(o_lwcon, flwc) 836 CALL histwrite_phy(o_iwcon, fiwc) 837 CALL histwrite_phy(o_temp, t_seri) 838 CALL histwrite_phy(o_theta, theta) 839 CALL histwrite_phy(o_ovapinit, qx(:,:,ivap)) 840 CALL histwrite_phy(o_ovap, q_seri) 841 CALL histwrite_phy(o_oliq, ql_seri) 842 CALL histwrite_phy(o_geop, zphi) 843 CALL histwrite_phy(o_vitu, u_seri) 844 CALL histwrite_phy(o_vitv, v_seri) 845 CALL histwrite_phy(o_vitw, omega) 846 CALL histwrite_phy(o_pres, pplay) 847 CALL histwrite_phy(o_paprs, paprs(:,1:klev)) 848 IF (vars_defined) THEN 849 DO i=1, klon 850 zx_tmp_fi3d1(i,1)= pphis(i)/RG 851 !020611 zx_tmp_fi3d(i,1)= pphis(i)/RG 852 ENDDO 853 DO k=1, klev 854 !020611 DO k=1, klev-1 855 DO i=1, klon 856 !020611 zx_tmp_fi3d(i,k+1)= zx_tmp_fi3d(i,k) - (t_seri(i,k) *RD * 857 zx_tmp_fi3d1(i,k+1)= zx_tmp_fi3d1(i,k) - (t_seri(i,k) *RD * & 858 (paprs(i,k+1) - paprs(i,k))) / ( pplay(i,k) * RG ) 859 ENDDO 860 ENDDO 861 ENDIF 862 CALL histwrite_phy(o_zfull,zx_tmp_fi3d1(:,2:klevp1)) 863 !020611 $o_zfull%name,itau_w,zx_tmp_fi3d) 864 865 IF (vars_defined) THEN 866 DO i=1, klon 867 zx_tmp_fi3d(i,1)= pphis(i)/RG - ( & 868 (t_seri(i,1)+zxtsol(i))/2. *RD * & 869 (pplay(i,1) - paprs(i,1)))/( (paprs(i,1)+pplay(i,1))/2.* RG) 870 ENDDO 871 DO k=1, klev-1 872 DO i=1, klon 873 zx_tmp_fi3d(i,k+1)= zx_tmp_fi3d(i,k) - ( & 874 (t_seri(i,k)+t_seri(i,k+1))/2. *RD * & 875 (pplay(i,k+1) - pplay(i,k))) / ( paprs(i,k) * RG ) 876 ENDDO 877 ENDDO 878 ENDIF 879 CALL histwrite_phy(o_zhalf, zx_tmp_fi3d) 880 CALL histwrite_phy(o_rneb, cldfra) 881 CALL histwrite_phy(o_rnebcon, rnebcon) 882 CALL histwrite_phy(o_rnebls, rneb) 883 CALL histwrite_phy(o_rhum, zx_rh) 884 CALL histwrite_phy(o_ozone, & 885 wo(:, :, 1) * dobson_u * 1e3 / zmasse / rmo3 * rmd) 886 887 IF (read_climoz == 2) THEN 888 CALL histwrite_phy(o_ozone_light, & 889 wo(:, :, 2) * dobson_u * 1e3 / zmasse / rmo3 * rmd) 890 ENDIF 891 892 CALL histwrite_phy(o_dtphy, d_t) 893 CALL histwrite_phy(o_dqphy, d_qx(:,:,ivap)) 894 DO nsrf=1, nbsrf 895 IF (vars_defined) zx_tmp_fi2d(1 : klon) = falb1( 1 : klon, nsrf) 896 CALL histwrite_phy(o_albe_srf(nsrf), zx_tmp_fi2d) 897 IF (vars_defined) zx_tmp_fi2d(1 : klon) = frugs( 1 : klon, nsrf) 898 CALL histwrite_phy(o_rugs_srf(nsrf), zx_tmp_fi2d) 899 IF (vars_defined) zx_tmp_fi2d(1 : klon) = agesno( 1 : klon, nsrf) 900 CALL histwrite_phy(o_ages_srf(nsrf), zx_tmp_fi2d) 901 ENDDO !nsrf=1, nbsrf 902 CALL histwrite_phy(o_alb1, albsol1) 903 CALL histwrite_phy(o_alb2, albsol2) 904 !FH Sorties pour la couche limite 905 if (iflag_pbl>1) then 906 zx_tmp_fi3d=0. 907 IF (vars_defined) THEN 908 do nsrf=1,nbsrf 909 do k=1,klev 910 zx_tmp_fi3d(:,k)=zx_tmp_fi3d(:,k) & 911 +pctsrf(:,nsrf)*pbl_tke(:,k,nsrf) 912 enddo 913 enddo 914 ENDIF 915 CALL histwrite_phy(o_tke, zx_tmp_fi3d) 916 917 CALL histwrite_phy(o_tke_max, zx_tmp_fi3d) 918 ENDIF 919 920 CALL histwrite_phy(o_kz, coefh(:,:,is_ave)) 921 922 CALL histwrite_phy(o_kz_max, coefh(:,:,is_ave)) 923 924 CALL histwrite_phy(o_clwcon, clwcon0) 925 CALL histwrite_phy(o_dtdyn, d_t_dyn) 926 CALL histwrite_phy(o_dqdyn, d_q_dyn) 927 CALL histwrite_phy(o_dudyn, d_u_dyn) 928 CALL histwrite_phy(o_dvdyn, d_v_dyn) 929 930 IF (vars_defined) THEN 931 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys 932 ENDIF 933 CALL histwrite_phy(o_dtcon, zx_tmp_fi3d) 934 if(iflag_thermals.eq.1)then 935 IF (vars_defined) THEN 936 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & 937 d_t_ajsb(1:klon,1:klev)/pdtphys 938 ENDIF 939 CALL histwrite_phy(o_tntc, zx_tmp_fi3d) 940 else if(iflag_thermals.gt.1.and.iflag_wake.EQ.1)then 941 IF (vars_defined) THEN 942 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & 943 d_t_ajs(1:klon,1:klev)/pdtphys + & 944 d_t_wake(1:klon,1:klev)/pdtphys 945 ENDIF 946 CALL histwrite_phy(o_tntc, zx_tmp_fi3d) 947 endif 948 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_con(1:klon,1:klev)/pdtphys 949 CALL histwrite_phy(o_ducon, zx_tmp_fi3d) 950 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_con(1:klon,1:klev)/pdtphys 951 CALL histwrite_phy(o_dvcon, zx_tmp_fi3d) 952 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys 953 CALL histwrite_phy(o_dqcon, zx_tmp_fi3d) 954 955 IF(iflag_thermals.EQ.1) THEN 956 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys 957 CALL histwrite_phy(o_tnhusc, zx_tmp_fi3d) 958 ELSE IF(iflag_thermals.GT.1.AND.iflag_wake.EQ.1) THEN 959 IF (vars_defined) THEN 960 zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys + & 961 d_q_ajs(1:klon,1:klev)/pdtphys + & 962 d_q_wake(1:klon,1:klev)/pdtphys 963 ENDIF 964 CALL histwrite_phy(o_tnhusc, zx_tmp_fi3d) 965 ENDIF 966 967 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lsc(1:klon,1:klev)/pdtphys 968 CALL histwrite_phy(o_dtlsc, zx_tmp_fi3d) 969 IF (vars_defined) zx_tmp_fi3d(1:klon, 1:klev)=(d_t_lsc(1:klon,1:klev)+ & 970 d_t_eva(1:klon,1:klev))/pdtphys 971 CALL histwrite_phy(o_dtlschr, zx_tmp_fi3d) 972 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys 973 CALL histwrite_phy(o_dqlsc, zx_tmp_fi3d) 974 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=beta_prec(1:klon,1:klev) 975 CALL histwrite_phy(o_beta_prec, zx_tmp_fi3d) 983 976 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 984 ! Sorties specifiques a la separation thermiques/non thermiques977 ! Sorties specifiques a la separation thermiques/non thermiques 985 978 if (iflag_thermals>=1) then 986 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscth(1:klon,1:klev)/pdtphys987 CALL histwrite_phy(o_dtlscth, zx_tmp_fi3d)988 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscst(1:klon,1:klev)/pdtphys989 CALL histwrite_phy(o_dtlscst, zx_tmp_fi3d)990 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscth(1:klon,1:klev)/pdtphys991 CALL histwrite_phy(o_dqlscth, zx_tmp_fi3d)992 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscst(1:klon,1:klev)/pdtphys993 CALL histwrite_phy(o_dqlscst, zx_tmp_fi3d)994 CALL histwrite_phy(o_plulth, plul_th)995 CALL histwrite_phy(o_plulst, plul_st)996 IF (vars_defined) THEN997 do k=1,klev998 do i=1,klon999 if (ptconvth(i,k)) then1000 zx_tmp_fi3d(i,k)=1.1001 else1002 zx_tmp_fi3d(i,k)=0.1003 endif1004 enddo1005 enddo1006 ENDIF1007 CALL histwrite_phy(o_ptconvth, zx_tmp_fi3d)1008 IF (vars_defined) THEN1009 do i=1,klon1010 zx_tmp_fi2d(1:klon)=lmax_th(:)1011 enddo1012 ENDIF1013 CALL histwrite_phy(o_lmaxth, zx_tmp_fi2d)1014 endif ! iflag_thermals>=1979 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscth(1:klon,1:klev)/pdtphys 980 CALL histwrite_phy(o_dtlscth, zx_tmp_fi3d) 981 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscst(1:klon,1:klev)/pdtphys 982 CALL histwrite_phy(o_dtlscst, zx_tmp_fi3d) 983 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscth(1:klon,1:klev)/pdtphys 984 CALL histwrite_phy(o_dqlscth, zx_tmp_fi3d) 985 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscst(1:klon,1:klev)/pdtphys 986 CALL histwrite_phy(o_dqlscst, zx_tmp_fi3d) 987 CALL histwrite_phy(o_plulth, plul_th) 988 CALL histwrite_phy(o_plulst, plul_st) 989 IF (vars_defined) THEN 990 do k=1,klev 991 do i=1,klon 992 if (ptconvth(i,k)) then 993 zx_tmp_fi3d(i,k)=1. 994 else 995 zx_tmp_fi3d(i,k)=0. 996 endif 997 enddo 998 enddo 999 ENDIF 1000 CALL histwrite_phy(o_ptconvth, zx_tmp_fi3d) 1001 IF (vars_defined) THEN 1002 do i=1,klon 1003 zx_tmp_fi2d(1:klon)=lmax_th(:) 1004 enddo 1005 ENDIF 1006 CALL histwrite_phy(o_lmaxth, zx_tmp_fi2d) 1007 endif ! iflag_thermals>=1 1015 1008 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1016 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev)/pdtphys1017 CALL histwrite_phy(o_dtvdf, zx_tmp_fi3d)1018 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_diss(1:klon,1:klev)/pdtphys1019 CALL histwrite_phy(o_dtdis, zx_tmp_fi3d)1020 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys1021 CALL histwrite_phy(o_dqvdf, zx_tmp_fi3d)1022 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_eva(1:klon,1:klev)/pdtphys1023 CALL histwrite_phy(o_dteva, zx_tmp_fi3d)1024 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_eva(1:klon,1:klev)/pdtphys1025 CALL histwrite_phy(o_dqeva, zx_tmp_fi3d)1026 zpt_conv = 0.1027 WHERE (ptconv) zpt_conv = 1.1028 CALL histwrite_phy(o_ptconv, zpt_conv)1029 CALL histwrite_phy(o_ratqs, ratqs)1030 IF (vars_defined) THEN1031 zx_tmp_fi3d(1:klon,1:klev)=d_t_ajs(1:klon,1:klev)/pdtphys - &1032 1033 ENDIF1034 CALL histwrite_phy(o_dtthe, zx_tmp_fi3d)1009 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev)/pdtphys 1010 CALL histwrite_phy(o_dtvdf, zx_tmp_fi3d) 1011 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_diss(1:klon,1:klev)/pdtphys 1012 CALL histwrite_phy(o_dtdis, zx_tmp_fi3d) 1013 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys 1014 CALL histwrite_phy(o_dqvdf, zx_tmp_fi3d) 1015 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_eva(1:klon,1:klev)/pdtphys 1016 CALL histwrite_phy(o_dteva, zx_tmp_fi3d) 1017 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_eva(1:klon,1:klev)/pdtphys 1018 CALL histwrite_phy(o_dqeva, zx_tmp_fi3d) 1019 zpt_conv = 0. 1020 WHERE (ptconv) zpt_conv = 1. 1021 CALL histwrite_phy(o_ptconv, zpt_conv) 1022 CALL histwrite_phy(o_ratqs, ratqs) 1023 IF (vars_defined) THEN 1024 zx_tmp_fi3d(1:klon,1:klev)=d_t_ajs(1:klon,1:klev)/pdtphys - & 1025 d_t_ajsb(1:klon,1:klev)/pdtphys 1026 ENDIF 1027 CALL histwrite_phy(o_dtthe, zx_tmp_fi3d) 1035 1028 IF (iflag_thermals>=1) THEN 1036 ! Pour l instant 0 a y reflichir pour les thermiques1037 zx_tmp_fi2d=0.1038 CALL histwrite_phy(o_ftime_th, zx_tmp_fi2d)1039 CALL histwrite_phy(o_f_th, fm_therm)1040 CALL histwrite_phy(o_e_th, entr_therm)1041 CALL histwrite_phy(o_w_th, zw2)1042 CALL histwrite_phy(o_q_th, zqasc)1043 CALL histwrite_phy(o_a_th, fraca)1044 CALL histwrite_phy(o_d_th, detr_therm)1045 CALL histwrite_phy(o_f0_th, f0)1046 CALL histwrite_phy(o_zmax_th, zmax_th)1047 IF (vars_defined) THEN1048 zx_tmp_fi3d(1:klon,1:klev)=d_q_ajs(1:klon,1:klev)/pdtphys - &1049 1050 ENDIF1051 CALL histwrite_phy(o_dqthe, zx_tmp_fi3d)1052 ENDIF !iflag_thermals1053 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ajsb(1:klon,1:klev)/pdtphys1054 CALL histwrite_phy(o_dtajs, zx_tmp_fi3d)1055 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys1056 CALL histwrite_phy(o_dqajs, zx_tmp_fi3d)1057 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=heat(1:klon,1:klev)/RDAY1058 CALL histwrite_phy(o_dtswr, zx_tmp_fi3d)1059 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=heat0(1:klon,1:klev)/RDAY1060 CALL histwrite_phy(o_dtsw0, zx_tmp_fi3d)1061 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=-1.*cool(1:klon,1:klev)/RDAY1062 CALL histwrite_phy(o_dtlwr, zx_tmp_fi3d)1063 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=-1.*cool0(1:klon,1:klev)/RDAY1064 CALL histwrite_phy(o_dtlw0, zx_tmp_fi3d)1065 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev)/pdtphys1066 CALL histwrite_phy(o_dtec, zx_tmp_fi3d)1067 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_vdf(1:klon,1:klev)/pdtphys1068 CALL histwrite_phy(o_duvdf, zx_tmp_fi3d)1069 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_vdf(1:klon,1:klev)/pdtphys1070 CALL histwrite_phy(o_dvvdf, zx_tmp_fi3d)1029 ! Pour l instant 0 a y reflichir pour les thermiques 1030 zx_tmp_fi2d=0. 1031 CALL histwrite_phy(o_ftime_th, zx_tmp_fi2d) 1032 CALL histwrite_phy(o_f_th, fm_therm) 1033 CALL histwrite_phy(o_e_th, entr_therm) 1034 CALL histwrite_phy(o_w_th, zw2) 1035 CALL histwrite_phy(o_q_th, zqasc) 1036 CALL histwrite_phy(o_a_th, fraca) 1037 CALL histwrite_phy(o_d_th, detr_therm) 1038 CALL histwrite_phy(o_f0_th, f0) 1039 CALL histwrite_phy(o_zmax_th, zmax_th) 1040 IF (vars_defined) THEN 1041 zx_tmp_fi3d(1:klon,1:klev)=d_q_ajs(1:klon,1:klev)/pdtphys - & 1042 d_q_ajsb(1:klon,1:klev)/pdtphys 1043 ENDIF 1044 CALL histwrite_phy(o_dqthe, zx_tmp_fi3d) 1045 ENDIF !iflag_thermals 1046 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ajsb(1:klon,1:klev)/pdtphys 1047 CALL histwrite_phy(o_dtajs, zx_tmp_fi3d) 1048 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys 1049 CALL histwrite_phy(o_dqajs, zx_tmp_fi3d) 1050 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=heat(1:klon,1:klev)/RDAY 1051 CALL histwrite_phy(o_dtswr, zx_tmp_fi3d) 1052 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=heat0(1:klon,1:klev)/RDAY 1053 CALL histwrite_phy(o_dtsw0, zx_tmp_fi3d) 1054 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=-1.*cool(1:klon,1:klev)/RDAY 1055 CALL histwrite_phy(o_dtlwr, zx_tmp_fi3d) 1056 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=-1.*cool0(1:klon,1:klev)/RDAY 1057 CALL histwrite_phy(o_dtlw0, zx_tmp_fi3d) 1058 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev)/pdtphys 1059 CALL histwrite_phy(o_dtec, zx_tmp_fi3d) 1060 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_vdf(1:klon,1:klev)/pdtphys 1061 CALL histwrite_phy(o_duvdf, zx_tmp_fi3d) 1062 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_vdf(1:klon,1:klev)/pdtphys 1063 CALL histwrite_phy(o_dvvdf, zx_tmp_fi3d) 1071 1064 IF (ok_orodr) THEN 1072 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_oro(1:klon,1:klev)/pdtphys1073 CALL histwrite_phy(o_duoro, zx_tmp_fi3d)1074 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_oro(1:klon,1:klev)/pdtphys1075 CALL histwrite_phy(o_dvoro, zx_tmp_fi3d)1076 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_oro(1:klon,1:klev)/pdtphys1077 CALL histwrite_phy(o_dtoro, zx_tmp_fi3d)1078 ENDIF 1079 1080 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_lif(1:klon,1:klev)/pdtphys1081 CALL histwrite_phy(o_dulif, zx_tmp_fi3d)1082 ENDIF 1083 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_lif(1:klon,1:klev)/pdtphys1084 CALL histwrite_phy(o_dvlif, zx_tmp_fi3d)1085 1086 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lif(1:klon,1:klev)/pdtphys1087 CALL histwrite_phy(o_dtlif, zx_tmp_fi3d)1065 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_oro(1:klon,1:klev)/pdtphys 1066 CALL histwrite_phy(o_duoro, zx_tmp_fi3d) 1067 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_oro(1:klon,1:klev)/pdtphys 1068 CALL histwrite_phy(o_dvoro, zx_tmp_fi3d) 1069 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_oro(1:klon,1:klev)/pdtphys 1070 CALL histwrite_phy(o_dtoro, zx_tmp_fi3d) 1071 ENDIF 1072 IF (ok_orolf) THEN 1073 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_lif(1:klon,1:klev)/pdtphys 1074 CALL histwrite_phy(o_dulif, zx_tmp_fi3d) 1075 ENDIF 1076 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_lif(1:klon,1:klev)/pdtphys 1077 CALL histwrite_phy(o_dvlif, zx_tmp_fi3d) 1078 1079 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lif(1:klon,1:klev)/pdtphys 1080 CALL histwrite_phy(o_dtlif, zx_tmp_fi3d) 1088 1081 1089 1082 IF (ok_hines) THEN 1090 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_hin(1:klon,1:klev)/pdtphys1091 CALL histwrite_phy(o_duhin, zx_tmp_fi3d)1092 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_hin(1:klon,1:klev)/pdtphys1093 CALL histwrite_phy(o_dvhin, zx_tmp_fi3d)1094 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_hin(1:klon,1:klev)/pdtphys1095 CALL histwrite_phy(o_dthin, zx_tmp_fi3d)1096 1097 CALL histwrite_phy(o_rsu, swup)1098 CALL histwrite_phy(o_rsd, swdn)1099 CALL histwrite_phy(o_rlu, lwup)1100 CALL histwrite_phy(o_rld, lwdn)1101 CALL histwrite_phy(o_rsucs, swup0)1102 CALL histwrite_phy(o_rsdcs, swdn0)1103 CALL histwrite_phy(o_rlucs, lwup0)1104 CALL histwrite_phy(o_rldcs, lwdn0)1105 IF(vars_defined) THEN1106 zx_tmp_fi3d(1:klon,1:klev)=d_t(1:klon,1:klev)+ &1107 d_t_dyn(1:klon,1:klev)1108 ENDIF1109 CALL histwrite_phy(o_tnt, zx_tmp_fi3d)1110 IF(vars_defined) THEN1111 zx_tmp_fi3d(1:klon,1:klev)=heat(1:klon,1:klev)/RDAY - &1112 cool(1:klon,1:klev)/RDAY1113 ENDIF1114 CALL histwrite_phy(o_tntr, zx_tmp_fi3d)1115 IF(vars_defined) THEN1116 zx_tmp_fi3d(1:klon,1:klev)= (d_t_lsc(1:klon,1:klev)+ &1117 1118 1119 ENDIF1120 CALL histwrite_phy(o_tntscpbl, zx_tmp_fi3d)1121 IF(vars_defined) THEN1122 zx_tmp_fi3d(1:klon,1:klev)=d_qx(1:klon,1:klev,ivap)+ &1123 d_q_dyn(1:klon,1:klev)1124 ENDIF1125 CALL histwrite_phy(o_tnhus, zx_tmp_fi3d)1126 IF(vars_defined) THEN1127 zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys+ &1128 1129 ENDIF1130 CALL histwrite_phy(o_tnhusscpbl, zx_tmp_fi3d)1131 CALL histwrite_phy(o_evu, coefm(:,:,is_ave))1132 IF(vars_defined) THEN1133 zx_tmp_fi3d(1:klon,1:klev)=q_seri(1:klon,1:klev)+ &1134 1135 ENDIF1136 CALL histwrite_phy(o_h2o, zx_tmp_fi3d)1083 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_hin(1:klon,1:klev)/pdtphys 1084 CALL histwrite_phy(o_duhin, zx_tmp_fi3d) 1085 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_hin(1:klon,1:klev)/pdtphys 1086 CALL histwrite_phy(o_dvhin, zx_tmp_fi3d) 1087 IF(vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_hin(1:klon,1:klev)/pdtphys 1088 CALL histwrite_phy(o_dthin, zx_tmp_fi3d) 1089 ENDIF 1090 CALL histwrite_phy(o_rsu, swup) 1091 CALL histwrite_phy(o_rsd, swdn) 1092 CALL histwrite_phy(o_rlu, lwup) 1093 CALL histwrite_phy(o_rld, lwdn) 1094 CALL histwrite_phy(o_rsucs, swup0) 1095 CALL histwrite_phy(o_rsdcs, swdn0) 1096 CALL histwrite_phy(o_rlucs, lwup0) 1097 CALL histwrite_phy(o_rldcs, lwdn0) 1098 IF(vars_defined) THEN 1099 zx_tmp_fi3d(1:klon,1:klev)=d_t(1:klon,1:klev)+ & 1100 d_t_dyn(1:klon,1:klev) 1101 ENDIF 1102 CALL histwrite_phy(o_tnt, zx_tmp_fi3d) 1103 IF(vars_defined) THEN 1104 zx_tmp_fi3d(1:klon,1:klev)=heat(1:klon,1:klev)/RDAY - & 1105 cool(1:klon,1:klev)/RDAY 1106 ENDIF 1107 CALL histwrite_phy(o_tntr, zx_tmp_fi3d) 1108 IF(vars_defined) THEN 1109 zx_tmp_fi3d(1:klon,1:klev)= (d_t_lsc(1:klon,1:klev)+ & 1110 d_t_eva(1:klon,1:klev)+ & 1111 d_t_vdf(1:klon,1:klev))/pdtphys 1112 ENDIF 1113 CALL histwrite_phy(o_tntscpbl, zx_tmp_fi3d) 1114 IF(vars_defined) THEN 1115 zx_tmp_fi3d(1:klon,1:klev)=d_qx(1:klon,1:klev,ivap)+ & 1116 d_q_dyn(1:klon,1:klev) 1117 ENDIF 1118 CALL histwrite_phy(o_tnhus, zx_tmp_fi3d) 1119 IF(vars_defined) THEN 1120 zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys+ & 1121 d_q_eva(1:klon,1:klev)/pdtphys 1122 ENDIF 1123 CALL histwrite_phy(o_tnhusscpbl, zx_tmp_fi3d) 1124 CALL histwrite_phy(o_evu, coefm(:,:,is_ave)) 1125 IF(vars_defined) THEN 1126 zx_tmp_fi3d(1:klon,1:klev)=q_seri(1:klon,1:klev)+ & 1127 ql_seri(1:klon,1:klev) 1128 ENDIF 1129 CALL histwrite_phy(o_h2o, zx_tmp_fi3d) 1137 1130 if (iflag_con >= 3) then 1138 IF(vars_defined) THEN1131 IF(vars_defined) THEN 1139 1132 zx_tmp_fi3d(1:klon,1:klev)=-1 * (dnwd(1:klon,1:klev)+ & 1140 1133 dnwd0(1:klon,1:klev)) 1141 ENDIF1142 CALL histwrite_phy(o_mcd, zx_tmp_fi3d)1143 IF(vars_defined) THEN1134 ENDIF 1135 CALL histwrite_phy(o_mcd, zx_tmp_fi3d) 1136 IF(vars_defined) THEN 1144 1137 zx_tmp_fi3d(1:klon,1:klev)=upwd(1:klon,1:klev) + & 1145 1138 dnwd(1:klon,1:klev)+ dnwd0(1:klon,1:klev) 1146 ENDIF1147 CALL histwrite_phy(o_dmc, zx_tmp_fi3d)1139 ENDIF 1140 CALL histwrite_phy(o_dmc, zx_tmp_fi3d) 1148 1141 else if (iflag_con == 2) then 1149 CALL histwrite_phy(o_mcd, pmfd)1150 CALL histwrite_phy(o_dmc, pmfu + pmfd)1142 CALL histwrite_phy(o_mcd, pmfd) 1143 CALL histwrite_phy(o_dmc, pmfu + pmfd) 1151 1144 end if 1152 CALL histwrite_phy(o_ref_liq, ref_liq)1153 CALL histwrite_phy(o_ref_ice, ref_ice)1154 if (RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR. &1155 RN2O_per.NE.RN2O_act.OR.RCFC11_per.NE.RCFC11_act.OR. &1156 RCFC12_per.NE.RCFC12_act) THEN1157 IF(vars_defined) zx_tmp_fi2d(1 : klon) = swupp ( 1 : klon, klevp1 )1158 CALL histwrite_phy(o_rsut4co2, zx_tmp_fi2d)1159 IF(vars_defined) zx_tmp_fi2d(1 : klon) = lwupp ( 1 : klon, klevp1 )1160 CALL histwrite_phy(o_rlut4co2, zx_tmp_fi2d)1161 IF(vars_defined) zx_tmp_fi2d(1 : klon) = swup0p ( 1 : klon, klevp1 )1162 CALL histwrite_phy(o_rsutcs4co2, zx_tmp_fi2d)1163 IF(vars_defined) zx_tmp_fi2d(1 : klon) = lwup0p ( 1 : klon, klevp1 )1164 CALL histwrite_phy(o_rlutcs4co2, zx_tmp_fi2d)1165 CALL histwrite_phy(o_rsu4co2, swupp)1166 CALL histwrite_phy(o_rlu4co2, lwupp)1167 CALL histwrite_phy(o_rsucs4co2, swup0p)1168 CALL histwrite_phy(o_rlucs4co2, lwup0p)1169 CALL histwrite_phy(o_rsd4co2, swdnp)1170 CALL histwrite_phy(o_rld4co2, lwdnp)1171 CALL histwrite_phy(o_rsdcs4co2, swdn0p)1172 CALL histwrite_phy(o_rldcs4co2, lwdn0p)1173 ENDIF1145 CALL histwrite_phy(o_ref_liq, ref_liq) 1146 CALL histwrite_phy(o_ref_ice, ref_ice) 1147 if (RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR. & 1148 RN2O_per.NE.RN2O_act.OR.RCFC11_per.NE.RCFC11_act.OR. & 1149 RCFC12_per.NE.RCFC12_act) THEN 1150 IF(vars_defined) zx_tmp_fi2d(1 : klon) = swupp ( 1 : klon, klevp1 ) 1151 CALL histwrite_phy(o_rsut4co2, zx_tmp_fi2d) 1152 IF(vars_defined) zx_tmp_fi2d(1 : klon) = lwupp ( 1 : klon, klevp1 ) 1153 CALL histwrite_phy(o_rlut4co2, zx_tmp_fi2d) 1154 IF(vars_defined) zx_tmp_fi2d(1 : klon) = swup0p ( 1 : klon, klevp1 ) 1155 CALL histwrite_phy(o_rsutcs4co2, zx_tmp_fi2d) 1156 IF(vars_defined) zx_tmp_fi2d(1 : klon) = lwup0p ( 1 : klon, klevp1 ) 1157 CALL histwrite_phy(o_rlutcs4co2, zx_tmp_fi2d) 1158 CALL histwrite_phy(o_rsu4co2, swupp) 1159 CALL histwrite_phy(o_rlu4co2, lwupp) 1160 CALL histwrite_phy(o_rsucs4co2, swup0p) 1161 CALL histwrite_phy(o_rlucs4co2, lwup0p) 1162 CALL histwrite_phy(o_rsd4co2, swdnp) 1163 CALL histwrite_phy(o_rld4co2, lwdnp) 1164 CALL histwrite_phy(o_rsdcs4co2, swdn0p) 1165 CALL histwrite_phy(o_rldcs4co2, lwdn0p) 1166 ENDIF 1174 1167 !!!!!!!!!!!! Sorties niveaux de pression NMC !!!!!!!!!!!!!!!!!!!! 1175 DO iff=7, nfiles1176 1177 CALL histwrite_phy(o_tnondef,tnondef(:,:,iff-6),iff)1178 CALL histwrite_phy(o_ta,twriteSTD(:,:,iff-6),iff)1179 CALL histwrite_phy(o_zg,phiwriteSTD(:,:,iff-6),iff)1180 CALL histwrite_phy(o_hus,qwriteSTD(:,:,iff-6),iff)1181 CALL histwrite_phy(o_hur,rhwriteSTD(:,:,iff-6),iff)1182 CALL histwrite_phy(o_ua,uwriteSTD(:,:,iff-6),iff)1183 CALL histwrite_phy(o_va,vwriteSTD(:,:,iff-6),iff)1184 CALL histwrite_phy(o_wap,wwriteSTD(:,:,iff-6),iff)1185 IF(vars_defined) THEN1186 DO k=1, nlevSTD1187 DO i=1, klon1188 IF(tnondef(i,k,iff-6).NE.missing_val) THEN1189 zx_tmp_fi3d(i,k) = (100.*tnondef(i,k,iff-6))/freq_moyNMC(iff-6)1190 ELSE1191 zx_tmp_fi3d(i,k) = missing_val1192 ENDIF1193 ENDDO1194 ENDDO1195 ENDIF1196 CALL histwrite_phy(o_psbg,zx_tmp_fi3d,iff)1197 IF(vars_defined) THEN1198 DO k=1, nlevSTD1199 DO i=1, klon1200 IF(O3sumSTD(i,k,iff-6).NE.missing_val) THEN1201 zx_tmp_fi3d(i,k) = O3sumSTD(i,k,iff-6) * 1.e+91202 ELSE1203 zx_tmp_fi3d(i,k) = missing_val1204 ENDIF1205 ENDDO1206 ENDDO !k=1, nlevSTD1207 ENDIF1208 CALL histwrite_phy(o_tro3,zx_tmp_fi3d,iff)1209 if (read_climoz == 2) THEN1210 IF(vars_defined) THEN1211 DO k=1, nlevSTD1212 DO i=1, klon1213 IF(O3daysumSTD(i,k,iff-6).NE.missing_val) THEN1214 zx_tmp_fi3d(i,k) = O3daysumSTD(i,k,iff-6) * 1.e+91215 ELSE1216 zx_tmp_fi3d(i,k) = missing_val1217 ENDIF1218 ENDDO1219 ENDDO !k=1, nlevSTD1220 ENDIF1221 CALL histwrite_phy(o_tro3_daylight,zx_tmp_fi3d,iff)1222 endif1223 CALL histwrite_phy(o_uxv,uvsumSTD(:,:,iff-6),iff)1224 CALL histwrite_phy(o_vxq,vqsumSTD(:,:,iff-6),iff)1225 CALL histwrite_phy(o_vxT,vTsumSTD(:,:,iff-6),iff)1226 CALL histwrite_phy(o_wxq,wqsumSTD(:,:,iff-6),iff)1227 CALL histwrite_phy(o_vxphi,vphisumSTD(:,:,iff-6),iff)1228 CALL histwrite_phy(o_wxT,wTsumSTD(:,:,iff-6),iff)1229 CALL histwrite_phy(o_uxu,u2sumSTD(:,:,iff-6),iff)1230 CALL histwrite_phy(o_vxv,v2sumSTD(:,:,iff-6),iff)1231 CALL histwrite_phy(o_TxT,T2sumSTD(:,:,iff-6),iff)1232 ENDDO !nfiles1168 DO iff=7, nfiles 1169 1170 CALL histwrite_phy(o_tnondef,tnondef(:,:,iff-6),iff) 1171 CALL histwrite_phy(o_ta,twriteSTD(:,:,iff-6),iff) 1172 CALL histwrite_phy(o_zg,phiwriteSTD(:,:,iff-6),iff) 1173 CALL histwrite_phy(o_hus,qwriteSTD(:,:,iff-6),iff) 1174 CALL histwrite_phy(o_hur,rhwriteSTD(:,:,iff-6),iff) 1175 CALL histwrite_phy(o_ua,uwriteSTD(:,:,iff-6),iff) 1176 CALL histwrite_phy(o_va,vwriteSTD(:,:,iff-6),iff) 1177 CALL histwrite_phy(o_wap,wwriteSTD(:,:,iff-6),iff) 1178 IF(vars_defined) THEN 1179 DO k=1, nlevSTD 1180 DO i=1, klon 1181 IF(tnondef(i,k,iff-6).NE.missing_val) THEN 1182 zx_tmp_fi3d(i,k) = (100.*tnondef(i,k,iff-6))/freq_moyNMC(iff-6) 1183 ELSE 1184 zx_tmp_fi3d(i,k) = missing_val 1185 ENDIF 1186 ENDDO 1187 ENDDO 1188 ENDIF 1189 CALL histwrite_phy(o_psbg,zx_tmp_fi3d,iff) 1190 IF(vars_defined) THEN 1191 DO k=1, nlevSTD 1192 DO i=1, klon 1193 IF(O3sumSTD(i,k,iff-6).NE.missing_val) THEN 1194 zx_tmp_fi3d(i,k) = O3sumSTD(i,k,iff-6) * 1.e+9 1195 ELSE 1196 zx_tmp_fi3d(i,k) = missing_val 1197 ENDIF 1198 ENDDO 1199 ENDDO !k=1, nlevSTD 1200 ENDIF 1201 CALL histwrite_phy(o_tro3,zx_tmp_fi3d,iff) 1202 if (read_climoz == 2) THEN 1203 IF(vars_defined) THEN 1204 DO k=1, nlevSTD 1205 DO i=1, klon 1206 IF(O3daysumSTD(i,k,iff-6).NE.missing_val) THEN 1207 zx_tmp_fi3d(i,k) = O3daysumSTD(i,k,iff-6) * 1.e+9 1208 ELSE 1209 zx_tmp_fi3d(i,k) = missing_val 1210 ENDIF 1211 ENDDO 1212 ENDDO !k=1, nlevSTD 1213 ENDIF 1214 CALL histwrite_phy(o_tro3_daylight,zx_tmp_fi3d,iff) 1215 endif 1216 CALL histwrite_phy(o_uxv,uvsumSTD(:,:,iff-6),iff) 1217 CALL histwrite_phy(o_vxq,vqsumSTD(:,:,iff-6),iff) 1218 CALL histwrite_phy(o_vxT,vTsumSTD(:,:,iff-6),iff) 1219 CALL histwrite_phy(o_wxq,wqsumSTD(:,:,iff-6),iff) 1220 CALL histwrite_phy(o_vxphi,vphisumSTD(:,:,iff-6),iff) 1221 CALL histwrite_phy(o_wxT,wTsumSTD(:,:,iff-6),iff) 1222 CALL histwrite_phy(o_uxu,u2sumSTD(:,:,iff-6),iff) 1223 CALL histwrite_phy(o_vxv,v2sumSTD(:,:,iff-6),iff) 1224 CALL histwrite_phy(o_TxT,T2sumSTD(:,:,iff-6),iff) 1225 ENDDO !nfiles 1233 1226 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1234 1235 DO iq=3,nqtot1227 IF (nqtot.GE.3) THEN 1228 DO iq=3,nqtot 1236 1229 CALL histwrite_phy(o_trac(iq-2), qx(:,:,iq)) 1237 1230 CALL histwrite_phy(o_dtr_vdf(iq-2),d_tr_cl(:,:,iq-2)) … … 1248 1241 CALL histwrite_phy(o_dtr_sat(iq-2),d_tr_sat(:,:,iq-2)) 1249 1242 CALL histwrite_phy(o_dtr_uscav(iq-2),d_tr_uscav(:,:,iq-2)) 1250 zx_tmp_fi2d=0. 1251 IF(vars_defined) THEN 1252 DO k=1,klev 1253 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*qx(:,k,iq) 1254 ENDDO 1255 ENDIF 1256 CALL histwrite_phy(o_trac_cum(iq-2), zx_tmp_fi2d) 1257 ENDDO 1258 ENDIF 1259 1260 1261 IF(.NOT.vars_defined) THEN 1262 !$OMP MASTER 1243 zx_tmp_fi2d=0. 1244 IF(vars_defined) THEN 1245 DO k=1,klev 1246 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*qx(:,k,iq) 1247 ENDDO 1248 ENDIF 1249 CALL histwrite_phy(o_trac_cum(iq-2), zx_tmp_fi2d) 1250 ENDDO 1251 ENDIF 1252 1253 IF(.NOT.vars_defined) THEN 1254 !$OMP MASTER 1263 1255 #ifndef CPP_NO_IOIPSL 1264 1265 1266 1267 1268 1269 1270 1271 1256 DO iff=1,nfiles 1257 IF (clef_files(iff)) THEN 1258 CALL histend(nid_files(iff)) 1259 ndex2d = 0 1260 ndex3d = 0 1261 1262 ENDIF ! clef_files 1263 ENDDO ! iff 1272 1264 #endif 1273 1265 #ifdef CPP_XIOS 1274 1275 1266 !On finalise l'initialisation: 1267 CALL wxios_closedef() 1276 1268 #endif 1277 1269 1278 !$OMP END MASTER 1279 !$OMP BARRIER 1280 vars_defined = .TRUE. 1281 1282 1283 END IF 1270 !$OMP END MASTER 1271 !$OMP BARRIER 1272 vars_defined = .TRUE. 1273 1274 END IF 1284 1275 1285 1276 END DO 1286 1277 1287 1278 IF(vars_defined) THEN 1288 ! On synchronise les fichiers pour IOIPSL1279 ! On synchronise les fichiers pour IOIPSL 1289 1280 #ifndef CPP_NO_IOIPSL 1290 !$OMP MASTER1291 DO iff=1,nfiles1281 !$OMP MASTER 1282 DO iff=1,nfiles 1292 1283 IF (ok_sync .AND. clef_files(iff)) THEN 1293 1294 ENDIF 1295 END DO1296 !$OMP END MASTER1284 CALL histsync(nid_files(iff)) 1285 ENDIF 1286 END DO 1287 !$OMP END MASTER 1297 1288 #endif 1298 1289 ENDIF 1299 1290 1300 1301 1302 1303 END SUBROUTINE phys_output_write 1304 1305 1306 1307 END MODULE phys_output_write_mod 1308 1291 END SUBROUTINE phys_output_write 1292 1293 END MODULE phys_output_write_mod
Note: See TracChangeset
for help on using the changeset viewer.