- Timestamp:
- Jan 30, 2017, 5:54:45 PM (8 years ago)
- Location:
- LMDZ5/branches/testing
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/testing
- Property svn:mergeinfo changed
/LMDZ5/trunk merged: 2728,2730-2775,2777-2785
- Property svn:mergeinfo changed
-
LMDZ5/branches/testing/libf/phylmd/Dust/phys_output_write_spl_mod.F90
r2641 r2787 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, klevp1, nslay 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, & 94 USE dimphy, ONLY: klon, klev, klevp1 95 USE ocean_slab_mod, ONLY: nslay 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, & 98 98 is_ave, is_sic, o_contfracATM, o_contfracOR, & 99 99 o_aireTER, o_flat, o_slp, o_tsol, & … … 287 287 !JE20150620>> 288 288 289 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, & 290 290 qsol, z0m, z0h, fevap, agesno, & 291 291 nday_rain, rain_con, snow_con, & … … 314 314 vphiSTD, wTSTD, u2STD, v2STD, T2STD, missing_val_nf90 315 315 316 USE phys_local_var_mod, only: zxfluxlat, slp, zxtsol, zt2m, &316 USE phys_local_var_mod, ONLY: zxfluxlat, slp, zxtsol, zt2m, & 317 317 t2m_min_mon, t2m_max_mon, evap, & 318 318 zu10m, zv10m, zq2m, zustar, zxqsurf, & … … 369 369 d_q_ch4, pmfd, pmfu, ref_liq, ref_ice, rhwriteSTD 370 370 371 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, & 372 372 bils_ec,bils_ech, bils_tke, bils_kinetic, bils_latent, bils_enthalp, & 373 373 itau_con, nfiles, clef_files, nid_files, zvstr_gwd_rando 374 USE ocean_slab_mod, only: tslab, slab_bils, slab_bilg, tice, seaice375 USE pbl_surface_mod, only: snow376 USE indice_sol_mod, only: nbsrf377 USE infotrac, only: nqtot, nqo, nbtr, type_trac378 USE geometry_mod, only: cell_area379 USE surface_data, only: type_ocean, version_ocean, ok_veget, ok_snow380 ! USE aero_mod, only: naero_spc381 USE aero_mod, only: naero_tot, id_STRAT_phy382 USE ioipsl, only: histend, histsync383 USE iophy, only: set_itau_iophy, histwrite_phy384 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 385 385 386 386 #ifdef CPP_XIOS 387 387 ! ug Pour les sorties XIOS 388 388 USE xios, ONLY: xios_update_calendar 389 USE wxios, only: wxios_closedef, missing_val389 USE wxios, ONLY: wxios_closedef, missing_val 390 390 #endif 391 USE phys_cal_mod, only : mth_len 392 391 USE phys_cal_mod, ONLY : mth_len 393 392 394 393 IMPLICIT NONE 395 396 394 397 395 ! INCLUDE "temps.h" … … 445 443 CALL set_itau_iophy(itau_w) 446 444 447 IF (.NOT.vars_defined) THEN445 IF (.NOT.vars_defined) THEN 448 446 iinitend = 2 449 447 ELSE … … 456 454 !$OMP MASTER 457 455 IF (vars_defined) THEN 458 if (prt_level >= 10) then456 IF (prt_level >= 10) THEN 459 457 write(lunout,*)"phys_output_write: call xios_update_calendar, itau_w=",itau_w 460 endif458 ENDIF 461 459 ! CALL xios_update_calendar(itau_w) 462 460 CALL xios_update_calendar(itap) 463 END 461 ENDIF 464 462 !$OMP END MASTER 465 463 !$OMP BARRIER … … 751 749 CALL histwrite_phy(o_uq, uq) 752 750 CALL histwrite_phy(o_vq, vq) 753 IF (iflag_con.GE.3) THEN ! sb751 IF (iflag_con.GE.3) THEN ! sb 754 752 CALL histwrite_phy(o_cape, cape) 755 753 CALL histwrite_phy(o_pbase, ema_pcb) 756 754 CALL histwrite_phy(o_ptop, ema_pct) 757 755 CALL histwrite_phy(o_fbase, ema_cbmf) 758 if (iflag_con /= 30) then756 IF (iflag_con /= 30) THEN 759 757 CALL histwrite_phy(o_plcl, plcl) 760 758 CALL histwrite_phy(o_plfc, plfc) 761 759 CALL histwrite_phy(o_wbeff, wbeff) 762 end if760 ENDIF 763 761 764 762 CALL histwrite_phy(o_cape_max, cape) … … 771 769 CALL histwrite_phy(o_ftime_con, zx_tmp_fi2d) 772 770 IF (vars_defined) THEN 773 IF (iflag_thermals>=1)THEN771 IF (iflag_thermals>=1)THEN 774 772 zx_tmp_fi3d=dnwd+dnwd0+upwd+fm_therm(:,1:klev) 775 773 ELSE … … 820 818 DO k=1, nlevSTD 821 819 bb2=clevSTD(k) 822 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. &820 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. & 823 821 bb2.EQ."500".OR.bb2.EQ."200".OR. & 824 822 bb2.EQ."100".OR. & … … 840 838 #endif 841 839 #endif 840 842 841 #ifdef CPP_XIOS 843 IF (ok_all_xml) THEN842 IF (ok_all_xml) THEN 844 843 !XIOS CALL xios_get_field_attr("u850",default_value=missing_val) 845 844 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 847 846 DO k=1, nlevSTD 848 847 bb2=clevSTD(k) 849 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. &848 IF (bb2.EQ."850".OR.bb2.EQ."700".OR. & 850 849 bb2.EQ."500".OR.bb2.EQ."200".OR. & 851 850 bb2.EQ."100".OR. & … … 940 939 ELSE 941 940 CALL histwrite_phy(o_tslab, tslab) 942 END 941 ENDIF 943 942 IF (version_ocean=='sicINT') THEN 944 943 CALL histwrite_phy(o_slab_bilg, slab_bilg) 945 944 CALL histwrite_phy(o_slab_tice, tice) 946 945 CALL histwrite_phy(o_slab_sic, seaice) 947 END 946 ENDIF 948 947 ENDIF !type_ocean == force/slab 949 948 CALL histwrite_phy(o_weakinv, weak_inversion) … … 1029 1028 CALL histwrite_phy(o_tausumaero(naero), & 1030 1029 tausum_aero(:,2,naero) ) 1031 END 1030 ENDDO 1032 1031 ENDIF 1033 1032 IF (flag_aerosol_strat>=1) THEN … … 1046 1045 CALL histwrite_phy(o_sollwad0, sollwad0_aero) 1047 1046 !====MS forcing diagnostics 1048 if (new_aod) then1047 IF (new_aod) THEN 1049 1048 CALL histwrite_phy(o_swtoaas_nat, topsw_aero(:,1)) 1050 1049 CALL histwrite_phy(o_swsrfas_nat, solsw_aero(:,1)) … … 1057 1056 CALL histwrite_phy(o_swsrfcs_ant, solsw0_aero(:,2)) 1058 1057 !cf 1059 if (.not. aerosol_couple) then1058 IF (.not. aerosol_couple) THEN 1060 1059 CALL histwrite_phy(o_swtoacf_nat, topswcf_aero(:,1)) 1061 1060 CALL histwrite_phy(o_swsrfcf_nat, solswcf_aero(:,1)) … … 1064 1063 CALL histwrite_phy(o_swtoacf_zero,topswcf_aero(:,3)) 1065 1064 CALL histwrite_phy(o_swsrfcf_zero,solswcf_aero(:,3)) 1066 endif1067 endif! new_aod1065 ENDIF 1066 ENDIF ! new_aod 1068 1067 !====MS forcing diagnostics 1069 1068 ENDIF … … 1085 1084 ENDIF 1086 1085 ! Champs 3D: 1087 IF (ok_ade .OR. ok_aie) then1086 IF (ok_ade .OR. ok_aie) THEN 1088 1087 CALL histwrite_phy(o_ec550aer, ec550aer) 1089 1088 ENDIF … … 1170 1169 CALL histwrite_phy(o_alb2, albsol2) 1171 1170 !FH Sorties pour la couche limite 1172 if (iflag_pbl>1) then1171 IF (iflag_pbl>1) THEN 1173 1172 zx_tmp_fi3d=0. 1174 1173 IF (vars_defined) THEN 1175 donsrf=1,nbsrf1176 dok=1,klev1174 DO nsrf=1,nbsrf 1175 DO k=1,klev 1177 1176 zx_tmp_fi3d(:,k)=zx_tmp_fi3d(:,k) & 1178 1177 +pctsrf(:,nsrf)*pbl_tke(:,k,nsrf) … … 1199 1198 ENDIF 1200 1199 CALL histwrite_phy(o_dtcon, zx_tmp_fi3d) 1201 if(iflag_thermals.eq.0)then1200 IF (iflag_thermals.eq.0)THEN 1202 1201 IF (vars_defined) THEN 1203 1202 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & … … 1205 1204 ENDIF 1206 1205 CALL histwrite_phy(o_tntc, zx_tmp_fi3d) 1207 else if(iflag_thermals.ge.1.and.iflag_wake.EQ.1)then1206 ELSEIF (iflag_thermals.ge.1.and.iflag_wake.EQ.1)THEN 1208 1207 IF (vars_defined) THEN 1209 1208 zx_tmp_fi3d(1:klon,1:klev)=d_t_con(1:klon,1:klev)/pdtphys + & … … 1212 1211 ENDIF 1213 1212 CALL histwrite_phy(o_tntc, zx_tmp_fi3d) 1214 endif1213 ENDIF 1215 1214 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_u_con(1:klon,1:klev)/pdtphys 1216 1215 CALL histwrite_phy(o_ducon, zx_tmp_fi3d) … … 1220 1219 CALL histwrite_phy(o_dqcon, zx_tmp_fi3d) 1221 1220 1222 IF (iflag_thermals.EQ.0) THEN1221 IF (iflag_thermals.EQ.0) THEN 1223 1222 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys 1224 1223 CALL histwrite_phy(o_tnhusc, zx_tmp_fi3d) 1225 ELSE IF(iflag_thermals.GE.1.AND.iflag_wake.EQ.1) THEN1224 ELSEIF (iflag_thermals.GE.1.AND.iflag_wake.EQ.1) THEN 1226 1225 IF (vars_defined) THEN 1227 1226 zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys + & … … 1243 1242 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1244 1243 ! Sorties specifiques a la separation thermiques/non thermiques 1245 if (iflag_thermals>=1) then1246 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 1247 1246 CALL histwrite_phy(o_dtlscth, zx_tmp_fi3d) 1248 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 1249 1248 CALL histwrite_phy(o_dtlscst, zx_tmp_fi3d) 1250 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 1251 1250 CALL histwrite_phy(o_dqlscth, zx_tmp_fi3d) 1252 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 1253 1252 CALL histwrite_phy(o_dqlscst, zx_tmp_fi3d) 1254 1253 CALL histwrite_phy(o_plulth, plul_th) 1255 1254 CALL histwrite_phy(o_plulst, plul_st) 1256 1255 IF (vars_defined) THEN 1257 dok=1,klev1258 doi=1,klon1259 if (ptconvth(i,k)) then1256 DO k=1,klev 1257 DO i=1,klon 1258 IF (ptconvth(i,k)) THEN 1260 1259 zx_tmp_fi3d(i,k)=1. 1261 else1260 ELSE 1262 1261 zx_tmp_fi3d(i,k)=0. 1263 endif1262 ENDIF 1264 1263 enddo 1265 1264 enddo … … 1267 1266 CALL histwrite_phy(o_ptconvth, zx_tmp_fi3d) 1268 1267 IF (vars_defined) THEN 1269 doi=1,klon1268 DO i=1,klon 1270 1269 zx_tmp_fi2d(1:klon)=lmax_th(:) 1271 1270 enddo 1272 1271 ENDIF 1273 1272 CALL histwrite_phy(o_lmaxth, zx_tmp_fi2d) 1274 endif! iflag_thermals>=11273 ENDIF ! iflag_thermals>=1 1275 1274 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 1276 1275 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_vdf(1:klon,1:klev)/pdtphys 1277 1276 CALL histwrite_phy(o_dtvdf, zx_tmp_fi3d) 1278 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 1279 1278 CALL histwrite_phy(o_dtdis, zx_tmp_fi3d) 1280 1279 IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys … … 1320 1319 CALL histwrite_phy(o_dqthe, zx_tmp_fi3d) 1321 1320 ENDIF !iflag_thermals 1322 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 1323 1322 CALL histwrite_phy(o_dtajs, zx_tmp_fi3d) 1324 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 1325 1324 CALL histwrite_phy(o_dqajs, zx_tmp_fi3d) 1326 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 1327 1326 CALL histwrite_phy(o_dtswr, zx_tmp_fi3d) 1328 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 1329 1328 CALL histwrite_phy(o_dtsw0, zx_tmp_fi3d) 1330 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 1331 1330 CALL histwrite_phy(o_dtlwr, zx_tmp_fi3d) 1332 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 1333 1332 CALL histwrite_phy(o_dtlw0, zx_tmp_fi3d) 1334 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 1335 1334 CALL histwrite_phy(o_dtec, zx_tmp_fi3d) 1336 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 1337 1336 CALL histwrite_phy(o_duvdf, zx_tmp_fi3d) 1338 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 1339 1338 CALL histwrite_phy(o_dvvdf, zx_tmp_fi3d) 1340 1339 IF (ok_orodr) THEN 1341 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 1342 1341 CALL histwrite_phy(o_duoro, zx_tmp_fi3d) 1343 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 1344 1343 CALL histwrite_phy(o_dvoro, zx_tmp_fi3d) 1345 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 1346 1345 CALL histwrite_phy(o_dtoro, zx_tmp_fi3d) 1347 1346 ENDIF 1348 1347 IF (ok_orolf) THEN 1349 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 1350 1349 CALL histwrite_phy(o_dulif, zx_tmp_fi3d) 1351 1350 1352 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 1353 1352 CALL histwrite_phy(o_dvlif, zx_tmp_fi3d) 1354 1353 1355 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 1356 1355 CALL histwrite_phy(o_dtlif, zx_tmp_fi3d) 1357 1356 ENDIF 1358 1357 1359 1358 ! IF (ok_hines) THEN 1360 ! 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 1361 1360 ! CALL histwrite_phy(o_duhin, zx_tmp_fi3d) 1362 ! 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 1363 1362 ! CALL histwrite_phy(o_dvhin, zx_tmp_fi3d) 1364 ! 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 1365 1364 ! CALL histwrite_phy(o_dthin, zx_tmp_fi3d) 1366 1365 ! ENDIF 1367 1366 1368 ! IF (ok_gwd_rando) then1369 ! CALL histwrite_phy(o_du_gwd_rando, du_gwd_ran do/ pdtphys)1370 ! 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) 1371 1370 ! CALL histwrite_phy(o_vstr_gwd_rando, zvstr_gwd_rando) 1372 ! endIF1373 1374 IF (ok_qch4) then1371 ! ENDIF 1372 1373 IF (ok_qch4) THEN 1375 1374 CALL histwrite_phy(o_dqch4, d_q_ch4 / pdtphys) 1376 1375 ENDIF … … 1384 1383 CALL histwrite_phy(o_rlucs, lwup0) 1385 1384 CALL histwrite_phy(o_rldcs, lwdn0) 1386 IF (vars_defined) THEN1385 IF (vars_defined) THEN 1387 1386 zx_tmp_fi3d(1:klon,1:klev)=d_t(1:klon,1:klev)+ & 1388 1387 d_t_dyn(1:klon,1:klev) 1389 1388 ENDIF 1390 1389 CALL histwrite_phy(o_tnt, zx_tmp_fi3d) 1391 IF (vars_defined) THEN1390 IF (vars_defined) THEN 1392 1391 zx_tmp_fi3d(1:klon,1:klev)=d_t_swr(1:klon,1:klev)/pdtphys + & 1393 1392 d_t_lwr(1:klon,1:klev)/pdtphys 1394 1393 ENDIF 1395 1394 CALL histwrite_phy(o_tntr, zx_tmp_fi3d) 1396 IF (vars_defined) THEN1395 IF (vars_defined) THEN 1397 1396 zx_tmp_fi3d(1:klon,1:klev)= (d_t_lsc(1:klon,1:klev)+ & 1398 1397 d_t_eva(1:klon,1:klev)+ & … … 1400 1399 ENDIF 1401 1400 CALL histwrite_phy(o_tntscpbl, zx_tmp_fi3d) 1402 IF (vars_defined) THEN1401 IF (vars_defined) THEN 1403 1402 zx_tmp_fi3d(1:klon,1:klev)=d_qx(1:klon,1:klev,ivap)+ & 1404 1403 d_q_dyn(1:klon,1:klev) 1405 1404 ENDIF 1406 1405 CALL histwrite_phy(o_tnhus, zx_tmp_fi3d) 1407 IF (vars_defined) THEN1406 IF (vars_defined) THEN 1408 1407 zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys+ & 1409 1408 d_q_eva(1:klon,1:klev)/pdtphys … … 1411 1410 CALL histwrite_phy(o_tnhusscpbl, zx_tmp_fi3d) 1412 1411 CALL histwrite_phy(o_evu, coefm(:,:,is_ave)) 1413 IF (vars_defined) THEN1412 IF (vars_defined) THEN 1414 1413 zx_tmp_fi3d(1:klon,1:klev)=q_seri(1:klon,1:klev)+ & 1415 1414 ql_seri(1:klon,1:klev) 1416 1415 ENDIF 1417 1416 CALL histwrite_phy(o_h2o, zx_tmp_fi3d) 1418 if (iflag_con >= 3) then1419 IF (vars_defined) THEN1417 IF (iflag_con >= 3) THEN 1418 IF (vars_defined) THEN 1420 1419 zx_tmp_fi3d(1:klon,1:klev)=-1 * (dnwd(1:klon,1:klev)+ & 1421 1420 dnwd0(1:klon,1:klev)) 1422 1421 ENDIF 1423 1422 CALL histwrite_phy(o_mcd, zx_tmp_fi3d) 1424 IF (vars_defined) THEN1423 IF (vars_defined) THEN 1425 1424 zx_tmp_fi3d(1:klon,1:klev)=upwd(1:klon,1:klev) + & 1426 1425 dnwd(1:klon,1:klev)+ dnwd0(1:klon,1:klev) 1427 1426 ENDIF 1428 1427 CALL histwrite_phy(o_dmc, zx_tmp_fi3d) 1429 else if (iflag_con == 2) then1428 ELSEIF (iflag_con == 2) THEN 1430 1429 CALL histwrite_phy(o_mcd, pmfd) 1431 1430 CALL histwrite_phy(o_dmc, pmfu + pmfd) 1432 end if1431 ENDIF 1433 1432 CALL histwrite_phy(o_ref_liq, ref_liq) 1434 1433 CALL histwrite_phy(o_ref_ice, ref_ice) 1435 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. & 1436 1435 RN2O_per.NE.RN2O_act.OR.RCFC11_per.NE.RCFC11_act.OR. & 1437 1436 RCFC12_per.NE.RCFC12_act) THEN 1438 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 ) 1439 1438 CALL histwrite_phy(o_rsut4co2, zx_tmp_fi2d) 1440 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 ) 1441 1440 CALL histwrite_phy(o_rlut4co2, zx_tmp_fi2d) 1442 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 ) 1443 1442 CALL histwrite_phy(o_rsutcs4co2, zx_tmp_fi2d) 1444 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 ) 1445 1444 CALL histwrite_phy(o_rlutcs4co2, zx_tmp_fi2d) 1446 1445 CALL histwrite_phy(o_rsu4co2, swupp) … … 1460 1459 ! Champs interpolles sur des niveaux de pression 1461 1460 missing_val=missing_val_nf90 1462 DO iff=7, nfiles 1461 DO iff=7, nfiles-1 !--here we deal with files 7,8 and 9 1463 1462 1464 1463 CALL histwrite_phy(o_tnondef,tnondef(:,:,iff-6),iff) … … 1470 1469 CALL histwrite_phy(o_va,vwriteSTD(:,:,iff-6),iff) 1471 1470 CALL histwrite_phy(o_wap,wwriteSTD(:,:,iff-6),iff) 1472 IF (vars_defined) THEN1471 IF (vars_defined) THEN 1473 1472 DO k=1, nlevSTD 1474 1473 DO i=1, klon 1475 IF (tnondef(i,k,iff-6).NE.missing_val) THEN1476 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 1477 1476 freq_moyNMC(iff-6)=(mth_len*un_jour)/freq_calNMC(iff-6) 1478 1477 ELSE … … 1487 1486 ENDIF 1488 1487 CALL histwrite_phy(o_psbg,zx_tmp_fi3d_STD,iff) 1489 IF (vars_defined) THEN1488 IF (vars_defined) THEN 1490 1489 DO k=1, nlevSTD 1491 1490 DO i=1, klon 1492 IF (O3sumSTD(i,k,iff-6).NE.missing_val) THEN1491 IF (O3sumSTD(i,k,iff-6).NE.missing_val) THEN 1493 1492 zx_tmp_fi3d_STD(i,k) = O3sumSTD(i,k,iff-6) * 1.e+9 1494 1493 ELSE … … 1499 1498 ENDIF 1500 1499 CALL histwrite_phy(o_tro3,zx_tmp_fi3d_STD,iff) 1501 if(read_climoz == 2) THEN1502 IF (vars_defined) THEN1500 IF (read_climoz == 2) THEN 1501 IF (vars_defined) THEN 1503 1502 DO k=1, nlevSTD 1504 1503 DO i=1, klon 1505 IF (O3daysumSTD(i,k,iff-6).NE.missing_val) THEN1504 IF (O3daysumSTD(i,k,iff-6).NE.missing_val) THEN 1506 1505 zx_tmp_fi3d_STD(i,k) = O3daysumSTD(i,k,iff-6) * 1.e+9 1507 1506 ELSE … … 1512 1511 ENDIF 1513 1512 CALL histwrite_phy(o_tro3_daylight,zx_tmp_fi3d_STD,iff) 1514 endif1513 ENDIF 1515 1514 CALL histwrite_phy(o_uxv,uvsumSTD(:,:,iff-6),iff) 1516 1515 CALL histwrite_phy(o_vxq,vqsumSTD(:,:,iff-6),iff) … … 1527 1526 #endif 1528 1527 #ifdef CPP_XIOS 1529 IF (ok_all_xml) THEN1528 IF (ok_all_xml) THEN 1530 1529 ! DO iff=7, nfiles 1531 1530 … … 1538 1537 CALL histwrite_phy(o_va,vlevSTD(:,:)) 1539 1538 CALL histwrite_phy(o_wap,wlevSTD(:,:)) 1540 ! IF (vars_defined) THEN1539 ! IF (vars_defined) THEN 1541 1540 ! DO k=1, nlevSTD 1542 1541 ! DO i=1, klon 1543 ! IF (tnondef(i,k,3).NE.missing_val) THEN1544 ! 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 1545 1544 ! freq_moyNMC(iff-6)=(mth_len*un_jour)/freq_calNMC(iff-6) 1546 1545 ! ELSE … … 1555 1554 ! ENDIF 1556 1555 ! CALL histwrite_phy(o_psbg,zx_tmp_fi3d_STD) 1557 IF (vars_defined) THEN1556 IF (vars_defined) THEN 1558 1557 DO k=1, nlevSTD 1559 1558 DO i=1, klon 1560 IF (O3STD(i,k).NE.missing_val) THEN1559 IF (O3STD(i,k).NE.missing_val) THEN 1561 1560 zx_tmp_fi3d_STD(i,k) = O3STD(i,k) * 1.e+9 1562 1561 ELSE … … 1567 1566 ENDIF 1568 1567 CALL histwrite_phy(o_tro3,zx_tmp_fi3d_STD) 1569 if(read_climoz == 2) THEN1570 IF (vars_defined) THEN1568 IF (read_climoz == 2) THEN 1569 IF (vars_defined) THEN 1571 1570 DO k=1, nlevSTD 1572 1571 DO i=1, klon 1573 IF (O3daySTD(i,k).NE.missing_val) THEN1572 IF (O3daySTD(i,k).NE.missing_val) THEN 1574 1573 zx_tmp_fi3d_STD(i,k) = O3daySTD(i,k) * 1.e+9 1575 1574 ELSE … … 1580 1579 ENDIF 1581 1580 CALL histwrite_phy(o_tro3_daylight,zx_tmp_fi3d_STD) 1582 endif1581 ENDIF 1583 1582 CALL histwrite_phy(o_uxv,uvSTD(:,:)) 1584 1583 CALL histwrite_phy(o_vxq,vqSTD(:,:)) … … 1598 1597 IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN 1599 1598 1600 !jyg<1601 !! CALL histwrite_phy(o_trac(iq-nqo), qx(:,:,iq))1602 1599 CALL histwrite_phy(o_trac(iq-nqo), tr_seri(:,:,iq-nqo)) 1603 !>jyg1604 1600 CALL histwrite_phy(o_dtr_vdf(iq-nqo),d_tr_cl(:,:,iq-nqo)) 1605 1601 CALL histwrite_phy(o_dtr_the(iq-nqo),d_tr_th(:,:,iq-nqo)) … … 1612 1608 CALL histwrite_phy(o_dtr_ls(iq-nqo),d_tr_ls(:,:,iq-nqo)) 1613 1609 ! CALL histwrite_phy(o_dtr_dyn(iq-nqo),d_tr_dyn(:,:,iq-nqo)) 1614 !!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)) 1615 1611 CALL histwrite_phy(o_dtr_trsp(iq-nqo),d_tr_trsp(:,:,iq-nqo)) 1616 1612 CALL histwrite_phy(o_dtr_sscav(iq-nqo),d_tr_sscav(:,:,iq-nqo)) … … 1618 1614 CALL histwrite_phy(o_dtr_uscav(iq-nqo),d_tr_uscav(:,:,iq-nqo)) 1619 1615 zx_tmp_fi2d=0. 1620 IF (vars_defined) THEN1616 IF (vars_defined) THEN 1621 1617 DO k=1,klev 1622 !jyg<1623 !! zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*qx(:,k,iq)1624 1618 zx_tmp_fi2d(:)=zx_tmp_fi2d(:)+zmasse(:,k)*tr_seri(:,k,iq-nqo) 1625 !>jyg1626 1619 ENDDO 1627 1620 ENDIF 1628 1621 CALL histwrite_phy(o_trac_cum(iq-nqo), zx_tmp_fi2d) 1629 endif1630 ENDDO 1631 ENDIF 1632 1633 IF (.NOT.vars_defined) THEN1622 ENDIF 1623 ENDDO 1624 ENDIF 1625 1626 IF (.NOT.vars_defined) THEN 1634 1627 !$OMP MASTER 1635 1628 #ifndef CPP_IOIPSL_NO_OUTPUT … … 1652 1645 vars_defined = .TRUE. 1653 1646 1654 END 1655 1656 END 1657 1658 IF (vars_defined) THEN1647 ENDIF 1648 1649 ENDDO 1650 1651 IF (vars_defined) THEN 1659 1652 ! On synchronise les fichiers pour IOIPSL 1660 1653 #ifndef CPP_IOIPSL_NO_OUTPUT … … 1664 1657 CALL histsync(nid_files(iff)) 1665 1658 ENDIF 1666 END 1659 ENDDO 1667 1660 !$OMP END MASTER 1668 1661 #endif
Note: See TracChangeset
for help on using the changeset viewer.