Changeset 2690 for LMDZ5/trunk/libf/phylmd
- Timestamp:
- Oct 30, 2016, 4:35:25 PM (8 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 15 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/infotrac_phy.F90
r2320 r2690 95 95 indnum_fn_num_,index_trac_,& 96 96 niso_,ntraceurs_zone_,ntraciso_) 97 ! transfer information on tracers from dynamics to physics 98 USE print_control_mod, ONLY: prt_level, lunout 99 IMPLICIT NONE 97 98 ! transfer information on tracers from dynamics to physics 99 USE print_control_mod, ONLY: prt_level, lunout 100 IMPLICIT NONE 101 100 102 INTEGER,INTENT(IN) :: nqtot_ 101 103 INTEGER,INTENT(IN) :: nqo_ -
LMDZ5/trunk/libf/phylmd/phys_local_var_mod.F90
r2670 r2690 29 29 REAL, SAVE, ALLOCATABLE :: d_u_dyn(:,:), d_v_dyn(:,:) 30 30 !$OMP THREADPRIVATE(d_u_dyn, d_v_dyn) 31 !!!!32 31 REAL, SAVE, ALLOCATABLE :: d_tr_dyn(:,:,:) 33 32 !$OMP THREADPRIVATE(d_tr_dyn) 34 !!!!35 33 REAL, SAVE, ALLOCATABLE :: d_t_con(:,:),d_q_con(:,:) 36 34 !$OMP THREADPRIVATE(d_t_con,d_q_con) … … 420 418 !$OMP THREADPRIVATE(sissnow,runoff,albsol3_lic) 421 419 420 #ifdef CPP_StratAer 421 ! variables for strat. aerosol CK 422 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: R2SO4 423 !$OMP THREADPRIVATE(R2SO4) 424 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: DENSO4 425 !$OMP THREADPRIVATE(DENSO4) 426 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: f_r_wet 427 !$OMP THREADPRIVATE(f_r_wet) 428 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sfluxaer 429 !$OMP THREADPRIVATE(sfluxaer) 430 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: decfluxaer 431 !$OMP THREADPRIVATE(decfluxaer) 432 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: mdw 433 !$OMP THREADPRIVATE(mdw) 434 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulf_convert 435 !$OMP THREADPRIVATE(sulf_convert) 436 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulf_nucl 437 !$OMP THREADPRIVATE(sulf_nucl) 438 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sulf_cond_evap 439 !$OMP THREADPRIVATE(sulf_cond_evap) 440 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ocs_convert 441 !$OMP THREADPRIVATE(ocs_convert) 442 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: SO2_backgr_tend 443 !$OMP THREADPRIVATE(SO2_backgr_tend) 444 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: OCS_backgr_tend 445 !$OMP THREADPRIVATE(OCS_backgr_tend) 446 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: OCS_lifetime 447 !$OMP THREADPRIVATE(OCS_lifetime) 448 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: SO2_lifetime 449 !$OMP THREADPRIVATE(SO2_lifetime) 450 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: alpha_bin 451 !$OMP THREADPRIVATE(alpha_bin) 452 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: piz_bin 453 !$OMP THREADPRIVATE(piz_bin) 454 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: cg_bin 455 !$OMP THREADPRIVATE(cg_bin) 456 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_550 457 !$OMP THREADPRIVATE(tau_strat_550) 458 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_550_lay 459 !$OMP THREADPRIVATE(tau_strat_550_lay) 460 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tau_strat_1020 461 !$OMP THREADPRIVATE(tau_strat_1020) 462 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tausum_strat 463 !$OMP THREADPRIVATE(tausum_strat) 464 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sulf_dep_dry 465 !$OMP THREADPRIVATE(sulf_dep_dry) 466 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: sulf_dep_wet 467 !$OMP THREADPRIVATE(sulf_dep_wet) 468 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: surf_PM25_sulf 469 !$OMP THREADPRIVATE(surf_PM25_sulf) 470 REAL, ALLOCATABLE, SAVE, DIMENSION(:) :: p_tropopause 471 !$OMP THREADPRIVATE(p_tropopause) 472 REAL, ALLOCATABLE, SAVE, DIMENSION(:,:) :: vsed_aer 473 !$OMP THREADPRIVATE(vsed_aer) 474 #endif 475 422 476 CONTAINS 423 477 … … 659 713 ALLOCATE (sissnow(klon),runoff(klon),albsol3_lic(klon)) 660 714 661 715 #ifdef CPP_StratAer 716 ALLOCATE (R2SO4(klon,klev)) 717 ALLOCATE (DENSO4(klon,klev)) 718 ALLOCATE (f_r_wet(klon,klev)) 719 ALLOCATE (sfluxaer(klon)) 720 ALLOCATE (decfluxaer(klon,nbtr)) 721 ALLOCATE (mdw(nbtr)) 722 ALLOCATE (sulf_convert(klon,klev)) 723 ALLOCATE (sulf_nucl(klon,klev)) 724 ALLOCATE (sulf_cond_evap(klon,klev)) 725 ALLOCATE (ocs_convert(klon,klev)) 726 ALLOCATE (SO2_backgr_tend(klon,klev)) 727 ALLOCATE (OCS_backgr_tend(klon,klev)) 728 ALLOCATE (OCS_lifetime(klon,klev)) 729 ALLOCATE (SO2_lifetime(klon,klev)) 730 ALLOCATE (alpha_bin(nbands_sw_rrtm+nbands_lw_rrtm+nwave+nwave_lw,nbtr)) 731 ALLOCATE (piz_bin(nbands_sw_rrtm+nbands_lw_rrtm+nwave+nwave_lw,nbtr)) 732 ALLOCATE (cg_bin(nbands_sw_rrtm+nbands_lw_rrtm+nwave+nwave_lw,nbtr)) 733 ALLOCATE (tau_strat_550(klon,klev)) 734 ALLOCATE (tau_strat_550_lay(klon,klev)) 735 ALLOCATE (tau_strat_1020(klon,klev)) 736 ALLOCATE (tausum_strat(klon,3)) 737 ALLOCATE (sulf_dep_dry(klon)) 738 ALLOCATE (sulf_dep_wet(klon)) 739 ALLOCATE (surf_PM25_sulf(klon)) 740 ALLOCATE (p_tropopause(klon)) 741 ALLOCATE (vsed_aer(klon,klev)) 742 #endif 662 743 663 744 END SUBROUTINE phys_local_var_init … … 876 957 DEALLOCATE (zxsnow,snowhgt,qsnow,to_ice,sissnow,runoff,albsol3_lic) 877 958 959 #ifdef CPP_StratAer 960 ! variables for strat. aerosol CK 961 DEALLOCATE (R2SO4) 962 DEALLOCATE (DENSO4) 963 DEALLOCATE (f_r_wet) 964 DEALLOCATE (sfluxaer) 965 DEALLOCATE (decfluxaer) 966 DEALLOCATE (mdw) 967 DEALLOCATE (sulf_convert) 968 DEALLOCATE (sulf_nucl) 969 DEALLOCATE (sulf_cond_evap) 970 DEALLOCATE (ocs_convert) 971 DEALLOCATE (SO2_backgr_tend) 972 DEALLOCATE (OCS_backgr_tend) 973 DEALLOCATE (SO2_lifetime) 974 DEALLOCATE (OCS_lifetime) 975 DEALLOCATE (alpha_bin) 976 DEALLOCATE (piz_bin) 977 DEALLOCATE (cg_bin) 978 DEALLOCATE (tau_strat_550) 979 DEALLOCATE (tau_strat_550_lay) 980 DEALLOCATE (tau_strat_1020) 981 DEALLOCATE (tausum_strat) 982 DEALLOCATE (sulf_dep_dry) 983 DEALLOCATE (sulf_dep_wet) 984 DEALLOCATE (surf_PM25_sulf) 985 DEALLOCATE (p_tropopause) 986 DEALLOCATE (vsed_aer) 987 #endif 988 878 989 END SUBROUTINE phys_local_var_end 879 990 -
LMDZ5/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
r2670 r2690 1174 1174 'lcc', 'Cloud liquid fraction at top of cloud', '1', (/ ('', i=1, 9) /)) 1175 1175 1176 #ifdef CPP_StratAer 1177 TYPE(ctrl_out), SAVE :: o_ext_strat_550 = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1178 'ext_strat_550', 'Strat. aerosol extinction coefficient at 550 nm', '1/m', (/ ('', i=1, 9) /)) 1179 TYPE(ctrl_out), SAVE :: o_ext_strat_1020 = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1180 'ext_strat_1020', 'Strat. aerosol extinction coefficient at 1020 nm', '1/m', (/ ('', i=1, 9) /)) 1181 TYPE(ctrl_out), SAVE :: o_tau_strat_550 = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1182 'OD550_strat_only', 'Stratospheric Aerosol Optical depth at 550 nm ', '1', (/ ('', i=1, 9) /)) 1183 TYPE(ctrl_out), SAVE :: o_tau_strat_1020 = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1184 'OD1020_strat_only', 'Stratospheric Aerosol Optical depth at 1020 nm ', '1', (/ ('', i=1, 9) /)) 1185 TYPE(ctrl_out), SAVE :: o_sulf_convert = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1186 'sulf_convert', 'SO2 mass flux converted to H2SO4', 'kg(S)/m2/layer/s', (/ ('', i=1, 9) /)) 1187 TYPE(ctrl_out), SAVE :: o_sulf_nucl = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1188 'sulf_nucl', 'H2SO4 nucleation mass flux', 'kg(S)/m2/layer/s', (/ ('', i=1, 9) /)) 1189 TYPE(ctrl_out), SAVE :: o_sulf_cond_evap = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1190 'sulf_cond_evap', 'H2SO4 condensation/evaporation mass flux', 'kg(S)/m2/layer/s', (/ ('', i=1, 9) /)) 1191 TYPE(ctrl_out), SAVE :: o_ocs_convert = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1192 'ocs_convert', 'OCS mass flux converted to SO2', 'kg(S)/m2/layer/s', (/ ('', i=1, 9) /)) 1193 TYPE(ctrl_out), SAVE :: o_R2SO4 = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1194 'R2SO4', 'H2SO4 mass fraction in aerosol', '%', (/ ('', i=1, 9) /)) 1195 TYPE(ctrl_out), SAVE :: o_OCS_lifetime = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1196 'OCS_lifetime', 'OCS lifetime', 's', (/ ('', i=1, 9) /)) 1197 TYPE(ctrl_out), SAVE :: o_SO2_lifetime = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1198 'SO2_lifetime', 'SO2 lifetime', 's', (/ ('', i=1, 9) /)) 1199 TYPE(ctrl_out), SAVE :: o_SO2_backgr_tend = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1200 'SO2_backgr_tend', 'SO2 background tendency', 'kg(S)/m2/layer/s', (/ ('', i=1, 9) /)) 1201 TYPE(ctrl_out), SAVE :: o_OCS_backgr_tend = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1202 'OCS_backgr_tend', 'OCS background tendency', 'kg(S)/m2/layer/s', (/ ('', i=1, 9) /)) 1203 TYPE(ctrl_out), SAVE :: o_vsed_aer = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1204 'vsed_aer', 'Strat. aerosol sedimentation velocity (mass-weighted)', 'm/s', (/ ('', i=1, 9) /)) 1205 TYPE(ctrl_out), SAVE :: o_f_r_wet = ctrl_out((/ 1, 6, 7, 10, 10, 10, 11, 11, 11 /), & 1206 'f_r_wet', 'Conversion factor dry to wet aerosol radius', '-', (/ ('', i=1, 9) /)) 1207 TYPE(ctrl_out), SAVE :: o_sulf_dep_dry = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1208 'sulf_dep_dry', 'Sulfur dry deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 9) /)) 1209 TYPE(ctrl_out), SAVE :: o_sulf_dep_wet = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1210 'sulf_dep_wet', 'Sulfur wet deposition flux', 'kg(S)/m2/s', (/ ('', i=1, 9) /)) 1211 TYPE(ctrl_out), SAVE :: o_surf_PM25_sulf = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1212 'surf_PM25_sulf', 'Sulfate PM2.5 concentration at the surface', 'ug/m3', (/ ('', i=1, 9) /)) 1213 TYPE(ctrl_out), SAVE :: o_p_tropopause = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1214 'p_tropopause', 'Tropopause pressure', 'Pa', (/ ('', i=1, 9) /)) 1215 TYPE(ctrl_out), SAVE :: o_sfluxaer = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11 /), & 1216 'sflux', 'Ground sedimentation flux of strat. particles', 'kg(S)/m2/s', (/ ('', i=1, 9) /)) 1217 #endif 1176 1218 1177 1219 !!!!!!!!!!!!!!!!!!!!!! 3D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -
LMDZ5/trunk/libf/phylmd/phys_output_mod.F90
r2665 r2690 427 427 DO iq=nqo+1,nqtot 428 428 iiq=niadv(iq) 429 o_trac(iq-nqo) = ctrl_out((/ 4, 5, 5, 5, 10, 10, 11, 11, 11 /), &429 o_trac(iq-nqo) = ctrl_out((/ 1, 5, 5, 5, 10, 10, 11, 11, 11 /), & 430 430 tname(iiq),'Tracer '//ttext(iiq), "-", & 431 431 (/ '', '', '', '', '', '', '', '', '' /)) … … 500 500 (/ '', '', '', '', '', '', '', '', '' /)) 501 501 502 o_trac_cum(iq-nqo) = ctrl_out((/ 3, 4, 10, 10, 10, 10, 11, 11, 11 /), &502 o_trac_cum(iq-nqo) = ctrl_out((/ 1, 4, 10, 10, 10, 10, 11, 11, 11 /), & 503 503 'cum'//tname(iiq),& 504 504 'Cumulated tracer '//ttext(iiq), "-", & -
LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90
r2670 r2690 182 182 o_alt_tropo 183 183 184 #ifdef CPP_StratAer 185 USE phys_output_ctrlout_mod, only: & 186 o_sulf_convert, o_sulf_nucl, o_sulf_cond_evap, o_ocs_convert, & 187 o_sfluxaer, o_R2SO4, o_OCS_lifetime, o_SO2_lifetime, & 188 o_OCS_backgr_tend, o_SO2_backgr_tend, o_sulf_dep_dry, o_sulf_dep_wet, & 189 o_surf_PM25_sulf, o_ext_strat_550, o_tau_strat_550, & 190 o_p_tropopause, o_vsed_aer, o_tau_strat_1020, o_ext_strat_1020, o_f_r_wet 191 #endif 184 192 185 193 USE phys_state_var_mod, only: pctsrf, paire_ter, rain_fall, snow_fall, & … … 273 281 ep, epmax_diag ! epmax_cape 274 282 283 #ifdef CPP_StratAer 284 USE phys_local_var_mod, only: & 285 sulf_convert, sulf_nucl, sulf_cond_evap, ocs_convert, & 286 sfluxaer, R2SO4, OCS_lifetime, SO2_lifetime, & 287 OCS_backgr_tend, SO2_backgr_tend, sulf_dep_dry, sulf_dep_wet, & 288 surf_PM25_sulf, tau_strat_550, p_tropopause, tausum_strat, & 289 vsed_aer, tau_strat_1020, f_r_wet 290 #endif 291 275 292 USE phys_output_var_mod, only: vars_defined, snow_o, zfra_o, bils_diss, & 276 293 bils_ec,bils_ech, bils_tke, bils_kinetic, bils_latent, bils_enthalp, & … … 292 309 alt_tropo 293 310 294 295 296 311 USE ocean_slab_mod, only: nslay, tslab, slab_bils, slab_bilg, tice, & 297 312 seaice, slab_ekman,slab_hdiff, dt_ekman, dt_hdiff … … 370 385 CALL set_itau_iophy(itau_w) 371 386 372 IF (.NOT.vars_defined) THEN387 IF (.NOT.vars_defined) THEN 373 388 iinitend = 2 374 389 ELSE … … 381 396 !$OMP MASTER 382 397 IF (vars_defined) THEN 383 if(prt_level >= 10) then398 IF (prt_level >= 10) then 384 399 write(lunout,*)"phys_output_write: call xios_update_calendar, itau_w=",itau_w 385 endif400 ENDIF 386 401 ! CALL xios_update_calendar(itau_w) 387 402 CALL xios_update_calendar(itap) 388 END 403 ENDIF 389 404 !$OMP END MASTER 390 405 !$OMP BARRIER … … 395 410 396 411 zx_tmp_fi2d = cell_area 397 if(is_north_pole_phy) then412 IF (is_north_pole_phy) then 398 413 zx_tmp_fi2d(1) = cell_area(1)/nbp_lon 399 endif400 if(is_south_pole_phy) then414 ENDIF 415 IF (is_south_pole_phy) then 401 416 zx_tmp_fi2d(klon) = cell_area(klon)/nbp_lon 402 endif417 ENDIf 403 418 CALL histwrite_phy(o_aire, zx_tmp_fi2d) 404 419 … … 779 794 CALL histwrite_phy(o_uq, uq) 780 795 CALL histwrite_phy(o_vq, vq) 781 IF (iflag_con.GE.3) THEN ! sb796 IF (iflag_con.GE.3) THEN ! sb 782 797 CALL histwrite_phy(o_cape, cape) 783 798 CALL histwrite_phy(o_pbase, ema_pcb) 784 799 CALL histwrite_phy(o_ptop, ema_pct) 785 800 CALL histwrite_phy(o_fbase, ema_cbmf) 786 if (iflag_con /= 30) then801 IF (iflag_con /= 30) THEN 787 802 CALL histwrite_phy(o_plcl, plcl) 788 803 CALL histwrite_phy(o_plfc, plfc) 789 804 CALL histwrite_phy(o_wbeff, wbeff) 790 end if805 ENDIF 791 806 792 807 CALL histwrite_phy(o_cape_max, cape) … … 799 814 CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d) 800 815 IF (vars_defined) THEN 801 IF (iflag_thermals>=1)THEN816 IF (iflag_thermals>=1)THEN 802 817 zx_tmp_fi3d=dnwd+dnwd0+upwd+fm_therm(:,1:klev) 803 818 ELSE … … 850 865 DO k=1, nlevSTD 851 866 bb2=clevSTD(k) 852 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. &867 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. & 853 868 bb2.EQ."500".OR.bb2.EQ."200".OR. & 854 869 bb2.EQ."100".OR. & … … 871 886 #endif 872 887 #ifdef CPP_XIOS 873 IF (ok_all_xml) THEN888 IF (ok_all_xml) THEN 874 889 !XIOS CALL xios_get_field_attr("u850",default_value=missing_val) 875 890 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 877 892 DO k=1, nlevSTD 878 893 bb2=clevSTD(k) 879 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. &894 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. & 880 895 bb2.EQ."500".OR.bb2.EQ."200".OR. & 881 896 bb2.EQ."100".OR. & … … 994 1009 ELSE 995 1010 CALL histwrite_phy(o_tslab, tslab(:,1:nslay)) 996 END 1011 ENDIF 997 1012 IF (version_ocean=='sicINT') THEN 998 1013 CALL histwrite_phy(o_slab_bilg, slab_bilg) 999 1014 CALL histwrite_phy(o_slab_tice, tice) 1000 1015 CALL histwrite_phy(o_slab_sic, seaice) 1001 END 1016 ENDIF 1002 1017 IF (slab_hdiff) THEN 1003 1018 IF (nslay.EQ.1) THEN … … 1006 1021 ELSE 1007 1022 CALL histwrite_phy(o_slab_hdiff, dt_hdiff(:,1:nslay)) 1008 END 1009 END 1023 ENDIF 1024 ENDIF 1010 1025 IF (slab_ekman.GT.0) THEN 1011 1026 IF (nslay.EQ.1) THEN … … 1014 1029 ELSE 1015 1030 CALL histwrite_phy(o_slab_ekman, dt_ekman(:,1:nslay)) 1016 END 1017 END 1031 ENDIF 1032 ENDIF 1018 1033 ENDIF !type_ocean == force/slab 1019 1034 CALL histwrite_phy(o_weakinv, weak_inversion) … … 1094 1109 ENDIF 1095 1110 IF (flag_aerosol.GT.0.OR.flag_aerosol_strat.GT.0) THEN 1096 ! DO naero = 1, naero_spc1097 !--correction mini bug OB1098 1111 DO naero = 1, naero_tot 1099 CALL histwrite_phy(o_tausumaero(naero), & 1100 tausum_aero(:,2,naero) ) 1112 CALL histwrite_phy(o_tausumaero(naero),tausum_aero(:,2,naero)) 1101 1113 END DO 1102 1114 ENDIF 1103 1115 IF (flag_aerosol_strat.GT.0) THEN 1104 CALL histwrite_phy(o_tausumaero_lw, & 1105 tausum_aero(:,6,id_STRAT_phy) ) 1106 ENDIF 1107 ENDIF 1116 CALL histwrite_phy(o_tausumaero_lw,tausum_aero(:,6,id_STRAT_phy)) 1117 ENDIF 1118 ENDIF 1119 #ifdef CPP_StratAer 1120 IF (type_trac=='coag') THEN 1121 CALL histwrite_phy(o_sulf_convert, sulf_convert) 1122 CALL histwrite_phy(o_sulf_nucl, sulf_nucl) 1123 CALL histwrite_phy(o_sulf_cond_evap, sulf_cond_evap) 1124 CALL histwrite_phy(o_ocs_convert, ocs_convert) 1125 CALL histwrite_phy(o_R2SO4, R2SO4) 1126 CALL histwrite_phy(o_OCS_lifetime, OCS_lifetime) 1127 CALL histwrite_phy(o_SO2_lifetime, SO2_lifetime) 1128 CALL histwrite_phy(o_OCS_backgr_tend, OCS_backgr_tend) 1129 CALL histwrite_phy(o_SO2_backgr_tend, SO2_backgr_tend) 1130 CALL histwrite_phy(o_sulf_dep_dry, sulf_dep_dry) 1131 CALL histwrite_phy(o_sulf_dep_wet, sulf_dep_wet) 1132 CALL histwrite_phy(o_surf_PM25_sulf, surf_PM25_sulf) 1133 CALL histwrite_phy(o_p_tropopause, p_tropopause) 1134 CALL histwrite_phy(o_sfluxaer, sfluxaer) 1135 CALL histwrite_phy(o_vsed_aer, vsed_aer) 1136 CALL histwrite_phy(o_f_r_wet, f_r_wet) 1137 CALL histwrite_phy(o_ext_strat_550, tau_strat_550) 1138 CALL histwrite_phy(o_ext_strat_1020, tau_strat_1020) 1139 CALL histwrite_phy(o_tau_strat_550, tausum_strat(:,1)) 1140 CALL histwrite_phy(o_tau_strat_1020, tausum_strat(:,2)) 1141 ENDIF 1142 #endif 1108 1143 IF (ok_ade) THEN 1109 1144 CALL histwrite_phy(o_topswad, topswad_aero*swradcorr) … … 1116 1151 CALL histwrite_phy(o_sollwad0, sollwad0_aero) 1117 1152 !====MS forcing diagnostics 1118 if (new_aod) then1153 IF (new_aod) THEN 1119 1154 zx_tmp_fi2d(:)=topsw_aero(:,1)*swradcorr(:) 1120 1155 CALL histwrite_phy(o_swtoaas_nat,zx_tmp_fi2d) … … 1135 1170 CALL histwrite_phy(o_swsrfcs_ant,zx_tmp_fi2d) 1136 1171 !cf 1137 if (.not. aerosol_couple) then1172 IF (.not. aerosol_couple) THEN 1138 1173 zx_tmp_fi2d(:)=topswcf_aero(:,1)*swradcorr(:) 1139 1174 CALL histwrite_phy(o_swtoacf_nat,zx_tmp_fi2d) … … 1148 1183 zx_tmp_fi2d(:)=solswcf_aero(:,3)*swradcorr(:) 1149 1184 CALL histwrite_phy(o_swsrfcf_zero,zx_tmp_fi2d) 1150 endif1151 endif! new_aod1185 ENDIF 1186 ENDIF ! new_aod 1152 1187 !====MS forcing diagnostics 1153 1188 ENDIF … … 1261 1296 CALL histwrite_phy(o_alb2, albsol2) 1262 1297 !FH Sorties pour la couche limite 1263 if (iflag_pbl>1) then1298 IF (iflag_pbl>1) THEN 1264 1299 zx_tmp_fi3d=0. 1265 1300 IF (vars_defined) THEN 1266 donsrf=1,nbsrf1267 dok=1,klev1301 DO nsrf=1,nbsrf 1302 DO k=1,klev 1268 1303 zx_tmp_fi3d(:,k)=zx_tmp_fi3d(:,k) & 1269 1304 +pctsrf(:,nsrf)*pbl_tke(:,k,nsrf) 1270 enddo1271 enddo1305 ENDDO 1306 ENDDO 1272 1307 ENDIF 1273 1308 CALL histwrite_phy(o_tke, zx_tmp_fi3d) … … 1325 1360 CALL histwrite_phy(o_dqcon2d, zx_tmp_fi2d) 1326 1361 1327 IF (iflag_thermals.EQ.0) THEN1362 IF (iflag_thermals.EQ.0) THEN 1328 1363 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys 1329 1364 CALL histwrite_phy(o_tnhusc, zx_tmp_fi3d) 1330 ELSE IF (iflag_thermals.GE.1.AND.iflag_wake.EQ.1) THEN1365 ELSE IF (iflag_thermals.GE.1.AND.iflag_wake.EQ.1) THEN 1331 1366 IF (vars_defined) THEN 1332 1367 zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys + & … … 1350 1385 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1351 1386 ! Sorties specifiques a la separation thermiques/non thermiques 1352 if (iflag_thermals>=1) then1353 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscth(1:klon,1:klev)/pdtphys1387 IF (iflag_thermals>=1) THEN 1388 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscth(1:klon,1:klev)/pdtphys 1354 1389 CALL histwrite_phy(o_dtlscth, zx_tmp_fi3d) 1355 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscst(1:klon,1:klev)/pdtphys1390 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscst(1:klon,1:klev)/pdtphys 1356 1391 CALL histwrite_phy(o_dtlscst, zx_tmp_fi3d) 1357 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscth(1:klon,1:klev)/pdtphys1392 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscth(1:klon,1:klev)/pdtphys 1358 1393 CALL histwrite_phy(o_dqlscth, zx_tmp_fi3d) 1359 1394 CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d) 1360 1395 CALL histwrite_phy(o_dqlscth2d, zx_tmp_fi2d) 1361 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscst(1:klon,1:klev)/pdtphys1396 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscst(1:klon,1:klev)/pdtphys 1362 1397 CALL histwrite_phy(o_dqlscst, zx_tmp_fi3d) 1363 1398 CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d) … … 1366 1401 CALL histwrite_phy(o_plulst, plul_st) 1367 1402 IF (vars_defined) THEN 1368 dok=1,klev1369 doi=1,klon1370 if (ptconvth(i,k)) then1403 DO k=1,klev 1404 DO i=1,klon 1405 IF (ptconvth(i,k)) THEN 1371 1406 zx_tmp_fi3d(i,k)=1. 1372 else1407 ELSE 1373 1408 zx_tmp_fi3d(i,k)=0. 1374 endif1375 enddo1376 enddo1409 ENDIF 1410 ENDDO 1411 ENDDO 1377 1412 ENDIF 1378 1413 CALL histwrite_phy(o_ptconvth, zx_tmp_fi3d) … … 1383 1418 ENDIF 1384 1419 CALL histwrite_phy(o_lmaxth, zx_tmp_fi2d) 1385 endif! iflag_thermals>=11420 ENDIF ! iflag_thermals>=1 1386 1421 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1387 1422 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev)/pdtphys 1388 1423 CALL histwrite_phy(o_dtvdf, zx_tmp_fi3d) 1389 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_diss(1:klon,1:klev)/pdtphys1424 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_diss(1:klon,1:klev)/pdtphys 1390 1425 CALL histwrite_phy(o_dtdis, zx_tmp_fi3d) 1391 1426 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys … … 1437 1472 CALL histwrite_phy(o_dqthe2d, zx_tmp_fi2d) 1438 1473 ENDIF !iflag_thermals 1439 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ajsb(1:klon,1:klev)/pdtphys1474 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ajsb(1:klon,1:klev)/pdtphys 1440 1475 CALL histwrite_phy(o_dtajs, zx_tmp_fi3d) 1441 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys1476 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys 1442 1477 CALL histwrite_phy(o_dqajs, zx_tmp_fi3d) 1443 1478 CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d) 1444 1479 CALL histwrite_phy(o_dqajs2d, zx_tmp_fi2d) 1445 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_swr(1:klon,1:klev)/pdtphys1480 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_swr(1:klon,1:klev)/pdtphys 1446 1481 CALL histwrite_phy(o_dtswr, zx_tmp_fi3d) 1447 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_sw0(1:klon,1:klev)/pdtphys1482 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_sw0(1:klon,1:klev)/pdtphys 1448 1483 CALL histwrite_phy(o_dtsw0, zx_tmp_fi3d) 1449 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lwr(1:klon,1:klev)/pdtphys1484 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lwr(1:klon,1:klev)/pdtphys 1450 1485 CALL histwrite_phy(o_dtlwr, zx_tmp_fi3d) 1451 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lw0(1:klon,1:klev)/pdtphys1486 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lw0(1:klon,1:klev)/pdtphys 1452 1487 CALL histwrite_phy(o_dtlw0, zx_tmp_fi3d) 1453 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev)/pdtphys1488 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev)/pdtphys 1454 1489 CALL histwrite_phy(o_dtec, zx_tmp_fi3d) 1455 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_vdf(1:klon,1:klev)/pdtphys1490 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_vdf(1:klon,1:klev)/pdtphys 1456 1491 CALL histwrite_phy(o_duvdf, zx_tmp_fi3d) 1457 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_vdf(1:klon,1:klev)/pdtphys1492 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_vdf(1:klon,1:klev)/pdtphys 1458 1493 CALL histwrite_phy(o_dvvdf, zx_tmp_fi3d) 1459 1494 IF (ok_orodr) THEN 1460 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_oro(1:klon,1:klev)/pdtphys1495 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_oro(1:klon,1:klev)/pdtphys 1461 1496 CALL histwrite_phy(o_duoro, zx_tmp_fi3d) 1462 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_oro(1:klon,1:klev)/pdtphys1497 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_oro(1:klon,1:klev)/pdtphys 1463 1498 CALL histwrite_phy(o_dvoro, zx_tmp_fi3d) 1464 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_oro(1:klon,1:klev)/pdtphys1499 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_oro(1:klon,1:klev)/pdtphys 1465 1500 CALL histwrite_phy(o_dtoro, zx_tmp_fi3d) 1466 1501 ENDIF 1467 1502 IF (ok_orolf) THEN 1468 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_lif(1:klon,1:klev)/pdtphys1503 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_lif(1:klon,1:klev)/pdtphys 1469 1504 CALL histwrite_phy(o_dulif, zx_tmp_fi3d) 1470 1505 1471 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_lif(1:klon,1:klev)/pdtphys1506 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_lif(1:klon,1:klev)/pdtphys 1472 1507 CALL histwrite_phy(o_dvlif, zx_tmp_fi3d) 1473 1508 1474 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lif(1:klon,1:klev)/pdtphys1509 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lif(1:klon,1:klev)/pdtphys 1475 1510 CALL histwrite_phy(o_dtlif, zx_tmp_fi3d) 1476 1511 ENDIF … … 1479 1514 CALL histwrite_phy(o_du_gwd_hines, du_gwd_hines/pdtphys) 1480 1515 CALL histwrite_phy(o_dv_gwd_hines, dv_gwd_hines/pdtphys) 1481 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_hin(1:klon,1:klev)/pdtphys1516 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_hin(1:klon,1:klev)/pdtphys 1482 1517 CALL histwrite_phy(o_dthin, zx_tmp_fi3d) 1483 1518 CALL histwrite_phy(o_ustr_gwd_hines, zustr_gwd_hines) 1484 1519 CALL histwrite_phy(o_vstr_gwd_hines, zvstr_gwd_hines) 1485 endIF1486 1487 if (.not. ok_hines .and. ok_gwd_rando) then1520 ENDIF 1521 1522 IF (.not. ok_hines .and. ok_gwd_rando) THEN 1488 1523 CALL histwrite_phy(o_du_gwd_front, du_gwd_front / pdtphys) 1489 1524 CALL histwrite_phy(o_dv_gwd_front, dv_gwd_front / pdtphys) … … 1492 1527 ENDIF 1493 1528 1494 IF (ok_gwd_rando) then1529 IF (ok_gwd_rando) THEN 1495 1530 CALL histwrite_phy(o_du_gwd_rando, du_gwd_rando / pdtphys) 1496 1531 CALL histwrite_phy(o_dv_gwd_rando, dv_gwd_rando / pdtphys) … … 1499 1534 CALL histwrite_phy(o_east_gwstress, east_gwstress ) 1500 1535 CALL histwrite_phy(o_west_gwstress, west_gwstress ) 1501 endIF1502 1503 IF (ok_qch4) then1536 ENDIF 1537 1538 IF (ok_qch4) THEN 1504 1539 CALL histwrite_phy(o_dqch4, d_q_ch4 / pdtphys) 1505 1540 ENDIF … … 1527 1562 CALL histwrite_phy(o_rldcs, lwdn0) 1528 1563 1529 IF (vars_defined) THEN1564 IF (vars_defined) THEN 1530 1565 zx_tmp_fi3d(1:klon,1:klev)=d_t(1:klon,1:klev)+ & 1531 1566 d_t_dyn(1:klon,1:klev) … … 1533 1568 CALL histwrite_phy(o_tnt, zx_tmp_fi3d) 1534 1569 1535 IF (vars_defined) THEN1570 IF (vars_defined) THEN 1536 1571 zx_tmp_fi3d(1:klon,1:klev)=d_t_swr(1:klon,1:klev)/pdtphys + & 1537 1572 d_t_lwr(1:klon,1:klev)/pdtphys 1538 1573 ENDIF 1539 1574 CALL histwrite_phy(o_tntr, zx_tmp_fi3d) 1540 IF (vars_defined) THEN1575 IF (vars_defined) THEN 1541 1576 zx_tmp_fi3d(1:klon,1:klev)= (d_t_lsc(1:klon,1:klev)+ & 1542 1577 d_t_eva(1:klon,1:klev)+ & … … 1544 1579 ENDIF 1545 1580 CALL histwrite_phy(o_tntscpbl, zx_tmp_fi3d) 1546 IF (vars_defined) THEN1581 IF (vars_defined) THEN 1547 1582 zx_tmp_fi3d(1:klon,1:klev)=d_qx(1:klon,1:klev,ivap)+ & 1548 1583 d_q_dyn(1:klon,1:klev) 1549 1584 ENDIF 1550 1585 CALL histwrite_phy(o_tnhus, zx_tmp_fi3d) 1551 IF (vars_defined) THEN1586 IF (vars_defined) THEN 1552 1587 zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys+ & 1553 1588 d_q_eva(1:klon,1:klev)/pdtphys … … 1555 1590 CALL histwrite_phy(o_tnhusscpbl, zx_tmp_fi3d) 1556 1591 CALL histwrite_phy(o_evu, coefm(:,:,is_ave)) 1557 IF (vars_defined) THEN1592 IF (vars_defined) THEN 1558 1593 zx_tmp_fi3d(1:klon,1:klev)=q_seri(1:klon,1:klev)+ & 1559 1594 ql_seri(1:klon,1:klev) 1560 1595 ENDIF 1561 1596 CALL histwrite_phy(o_h2o, zx_tmp_fi3d) 1562 if (iflag_con >= 3) then1563 IF (vars_defined) THEN1597 IF (iflag_con >= 3) THEN 1598 IF (vars_defined) THEN 1564 1599 zx_tmp_fi3d(1:klon,1:klev)=-1 * (dnwd(1:klon,1:klev)+ & 1565 1600 dnwd0(1:klon,1:klev)) 1566 1601 ENDIF 1567 1602 CALL histwrite_phy(o_mcd, zx_tmp_fi3d) 1568 IF (vars_defined) THEN1603 IF (vars_defined) THEN 1569 1604 zx_tmp_fi3d(1:klon,1:klev)=upwd(1:klon,1:klev) + & 1570 1605 dnwd(1:klon,1:klev)+ dnwd0(1:klon,1:klev) 1571 1606 ENDIF 1572 1607 CALL histwrite_phy(o_dmc, zx_tmp_fi3d) 1573 else if (iflag_con == 2) then1608 ELSE IF (iflag_con == 2) THEN 1574 1609 CALL histwrite_phy(o_mcd, pmfd) 1575 1610 CALL histwrite_phy(o_dmc, pmfu + pmfd) 1576 end if1611 ENDIF 1577 1612 CALL histwrite_phy(o_ref_liq, ref_liq) 1578 1613 CALL histwrite_phy(o_ref_ice, ref_ice) 1579 if(RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR. &1614 IF (RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR. & 1580 1615 RN2O_per.NE.RN2O_act.OR.RCFC11_per.NE.RCFC11_act.OR. & 1581 1616 RCFC12_per.NE.RCFC12_act) THEN 1582 IF (vars_defined) zx_tmp_fi2d(:) = swupp(:,klevp1)*swradcorr(:)1617 IF (vars_defined) zx_tmp_fi2d(:) = swupp(:,klevp1)*swradcorr(:) 1583 1618 CALL histwrite_phy(o_rsut4co2, zx_tmp_fi2d) 1584 IF (vars_defined) zx_tmp_fi2d(:) = lwupp(:,klevp1)1619 IF (vars_defined) zx_tmp_fi2d(:) = lwupp(:,klevp1) 1585 1620 CALL histwrite_phy(o_rlut4co2, zx_tmp_fi2d) 1586 IF (vars_defined) zx_tmp_fi2d(:) = swup0p(:,klevp1)*swradcorr(:)1621 IF (vars_defined) zx_tmp_fi2d(:) = swup0p(:,klevp1)*swradcorr(:) 1587 1622 CALL histwrite_phy(o_rsutcs4co2, zx_tmp_fi2d) 1588 IF (vars_defined) zx_tmp_fi2d(:) = lwup0p(:,klevp1)1623 IF (vars_defined) zx_tmp_fi2d(:) = lwup0p(:,klevp1) 1589 1624 CALL histwrite_phy(o_rlutcs4co2, zx_tmp_fi2d) 1590 1625 DO k=1, klevp1 … … 1626 1661 CALL histwrite_phy(o_va,vwriteSTD(:,:,iff-6),iff) 1627 1662 CALL histwrite_phy(o_wap,wwriteSTD(:,:,iff-6),iff) 1628 IF (vars_defined) THEN1663 IF (vars_defined) THEN 1629 1664 DO k=1, nlevSTD 1630 1665 DO i=1, klon 1631 IF (tnondef(i,k,iff-6).NE.missing_val) THEN1632 IF (freq_outNMC(iff-6).LT.0) THEN1666 IF (tnondef(i,k,iff-6).NE.missing_val) THEN 1667 IF (freq_outNMC(iff-6).LT.0) THEN 1633 1668 freq_moyNMC(iff-6)=(mth_len*un_jour)/freq_calNMC(iff-6) 1634 1669 ELSE … … 1643 1678 ENDIF 1644 1679 CALL histwrite_phy(o_psbg,zx_tmp_fi3d_STD,iff) 1645 IF (vars_defined) THEN1680 IF (vars_defined) THEN 1646 1681 DO k=1, nlevSTD 1647 1682 DO i=1, klon 1648 IF (O3sumSTD(i,k,iff-6).NE.missing_val) THEN1683 IF (O3sumSTD(i,k,iff-6).NE.missing_val) THEN 1649 1684 zx_tmp_fi3d_STD(i,k) = O3sumSTD(i,k,iff-6) * 1.e+9 1650 1685 ELSE … … 1655 1690 ENDIF 1656 1691 CALL histwrite_phy(o_tro3,zx_tmp_fi3d_STD,iff) 1657 if(read_climoz == 2) THEN1658 IF (vars_defined) THEN1692 IF (read_climoz == 2) THEN 1693 IF (vars_defined) THEN 1659 1694 DO k=1, nlevSTD 1660 1695 DO i=1, klon 1661 IF (O3daysumSTD(i,k,iff-6).NE.missing_val) THEN1696 IF (O3daysumSTD(i,k,iff-6).NE.missing_val) THEN 1662 1697 zx_tmp_fi3d_STD(i,k) = O3daysumSTD(i,k,iff-6) * 1.e+9 1663 1698 ELSE … … 1683 1718 #endif 1684 1719 #ifdef CPP_XIOS 1685 IF (ok_all_xml) THEN1720 IF (ok_all_xml) THEN 1686 1721 ! DO iff=7, nfiles 1687 1722 … … 1694 1729 CALL histwrite_phy(o_va,vlevSTD(:,:)) 1695 1730 CALL histwrite_phy(o_wap,wlevSTD(:,:)) 1696 ! IF (vars_defined) THEN1731 ! IF (vars_defined) THEN 1697 1732 ! DO k=1, nlevSTD 1698 1733 ! DO i=1, klon 1699 ! IF (tnondef(i,k,3).NE.missing_val) THEN1700 ! IF (freq_outNMC(iff-6).LT.0) THEN1734 ! IF (tnondef(i,k,3).NE.missing_val) THEN 1735 ! IF (freq_outNMC(iff-6).LT.0) THEN 1701 1736 ! freq_moyNMC(iff-6)=(mth_len*un_jour)/freq_calNMC(iff-6) 1702 1737 ! ELSE … … 1711 1746 ! ENDIF 1712 1747 ! CALL histwrite_phy(o_psbg,zx_tmp_fi3d_STD) 1713 IF (vars_defined) THEN1748 IF (vars_defined) THEN 1714 1749 DO k=1, nlevSTD 1715 1750 DO i=1, klon 1716 IF (O3STD(i,k).NE.missing_val) THEN1751 IF (O3STD(i,k).NE.missing_val) THEN 1717 1752 zx_tmp_fi3d_STD(i,k) = O3STD(i,k) * 1.e+9 1718 1753 ELSE … … 1723 1758 ENDIF 1724 1759 CALL histwrite_phy(o_tro3,zx_tmp_fi3d_STD) 1725 if(read_climoz == 2) THEN1726 IF (vars_defined) THEN1760 IF (read_climoz == 2) THEN 1761 IF (vars_defined) THEN 1727 1762 DO k=1, nlevSTD 1728 1763 DO i=1, klon 1729 IF (O3daySTD(i,k).NE.missing_val) THEN1764 IF (O3daySTD(i,k).NE.missing_val) THEN 1730 1765 zx_tmp_fi3d_STD(i,k) = O3daySTD(i,k) * 1.e+9 1731 1766 ELSE … … 1736 1771 ENDIF 1737 1772 CALL histwrite_phy(o_tro3_daylight,zx_tmp_fi3d_STD) 1738 endif1773 ENDIF 1739 1774 CALL histwrite_phy(o_uxv,uvSTD(:,:)) 1740 1775 CALL histwrite_phy(o_vxq,vqSTD(:,:)) … … 1751 1786 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1752 1787 IF (nqtot.GE.nqo+1) THEN 1753 DO iq=nqo+1,nqtot 1754 IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN 1755 1756 !jyg< 1757 !! CALL histwrite_phy(o_trac(iq-nqo), qx(:,:,iq)) 1788 DO iq=nqo+1,nqtot 1789 IF (type_trac == 'lmdz' .OR. type_trac == 'repr' .OR. type_trac == 'coag') THEN 1758 1790 CALL histwrite_phy(o_trac(iq-nqo), tr_seri(:,:,iq-nqo)) 1759 !>jyg1760 1791 CALL histwrite_phy(o_dtr_vdf(iq-nqo),d_tr_cl(:,:,iq-nqo)) 1761 1792 CALL histwrite_phy(o_dtr_the(iq-nqo),d_tr_th(:,:,iq-nqo)) … … 1772 1803 CALL histwrite_phy(o_dtr_uscav(iq-nqo),d_tr_uscav(:,:,iq-nqo)) 1773 1804 zx_tmp_fi2d=0. 1774 IF (vars_defined) THEN1805 IF (vars_defined) THEN 1775 1806 DO k=1,klev 1776 !jyg<1777 !! zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*qx(:,k,iq)1778 1807 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,iq-nqo) 1779 !>jyg1780 1808 ENDDO 1781 1809 ENDIF 1782 1810 CALL histwrite_phy(o_trac_cum(iq-nqo), zx_tmp_fi2d) 1783 endif1784 ENDDO 1785 ENDIF 1786 1787 IF (.NOT.vars_defined) THEN1811 ENDIF 1812 ENDDO 1813 ENDIF 1814 1815 IF (.NOT.vars_defined) THEN 1788 1816 !$OMP MASTER 1789 1817 #ifndef CPP_IOIPSL_NO_OUTPUT … … 1801 1829 CALL wxios_closedef() 1802 1830 #endif 1803 1804 1831 !$OMP END MASTER 1805 1832 !$OMP BARRIER 1806 1833 vars_defined = .TRUE. 1807 1808 END IF 1809 1810 END DO 1811 1812 IF(vars_defined) THEN 1834 ENDIF 1835 1836 ENDDO 1837 1838 IF (vars_defined) THEN 1813 1839 ! On synchronise les fichiers pour IOIPSL 1814 1840 #ifndef CPP_IOIPSL_NO_OUTPUT … … 1823 1849 ENDIF 1824 1850 1825 1826 1851 END SUBROUTINE phys_output_write 1827 1852 -
LMDZ5/trunk/libf/phylmd/physiq_mod.F90
r2684 r2690 745 745 REAL conv_q(klon,klev) ! convergence de l'humidite (kg/kg/s) 746 746 REAL conv_t(klon,klev) ! convergence de la temperature(K/s) 747 748 ! 749 ! REAL zxsnow(klon) 747 ! 750 748 REAL zxsnow_dummy(klon) 751 749 REAL zsav_tsol(klon) … … 763 761 real zqsat(klon,klev) 764 762 ! 765 INTEGER i, k, iq, ig, j, nsrf, ll, l, iiq763 INTEGER i, k, iq, j, nsrf, ll, l 766 764 ! 767 765 REAL t_coup … … 884 882 !IM 141004 END 885 883 !IM 190504 BEG 886 INTEGER ij887 884 ! INTEGER imp1jmp1 888 885 ! PARAMETER(imp1jmp1=(iim+1)*jjmp1) … … 893 890 LOGICAL ok_msk 894 891 REAL msk(klon) 895 !IM896 REAL airetot, pi897 892 !ym A voir plus tard 898 893 !ym REAL zm_wo(jjmp1, klev) … … 932 927 !$OMP THREADPRIVATE(ok_sync) 933 928 real date0 934 integer idayref935 929 936 930 ! essai writephys … … 953 947 DATA ip_ebil/0/ 954 948 !$OMP THREADPRIVATE(ip_ebil) 955 INTEGER if_ebil ! level for energy conserv. dignostics956 SAVE if_ebil957 !$OMP THREADPRIVATE(if_ebil)958 949 REAL q2m(klon,nbsrf) ! humidite a 2m 959 950 … … 3483 3474 ELSE 3484 3475 #ifdef CPP_RRTM 3476 #ifndef CPP_StratAer 3477 !--prescribed strat aerosols 3478 !--only in the case of non-interactive strat aerosols 3485 3479 IF (flag_aerosol_strat.EQ.1) THEN 3486 3480 CALL readaerosolstrato1_rrtm(debut) … … 3492 3486 CALL abort_physic(modname,abort_message,1) 3493 3487 ENDIF 3488 #endif 3494 3489 #else 3495 3490 abort_message='You should compile with -rrtm if running ' & … … 3499 3494 ENDIF 3500 3495 ENDIF 3496 ! 3497 #ifdef CPP_RRTM 3498 #ifdef CPP_StratAer 3499 !--interactive strat aerosols 3500 CALL calcaerosolstrato_rrtm(pplay,t_seri,paprs,debut) 3501 #endif 3502 #endif 3501 3503 !--fin STRAT AEROSOL 3502 3504 ! -
LMDZ5/trunk/libf/phylmd/phytrac_mod.F90
r2637 r2690 97 97 USE tracreprobus_mod 98 98 USE indice_sol_mod 99 100 99 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 101 100 USE print_control_mod, ONLY: lunout 102 101 USE aero_mod, ONLY : naero_grp 102 103 #ifdef CPP_StratAer 104 USE traccoag_mod 105 USE phys_local_var_mod, ONLY: mdw, sulf_dep_dry, sulf_dep_wet 106 USE infotrac, ONLY: nbtr_sulgas, id_SO2_strat, id_H2SO4_strat 107 USE aerophys 108 #endif 103 109 104 110 IMPLICIT NONE … … 208 214 !-------------- 209 215 ! 210 !211 216 REAL,DIMENSION(:),INTENT(IN) :: cdragh ! (klon) coeff drag pour T et Q 212 217 REAL,DIMENSION(:,:),INTENT(IN) :: coefh ! (klon,klev) coeff melange CL (m**2/s) … … 215 220 REAL,DIMENSION(:),INTENT(IN) :: yu1 ! (klon) vents au premier niveau 216 221 REAL,DIMENSION(:),INTENT(IN) :: yv1 ! (klon) vents au premier niveau 217 218 222 ! 219 223 !Lessivage: … … 238 242 REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: pctsrf ! Pourcentage de sol (nature du sol) 239 243 240 244 #ifdef CPP_StratAer 245 REAL,DIMENSION(klon) :: v_dep_dry !dry deposition velocity of stratospheric sulfate in m/s 246 #endif 241 247 ! Output argument 242 248 !---------------- 243 249 REAL,DIMENSION(klon,klev,nbtr),INTENT(INOUT) :: tr_seri ! Concentration Traceur [U/KgA] 244 250 REAL,DIMENSION(klon,klev) :: sourceBE 251 245 252 !======================================================================================= 246 253 ! -- LOCAL VARIABLES -- … … 267 274 INTEGER :: itau_w ! pas de temps ecriture = nstep + itau_phy 268 275 LOGICAL,PARAMETER :: ok_sync=.TRUE. 269 270 276 ! 271 277 ! Nature du traceur … … 456 462 CASE('repr') 457 463 source(:,:)=0. 464 #ifdef CPP_StratAer 465 CASE('coag') 466 source(:,:)=0. 467 DO it= 1, nbtr_sulgas 468 aerosol(it)=.FALSE. 469 IF (it==id_H2SO4_strat) aerosol(it)=.TRUE. 470 ENDDO 471 DO it= nbtr_sulgas+1, nbtr 472 aerosol(it)=.TRUE. 473 ENDDO 474 #endif 458 475 END SELECT 459 476 … … 504 521 !--for now we do not scavenge in cvltr 505 522 flag_cvltr(it)=.false. 523 524 #ifdef CPP_StratAer 525 CASE('coag') 526 IF (convscav.and.aerosol(it)) THEN 527 flag_cvltr(it)=.true. 528 ccntrAA(it) =ccntrAA_in 529 ccntrENV(it)=ccntrENV_in 530 coefcoli(it)=coefcoli_in 531 ELSE 532 flag_cvltr(it)=.false. 533 ENDIF 534 #endif 535 506 536 END SELECT 507 537 ENDDO … … 572 602 ! Appel fait en fin de phytrac pour avoir les emissions modifiees par 573 603 ! la couche limite et la convection avant le calcul de la chimie 604 574 605 CASE('repr') 575 606 ! -- CHIMIE REPROBUS -- 576 577 607 CALL tracreprobus(pdtphys, gmtime, debutphy, julien, & 578 608 presnivs, xlat, xlon, pphis, pphi, & … … 580 610 tr_seri) 581 611 612 #ifdef CPP_StratAer 613 CASE('coag') 614 ! --STRATOSPHERIC AER IN THE STRAT -- 615 CALL traccoag(pdtphys, gmtime, debutphy, julien, & 616 presnivs, xlat, xlon, pphis, pphi, & 617 t_seri, pplay, paprs, sh, rh , & 618 tr_seri) 619 #endif 620 582 621 END SELECT 583 622 !====================================================================== … … 591 630 IF (iflag_con.LT.2) THEN 592 631 !--pas de transport convectif 593 594 632 d_tr_cv(:,:,it)=0. 633 595 634 ELSE IF (iflag_con.EQ.2) THEN 596 635 !--ancien transport convectif de Tiedtke … … 648 687 649 688 END DO ! nbtr 689 690 #ifdef CPP_StratAer 691 IF (type_trac=='coag') THEN 692 ! initialize wet deposition flux of sulfur 693 sulf_dep_wet(:)=0.0 694 ! compute wet deposition flux of sulfur (sum over gases and particles) 695 ! and convert to kg(S)/m2/s 696 DO i = 1, klon 697 DO k = 1, klev 698 DO it = 1, nbtr 699 !do not include SO2 because most of it comes trom the troposphere 700 IF (it==id_H2SO4_strat) THEN 701 sulf_dep_wet(i)=sulf_dep_wet(i)+d_tr_cv(i,k,it)*(mSatom/mH2SO4mol) & 702 & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys 703 ELSEIF (it.GT.nbtr_sulgas) THEN 704 sulf_dep_wet(i)=sulf_dep_wet(i)+d_tr_cv(i,k,it)*(mSatom/mH2SO4mol) & 705 & *dens_aer_dry*4./3.*RPI*(mdw(it-nbtr_sulgas)/2.)**3 & 706 & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys 707 ENDIF 708 ENDDO 709 ENDDO 710 ENDDO 711 ENDIF 712 #endif 650 713 651 714 END IF ! convection … … 692 755 ! Injection during BL mixing 693 756 ! 757 #ifdef CPP_StratAer 758 IF (type_trac=='coag') THEN 759 760 ! initialize dry deposition flux of sulfur 761 sulf_dep_dry(:)=0.0 762 763 ! compute dry deposition velocity as function of surface type (numbers 764 ! from IPSL note 23, 2002) 765 v_dep_dry(:) = pctsrf(:,is_ter) * 2.5e-3 & 766 & + pctsrf(:,is_oce) * 0.5e-3 & 767 & + pctsrf(:,is_lic) * 2.5e-3 & 768 & + pctsrf(:,is_sic) * 2.5e-3 769 770 ! compute surface dry deposition flux 771 zrho(:,1)=pplay(:,1)/t_seri(:,1)/RD 772 773 DO it=1, nbtr 774 source(:,it) = - v_dep_dry(:) * tr_seri(:,1,it) * zrho(:,1) 775 ENDDO 776 777 ENDIF 778 #endif 779 694 780 DO it=1, nbtr 695 781 ! … … 703 789 tr_seri(:,:,it)=tr_seri(:,:,it)+d_tr_cl(:,:,it) 704 790 ! 705 END IF 791 #ifdef CPP_StratAer 792 IF (type_trac=='coag') THEN 793 ! compute dry deposition flux of sulfur (sum over gases and particles) 794 IF (it==id_H2SO4_strat) THEN 795 sulf_dep_dry(:)=sulf_dep_dry(:)-source(:,it)*(mSatom/mH2SO4mol) 796 ELSEIF (it.GT.nbtr_sulgas) THEN 797 sulf_dep_dry(:)=sulf_dep_dry(:)-source(:,it)*(mSatom/mH2SO4mol)*dens_aer_dry & 798 & *4./3.*RPI*(mdw(it-nbtr_sulgas)/2.)**3 799 ENDIF 800 ENDIF 801 #endif 802 ! 803 ENDIF 706 804 ! 707 END 805 ENDDO 708 806 ! 709 807 ELSE IF (iflag_vdf_trac==0) THEN … … 720 818 ! 721 819 ! Nothing happens 722 !723 820 d_tr_cl=0. 724 821 ! … … 772 869 773 870 END DO !tr 871 872 #ifdef CPP_StratAer 873 IF (type_trac=='coag') THEN 874 ! compute wet deposition flux of sulfur (sum over gases and 875 ! particles) and convert to kg(S)/m2/s 876 ! adding contribution of d_tr_ls to d_tr_cv (above) 877 DO i = 1, klon 878 DO k = 1, klev 879 DO it = 1, nbtr 880 IF (it==id_H2SO4_strat) THEN 881 sulf_dep_wet(i)=sulf_dep_wet(i)+d_tr_ls(i,k,it)*(mSatom/mH2SO4mol) & 882 & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys 883 ELSEIF (it.GT.nbtr_sulgas) THEN 884 sulf_dep_wet(i)=sulf_dep_wet(i)+d_tr_ls(i,k,it)*(mSatom/mH2SO4mol) & 885 & *dens_aer_dry*4./3.*RPI*(mdw(it-nbtr_sulgas)/2.)**3 & 886 & *(paprs(i,k)-paprs(i,k+1))/RG/pdtphys 887 ENDIF 888 ENDDO 889 ENDDO 890 ENDDO 891 ENDIF 892 #endif 774 893 775 894 ELSE IF (iflag_lscav .EQ. 2) THEN ! frac_impa, frac_nucl
Note: See TracChangeset
for help on using the changeset viewer.