Changeset 2754
- Timestamp:
- Jan 8, 2017, 7:53:57 PM (8 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/Dust/phys_output_write_spl_mod.F90
r2747 r2754 6 6 !JE20150620<< 7 7 !JE20150620>> 8 9 8 !JE20150620<< 10 9 11 USE time_phylmdz_mod, only: day_step_phy, start_time, itau_phy10 USE time_phylmdz_mod, ONLY: day_step_phy, start_time, itau_phy 12 11 13 12 USE phytracr_spl_mod, ONLY : ok_chimeredust, id_prec, id_fine, id_coss, & … … 93 92 ! defined and initialised in phys_output_mod.F90 94 93 95 USE dimphy, only: klon, klev, klevp194 USE dimphy, ONLY: klon, klev, klevp1 96 95 USE ocean_slab_mod, ONLY: nslay 97 USE control_mod, only: day_step, iphysiq98 USE phys_output_ctrlout_mod, only: o_phis, o_aire, is_ter, is_lic, is_oce, &96 USE control_mod, ONLY: day_step, iphysiq 97 USE phys_output_ctrlout_mod, ONLY: o_phis, o_aire, is_ter, is_lic, is_oce, & 99 98 is_ave, is_sic, o_contfracATM, o_contfracOR, & 100 99 o_aireTER, o_flat, o_slp, o_tsol, & … … 288 287 !JE20150620>> 289 288 290 USE phys_state_var_mod, only: pctsrf, paire_ter, rain_fall, snow_fall, &289 USE phys_state_var_mod, ONLY: pctsrf, paire_ter, rain_fall, snow_fall, & 291 290 qsol, z0m, z0h, fevap, agesno, & 292 291 nday_rain, rain_con, snow_con, & … … 315 314 vphiSTD, wTSTD, u2STD, v2STD, T2STD, missing_val_nf90 316 315 317 USE phys_local_var_mod, only: zxfluxlat, slp, zxtsol, zt2m, &316 USE phys_local_var_mod, ONLY: zxfluxlat, slp, zxtsol, zt2m, & 318 317 t2m_min_mon, t2m_max_mon, evap, & 319 318 zu10m, zv10m, zq2m, zustar, zxqsurf, & … … 370 369 d_q_ch4, pmfd, pmfu, ref_liq, ref_ice, rhwriteSTD 371 370 372 USE phys_output_var_mod, only: vars_defined, snow_o, zfra_o, bils_diss, &371 USE phys_output_var_mod, ONLY: vars_defined, snow_o, zfra_o, bils_diss, & 373 372 bils_ec,bils_ech, bils_tke, bils_kinetic, bils_latent, bils_enthalp, & 374 373 itau_con, nfiles, clef_files, nid_files, zvstr_gwd_rando 375 USE ocean_slab_mod, only: tslab, slab_bils, slab_bilg, tice, seaice376 USE pbl_surface_mod, only: snow377 USE indice_sol_mod, only: nbsrf378 USE infotrac, only: nqtot, nqo, nbtr, type_trac379 USE geometry_mod, only: cell_area380 USE surface_data, only: type_ocean, version_ocean, ok_veget, ok_snow381 ! USE aero_mod, only: naero_spc382 USE aero_mod, only: naero_tot, id_STRAT_phy383 USE ioipsl, only: histend, histsync384 USE iophy, only: set_itau_iophy, histwrite_phy385 USE netcdf, only: nf90_fill_real374 USE ocean_slab_mod, ONLY: tslab, slab_bils, slab_bilg, tice, seaice 375 USE pbl_surface_mod, ONLY: snow 376 USE indice_sol_mod, ONLY: nbsrf 377 USE infotrac, ONLY: nqtot, nqo, nbtr, type_trac 378 USE geometry_mod, ONLY: cell_area 379 USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, ok_snow 380 ! USE aero_mod, ONLY: naero_spc 381 USE aero_mod, ONLY: naero_tot, id_STRAT_phy 382 USE ioipsl, ONLY: histend, histsync 383 USE iophy, ONLY: set_itau_iophy, histwrite_phy 384 USE netcdf, ONLY: nf90_fill_real 386 385 387 386 #ifdef CPP_XIOS 388 387 ! ug Pour les sorties XIOS 389 388 USE xios, ONLY: xios_update_calendar 390 USE wxios, only: wxios_closedef, missing_val389 USE wxios, ONLY: wxios_closedef, missing_val 391 390 #endif 392 USE phys_cal_mod, only : mth_len 393 391 USE phys_cal_mod, ONLY : mth_len 394 392 395 393 IMPLICIT NONE 396 397 394 398 395 ! INCLUDE "temps.h" … … 446 443 CALL set_itau_iophy(itau_w) 447 444 448 IF (.NOT.vars_defined) THEN445 IF (.NOT.vars_defined) THEN 449 446 iinitend = 2 450 447 ELSE … … 457 454 !$OMP MASTER 458 455 IF (vars_defined) THEN 459 if (prt_level >= 10) then456 IF (prt_level >= 10) THEN 460 457 write(lunout,*)"phys_output_write: call xios_update_calendar, itau_w=",itau_w 461 endif458 ENDIF 462 459 ! CALL xios_update_calendar(itau_w) 463 460 CALL xios_update_calendar(itap) 464 END 461 ENDIF 465 462 !$OMP END MASTER 466 463 !$OMP BARRIER … … 752 749 CALL histwrite_phy(o_uq, uq) 753 750 CALL histwrite_phy(o_vq, vq) 754 IF (iflag_con.GE.3) THEN ! sb751 IF (iflag_con.GE.3) THEN ! sb 755 752 CALL histwrite_phy(o_cape, cape) 756 753 CALL histwrite_phy(o_pbase, ema_pcb) 757 754 CALL histwrite_phy(o_ptop, ema_pct) 758 755 CALL histwrite_phy(o_fbase, ema_cbmf) 759 if (iflag_con /= 30) then756 IF (iflag_con /= 30) THEN 760 757 CALL histwrite_phy(o_plcl, plcl) 761 758 CALL histwrite_phy(o_plfc, plfc) 762 759 CALL histwrite_phy(o_wbeff, wbeff) 763 end if760 ENDIF 764 761 765 762 CALL histwrite_phy(o_cape_max, cape) … … 772 769 CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d) 773 770 IF (vars_defined) THEN 774 IF (iflag_thermals>=1)THEN771 IF (iflag_thermals>=1)THEN 775 772 zx_tmp_fi3d=dnwd+dnwd0+upwd+fm_therm(:,1:klev) 776 773 ELSE … … 821 818 DO k=1, nlevSTD 822 819 bb2=clevSTD(k) 823 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. &820 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. & 824 821 bb2.EQ."500".OR.bb2.EQ."200".OR. & 825 822 bb2.EQ."100".OR. & … … 841 838 #endif 842 839 #endif 840 843 841 #ifdef CPP_XIOS 844 IF (ok_all_xml) THEN842 IF (ok_all_xml) THEN 845 843 !XIOS CALL xios_get_field_attr("u850",default_value=missing_val) 846 844 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 848 846 DO k=1, nlevSTD 849 847 bb2=clevSTD(k) 850 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. &848 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. & 851 849 bb2.EQ."500".OR.bb2.EQ."200".OR. & 852 850 bb2.EQ."100".OR. & … … 941 939 ELSE 942 940 CALL histwrite_phy(o_tslab, tslab) 943 END 941 ENDIF 944 942 IF (version_ocean=='sicINT') THEN 945 943 CALL histwrite_phy(o_slab_bilg, slab_bilg) 946 944 CALL histwrite_phy(o_slab_tice, tice) 947 945 CALL histwrite_phy(o_slab_sic, seaice) 948 END 946 ENDIF 949 947 ENDIF !type_ocean == force/slab 950 948 CALL histwrite_phy(o_weakinv, weak_inversion) … … 1030 1028 CALL histwrite_phy(o_tausumaero(naero), & 1031 1029 tausum_aero(:,2,naero) ) 1032 END 1030 ENDDO 1033 1031 ENDIF 1034 1032 IF (flag_aerosol_strat>=1) THEN … … 1047 1045 CALL histwrite_phy(o_sollwad0, sollwad0_aero) 1048 1046 !====MS forcing diagnostics 1049 if (new_aod) then1047 IF (new_aod) THEN 1050 1048 CALL histwrite_phy(o_swtoaas_nat, topsw_aero(:,1)) 1051 1049 CALL histwrite_phy(o_swsrfas_nat, solsw_aero(:,1)) … … 1058 1056 CALL histwrite_phy(o_swsrfcs_ant, solsw0_aero(:,2)) 1059 1057 !cf 1060 if (.not. aerosol_couple) then1058 IF (.not. aerosol_couple) THEN 1061 1059 CALL histwrite_phy(o_swtoacf_nat, topswcf_aero(:,1)) 1062 1060 CALL histwrite_phy(o_swsrfcf_nat, solswcf_aero(:,1)) … … 1065 1063 CALL histwrite_phy(o_swtoacf_zero,topswcf_aero(:,3)) 1066 1064 CALL histwrite_phy(o_swsrfcf_zero,solswcf_aero(:,3)) 1067 endif1068 endif! new_aod1065 ENDIF 1066 ENDIF ! new_aod 1069 1067 !====MS forcing diagnostics 1070 1068 ENDIF … … 1086 1084 ENDIF 1087 1085 ! Champs 3D: 1088 IF (ok_ade .OR. ok_aie) then1086 IF (ok_ade .OR. ok_aie) THEN 1089 1087 CALL histwrite_phy(o_ec550aer, ec550aer) 1090 1088 ENDIF … … 1171 1169 CALL histwrite_phy(o_alb2, albsol2) 1172 1170 !FH Sorties pour la couche limite 1173 if (iflag_pbl>1) then1171 IF (iflag_pbl>1) THEN 1174 1172 zx_tmp_fi3d=0. 1175 1173 IF (vars_defined) THEN 1176 donsrf=1,nbsrf1177 dok=1,klev1174 DO nsrf=1,nbsrf 1175 DO k=1,klev 1178 1176 zx_tmp_fi3d(:,k)=zx_tmp_fi3d(:,k) & 1179 1177 +pctsrf(:,nsrf)*pbl_tke(:,k,nsrf) … … 1200 1198 ENDIF 1201 1199 CALL histwrite_phy(o_dtcon, zx_tmp_fi3d) 1202 if(iflag_thermals.eq.0)then1200 IF (iflag_thermals.eq.0)THEN 1203 1201 IF (vars_defined) THEN 1204 1202 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & … … 1206 1204 ENDIF 1207 1205 CALL histwrite_phy(o_tntc, zx_tmp_fi3d) 1208 else if(iflag_thermals.ge.1.and.iflag_wake.EQ.1)then1206 ELSEIF (iflag_thermals.ge.1.and.iflag_wake.EQ.1)THEN 1209 1207 IF (vars_defined) THEN 1210 1208 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & … … 1213 1211 ENDIF 1214 1212 CALL histwrite_phy(o_tntc, zx_tmp_fi3d) 1215 endif1213 ENDIF 1216 1214 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_con(1:klon,1:klev)/pdtphys 1217 1215 CALL histwrite_phy(o_ducon, zx_tmp_fi3d) … … 1221 1219 CALL histwrite_phy(o_dqcon, zx_tmp_fi3d) 1222 1220 1223 IF (iflag_thermals.EQ.0) THEN1221 IF (iflag_thermals.EQ.0) THEN 1224 1222 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys 1225 1223 CALL histwrite_phy(o_tnhusc, zx_tmp_fi3d) 1226 ELSE IF(iflag_thermals.GE.1.AND.iflag_wake.EQ.1) THEN1224 ELSEIF (iflag_thermals.GE.1.AND.iflag_wake.EQ.1) THEN 1227 1225 IF (vars_defined) THEN 1228 1226 zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys + & … … 1244 1242 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1245 1243 ! Sorties specifiques a la separation thermiques/non thermiques 1246 if (iflag_thermals>=1) then1247 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscth(1:klon,1:klev)/pdtphys1244 IF (iflag_thermals>=1) THEN 1245 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscth(1:klon,1:klev)/pdtphys 1248 1246 CALL histwrite_phy(o_dtlscth, zx_tmp_fi3d) 1249 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscst(1:klon,1:klev)/pdtphys1247 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lscst(1:klon,1:klev)/pdtphys 1250 1248 CALL histwrite_phy(o_dtlscst, zx_tmp_fi3d) 1251 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscth(1:klon,1:klev)/pdtphys1249 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscth(1:klon,1:klev)/pdtphys 1252 1250 CALL histwrite_phy(o_dqlscth, zx_tmp_fi3d) 1253 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscst(1:klon,1:klev)/pdtphys1251 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscst(1:klon,1:klev)/pdtphys 1254 1252 CALL histwrite_phy(o_dqlscst, zx_tmp_fi3d) 1255 1253 CALL histwrite_phy(o_plulth, plul_th) 1256 1254 CALL histwrite_phy(o_plulst, plul_st) 1257 1255 IF (vars_defined) THEN 1258 dok=1,klev1259 doi=1,klon1260 if (ptconvth(i,k)) then1256 DO k=1,klev 1257 DO i=1,klon 1258 IF (ptconvth(i,k)) THEN 1261 1259 zx_tmp_fi3d(i,k)=1. 1262 else1260 ELSE 1263 1261 zx_tmp_fi3d(i,k)=0. 1264 endif1262 ENDIF 1265 1263 enddo 1266 1264 enddo … … 1268 1266 CALL histwrite_phy(o_ptconvth, zx_tmp_fi3d) 1269 1267 IF (vars_defined) THEN 1270 doi=1,klon1268 DO i=1,klon 1271 1269 zx_tmp_fi2d(1:klon)=lmax_th(:) 1272 1270 enddo 1273 1271 ENDIF 1274 1272 CALL histwrite_phy(o_lmaxth, zx_tmp_fi2d) 1275 endif! iflag_thermals>=11273 ENDIF ! iflag_thermals>=1 1276 1274 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1277 1275 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev)/pdtphys 1278 1276 CALL histwrite_phy(o_dtvdf, zx_tmp_fi3d) 1279 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_diss(1:klon,1:klev)/pdtphys1277 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_diss(1:klon,1:klev)/pdtphys 1280 1278 CALL histwrite_phy(o_dtdis, zx_tmp_fi3d) 1281 1279 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys … … 1321 1319 CALL histwrite_phy(o_dqthe, zx_tmp_fi3d) 1322 1320 ENDIF !iflag_thermals 1323 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ajsb(1:klon,1:klev)/pdtphys1321 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ajsb(1:klon,1:klev)/pdtphys 1324 1322 CALL histwrite_phy(o_dtajs, zx_tmp_fi3d) 1325 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys1323 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys 1326 1324 CALL histwrite_phy(o_dqajs, zx_tmp_fi3d) 1327 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_swr(1:klon,1:klev)/pdtphys1325 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_swr(1:klon,1:klev)/pdtphys 1328 1326 CALL histwrite_phy(o_dtswr, zx_tmp_fi3d) 1329 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_sw0(1:klon,1:klev)/pdtphys1327 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_sw0(1:klon,1:klev)/pdtphys 1330 1328 CALL histwrite_phy(o_dtsw0, zx_tmp_fi3d) 1331 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lwr(1:klon,1:klev)/pdtphys1329 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lwr(1:klon,1:klev)/pdtphys 1332 1330 CALL histwrite_phy(o_dtlwr, zx_tmp_fi3d) 1333 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lw0(1:klon,1:klev)/pdtphys1331 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lw0(1:klon,1:klev)/pdtphys 1334 1332 CALL histwrite_phy(o_dtlw0, zx_tmp_fi3d) 1335 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev)/pdtphys1333 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_ec(1:klon,1:klev)/pdtphys 1336 1334 CALL histwrite_phy(o_dtec, zx_tmp_fi3d) 1337 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_vdf(1:klon,1:klev)/pdtphys1335 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_vdf(1:klon,1:klev)/pdtphys 1338 1336 CALL histwrite_phy(o_duvdf, zx_tmp_fi3d) 1339 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_vdf(1:klon,1:klev)/pdtphys1337 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_vdf(1:klon,1:klev)/pdtphys 1340 1338 CALL histwrite_phy(o_dvvdf, zx_tmp_fi3d) 1341 1339 IF (ok_orodr) THEN 1342 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_oro(1:klon,1:klev)/pdtphys1340 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_oro(1:klon,1:klev)/pdtphys 1343 1341 CALL histwrite_phy(o_duoro, zx_tmp_fi3d) 1344 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_oro(1:klon,1:klev)/pdtphys1342 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_oro(1:klon,1:klev)/pdtphys 1345 1343 CALL histwrite_phy(o_dvoro, zx_tmp_fi3d) 1346 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_oro(1:klon,1:klev)/pdtphys1344 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_oro(1:klon,1:klev)/pdtphys 1347 1345 CALL histwrite_phy(o_dtoro, zx_tmp_fi3d) 1348 1346 ENDIF 1349 1347 IF (ok_orolf) THEN 1350 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_lif(1:klon,1:klev)/pdtphys1348 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_lIF (1:klon,1:klev)/pdtphys 1351 1349 CALL histwrite_phy(o_dulif, zx_tmp_fi3d) 1352 1350 1353 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_lif(1:klon,1:klev)/pdtphys1351 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_lIF (1:klon,1:klev)/pdtphys 1354 1352 CALL histwrite_phy(o_dvlif, zx_tmp_fi3d) 1355 1353 1356 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lif(1:klon,1:klev)/pdtphys1354 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_lIF (1:klon,1:klev)/pdtphys 1357 1355 CALL histwrite_phy(o_dtlif, zx_tmp_fi3d) 1358 1356 ENDIF 1359 1357 1360 1358 ! IF (ok_hines) THEN 1361 ! IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_hin(1:klon,1:klev)/pdtphys1359 ! IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_hin(1:klon,1:klev)/pdtphys 1362 1360 ! CALL histwrite_phy(o_duhin, zx_tmp_fi3d) 1363 ! IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_hin(1:klon,1:klev)/pdtphys1361 ! IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_v_hin(1:klon,1:klev)/pdtphys 1364 1362 ! CALL histwrite_phy(o_dvhin, zx_tmp_fi3d) 1365 ! IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_hin(1:klon,1:klev)/pdtphys1363 ! IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_hin(1:klon,1:klev)/pdtphys 1366 1364 ! CALL histwrite_phy(o_dthin, zx_tmp_fi3d) 1367 1365 ! ENDIF 1368 1366 1369 ! IF (ok_gwd_rando) then1370 ! CALL histwrite_phy(o_du_gwd_rando, du_gwd_ran do/ pdtphys)1371 ! CALL histwrite_phy(o_dv_gwd_rando, dv_gwd_ran do/ pdtphys)1367 ! IF (ok_gwd_rando) THEN 1368 ! CALL histwrite_phy(o_du_gwd_rando, du_gwd_ranDO / pdtphys) 1369 ! CALL histwrite_phy(o_dv_gwd_rando, dv_gwd_ranDO / pdtphys) 1372 1370 ! CALL histwrite_phy(o_vstr_gwd_rando, zvstr_gwd_rando) 1373 ! endIF1374 1375 IF (ok_qch4) then1371 ! ENDIF 1372 1373 IF (ok_qch4) THEN 1376 1374 CALL histwrite_phy(o_dqch4, d_q_ch4 / pdtphys) 1377 1375 ENDIF … … 1385 1383 CALL histwrite_phy(o_rlucs, lwup0) 1386 1384 CALL histwrite_phy(o_rldcs, lwdn0) 1387 IF (vars_defined) THEN1385 IF (vars_defined) THEN 1388 1386 zx_tmp_fi3d(1:klon,1:klev)=d_t(1:klon,1:klev)+ & 1389 1387 d_t_dyn(1:klon,1:klev) 1390 1388 ENDIF 1391 1389 CALL histwrite_phy(o_tnt, zx_tmp_fi3d) 1392 IF (vars_defined) THEN1390 IF (vars_defined) THEN 1393 1391 zx_tmp_fi3d(1:klon,1:klev)=d_t_swr(1:klon,1:klev)/pdtphys + & 1394 1392 d_t_lwr(1:klon,1:klev)/pdtphys 1395 1393 ENDIF 1396 1394 CALL histwrite_phy(o_tntr, zx_tmp_fi3d) 1397 IF (vars_defined) THEN1395 IF (vars_defined) THEN 1398 1396 zx_tmp_fi3d(1:klon,1:klev)= (d_t_lsc(1:klon,1:klev)+ & 1399 1397 d_t_eva(1:klon,1:klev)+ & … … 1401 1399 ENDIF 1402 1400 CALL histwrite_phy(o_tntscpbl, zx_tmp_fi3d) 1403 IF (vars_defined) THEN1401 IF (vars_defined) THEN 1404 1402 zx_tmp_fi3d(1:klon,1:klev)=d_qx(1:klon,1:klev,ivap)+ & 1405 1403 d_q_dyn(1:klon,1:klev) 1406 1404 ENDIF 1407 1405 CALL histwrite_phy(o_tnhus, zx_tmp_fi3d) 1408 IF (vars_defined) THEN1406 IF (vars_defined) THEN 1409 1407 zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys+ & 1410 1408 d_q_eva(1:klon,1:klev)/pdtphys … … 1412 1410 CALL histwrite_phy(o_tnhusscpbl, zx_tmp_fi3d) 1413 1411 CALL histwrite_phy(o_evu, coefm(:,:,is_ave)) 1414 IF (vars_defined) THEN1412 IF (vars_defined) THEN 1415 1413 zx_tmp_fi3d(1:klon,1:klev)=q_seri(1:klon,1:klev)+ & 1416 1414 ql_seri(1:klon,1:klev) 1417 1415 ENDIF 1418 1416 CALL histwrite_phy(o_h2o, zx_tmp_fi3d) 1419 if (iflag_con >= 3) then1420 IF (vars_defined) THEN1417 IF (iflag_con >= 3) THEN 1418 IF (vars_defined) THEN 1421 1419 zx_tmp_fi3d(1:klon,1:klev)=-1 * (dnwd(1:klon,1:klev)+ & 1422 1420 dnwd0(1:klon,1:klev)) 1423 1421 ENDIF 1424 1422 CALL histwrite_phy(o_mcd, zx_tmp_fi3d) 1425 IF (vars_defined) THEN1423 IF (vars_defined) THEN 1426 1424 zx_tmp_fi3d(1:klon,1:klev)=upwd(1:klon,1:klev) + & 1427 1425 dnwd(1:klon,1:klev)+ dnwd0(1:klon,1:klev) 1428 1426 ENDIF 1429 1427 CALL histwrite_phy(o_dmc, zx_tmp_fi3d) 1430 else if (iflag_con == 2) then1428 ELSEIF (iflag_con == 2) THEN 1431 1429 CALL histwrite_phy(o_mcd, pmfd) 1432 1430 CALL histwrite_phy(o_dmc, pmfu + pmfd) 1433 end if1431 ENDIF 1434 1432 CALL histwrite_phy(o_ref_liq, ref_liq) 1435 1433 CALL histwrite_phy(o_ref_ice, ref_ice) 1436 if(RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR. &1434 IF (RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR. & 1437 1435 RN2O_per.NE.RN2O_act.OR.RCFC11_per.NE.RCFC11_act.OR. & 1438 1436 RCFC12_per.NE.RCFC12_act) THEN 1439 IF (vars_defined) zx_tmp_fi2d(1 : klon) = swupp ( 1 : klon, klevp1 )1437 IF (vars_defined) zx_tmp_fi2d(1 : klon) = swupp ( 1 : klon, klevp1 ) 1440 1438 CALL histwrite_phy(o_rsut4co2, zx_tmp_fi2d) 1441 IF (vars_defined) zx_tmp_fi2d(1 : klon) = lwupp ( 1 : klon, klevp1 )1439 IF (vars_defined) zx_tmp_fi2d(1 : klon) = lwupp ( 1 : klon, klevp1 ) 1442 1440 CALL histwrite_phy(o_rlut4co2, zx_tmp_fi2d) 1443 IF (vars_defined) zx_tmp_fi2d(1 : klon) = swup0p ( 1 : klon, klevp1 )1441 IF (vars_defined) zx_tmp_fi2d(1 : klon) = swup0p ( 1 : klon, klevp1 ) 1444 1442 CALL histwrite_phy(o_rsutcs4co2, zx_tmp_fi2d) 1445 IF (vars_defined) zx_tmp_fi2d(1 : klon) = lwup0p ( 1 : klon, klevp1 )1443 IF (vars_defined) zx_tmp_fi2d(1 : klon) = lwup0p ( 1 : klon, klevp1 ) 1446 1444 CALL histwrite_phy(o_rlutcs4co2, zx_tmp_fi2d) 1447 1445 CALL histwrite_phy(o_rsu4co2, swupp) … … 1461 1459 ! Champs interpolles sur des niveaux de pression 1462 1460 missing_val=missing_val_nf90 1463 DO iff=7, nfiles 1461 DO iff=7, nfiles-1 !--here we deal with files 7,8 and 9 1464 1462 1465 1463 CALL histwrite_phy(o_tnondef,tnondef(:,:,iff-6),iff) … … 1471 1469 CALL histwrite_phy(o_va,vwriteSTD(:,:,iff-6),iff) 1472 1470 CALL histwrite_phy(o_wap,wwriteSTD(:,:,iff-6),iff) 1473 IF (vars_defined) THEN1471 IF (vars_defined) THEN 1474 1472 DO k=1, nlevSTD 1475 1473 DO i=1, klon 1476 IF (tnondef(i,k,iff-6).NE.missing_val) THEN1477 IF (freq_outNMC(iff-6).LT.0) THEN1474 IF (tnondef(i,k,iff-6).NE.missing_val) THEN 1475 IF (freq_outNMC(iff-6).LT.0) THEN 1478 1476 freq_moyNMC(iff-6)=(mth_len*un_jour)/freq_calNMC(iff-6) 1479 1477 ELSE … … 1488 1486 ENDIF 1489 1487 CALL histwrite_phy(o_psbg,zx_tmp_fi3d_STD,iff) 1490 IF (vars_defined) THEN1488 IF (vars_defined) THEN 1491 1489 DO k=1, nlevSTD 1492 1490 DO i=1, klon 1493 IF (O3sumSTD(i,k,iff-6).NE.missing_val) THEN1491 IF (O3sumSTD(i,k,iff-6).NE.missing_val) THEN 1494 1492 zx_tmp_fi3d_STD(i,k) = O3sumSTD(i,k,iff-6) * 1.e+9 1495 1493 ELSE … … 1500 1498 ENDIF 1501 1499 CALL histwrite_phy(o_tro3,zx_tmp_fi3d_STD,iff) 1502 if(read_climoz == 2) THEN1503 IF (vars_defined) THEN1500 IF (read_climoz == 2) THEN 1501 IF (vars_defined) THEN 1504 1502 DO k=1, nlevSTD 1505 1503 DO i=1, klon 1506 IF (O3daysumSTD(i,k,iff-6).NE.missing_val) THEN1504 IF (O3daysumSTD(i,k,iff-6).NE.missing_val) THEN 1507 1505 zx_tmp_fi3d_STD(i,k) = O3daysumSTD(i,k,iff-6) * 1.e+9 1508 1506 ELSE … … 1513 1511 ENDIF 1514 1512 CALL histwrite_phy(o_tro3_daylight,zx_tmp_fi3d_STD,iff) 1515 endif1513 ENDIF 1516 1514 CALL histwrite_phy(o_uxv,uvsumSTD(:,:,iff-6),iff) 1517 1515 CALL histwrite_phy(o_vxq,vqsumSTD(:,:,iff-6),iff) … … 1528 1526 #endif 1529 1527 #ifdef CPP_XIOS 1530 IF (ok_all_xml) THEN1528 IF (ok_all_xml) THEN 1531 1529 ! DO iff=7, nfiles 1532 1530 … … 1539 1537 CALL histwrite_phy(o_va,vlevSTD(:,:)) 1540 1538 CALL histwrite_phy(o_wap,wlevSTD(:,:)) 1541 ! IF (vars_defined) THEN1539 ! IF (vars_defined) THEN 1542 1540 ! DO k=1, nlevSTD 1543 1541 ! DO i=1, klon 1544 ! IF (tnondef(i,k,3).NE.missing_val) THEN1545 ! IF (freq_outNMC(iff-6).LT.0) THEN1542 ! IF (tnondef(i,k,3).NE.missing_val) THEN 1543 ! IF (freq_outNMC(iff-6).LT.0) THEN 1546 1544 ! freq_moyNMC(iff-6)=(mth_len*un_jour)/freq_calNMC(iff-6) 1547 1545 ! ELSE … … 1556 1554 ! ENDIF 1557 1555 ! CALL histwrite_phy(o_psbg,zx_tmp_fi3d_STD) 1558 IF (vars_defined) THEN1556 IF (vars_defined) THEN 1559 1557 DO k=1, nlevSTD 1560 1558 DO i=1, klon 1561 IF (O3STD(i,k).NE.missing_val) THEN1559 IF (O3STD(i,k).NE.missing_val) THEN 1562 1560 zx_tmp_fi3d_STD(i,k) = O3STD(i,k) * 1.e+9 1563 1561 ELSE … … 1568 1566 ENDIF 1569 1567 CALL histwrite_phy(o_tro3,zx_tmp_fi3d_STD) 1570 if(read_climoz == 2) THEN1571 IF (vars_defined) THEN1568 IF (read_climoz == 2) THEN 1569 IF (vars_defined) THEN 1572 1570 DO k=1, nlevSTD 1573 1571 DO i=1, klon 1574 IF (O3daySTD(i,k).NE.missing_val) THEN1572 IF (O3daySTD(i,k).NE.missing_val) THEN 1575 1573 zx_tmp_fi3d_STD(i,k) = O3daySTD(i,k) * 1.e+9 1576 1574 ELSE … … 1581 1579 ENDIF 1582 1580 CALL histwrite_phy(o_tro3_daylight,zx_tmp_fi3d_STD) 1583 endif1581 ENDIF 1584 1582 CALL histwrite_phy(o_uxv,uvSTD(:,:)) 1585 1583 CALL histwrite_phy(o_vxq,vqSTD(:,:)) … … 1599 1597 IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN 1600 1598 1601 !jyg<1602 !! CALL histwrite_phy(o_trac(iq-nqo), qx(:,:,iq))1603 1599 CALL histwrite_phy(o_trac(iq-nqo), tr_seri(:,:,iq-nqo)) 1604 !>jyg1605 1600 CALL histwrite_phy(o_dtr_vdf(iq-nqo),d_tr_cl(:,:,iq-nqo)) 1606 1601 CALL histwrite_phy(o_dtr_the(iq-nqo),d_tr_th(:,:,iq-nqo)) … … 1613 1608 CALL histwrite_phy(o_dtr_ls(iq-nqo),d_tr_ls(:,:,iq-nqo)) 1614 1609 ! CALL histwrite_phy(o_dtr_dyn(iq-nqo),d_tr_dyn(:,:,iq-nqo)) 1615 !!CALL histwrite_phy(o_dtr_cl(iq-nqo),d_tr_cl(:,:,iq-nqo))1610 ! CALL histwrite_phy(o_dtr_cl(iq-nqo),d_tr_cl(:,:,iq-nqo)) 1616 1611 CALL histwrite_phy(o_dtr_trsp(iq-nqo),d_tr_trsp(:,:,iq-nqo)) 1617 1612 CALL histwrite_phy(o_dtr_sscav(iq-nqo),d_tr_sscav(:,:,iq-nqo)) … … 1619 1614 CALL histwrite_phy(o_dtr_uscav(iq-nqo),d_tr_uscav(:,:,iq-nqo)) 1620 1615 zx_tmp_fi2d=0. 1621 IF (vars_defined) THEN1616 IF (vars_defined) THEN 1622 1617 DO k=1,klev 1623 !jyg<1624 !! zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*qx(:,k,iq)1625 1618 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,iq-nqo) 1626 !>jyg1627 1619 ENDDO 1628 1620 ENDIF 1629 1621 CALL histwrite_phy(o_trac_cum(iq-nqo), zx_tmp_fi2d) 1630 endif1631 ENDDO 1632 ENDIF 1633 1634 IF (.NOT.vars_defined) THEN1622 ENDIF 1623 ENDDO 1624 ENDIF 1625 1626 IF (.NOT.vars_defined) THEN 1635 1627 !$OMP MASTER 1636 1628 #ifndef CPP_IOIPSL_NO_OUTPUT … … 1653 1645 vars_defined = .TRUE. 1654 1646 1655 END 1656 1657 END 1658 1659 IF (vars_defined) THEN1647 ENDIF 1648 1649 ENDDO 1650 1651 IF (vars_defined) THEN 1660 1652 ! On synchronise les fichiers pour IOIPSL 1661 1653 #ifndef CPP_IOIPSL_NO_OUTPUT … … 1665 1657 CALL histsync(nid_files(iff)) 1666 1658 ENDIF 1667 END 1659 ENDDO 1668 1660 !$OMP END MASTER 1669 1661 #endif -
LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90
r2752 r2754 1746 1746 ! Champs interpolles sur des niveaux de pression 1747 1747 missing_val=missing_val_nf90 1748 DO iff=7, nfiles 1748 DO iff=7, nfiles-1 !--OB: here we deal with files 7,8,9 1749 1749 1750 1750 CALL histwrite_phy(o_tnondef,tnondef(:,:,iff-6),iff)
Note: See TracChangeset
for help on using the changeset viewer.