Changeset 2932 for trunk/LMDZ.MARS
- Timestamp:
- Apr 3, 2023, 6:17:05 PM (20 months ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 1 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2931 r2932 3982 3982 ==03/04/2023 == RV 3983 3983 Remove the test ngrid==1 for writediagfi. The routine can handle well the 1D case. 3984 3985 ==03/04/2023 == RV 3986 Add a new routine to write output called write_output. 3987 It needs to be imported (for example : use write_output_mod, only: write_output) 3988 Then, it requires only 4 arguments : the name of the variable, its title, its units and the variable itself. 3989 It detects the dimension of the variable and decide to output either in diagfi or diagsoil. 3990 It is also compatible with XIOS (xml file needs to be adapted) 3991 Writediagfi and writediagsoil routines are still available in case. -
trunk/LMDZ.MARS/libf/phymars/aeroptproperties.F
r2584 r2932 8 8 & QIRsQREF, omegaIR, gIR, QREFvis, QREFir, 9 9 & omegaREFvis, omegaREFir 10 use write_output_mod, only: write_output 10 11 IMPLICIT NONE 11 12 c ============================================================= … … 216 217 217 218 INTEGER, PARAMETER :: out_iaer = 2 218 INTEGER :: out_ndim219 219 REAL :: out_qext(ngrid,nlayer) 220 220 REAL :: out_omeg(ngrid,nlayer) … … 1291 1291 IF (out_qwg) THEN 1292 1292 c ------------------------------------------------------------- 1293 IF (ngrid.NE.1) THEN1294 out_ndim = 31295 ELSE1296 out_ndim = 11297 ENDIF1298 c -------------------------------------------------------------1299 1293 DO out_nchannel = 1, 2 1300 1294 c ------------------------------------------------------------- … … 1311 1305 #ifndef MESOSCALE 1312 1306 write(out_str(1:1),'(i1.1)') out_nchannel 1313 call WRITEDIAGFI(ngrid,'qextvis'//out_str,"Ext.efficiency","",1314 & out_ndim,out_qext)1315 call WRITEDIAGFI(ngrid,'omegvis'//out_str,"Sing.Scat.Alb.","",1316 & out_ ndim,out_omeg)1317 call WRITEDIAGFI(ngrid,'gvis'//out_str,"Asym.Factor","",1318 & out_ ndim,out_g)1307 call write_output('qextvis'//out_str,"Ext.efficiency","" 1308 & ,out_qext(:,:)) 1309 call write_output('omegvis'//out_str,"Sing.Scat.Alb.","", 1310 & out_omeg(:,:)) 1311 call write_output('gvis'//out_str,"Asym.Factor","", 1312 & out_g(:,:)) 1319 1313 #endif 1320 1314 c ------------------------------------------------------------- … … 1334 1328 #ifndef MESOSCALE 1335 1329 write(out_str(1:1),'(i1.1)') out_nchannel 1336 call WRITEDIAGFI(ngrid,'qextir'//out_str,"Ext.efficiency","",1337 & out_ ndim,out_qext)1338 call WRITEDIAGFI(ngrid,'omegir'//out_str,"Sing.Scat.Alb.","",1339 & out_ ndim,out_omeg)1340 call WRITEDIAGFI(ngrid,'gir'//out_str,"Asym.Factor","",1341 & out_ ndim,out_g)1330 call write_output('qextir'//out_str,"Ext.efficiency","", 1331 & out_qext(:,:)) 1332 call write_output('omegir'//out_str,"Sing.Scat.Alb.","", 1333 & out_omeg(:,:)) 1334 call write_output('gir'//out_str,"Asym.Factor","", 1335 & out_g(:,:)) 1342 1336 #endif 1343 1337 c ------------------------------------------------------------- 1344 1338 ENDDO ! out_nchannel 1345 1339 #ifndef MESOSCALE 1346 call WRITEDIAGFI(ngrid,"omegvisref","Sing.Scat.Alb.","",1347 & o ut_ndim,omegaREFvis3d(1,1,out_iaer))1348 call WRITEDIAGFI(ngrid,"omegirref","Sing.Scat.Alb.","",1349 & o ut_ndim,omegaREFir3d(1,1,out_iaer))1340 call write_output("omegvisref","Sing.Scat.Alb.","", 1341 & omegaREFvis3d(:,:,out_iaer)) 1342 call write_output("omegirref","Sing.Scat.Alb.","", 1343 & omegaREFir3d(:,:,out_iaer)) 1350 1344 #endif 1351 1345 ENDIF ! out_qwg -
trunk/LMDZ.MARS/libf/phymars/co2cloud.F90
r2826 r2932 108 108 109 109 use improvedCO2clouds_mod, only: improvedCO2clouds 110 110 use write_output_mod, only: write_output 111 111 #ifndef MESOSCALE 112 112 use vertical_layers_mod, only: ap, bp … … 494 494 495 495 ! Write outputs in diagfi.nc 496 call WRITEDIAGFI(ngrid, "SatIndex", "SatIndex", " ", 3, SatIndex)497 498 call WRITEDIAGFI(ngrid, "SatIndexmap", "SatIndexmap", "km", 2, SatIndexmap)496 call write_output( "SatIndex", "SatIndex", " ", SatIndex(:,:)) 497 498 call write_output( "SatIndexmap", "SatIndexmap", "km", SatIndexmap(:)) 499 499 !------------------------------------------------------------------------------------------------------------------! 500 500 ! if saturation index co2 is false, set saturation index to 0.05 … … 1184 1184 ! 11. Write outputs in diagfi.nc 1185 1185 !----------------------------------------------------------------------------------------------------------------------! 1186 call WRITEDIAGFI(ngrid, "satuco2", "vap in satu", " ", 3, satuco2)1187 1188 call WRITEDIAGFI(ngrid, "precip_co2_ice_rate", "surface deposition rate of co2 ice", "kg.m-2.s-1", 2, pdqs_sedco2(:))1189 1190 call WRITEDIAGFI(ngrid, "co2ice_cond_rate", "CO2 condensation rate in atm layers", "kg.kg-1.s-1", 3, pcondicea)1191 1192 call WRITEDIAGFI(ngrid, "pdtcloudco2", "temperature variation of CO2 latent heat", "K.s-1", 3, pdtcloudco2)1193 1194 call write diagfi(ngrid, "riceco2", "ice radius", "m", 3, riceco2)1195 1196 call WRITEDIAGFI(ngrid, "Tau3D1mic", " co2 ice opacities", " ", 3, Qext1bins2)1197 1198 call WRITEDIAGFI(ngrid, "tau1mic", "co2 ice opacity 1 micron", " ", 2, tau1mic)1186 call write_output( "satuco2", "vap in satu", " ", satuco2(:,:)) 1187 1188 call write_output( "precip_co2_ice_rate", "surface deposition rate of co2 ice", "kg.m-2.s-1", pdqs_sedco2(:)) 1189 1190 call write_output( "co2ice_cond_rate", "CO2 condensation rate in atm layers", "kg.kg-1.s-1", pcondicea(:,:)) 1191 1192 call write_output( "pdtcloudco2", "temperature variation of CO2 latent heat", "K.s-1", pdtcloudco2(:,:)) 1193 1194 call write_output( "riceco2", "ice radius", "m", riceco2(:,:)) 1195 1196 call write_output( "Tau3D1mic", " co2 ice opacities", " ", Qext1bins2(:,:)) 1197 1198 call write_output( "tau1mic", "co2 ice opacity 1 micron", " ", tau1mic(:)) 1199 1199 1200 1200 if (CLFvaryingCO2) then 1201 call WRITEDIAGFI(ngrid, "co2cloudfrac", "co2 cloud fraction", " ", 3, co2cloudfrac)1201 call write_output( "co2cloudfrac", "co2 cloud fraction", " ", co2cloudfrac(:,:)) 1202 1202 end if 1203 1203 !======================================================================================================================! -
trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F
r2903 r2932 30 30 use comcstfi_h, only: cpp, g, r, pi 31 31 use dust_param_mod, only: freedust 32 32 use write_output_mod, only: write_output 33 33 #ifndef MESOSCALE 34 34 USE vertical_layers_mod, ONLY: ap, bp … … 332 332 & rdust,zcondicea,zfallice,zdq_scav,pdqsc) 333 333 endif 334 call WRITEdiagfi(ngrid,"zfallice",334 call write_output("zfallice", 335 335 & "", 336 & " ", 2,zfallice(ngrid,1))336 & " ",zfallice(:,1)) 337 337 ELSE ! if co2 clouds 338 338 condens_layer(:,:) = 0. … … 349 349 piceco2(ig) = piceco2(ig) + zdqssed_co2(ig)*ptimestep 350 350 ENDDO 351 call WRITEdiagfi(ngrid,"zfallice",351 call write_output("zfallice", 352 352 & "", 353 & " ", 2,zdqssed_co2) ! otherwise we have not 1 day(1proc) = 1 day (24procs) test353 & " ",zdqssed_co2(:)) ! otherwise we have not 1 day(1proc) = 1 day (24procs) test 354 354 ENDIF ! end of if co2clouds 355 355 356 call WRITEdiagfi(ngrid,"pdtc_atm",356 call write_output("pdtc_atm", 357 357 & "temperature tendency due to CO2 condensation", 358 & " ", 3,pdtc)358 & " ",pdtc(:,:)) 359 359 360 call WRITEdiagfi(ngrid,"condens_layer",360 call write_output("condens_layer", 361 361 & "", 362 & " ", 3,condens_layer)362 & " ",condens_layer(:,:)) 363 363 364 364 c ************************* … … 716 716 c END DO 717 717 c END DO 718 c call WRITEDIAGFI(ngrid,'tconda1',718 c call write_output('tconda1', 719 719 c &'Taux de condensation CO2 atmospherique /Pa', 720 c & 'kg.m-2.Pa-1.s-1', 3,tconda1)721 c call WRITEDIAGFI(ngrid,'tconda2',720 c & 'kg.m-2.Pa-1.s-1',tconda1) 721 c call write_output('tconda2', 722 722 c &'Taux de condensation CO2 atmospherique /m', 723 c & 'kg.m-3.s-1', 3,tconda2)723 c & 'kg.m-3.s-1',tconda2) 724 724 725 725 ! output falling co2 ice in 1st layer: 726 ! call WRITEDIAGFI(ngrid,'fallice',726 ! call write_output('fallice', 727 727 ! &'Precipitation of co2 ice', 728 ! & 'kg.m-2.s-1', 2,zfallice(1,1))728 ! & 'kg.m-2.s-1',zfallice(1,1)) 729 729 730 730 #ifndef MESOSCALE -
trunk/LMDZ.MARS/libf/phymars/compute_dtau_mod.F90
r2643 r2932 25 25 USE dust_param_mod, only: odpref, t_scenario_sol 26 26 USE read_dust_scenario_mod, only: read_dust_scenario 27 use write_output_mod, only: write_output 27 28 28 29 IMPLICIT NONE … … 80 81 endif 81 82 ! for diagnostics 82 call WRITEDIAGFI(ngrid,"tau_pref_target", &83 call write_output("tau_pref_target", & 83 84 "target visible dust opacity column at 610Pa", & 84 "", 2,tau_pref_target)85 "",tau_pref_target(:)) 85 86 86 87 ! 2. Compute dtau() and dustliftday() … … 102 103 103 104 ! for diagnostics 104 call WRITEDIAGFI(ngrid,"dtau","opacity difference wrt scenario",&105 "", 2,dtau)106 call WRITEDIAGFI(ngrid,"dustliftday","dust injection rate", &107 "s-1", 2,dustliftday)105 call write_output("dtau","opacity difference wrt scenario",& 106 "",dtau(:)) 107 call write_output("dustliftday","dust injection rate", & 108 "s-1",dustliftday(:)) 108 109 109 110 ! 4. Save local time -
trunk/LMDZ.MARS/libf/phymars/dustdevil.F
r2608 r2932 233 233 c end do 234 234 235 c call WRITEDIAGFI(ngrid,'dqs_dev','dqs devil',236 c & 'kg.m-2.s-1', 2,pdqs_dev)237 c call WRITEDIAGFI(ngrid,'wind','wind',238 c & 'm.s-1', 2,magwind)239 c call WRITEDIAGFI(ngrid,'ztop','top pbl',240 c & 'km', 2,ztop)241 c call WRITEDIAGFI(ngrid,'tsurf','tsurf',242 c & 'K', 2,ptsurf)243 c call WRITEDIAGFI(ngrid,'T1','T(1)',244 c & 'K', 2,t1)245 c call WRITEDIAGFI(ngrid,'b','b',246 c & ' ', 2,b_diag)235 c call write_output('dqs_dev','dqs devil', 236 c & 'kg.m-2.s-1',pdqs_dev) 237 c call write_output('wind','wind', 238 c & 'm.s-1',magwind) 239 c call write_output('ztop','top pbl', 240 c & 'km',ztop) 241 c call write_output('tsurf','tsurf', 242 c & 'K',ptsurf) 243 c call write_output('T1','T(1)', 244 c & 'K',t1) 245 c call write_output('b','b', 246 c & ' ',b_diag) 247 247 c END If 248 248 c ********************************************************* -
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F
r2926 r2932 41 41 & nf90_strerror 42 42 use iostart, only: open_startphy,get_var, close_startphy 43 use write_output_mod, only: write_output 43 44 IMPLICIT NONE 44 45 … … 852 853 ENDIF !((iq.eq.igcm_h2o_vap).and.(atm_wat_profile.eq.2)) THEN 853 854 ENDDO 854 CALL WRITEDIAGFI(ngrid,'qsat',855 CALL write_output('qsat', 855 856 & 'qsat', 856 & 'kg/kg', 1,zqsat)857 & 'kg/kg',zqsat(:)) 857 858 858 859 -
trunk/LMDZ.MARS/libf/phymars/hdo_surfex_mod.F
r2593 r2932 16 16 use geometry_mod, only: longitude_deg,latitude_deg 17 17 use comcstfi_h, only: pi 18 use write_output_mod, only: write_output 18 19 19 20 implicit none … … 155 156 ENDDO ! of DO ig=1,ngrid 156 157 157 c CALL WRITEDIAGFI(ngrid,'extrasublim',158 c CALL write_output('extrasublim', 158 159 c & 'extrasublimation', 159 c & ' ', 2,tmpratio)160 c CALL WRITEDIAGFI(ngrid,'alpha_c_s',160 c & ' ',tmpratio) 161 c CALL write_output('alpha_c_s', 161 162 c & 'alpha_c_s', 162 c & ' ', 2,alpha_c)163 c & ' ',alpha_c) 163 164 164 165 return -
trunk/LMDZ.MARS/libf/phymars/improvedclouds_mod.F
r2801 r2932 19 19 use conc_mod, only: mmean 20 20 use comcstfi_h, only: pi, cpp 21 use write_output_mod, only: write_output 21 22 implicit none 22 23 … … 540 541 #ifndef MESOSCALE 541 542 ! IF (ngrid.ne.1) THEN ! 3D 542 ! call WRITEDIAGFI(ngrid,"satu","ratio saturation","",3,543 ! call write_output("satu","ratio saturation","", 543 544 ! & satu_out) 544 ! call WRITEDIAGFI(ngrid,"dM","ccn variation","kg/kg",3,545 ! call write_output("dM","ccn variation","kg/kg", 545 546 ! & dM_out) 546 ! call WRITEDIAGFI(ngrid,"dN","ccn variation","#",3,547 ! call write_output("dN","ccn variation","#", 547 548 ! & dN_out) 548 ! call WRITEDIAGFI(ngrid,"error","dichotomy max error","%",2,549 ! call write_output("error","dichotomy max error","%", 549 550 ! & error2d) 550 ! call WRITEDIAGFI(ngrid,"zqsat","zqsat","kg",3,551 ! call write_output("zqsat","zqsat","kg", 551 552 ! & zqsat) 552 553 ! ENDIF 553 554 554 555 ! IF (ngrid.eq.1) THEN ! 1D 555 ! call WRITEDIAGFI(ngrid,"error","incertitude sur glace","%",1,556 ! call write_output("error","incertitude sur glace","%", 556 557 ! & error_out) 557 call WRITEdiagfi(ngrid,"resist","resistance","s/m2",1,558 & res_out )559 call WRITEdiagfi(ngrid,"satu_bf","satu before","kg/kg",1,560 & satubf )561 call WRITEdiagfi(ngrid,"satu_af","satu after","kg/kg",1,562 & satuaf )563 call WRITEdiagfi(ngrid,"vapbf","h2ovap before","kg/kg",1,564 & zq0( 1,1,igcm_h2o_vap))565 call WRITEdiagfi(ngrid,"vapaf","h2ovap after","kg/kg",1,566 & zq( 1,1,igcm_h2o_vap))567 call WRITEdiagfi(ngrid,"icebf","h2oice before","kg/kg",1,568 & zq0( 1,1,igcm_h2o_ice))569 call WRITEdiagfi(ngrid,"iceaf","h2oice after","kg/kg",1,570 & zq( 1,1,igcm_h2o_ice))571 call WRITEdiagfi(ngrid,"ccnbf","ccn before","/kg",1,572 & zq0( 1,1,igcm_ccn_number))573 call WRITEdiagfi(ngrid,"ccnaf","ccn after","/kg",1,574 & zq( 1,1,igcm_ccn_number))575 c call WRITEDIAGFI(ngrid,"growthrate","growth rate","m^2/s",1,558 call write_output("resist","resistance","s/m2", 559 & res_out(:,:)) 560 call write_output("satu_bf","satu before","kg/kg", 561 & satubf(:,:)) 562 call write_output("satu_af","satu after","kg/kg", 563 & satuaf(:,:)) 564 call write_output("vapbf","h2ovap before","kg/kg", 565 & zq0(:,:,igcm_h2o_vap)) 566 call write_output("vapaf","h2ovap after","kg/kg", 567 & zq(:,:,igcm_h2o_vap)) 568 call write_output("icebf","h2oice before","kg/kg", 569 & zq0(:,:,igcm_h2o_ice)) 570 call write_output("iceaf","h2oice after","kg/kg", 571 & zq(:,:,igcm_h2o_ice)) 572 call write_output("ccnbf","ccn before","/kg", 573 & zq0(:,:,igcm_ccn_number)) 574 call write_output("ccnaf","ccn after","/kg", 575 & zq(:,:,igcm_ccn_number)) 576 c call write_output("growthrate","growth rate","m^2/s", 576 577 c & gr_out) 577 c call WRITEDIAGFI(ngrid,"nuclearate","nucleation rate","",1,578 c call write_output("nuclearate","nucleation rate","", 578 579 c & rate_out) 579 c call WRITEDIAGFI(ngrid,"dM","ccn variation","kg",1,580 c call write_output("dM","ccn variation","kg", 580 581 c & dM_out) 581 c call WRITEDIAGFI(ngrid,"dN","ccn variation","#",1,582 c call write_output("dN","ccn variation","#", 582 583 c & dN_out) 583 call WRITEdiagfi(ngrid,"zqsat","p vap sat","kg/kg",1,584 & zqsat )585 ! call WRITEDIAGFI(ngrid,"satu","ratio saturation","",1,586 ! & satu_out )587 call WRITEdiagfi(ngrid,"rice","ice radius","m",1,588 & rice )589 ! call WRITEDIAGFI(ngrid,"rdust_sca","rdust","m",1,584 call write_output("zqsat","p vap sat","kg/kg", 585 & zqsat(:,:)) 586 ! call write_output("satu","ratio saturation","", 587 ! & satu_out(:,:)) 588 call write_output("rice","ice radius","m", 589 & rice(:,:)) 590 ! call write_output("rdust_sca","rdust","m", 590 591 ! & rdust) 591 ! call WRITEDIAGFI(ngrid,"rsedcloud","rsedcloud","m",1,592 ! call write_output("rsedcloud","rsedcloud","m", 592 593 ! & rsedcloud) 593 ! call WRITEDIAGFI(ngrid,"rhocloud","rhocloud","kg.m-3",1,594 ! call write_output("rhocloud","rhocloud","kg.m-3", 594 595 ! & rhocloud) 595 596 ! ENDIF -
trunk/LMDZ.MARS/libf/phymars/nonoro_gwd_ran_mod.F90
r2682 r2932 47 47 use vertical_layers_mod, only : presnivs 48 48 use geometry_mod, only: cell_area 49 use write_output_mod, only: write_output 49 50 #ifdef CPP_XIOS 50 51 use xios_output_mod, only: send_xios_field … … 222 223 PH(:, 1) = 2. * PP(:, 1) - PH(:, 2) 223 224 224 call write diagfi(ngrid,'nonoro_pp','nonoro_pp', 'm',3,PP(:,1:nlayer))225 call write diagfi(ngrid,'nonoro_ph','nonoro_ph', 'm',3,PH(:,1:nlayer))225 call write_output('nonoro_pp','nonoro_pp', 'm',PP(:,:)) 226 call write_output('nonoro_ph','nonoro_ph', 'm',PH(:,:)) 226 227 227 228 ! Launching level for reproductible case … … 250 251 ZH(:, 1) = H0 * LOG(PR / (PH(:, 1) + PSEC)) 251 252 252 call write diagfi(ngrid,'nonoro_zh','nonoro_zh', 'm',3,ZH(:,2:nlayer+1))253 call write_output('nonoro_zh','nonoro_zh', 'm',ZH(:,2:nlayer+1)) 253 254 254 255 ! Winds and Brunt Vaisala frequency … … 275 276 MAX_K(II)=MAX(kmin,kstar) 276 277 ENDDO 277 call write diagfi(ngrid,'nonoro_bv','nonoro_bv', 'm',3,BV(:,2:nlayer+1))278 call write_output('nonoro_bv','nonoro_bv', 'm',BV(:,2:nlayer+1)) 278 279 279 280 !----------------------------------------------------------------------------------------------------------------------- … … 444 445 ! (upward) that should be compensated by circulation 445 446 ! and induce additional friction at the surface 446 call write diagfi(ngrid,'nonoro_u_epflux_tot','nonoro_u_epflux_tot', '',3,u_epflux_tot(:,2:nlayer+1))447 call write diagfi(ngrid,'nonoro_v_epflux_tot','nonoro_v_epflux_tot', '',3,v_epflux_tot(:,2:nlayer+1))447 call write_output('nonoro_u_epflux_tot','nonoro_u_epflux_tot', '',u_epflux_tot(:,2:nlayer+1)) 448 call write_output('nonoro_v_epflux_tot','nonoro_v_epflux_tot', '',v_epflux_tot(:,2:nlayer+1)) 448 449 449 450 ! 5.2 AR-1 RECURSIVE FORMULA (13) IN VERSION 4 … … 457 458 ENDDO 458 459 d_t(:,:) = 0. 459 call write diagfi(ngrid,'nonoro_d_u','nonoro_d_u', '',3,d_u)460 call write diagfi(ngrid,'nonoro_d_v','nonoro_d_v', '',3,d_v)460 call write_output('nonoro_d_u','nonoro_d_u', '',d_u(:,:)) 461 call write_output('nonoro_d_v','nonoro_d_v', '',d_v(:,:)) 461 462 462 463 ! 5.3 Update tendency of wind with the previous (and saved) values … … 469 470 dv_nonoro_gwd(:,:) = d_v(:,:) 470 471 471 call write diagfi(ngrid,'du_nonoro_gwd','du_nonoro_gwd', '',3,du_nonoro_gwd)472 call write diagfi(ngrid,'dv_nonoro_gwd','dv_nonoro_gwd', '',3,dv_nonoro_gwd)472 call write_output('du_nonoro_gwd','du_nonoro_gwd', '',du_nonoro_gwd(:,:)) 473 call write_output('dv_nonoro_gwd','dv_nonoro_gwd', '',dv_nonoro_gwd(:,:)) 473 474 474 475 ! Cosmetic: evaluation of the cumulated stress -
trunk/LMDZ.MARS/libf/phymars/pbl_parameters.F
r2586 r2932 3 3 & T_out,u_out,ustar,tstar,L_mo,vhf,vvv) 4 4 USE comcstfi_h 5 use write_output_mod, only: write_output 5 6 IMPLICIT NONE 6 7 !======================================================================= … … 361 362 362 363 #ifndef MESOSCALE 363 call WRITEDIAGFI(ngrid,'rib_pbl',364 & 'Richardson in pbl parameter','m/s', 2,rib)365 call WRITEDIAGFI(ngrid,'cdn_pbl',366 & 'neutral momentum coef','m/s', 2,cdn)367 call WRITEDIAGFI(ngrid,'fm_pbl',368 & 'momentum stab function','m/s', 2,fm)369 call WRITEDIAGFI(ngrid,'uv',370 & 'wind norm first layer','m/s', 2,sqrt(zu2))371 call WRITEDIAGFI(ngrid,'uvtrue',372 & 'wind norm first layer','m/s', 2,sqrt(pu(:,1)**2+pv(:,1)**2))373 call WRITEDIAGFI(ngrid,'chn_pbl',374 & 'neutral momentum coef','m/s', 2,chn)375 call WRITEDIAGFI(ngrid,'fh_pbl',376 & 'momentum stab function','m/s', 2,fh)377 call WRITEDIAGFI(ngrid,'B_pbl',378 & 'buoyancy','m/', 2,(ph(:,1)-pts(:))/pts(:))379 call WRITEDIAGFI(ngrid,'zot_pbl',380 & 'buoyancy','ms', 2,pz0tcomp)381 call WRITEDIAGFI(ngrid,'zz1','buoyancy','m',2,zzlay(:,1))364 call write_output('rib_pbl', 365 & 'Richardson in pbl parameter','m/s',rib(:)) 366 call write_output('cdn_pbl', 367 & 'neutral momentum coef','m/s',cdn(:)) 368 call write_output('fm_pbl', 369 & 'momentum stab function','m/s',fm(:)) 370 call write_output('uv', 371 & 'wind norm first layer','m/s',sqrt(zu2(:))) 372 call write_output('uvtrue', 373 & 'wind norm first layer','m/s',sqrt(pu(:,1)**2+pv(:,1)**2)) 374 call write_output('chn_pbl', 375 & 'neutral momentum coef','m/s',chn(:)) 376 call write_output('fh_pbl', 377 & 'momentum stab function','m/s',fh(:)) 378 call write_output('B_pbl', 379 & 'buoyancy','m/',(ph(:,1)-pts(:))/pts(:)) 380 call write_output('zot_pbl', 381 & 'buoyancy','ms',pz0tcomp(:)) 382 call write_output('zz1','buoyancy','m',zzlay(:,1)) 382 383 #endif 383 384 -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r2931 r2932 90 90 use phyetat0_mod, only: phyetat0, tab_cntrl_mod 91 91 use wstats_mod, only: callstats, wstats, mkstats 92 use writediagsoil_mod, only: writediagsoil93 92 use eofdump_mod, only: eofdump 94 93 USE vertical_layers_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt … … 110 109 & ini_comslope_h 111 110 USE ioipsl_getincom, only: getin 111 use write_output_mod, only: write_output 112 112 IMPLICIT NONE 113 113 c======================================================================= … … 1303 1303 enddo 1304 1304 enddo 1305 call write diagfi(ngrid,'qdustrds0','qdust before rds',1306 & 'kg/kg ', 3,qdustrds0)1307 call write diagfi(ngrid,'qstormrds0','qstorm before rds',1308 & 'kg/kg ', 3,qstormrds0)1305 call write_output('qdustrds0','qdust before rds', 1306 & 'kg/kg ',qdustrds0(:,:)) 1307 call write_output('qstormrds0','qstorm before rds', 1308 & 'kg/kg ',qstormrds0(:,:)) 1309 1309 1310 1310 CALL rocketduststorm(ngrid,nlayer,nq,ptime,ptimestep, … … 1355 1355 1356 1356 c for diagnostics 1357 call write diagfi(ngrid,'qdustrds1','qdust after rds',1358 & 'kg/kg ', 3,qdustrds1)1359 call write diagfi(ngrid,'qstormrds1','qstorm after rds',1360 & 'kg/kg ', 3,qstormrds1)1357 call write_output('qdustrds1','qdust after rds', 1358 & 'kg/kg ',qdustrds1(:,:)) 1359 call write_output('qstormrds1','qstorm after rds', 1360 & 'kg/kg ',qstormrds1(:,:)) 1361 1361 1362 call write diagfi(ngrid,'qdusttotal0','q sum before rds',1363 & 'kg/m2 ', 2,qdusttotal0)1364 call write diagfi(ngrid,'qdusttotal1','q sum after rds',1365 & 'kg/m2 ', 2,qdusttotal1)1362 call write_output('qdusttotal0','q sum before rds', 1363 & 'kg/m2 ',qdusttotal0(:)) 1364 call write_output('qdusttotal1','q sum after rds', 1365 & 'kg/m2 ',qdusttotal1(:)) 1366 1366 1367 1367 ENDIF ! end of if(rdstorm) … … 2514 2514 DO n=1,n_out 2515 2515 write(zstring, '(F8.6)') z_out(n) 2516 call WRITEDIAGFI(ngrid,'T_out_'//trim(zstring),2517 & 'potential temperature at z_out','K', 2,T_out(:,n))2518 call WRITEDIAGFI(ngrid,'u_out_'//trim(zstring),2519 & 'horizontal velocity norm at z_out','m/s', 2,u_out(:,n))2516 call write_output('T_out_'//trim(zstring), 2517 & 'potential temperature at z_out','K',T_out(:,n)) 2518 call write_output('u_out_'//trim(zstring), 2519 & 'horizontal velocity norm at z_out','m/s',u_out(:,n)) 2520 2520 ENDDO 2521 call WRITEDIAGFI(ngrid,'u_star',2522 & 'friction velocity','m/s', 2,ustar)2523 call WRITEDIAGFI(ngrid,'teta_star',2524 & 'friction potential temperature','K', 2,tstar)2525 call WRITEDIAGFI(ngrid,'vvv',2526 & 'Vertical velocity variance at zout','m', 2,vvv)2527 call WRITEDIAGFI(ngrid,'vhf',2528 & 'Vertical heat flux at zout','m', 2,vhf)2521 call write_output('u_star', 2522 & 'friction velocity','m/s',ustar) 2523 call write_output('teta_star', 2524 & 'friction potential temperature','K',tstar) 2525 call write_output('vvv', 2526 & 'Vertical velocity variance at zout','m',vvv) 2527 call write_output('vhf', 2528 & 'Vertical heat flux at zout','m',vhf) 2529 2529 #else 2530 2530 T_out1(:)=T_out(:,1) … … 3005 3005 $ .or. (noms(iq).eq."o2") 3006 3006 $ .or. (noms(iq).eq."h2o_vap") ) then 3007 call write diagfi(ngrid,"vmr_"//trim(noms(iq)),3008 $ "Volume mixing ratio","mol/mol", 3,vmr)3007 call write_output("vmr_"//trim(noms(iq)), 3008 $ "Volume mixing ratio","mol/mol",vmr(:,:)) 3009 3009 end if 3010 3010 … … 3017 3017 call wstats(ngrid,"num_"//trim(noms(iq)), 3018 3018 $ "Number density","cm-3",3,rhopart) 3019 call write diagfi(ngrid,"num_"//trim(noms(iq)),3020 $ "Number density","cm-3", 3,rhopart)3019 call write_output("num_"//trim(noms(iq)), 3020 $ "Number density","cm-3",rhopart(:,:)) 3021 3021 3022 3022 ! vertical column (molecule.cm-2) … … 3035 3035 call wstats(ngrid,"c_"//trim(noms(iq)), 3036 3036 $ "column","mol cm-2",2,colden(1,iq)) 3037 call write diagfi(ngrid,"c_"//trim(noms(iq)),3038 $ "column","mol cm-2", 2,colden(1,iq))3037 call write_output("c_"//trim(noms(iq)), 3038 $ "column","mol cm-2",colden(:,iq)) 3039 3039 3040 3040 ! global mass (g) … … 3043 3043 $ *mmol(iq)*1.e4*cell_area(:),mass(iq)) 3044 3044 3045 call write diagfi(ngrid,"mass_"//trim(noms(iq)),3046 $ "global mass","g", 0,mass(iq))3045 call write_output("mass_"//trim(noms(iq)), 3046 $ "global mass","g",mass(iq)) 3047 3047 3048 3048 end if ! of if (noms(iq) .ne. "dust_mass" ...) … … 3133 3133 c WRITEDIAGFI can ALSO be called from any other subroutines 3134 3134 c for any variables !! 3135 call WRITEDIAGFI(ngrid,"emis","Surface emissivity","w.m-1",2,3135 call write_output("emis","Surface emissivity","w.m-1", 3136 3136 & emis(:,iflat)) 3137 3137 do islope=1,nslope 3138 3138 write(str2(1:2),'(i2.2)') islope 3139 call WRITEDIAGFI(ngrid,"emis_slope"//str2,3140 & "Surface emissivity","w.m-1", 2,emis(:,islope))3139 call write_output("emis_slope"//str2, 3140 & "Surface emissivity","w.m-1",emis(:,islope)) 3141 3141 ENDDO 3142 call WRITEDIAGFI(ngrid,"zzlev","Interlayer altitude",3143 & "m", 3,zzlev(:,1:nlayer))3144 call write diagfi(ngrid,"pphi","Geopotential","m2s-2",3,3145 & pphi )3146 call write diagfi(ngrid,"phisfi","Surface geopotential",3147 & "m2s-2", 2,phisfi)3148 call WRITEDIAGFI(ngrid,"tsurf","Surface temperature","K",2,3142 call write_output("zzlev","Interlayer altitude", 3143 & "m",zzlev(:,1:nlayer)) 3144 call write_output("pphi","Geopotential","m2s-2", 3145 & pphi(:,:)) 3146 call write_output("phisfi","Surface geopotential", 3147 & "m2s-2",phisfi(:)) 3148 call write_output("tsurf","Surface temperature","K", 3149 3149 & tsurf(:,iflat)) 3150 3150 do islope=1,nslope 3151 3151 write(str2(1:2),'(i2.2)') islope 3152 call WRITEDIAGFI(ngrid,"tsurf_slope"//str2,3153 & "Surface temperature","K", 2,3152 call write_output("tsurf_slope"//str2, 3153 & "Surface temperature","K", 3154 3154 & tsurf(:,islope)) 3155 3155 ENDDO 3156 call WRITEDIAGFI(ngrid,"ps","surface pressure","Pa",2,ps)3157 call WRITEDIAGFI(ngrid,"co2ice","co2 ice thickness"3158 & ,"kg.m-2", 2,qsurf(:,igcm_co2,iflat))3156 call write_output("ps","surface pressure","Pa",ps(:)) 3157 call write_output("co2ice","co2 ice thickness" 3158 & ,"kg.m-2",qsurf(:,igcm_co2,iflat)) 3159 3159 do islope=1,nslope 3160 3160 write(str2(1:2),'(i2.2)') islope 3161 call WRITEDIAGFI(ngrid,"co2ice_slope"//str2,"co2 ice thickness"3162 & ,"kg.m-2", 2,qsurf(:,igcm_co2,islope))3161 call write_output("co2ice_slope"//str2,"co2 ice thickness" 3162 & ,"kg.m-2",qsurf(:,igcm_co2,islope)) 3163 3163 ENDDO 3164 call WRITEDIAGFI(ngrid,"watercap","Water ice thickness"3165 & ,"kg.m-2", 2,watercap(:,iflat))3164 call write_output("watercap","Water ice thickness" 3165 & ,"kg.m-2",watercap(:,iflat)) 3166 3166 do islope=1,nslope 3167 3167 write(str2(1:2),'(i2.2)') islope 3168 call WRITEDIAGFI(ngrid,"watercap_slope"//str2,3168 call write_output("watercap_slope"//str2, 3169 3169 & "Water ice thickness" 3170 & ,"kg.m-2", 2,watercap(:,islope))3170 & ,"kg.m-2",watercap(:,islope)) 3171 3171 ENDDO 3172 call WRITEDIAGFI(ngrid,"temp_layer1","temperature in layer 1",3173 & "K", 2,zt(1,1))3174 call WRITEDIAGFI(ngrid,"temp7","temperature in layer 7",3175 & "K", 2,zt(1,7))3176 call WRITEDIAGFI(ngrid,"fluxsurf_lw","fluxsurf_lw","W.m-2",2,3172 call write_output("temp_layer1","temperature in layer 1", 3173 & "K",zt(:,1)) 3174 call write_output("temp7","temperature in layer 7", 3175 & "K",zt(:,7)) 3176 call write_output("fluxsurf_lw","fluxsurf_lw","W.m-2", 3177 3177 & fluxsurf_lw(:,iflat)) 3178 3178 do islope=1,nslope 3179 3179 write(str2(1:2),'(i2.2)') islope 3180 call WRITEDIAGFI(ngrid,"fluxsurf_lw_slope"//str2,3181 & "fluxsurf_lw","W.m-2", 2,3180 call write_output("fluxsurf_lw_slope"//str2, 3181 & "fluxsurf_lw","W.m-2", 3182 3182 & fluxsurf_lw(:,islope)) 3183 3183 ENDDO 3184 call WRITEDIAGFI(ngrid,"fluxsurf_dn_sw","fluxsurf_dn_sw",3185 & "W.m-2", 2,fluxsurf_dn_sw_tot(:,iflat))3184 call write_output("fluxsurf_dn_sw","fluxsurf_dn_sw", 3185 & "W.m-2",fluxsurf_dn_sw_tot(:,iflat)) 3186 3186 do islope=1,nslope 3187 3187 write(str2(1:2),'(i2.2)') islope 3188 call WRITEDIAGFI(ngrid,"fluxsurf_dn_sw_slope"//str2,3188 call write_output("fluxsurf_dn_sw_slope"//str2, 3189 3189 & "fluxsurf_dn_sw", 3190 & "W.m-2", 2,fluxsurf_dn_sw_tot(:,islope))3190 & "W.m-2",fluxsurf_dn_sw_tot(:,islope)) 3191 3191 ENDDO 3192 call WRITEDIAGFI(ngrid,"fluxtop_lw","fluxtop_lw","W.m-2",2,3193 & fluxtop_lw )3194 call WRITEDIAGFI(ngrid,"fluxtop_up_sw","fluxtop_up_sw","W.m-2",3195 & 2,fluxtop_up_sw_tot)3196 call WRITEDIAGFI(ngrid,"temp","temperature","K",3,zt)3197 call WRITEDIAGFI(ngrid,"Sols","Time","sols",0,[zday])3198 call WRITEDIAGFI(ngrid,"Ls","Solar longitude","deg",3199 & 0,[zls*180./pi])3200 call WRITEDIAGFI(ngrid,"u","Zonal wind","m.s-1",3,zu)3201 call WRITEDIAGFI(ngrid,"v","Meridional wind","m.s-1",3,zv)3202 call WRITEDIAGFI(ngrid,"w","Vertical wind","m.s-1",3,pw)3203 call WRITEDIAGFI(ngrid,"rho","density","kg.m-3",3,rho)3204 call WRITEDIAGFI(ngrid,"pressure","Pressure","Pa",3,zplay)3205 call WRITEDIAGFI(ngrid,"pplev","Pressure","Pa",3,zplev)3206 call WRITEDIAGFI(ngrid,'sw_htrt','sw heat. rate',3207 & 'K/s', 3,zdtsw)3208 call WRITEDIAGFI(ngrid,'lw_htrt','lw heat. rate',3209 & 'K/s', 3,zdtlw)3210 call write diagfi(ngrid,"local_time","Local time",3211 & 'sol', 2,local_time)3192 call write_output("fluxtop_lw","fluxtop_lw","W.m-2", 3193 & fluxtop_lw(:)) 3194 call write_output("fluxtop_up_sw","fluxtop_up_sw","W.m-2", 3195 & fluxtop_up_sw_tot(:)) 3196 call write_output("temp","temperature","K",zt(:,:)) 3197 call write_output("Sols","Time","sols",zday) 3198 call write_output("Ls","Solar longitude","deg", 3199 & zls*180./pi) 3200 call write_output("u","Zonal wind","m.s-1",zu(:,:)) 3201 call write_output("v","Meridional wind","m.s-1",zv(:,:)) 3202 call write_output("w","Vertical wind","m.s-1",pw(:,:)) 3203 call write_output("rho","density","kg.m-3",rho(:,:)) 3204 call write_output("pressure","Pressure","Pa",zplay(:,:)) 3205 call write_output("pplev","Pressure","Pa",zplev(:,:)) 3206 call write_output('sw_htrt','sw heat. rate', 3207 & 'K/s',zdtsw(:,:)) 3208 call write_output('lw_htrt','lw heat. rate', 3209 & 'K/s',zdtlw(:,:)) 3210 call write_output("local_time","Local time", 3211 & 'sol',local_time(:)) 3212 3212 if (.not.activice) then 3213 CALL WRITEDIAGFI(ngrid,'tauTESap',3213 CALL write_output('tauTESap', 3214 3214 & 'tau abs 825 cm-1', 3215 & '', 2,tauTES)3215 & '',tauTES(:)) 3216 3216 else 3217 CALL WRITEDIAGFI(ngrid,'tauTES',3217 CALL write_output('tauTES', 3218 3218 & 'tau abs 825 cm-1', 3219 & '', 2,taucloudtes)3219 & '',taucloudtes(:)) 3220 3220 endif 3221 3221 #else 3222 3222 !!! this is to ensure correct initialisation of mesoscale model 3223 call WRITEDIAGFI(ngrid,"tsurf","Surface temperature","K",2,3223 call write_output("tsurf","Surface temperature","K", 3224 3224 & tsurf(:,iflat)) 3225 call WRITEDIAGFI(ngrid,"ps","surface pressure","Pa",2,ps)3226 call WRITEDIAGFI(ngrid,"co2ice","co2 ice thickness","kg.m-2",2,3225 call write_output("ps","surface pressure","Pa",ps(:)) 3226 call write_output("co2ice","co2 ice thickness","kg.m-2", 3227 3227 & qsurf(:,igcm_co2,iflat)) 3228 call WRITEDIAGFI(ngrid,"temp","temperature","K",3,zt)3229 call WRITEDIAGFI(ngrid,"u","Zonal wind","m.s-1",3,zu)3230 call WRITEDIAGFI(ngrid,"v","Meridional wind","m.s-1",3,zv)3231 call WRITEDIAGFI(ngrid,"emis","Surface emissivity","w.m-1",2,3232 & emis )3233 call WRITEDIAGFI(ngrid,"tsoil","Soil temperature",3234 & "K", 3,tsoil(:,:,iflat))3235 call WRITEDIAGFI(ngrid,"inertiedat","Soil inertia",3236 & "K", 3,inertiedat)3228 call write_output("temp","temperature","K",zt(:,:)) 3229 call write_output("u","Zonal wind","m.s-1",zu(:,:)) 3230 call write_output("v","Meridional wind","m.s-1",zv(:,:)) 3231 call write_output("emis","Surface emissivity","w.m-1", 3232 & emis(:,iflat)) 3233 call write_output("tsoil","Soil temperature", 3234 & "K",tsoil(:,:,iflat)) 3235 call write_output("inertiedat","Soil inertia", 3236 & "K",inertiedat(:,:)) 3237 3237 #endif 3238 3238 … … 3242 3242 3243 3243 if (igcm_co2.ne.0) then 3244 call WRITEDIAGFI(ngrid,"co2","co2 mass mixing ratio",3245 & "kg.kg-1", 3,zq(:,:,igcm_co2))3244 call write_output("co2","co2 mass mixing ratio", 3245 & "kg.kg-1",zq(:,:,igcm_co2)) 3246 3246 3247 3247 if (co2clouds) then 3248 call WRITEDIAGFI(ngrid,'ccnqco2','CCNco2 mmr', 3249 & 'kg.kg-1',3,zq(:,:,igcm_ccnco2_mass)) 3250 3251 call WRITEDIAGFI(ngrid,'ccnNco2','CCNco2 number', 3252 & 'part.kg-1',3,zq(:,:,igcm_ccnco2_number)) 3253 3254 call WRITEDIAGFI(ngrid,'co2_ice','co2_ice mmr in atm', 3255 & 'kg.kg-1', 3, zq(:,:,igcm_co2_ice)) 3256 3257 call WRITEDIAGFI(ngrid,"mtotco2","total mass atm of co2", 3258 & "kg.m-2",2, mtotco2) 3259 call WRITEDIAGFI(ngrid,"icetotco2","total mass atm of co2 ice", 3260 & "kg.m-2", 2, icetotco2) 3261 call WRITEDIAGFI(ngrid,"vaptotco2","total mass atm of co2 "// 3262 & "vapor","kg.m-2", 2, vaptotco2) 3263 call WRITEDIAGFI(ngrid,"emis","Surface emissivity","w.m-1",2, 3264 & emis) 3248 call write_output('ccnqco2','CCNco2 mmr', 3249 & 'kg.kg-1',zq(:,:,igcm_ccnco2_mass)) 3250 3251 call write_output('ccnNco2','CCNco2 number', 3252 & 'part.kg-1',zq(:,:,igcm_ccnco2_number)) 3253 3254 call write_output('co2_ice','co2_ice mmr in atm', 3255 & 'kg.kg-1',zq(:,:,igcm_co2_ice)) 3256 3257 call write_output("mtotco2","total mass atm of co2", 3258 & "kg.m-2",mtotco2(:)) 3259 call write_output("icetotco2","total mass atm of co2 ice", 3260 & "kg.m-2", icetotco2(:)) 3261 call write_output("vaptotco2","total mass atm of co2 "// 3262 & "vapor","kg.m-2", vaptotco2(:)) 3265 3263 if (co2useh2o) then 3266 call WRITEDIAGFI(ngrid,'ccnqco2_h2o_m_ice',3264 call write_output('ccnqco2_h2o_m_ice', 3267 3265 & 'CCNco2_h2o_mass_ice mmr', 3268 & 'kg.kg-1', 3,zq(:,:,igcm_ccnco2_h2o_mass_ice))3269 3270 call WRITEDIAGFI(ngrid,'ccnqco2_h2o_m_ccn',3266 & 'kg.kg-1',zq(:,:,igcm_ccnco2_h2o_mass_ice)) 3267 3268 call write_output('ccnqco2_h2o_m_ccn', 3271 3269 & 'CCNco2_h2o_mass_ccn mmr', 3272 & 'kg.kg-1', 3,zq(:,:,igcm_ccnco2_h2o_mass_ccn))3273 3274 call WRITEDIAGFI(ngrid,'ccnNco2_h2o','CCNco2_h2o number',3275 & 'part.kg-1', 3,zq(:,:,igcm_ccnco2_h2o_number))3270 & 'kg.kg-1',zq(:,:,igcm_ccnco2_h2o_mass_ccn)) 3271 3272 call write_output('ccnNco2_h2o','CCNco2_h2o number', 3273 & 'part.kg-1',zq(:,:,igcm_ccnco2_h2o_number)) 3276 3274 end if 3277 3275 3278 3276 if (meteo_flux) then 3279 call WRITEDIAGFI(ngrid,'ccnqco2_meteor','CCNco2_meteor mmr',3280 & 'kg.kg-1', 3,zq(:,:,igcm_ccnco2_meteor_mass))3281 3282 call WRITEDIAGFI(ngrid,'ccnNco2_meteor','CCNco2_meteor number',3283 & 'part.kg-1', 3,zq(:,:,igcm_ccnco2_meteor_number))3277 call write_output('ccnqco2_meteor','CCNco2_meteor mmr', 3278 & 'kg.kg-1',zq(:,:,igcm_ccnco2_meteor_mass)) 3279 3280 call write_output('ccnNco2_meteor','CCNco2_meteor number', 3281 & 'part.kg-1',zq(:,:,igcm_ccnco2_meteor_number)) 3284 3282 end if 3285 3283 … … 3289 3287 ! Output He tracer, if there is one 3290 3288 if (igcm_he.ne.0) then 3291 call WRITEDIAGFI(ngrid,"he","helium mass mixing ratio",3292 & "kg/kg", 3,zq(1,1,igcm_he))3289 call write_output("he","helium mass mixing ratio", 3290 & "kg/kg",zq(:,:,igcm_he)) 3293 3291 vmr = zq(1:ngrid,1:nlayer,igcm_he) 3294 3292 & * mmean(1:ngrid,1:nlayer)/mmol(igcm_he) 3295 call WRITEDIAGFI(ngrid,'vmr_he','helium vol. mixing ratio',3296 & 'mol/mol', 3,vmr)3293 call write_output('vmr_he','helium vol. mixing ratio', 3294 & 'mol/mol',vmr(:,:)) 3297 3295 end if 3298 3296 … … 3303 3301 #ifdef MESOINI 3304 3302 !!!! waterice = q01, voir readmeteo.F90 3305 call WRITEDIAGFI(ngrid,'q01',noms(igcm_h2o_ice),3306 & 'kg/kg', 3,3307 & zq( 1:ngrid,1:nlayer,igcm_h2o_ice))3303 call write_output('q01',noms(igcm_h2o_ice), 3304 & 'kg/kg', 3305 & zq(:,:,igcm_h2o_ice)) 3308 3306 !!!! watervapor = q02, voir readmeteo.F90 3309 call WRITEDIAGFI(ngrid,'q02',noms(igcm_h2o_vap),3310 & 'kg/kg', 3,3311 & zq( 1:ngrid,1:nlayer,igcm_h2o_vap))3307 call write_output('q02',noms(igcm_h2o_vap), 3308 & 'kg/kg', 3309 & zq(:,:,igcm_h2o_vap)) 3312 3310 !!!! surface waterice qsurf02 (voir readmeteo) 3313 call WRITEDIAGFI(ngrid,'qsurf02','surface tracer',3314 & 'kg.m-2', 2,3315 & qsurf( 1:ngrid,igcm_h2o_ice,iflat))3311 call write_output('qsurf02','surface tracer', 3312 & 'kg.m-2', 3313 & qsurf(:,igcm_h2o_ice,iflat)) 3316 3314 do islope=1,nslope 3317 3315 write(str2(1:2),'(i2.2)') islope 3318 call WRITEDIAGFI(ngrid,'qsurf02_slope'//str2,3319 & 'surface tracer','kg.m-2', 2,3320 & qsurf( 1:ngrid,igcm_h2o_ice,islope))3316 call write_output('qsurf02_slope'//str2, 3317 & 'surface tracer','kg.m-2', 3318 & qsurf(:,igcm_h2o_ice,islope)) 3321 3319 ENDDO 3322 3320 #endif 3323 call WRITEDIAGFI(ngrid,'mtot',3321 call write_output('mtot', 3324 3322 & 'total mass of water vapor', 3325 & 'kg/m2', 2,mtot)3326 call WRITEDIAGFI(ngrid,'icetot',3323 & 'kg/m2',mtot(:)) 3324 call write_output('icetot', 3327 3325 & 'total mass of water ice', 3328 & 'kg/m2', 2,icetot)3326 & 'kg/m2',icetot(:)) 3329 3327 vmr = zq(1:ngrid,1:nlayer,igcm_h2o_ice) 3330 3328 & * mmean(1:ngrid,1:nlayer)/mmol(igcm_h2o_ice) 3331 call WRITEDIAGFI(ngrid,'vmr_h2oice','h2o ice vmr',3332 & 'mol/mol', 3,vmr)3329 call write_output('vmr_h2oice','h2o ice vmr', 3330 & 'mol/mol',vmr(:,:)) 3333 3331 vmr = zq(1:ngrid,1:nlayer,igcm_h2o_vap) 3334 3332 & * mmean(1:ngrid,1:nlayer)/mmol(igcm_h2o_vap) 3335 call WRITEDIAGFI(ngrid,'vmr_h2ovap','h2o vap vmr',3336 & 'mol/mol', 3,vmr)3337 call WRITEDIAGFI(ngrid,'reffice',3333 call write_output('vmr_h2ovap','h2o vap vmr', 3334 & 'mol/mol',vmr(:,:)) 3335 call write_output('reffice', 3338 3336 & 'Mean reff', 3339 & 'm', 2,rave)3340 call WRITEDIAGFI(ngrid,'h2o_ice','h2o_ice','kg/kg',3341 & 3,zq(:,:,igcm_h2o_ice))3342 call WRITEDIAGFI(ngrid,'h2o_vap','h2o_vap','kg/kg',3343 & 3,zq(:,:,igcm_h2o_vap))3337 & 'm',rave(:)) 3338 call write_output('h2o_ice','h2o_ice','kg/kg', 3339 & zq(:,:,igcm_h2o_ice)) 3340 call write_output('h2o_vap','h2o_vap','kg/kg', 3341 & zq(:,:,igcm_h2o_vap)) 3344 3342 3345 3343 if (hdo) then 3346 3344 vmr=zq(1:ngrid,1:nlayer,igcm_hdo_ice) 3347 3345 & *mmean(1:ngrid,1:nlayer)/mmol(igcm_hdo_ice) 3348 CALL WRITEDIAGFI(ngrid,'vmr_hdoice','hdo ice vmr',3349 & 'mol/mol', 3,vmr)3346 CALL write_output('vmr_hdoice','hdo ice vmr', 3347 & 'mol/mol',vmr(:,:)) 3350 3348 vmr=zq(1:ngrid,1:nlayer,igcm_hdo_vap) 3351 3349 & *mmean(1:ngrid,1:nlayer)/mmol(igcm_hdo_vap) 3352 CALL WRITEDIAGFI(ngrid,'vmr_hdovap','hdo vap vmr',3353 & 'mol/mol', 3,vmr)3354 call WRITEDIAGFI(ngrid,'hdo_ice','hdo_ice','kg/kg',3355 & 3,zq(:,:,igcm_hdo_ice))3356 call WRITEDIAGFI(ngrid,'hdo_vap','hdo_vap','kg/kg',3357 & 3,zq(:,:,igcm_hdo_vap))3358 3359 CALL WRITEDIAGFI(ngrid,'mtotD',3350 CALL write_output('vmr_hdovap','hdo vap vmr', 3351 & 'mol/mol',vmr(:,:)) 3352 call write_output('hdo_ice','hdo_ice','kg/kg', 3353 & zq(:,:,igcm_hdo_ice)) 3354 call write_output('hdo_vap','hdo_vap','kg/kg', 3355 & zq(:,:,igcm_hdo_vap)) 3356 3357 CALL write_output('mtotD', 3360 3358 & 'total mass of HDO vapor', 3361 & 'kg/m2', 2,mtotD)3362 CALL WRITEDIAGFI(ngrid,'icetotD',3359 & 'kg/m2',mtotD(:)) 3360 CALL write_output('icetotD', 3363 3361 & 'total mass of HDO ice', 3364 & 'kg/m2', 2,icetotD)3362 & 'kg/m2',icetotD(:)) 3365 3363 3366 3364 C Calculation of the D/H ratio … … 3387 3385 enddo 3388 3386 3389 CALL WRITEDIAGFI(ngrid,'DoH_vap',3387 CALL write_output('DoH_vap', 3390 3388 & 'D/H ratio in vapor', 3391 & ' ', 3,DoH_vap)3392 CALL WRITEDIAGFI(ngrid,'DoH_ice',3389 & ' ',DoH_vap(:,:)) 3390 CALL write_output('DoH_ice', 3393 3391 & 'D/H ratio in ice', 3394 & '', 3,DoH_ice)3392 & '',DoH_ice(:,:)) 3395 3393 3396 3394 endif !hdo 3397 3395 3398 3396 !A. Pottier 3399 CALL WRITEDIAGFI(ngrid,'rmoym',3397 CALL write_output('rmoym', 3400 3398 & 'alternative reffice', 3401 & 'm', 2,rave2)3402 call WRITEDIAGFI(ngrid,'saturation',3403 & 'h2o vap saturation ratio','dimless', 3,satu)3399 & 'm',rave2(:)) 3400 call write_output('saturation', 3401 & 'h2o vap saturation ratio','dimless',satu(:,:)) 3404 3402 if (scavenging) then 3405 CALL WRITEDIAGFI(ngrid,"Nccntot",3403 CALL write_output("Nccntot", 3406 3404 & "condensation nuclei","Nbr/m2", 3407 & 2,Nccntot)3408 CALL WRITEDIAGFI(ngrid,"Mccntot",3405 & Nccntot(:)) 3406 CALL write_output("Mccntot", 3409 3407 & "mass condensation nuclei","kg/m2", 3410 & 2,Mccntot)3408 & Mccntot(:)) 3411 3409 endif 3412 call WRITEDIAGFI(ngrid,'rice','Ice particle size',3413 & 'm', 3,rice)3414 call WRITEDIAGFI(ngrid,'h2o_ice_s',3410 call write_output('rice','Ice particle size', 3411 & 'm',rice(:,:)) 3412 call write_output('h2o_ice_s', 3415 3413 & 'surface h2o_ice', 3416 & 'kg.m-2', 2,qsurf(1,igcm_h2o_ice,iflat))3414 & 'kg.m-2',qsurf(:,igcm_h2o_ice,iflat)) 3417 3415 do islope=1,nslope 3418 3416 write(str2(1:2),'(i2.2)') islope 3419 call WRITEDIAGFI(ngrid,'h2o_ice_s_slope'//str2,3417 call write_output('h2o_ice_s_slope'//str2, 3420 3418 & 'surface h2o_ice', 3421 & 'kg.m-2', 2,qsurf(1,igcm_h2o_ice,islope))3419 & 'kg.m-2',qsurf(:,igcm_h2o_ice,islope)) 3422 3420 ENDDO 3423 3421 if (hdo) then 3424 call WRITEDIAGFI(ngrid,'hdo_ice_s',3422 call write_output('hdo_ice_s', 3425 3423 & 'surface hdo_ice', 3426 & 'kg.m-2', 2,qsurf(1,igcm_hdo_ice,iflat))3424 & 'kg.m-2',qsurf(:,igcm_hdo_ice,iflat)) 3427 3425 do islope=1,nslope 3428 3426 write(str2(1:2),'(i2.2)') islope 3429 call WRITEDIAGFI(ngrid,'hdo_ice_s_slope'//str2,3427 call write_output('hdo_ice_s_slope'//str2, 3430 3428 & 'surface hdo_ice', 3431 & 'kg.m-2', 2,qsurf(1,igcm_hdo_ice,islope))3429 & 'kg.m-2',qsurf(:,igcm_hdo_ice,islope)) 3432 3430 ENDDO 3433 3431 … … 3441 3439 enddo 3442 3440 3443 call WRITEDIAGFI(ngrid,'DoH_surf',3441 call write_output('DoH_surf', 3444 3442 & 'surface D/H', 3445 & '', 2,DoH_surf)3443 & '',DoH_surf(:)) 3446 3444 endif ! hdo 3447 3445 3448 CALL WRITEDIAGFI(ngrid,'albedo',3446 CALL write_output('albedo', 3449 3447 & 'albedo', 3450 & '', 2,albedo(1,1,iflat))3448 & '',albedo(:,1,iflat)) 3451 3449 do islope=1,nslope 3452 3450 write(str2(1:2),'(i2.2)') islope 3453 CALL WRITEDIAGFI(ngrid,'albedo_slope'//str2,3451 CALL write_output('albedo_slope'//str2, 3454 3452 & 'albedo', 3455 & '', 2,albedo(1,1,islope))3453 & '',albedo(:,1,islope)) 3456 3454 ENDDO 3457 3455 if (tifeedback) then 3458 call WRITEDIAGSOIL(ngrid,"soiltemp",3456 call write_output("soiltemp", 3459 3457 & "Soil temperature","K", 3460 & 3,tsoil)3461 call WRITEDIAGSOIL(ngrid,'soilti',3458 & tsoil(:,:,iflat)) 3459 call write_output('soilti', 3462 3460 & 'Soil Thermal Inertia', 3463 & 'J.s-1/2.m-2.K-1', 3,inertiesoil(:,:,iflat))3461 & 'J.s-1/2.m-2.K-1',inertiesoil(:,:,iflat)) 3464 3462 do islope=1,nslope 3465 3463 write(str2(1:2),'(i2.2)') islope 3466 call WRITEDIAGSOIL(ngrid,'soilti_slope'//str2,3464 call write_output('soilti_slope'//str2, 3467 3465 & 'Soil Thermal Inertia', 3468 & 'J.s-1/2.m-2.K-1', 3,inertiesoil(:,:,islope))3466 & 'J.s-1/2.m-2.K-1',inertiesoil(:,:,islope)) 3469 3467 ENDDO 3470 3468 endif 3471 3469 !A. Pottier 3472 3470 if (CLFvarying) then !AP14 nebulosity 3473 call WRITEDIAGFI(ngrid,'totcloudfrac',3471 call write_output('totcloudfrac', 3474 3472 & 'Total cloud fraction', 3475 & ' ', 2,totcloudfrac)3473 & ' ',totcloudfrac(:)) 3476 3474 end if !clf varying 3477 3475 end if !(water) … … 3481 3479 c ---------------------------------------------------------- 3482 3480 3483 call WRITEDIAGFI(ngrid,'tau_pref_scenario',3481 call write_output('tau_pref_scenario', 3484 3482 & 'Prescribed visible dust optical depth at 610Pa', 3485 & 'NU', 2,tau_pref_scenario)3486 3487 call WRITEDIAGFI(ngrid,'tau_pref_gcm',3483 & 'NU',tau_pref_scenario(:)) 3484 3485 call write_output('tau_pref_gcm', 3488 3486 & 'Visible dust optical depth at 610Pa in the GCM', 3489 & 'NU', 2,tau_pref_gcm)3487 & 'NU',tau_pref_gcm(:)) 3490 3488 3491 3489 if (reff_driven_IRtoVIS_scenario) then 3492 call WRITEDIAGFI(ngrid,'IRtoVIScoef',3490 call write_output('IRtoVIScoef', 3493 3491 & 'conversion coeff for dust tau from abs9.3um to ext0.67um', 3494 & '/', 2,IRtoVIScoef)3492 & '/',IRtoVIScoef(:)) 3495 3493 endif 3496 3494 3497 3495 if (dustbin.ne.0) then 3498 3496 3499 call WRITEDIAGFI(ngrid,'tau','taudust','SI',2,tau(1,1))3497 call write_output('tau','taudust','SI',tau(:,1)) 3500 3498 3501 3499 #ifndef MESOINI 3502 3500 if (doubleq) then 3503 call WRITEDIAGFI(ngrid,'dqsdust',3501 call write_output('dqsdust', 3504 3502 & 'deposited surface dust mass', 3505 & 'kg.m-2.s-1', 2,dqdustsurf)3506 call WRITEDIAGFI(ngrid,'dqndust',3503 & 'kg.m-2.s-1',dqdustsurf(:)) 3504 call write_output('dqndust', 3507 3505 & 'deposited surface dust number', 3508 & 'number.m-2.s-1', 2,dndustsurf)3509 call WRITEDIAGFI(ngrid,'reffdust','reffdust',3510 & 'm', 3,rdust*ref_r0)3511 call WRITEDIAGFI(ngrid,'dustq','Dust mass mr',3512 & 'kg/kg', 3,qdust)3513 call WRITEDIAGFI(ngrid,'dustN','Dust number',3514 & 'part/kg', 3,ndust)3506 & 'number.m-2.s-1',dndustsurf(:)) 3507 call write_output('reffdust','reffdust', 3508 & 'm',rdust(:,:)*ref_r0) 3509 call write_output('dustq','Dust mass mr', 3510 & 'kg/kg',qdust(:,:)) 3511 call write_output('dustN','Dust number', 3512 & 'part/kg',ndust(:,:)) 3515 3513 3516 3514 select case (trim(dustiropacity)) 3517 3515 case ("tes") 3518 call WRITEDIAGFI(ngrid,'dsodust',3516 call write_output('dsodust', 3519 3517 & 'density scaled extinction opacity of std dust at 9.3um(TES)', 3520 & 'm2.kg-1', 3,dsodust)3521 call WRITEDIAGFI(ngrid,'dso',3518 & 'm2.kg-1',dsodust(:,:)) 3519 call write_output('dso', 3522 3520 & 'density scaled extinction opacity of all dust at 9.3um(TES)', 3523 & 'm2.kg-1', 3,dsodust+dsords+dsotop)3521 & 'm2.kg-1',dsodust(:,:)+dsords(:,:)+dsotop(:,:)) 3524 3522 case ("mcs") 3525 call WRITEDIAGFI(ngrid,'dsodust',3523 call write_output('dsodust', 3526 3524 & 'density scaled extinction opacity of std dust at 21.6um(MCS)', 3527 & 'm2.kg-1', 3,dsodust)3528 call WRITEDIAGFI(ngrid,'dso',3525 & 'm2.kg-1',dsodust(:,:)) 3526 call write_output('dso', 3529 3527 & 'density scaled extinction opacity of all dust at 21.6um(MCS)', 3530 & 'm2.kg-1', 3,dsodust+dsords+dsotop)3528 & 'm2.kg-1',dsodust(:,:)+dsords(:,:)+dsotop(:,:)) 3531 3529 end select 3532 3530 else ! (doubleq=.false.) 3533 3531 do iq=1,dustbin 3534 3532 write(str2(1:2),'(i2.2)') iq 3535 call WRITEDIAGFI(ngrid,'q'//str2,'mix. ratio',3536 & 'kg/kg', 3,zq(1,1,iq))3537 call WRITEDIAGFI(ngrid,'qsurf'//str2,'qsurf',3538 & 'kg.m-2', 2,qsurf(1,iq,iflat))3533 call write_output('q'//str2,'mix. ratio', 3534 & 'kg/kg',zq(:,:,iq)) 3535 call write_output('qsurf'//str2,'qsurf', 3536 & 'kg.m-2',qsurf(:,iq,iflat)) 3539 3537 do islope=1,nslope 3540 3538 write(str2(1:2),'(i2.2)') islope 3541 call WRITEDIAGFI(ngrid,'qsurf_slope'//str2,'qsurf',3542 & 'kg.m-2', 2,qsurf(1,iq,islope))3539 call write_output('qsurf_slope'//str2,'qsurf', 3540 & 'kg.m-2',qsurf(:,iq,islope)) 3543 3541 ENDDO 3544 3542 end do … … 3546 3544 3547 3545 if (rdstorm) then ! writediagfi tendencies stormdust tracers 3548 call WRITEDIAGFI(ngrid,'reffstormdust','reffstormdust',3549 & 'm', 3,rstormdust*ref_r0)3550 call WRITEDIAGFI(ngrid,'mstormdtot',3546 call write_output('reffstormdust','reffstormdust', 3547 & 'm',rstormdust(:,:)*ref_r0) 3548 call write_output('mstormdtot', 3551 3549 & 'total mass of stormdust only', 3552 & 'kg.m-2', 2,mstormdtot)3553 call WRITEDIAGFI(ngrid,'mdusttot',3550 & 'kg.m-2',mstormdtot(:)) 3551 call write_output('mdusttot', 3554 3552 & 'total mass of dust only', 3555 & 'kg.m-2', 2,mdusttot)3556 call WRITEDIAGFI(ngrid,'rdsdqsdust',3553 & 'kg.m-2',mdusttot(:)) 3554 call write_output('rdsdqsdust', 3557 3555 & 'deposited surface stormdust mass', 3558 & 'kg.m-2.s-1', 2,rdsdqdustsurf)3559 call WRITEDIAGFI(ngrid,'rdsdustq','storm Dust mass mr',3560 & 'kg/kg', 3,rdsqdust)3561 call WRITEDIAGFI(ngrid,'rdsdustqmodel','storm Dust massmr',3562 & 'kg/kg', 3,pq(:,:,igcm_stormdust_mass))3563 call WRITEDIAGFI(ngrid,'rdsdustN','storm Dust number',3564 & 'part/kg', 3,rdsndust)3565 call WRITEDIAGFI(ngrid,"stormfract",3556 & 'kg.m-2.s-1',rdsdqdustsurf(:)) 3557 call write_output('rdsdustq','storm Dust mass mr', 3558 & 'kg/kg',rdsqdust(:,:)) 3559 call write_output('rdsdustqmodel','storm Dust massmr', 3560 & 'kg/kg',pq(:,:,igcm_stormdust_mass)) 3561 call write_output('rdsdustN','storm Dust number', 3562 & 'part/kg',rdsndust(:,:)) 3563 call write_output("stormfract", 3566 3564 & "fraction of the mesh, with stormdust","none", 3567 & 2,totstormfract)3568 call WRITEDIAGFI(ngrid,'qsurf',3565 & totstormfract(:)) 3566 call write_output('qsurf', 3569 3567 & 'stormdust injection', 3570 & 'kg.m-2', 2,qsurf(:,igcm_stormdust_mass,iflat))3568 & 'kg.m-2',qsurf(:,igcm_stormdust_mass,iflat)) 3571 3569 do islope=1,nslope 3572 3570 write(str2(1:2),'(i2.2)') islope 3573 call WRITEDIAGFI(ngrid,'qsurf_slope'//str2,3571 call write_output('qsurf_slope'//str2, 3574 3572 & 'stormdust injection', 3575 & 'kg.m-2', 2,qsurf(:,igcm_stormdust_mass,islope))3573 & 'kg.m-2',qsurf(:,igcm_stormdust_mass,islope)) 3576 3574 ENDDO 3577 call WRITEDIAGFI(ngrid,'pdqsurf',3575 call write_output('pdqsurf', 3578 3576 & 'tendancy stormdust mass at surface', 3579 & 'kg.m-2', 2,dqsurf(:,igcm_stormdust_mass,iflat))3577 & 'kg.m-2',dqsurf(:,igcm_stormdust_mass,iflat)) 3580 3578 do islope=1,nslope 3581 3579 write(str2(1:2),'(i2.2)') islope 3582 call WRITEDIAGFI(ngrid,'pdqsurf_slope'//str2,3580 call write_output('pdqsurf_slope'//str2, 3583 3581 & 'tendancy stormdust mass at surface', 3584 & 'kg.m-2', 2,dqsurf(:,igcm_stormdust_mass,islope))3582 & 'kg.m-2',dqsurf(:,igcm_stormdust_mass,islope)) 3585 3583 ENDDO 3586 call WRITEDIAGFI(ngrid,'wspeed','vertical speed stormdust',3587 & 'm/s', 3,wspeed(:,1:nlayer))3588 call WRITEDIAGFI(ngrid,'zdqsed_dustq'3589 & ,'sedimentation q','kg.m-2.s-1', 3,3584 call write_output('wspeed','vertical speed stormdust', 3585 & 'm/s',wspeed(:,:)) 3586 call write_output('zdqsed_dustq' 3587 & ,'sedimentation q','kg.m-2.s-1', 3590 3588 & zdqsed(:,:,igcm_dust_mass)) 3591 call WRITEDIAGFI(ngrid,'zdqssed_dustq'3592 & ,'sedimentation q','kg.m-2.s-1', 2,3589 call write_output('zdqssed_dustq' 3590 & ,'sedimentation q','kg.m-2.s-1', 3593 3591 & zdqssed(:,igcm_dust_mass)) 3594 call WRITEDIAGFI(ngrid,'zdqsed_rdsq'3595 & ,'sedimentation q','kg.m-2.s-1', 3,3592 call write_output('zdqsed_rdsq' 3593 & ,'sedimentation q','kg.m-2.s-1', 3596 3594 & zdqsed(:,:,igcm_stormdust_mass)) 3597 call WRITEDIAGFI(ngrid,'zdqsed_dustN'3598 & ,'sedimentation N','Nbr.m-2.s-1', 3,3595 call write_output('zdqsed_dustN' 3596 & ,'sedimentation N','Nbr.m-2.s-1', 3599 3597 & zdqsed(:,:,igcm_dust_number)) 3600 call WRITEDIAGFI(ngrid,'rdust','rdust',3601 & 'm', 3,rdust)3602 call WRITEDIAGFI(ngrid,'rstormdust','rstormdust',3603 & 'm', 3,rstormdust)3604 call WRITEDIAGFI(ngrid,'totaldustq','total dust mass',3605 & 'kg/kg', 3,qdusttotal)3598 call write_output('rdust','rdust', 3599 & 'm',rdust(:,:)) 3600 call write_output('rstormdust','rstormdust', 3601 & 'm',rstormdust(:,:)) 3602 call write_output('totaldustq','total dust mass', 3603 & 'kg/kg',qdusttotal(:,:)) 3606 3604 3607 3605 select case (trim(dustiropacity)) 3608 3606 case ("tes") 3609 call WRITEDIAGFI(ngrid,'dsords',3607 call write_output('dsords', 3610 3608 & 'density scaled extinction opacity of stormdust at 9.3um(TES)', 3611 & 'm2.kg-1', 3,dsords)3609 & 'm2.kg-1',dsords(:,:)) 3612 3610 case ("mcs") 3613 call WRITEDIAGFI(ngrid,'dsords',3611 call write_output('dsords', 3614 3612 & 'density scaled extinction opacity of stormdust at 21.6um(MCS)', 3615 & 'm2.kg-1', 3,dsords)3613 & 'm2.kg-1',dsords(:,:)) 3616 3614 end select 3617 3615 endif ! (rdstorm) 3618 3616 3619 3617 if (topflows) then 3620 call WRITEDIAGFI(ngrid,'refftopdust','refftopdust',3621 & 'm', 3,rtopdust*ref_r0)3622 call WRITEDIAGFI(ngrid,'topdustq','top Dust mass mr',3623 & 'kg/kg', 3,pq(:,:,igcm_topdust_mass))3624 call WRITEDIAGFI(ngrid,'topdustN','top Dust number',3625 & 'part/kg', 3,pq(:,:,igcm_topdust_number))3618 call write_output('refftopdust','refftopdust', 3619 & 'm',rtopdust(:,:)*ref_r0) 3620 call write_output('topdustq','top Dust mass mr', 3621 & 'kg/kg',pq(:,:,igcm_topdust_mass)) 3622 call write_output('topdustN','top Dust number', 3623 & 'part/kg',pq(:,:,igcm_topdust_number)) 3626 3624 select case (trim(dustiropacity)) 3627 3625 case ("tes") 3628 call WRITEDIAGFI(ngrid,'dsotop',3626 call write_output('dsotop', 3629 3627 & 'density scaled extinction opacity of topdust at 9.3um(TES)', 3630 & 'm2.kg-1', 3,dsotop)3628 & 'm2.kg-1',dsotop(:,:)) 3631 3629 case ("mcs") 3632 call WRITEDIAGFI(ngrid,'dsotop',3630 call write_output('dsotop', 3633 3631 & 'density scaled extinction opacity of topdust at 21.6um(MCS)', 3634 & 'm2.kg-1', 3,dsotop)3632 & 'm2.kg-1',dsotop(:,:)) 3635 3633 end select 3636 3634 endif ! (topflows) 3637 3635 3638 3636 if (dustscaling_mode==2) then 3639 call write diagfi(ngrid,"dust_rad_adjust",3637 call write_output("dust_rad_adjust", 3640 3638 & "radiative adjustment coefficient for dust", 3641 & "", 2,dust_rad_adjust)3639 & "",dust_rad_adjust(:)) 3642 3640 endif 3643 3641 3644 3642 if (scavenging) then 3645 call WRITEDIAGFI(ngrid,'ccnq','CCN mass mr',3646 & 'kg/kg', 3,qccn)3647 call WRITEDIAGFI(ngrid,'ccnN','CCN number',3648 & 'part/kg', 3,nccn)3649 call WRITEDIAGFI(ngrid,'surfccnq','Surf nuclei mass mr',3650 & 'kg.m-2', 2,qsurf(1,igcm_ccn_mass,iflat))3643 call write_output('ccnq','CCN mass mr', 3644 & 'kg/kg',qccn(:,:)) 3645 call write_output('ccnN','CCN number', 3646 & 'part/kg',nccn(:,:)) 3647 call write_output('surfccnq','Surf nuclei mass mr', 3648 & 'kg.m-2',qsurf(:,igcm_ccn_mass,iflat)) 3651 3649 do islope=1,nslope 3652 3650 write(str2(1:2),'(i2.2)') islope 3653 call WRITEDIAGFI(ngrid,'surfccnq_slope'//str2,3651 call write_output('surfccnq_slope'//str2, 3654 3652 & 'Surf nuclei mass mr', 3655 & 'kg.m-2', 2,qsurf(1,igcm_ccn_mass,islope))3653 & 'kg.m-2',qsurf(:,igcm_ccn_mass,islope)) 3656 3654 ENDDO 3657 call WRITEDIAGFI(ngrid,'surfccnN','Surf nuclei number',3658 & 'kg.m-2', 2,qsurf(1,igcm_ccn_number,iflat))3655 call write_output('surfccnN','Surf nuclei number', 3656 & 'kg.m-2',qsurf(:,igcm_ccn_number,iflat)) 3659 3657 do islope=1,nslope 3660 3658 write(str2(1:2),'(i2.2)') islope 3661 call WRITEDIAGFI(ngrid,'surfccnN_slope'//str2,3659 call write_output('surfccnN_slope'//str2, 3662 3660 & 'Surf nuclei number', 3663 & 'kg.m-2', 2,qsurf(1,igcm_ccn_number,islope))3661 & 'kg.m-2',qsurf(:,igcm_ccn_number,islope)) 3664 3662 ENDDO 3665 3663 endif ! (scavenging) … … 3668 3666 ! !!! to initialize mesoscale we need scaled variables 3669 3667 ! !!! because this must correspond to starting point for tracers 3670 ! call WRITEDIAGFI(ngrid,'dustq','Dust mass mr',3668 ! call write_output('dustq','Dust mass mr', 3671 3669 ! & 'kg/kg',3,pq(1:ngrid,1:nlayer,igcm_dust_mass)) 3672 ! call WRITEDIAGFI(ngrid,'dustN','Dust number',3670 ! call write_output('dustN','Dust number', 3673 3671 ! & 'part/kg',3,pq(1:ngrid,1:nlayer,igcm_dust_number)) 3674 ! call WRITEDIAGFI(ngrid,'ccn','Nuclei mass mr',3672 ! call write_output('ccn','Nuclei mass mr', 3675 3673 ! & 'kg/kg',3,pq(1:ngrid,1:nlayer,igcm_ccn_mass)) 3676 ! call WRITEDIAGFI(ngrid,'ccnN','Nuclei number',3674 ! call write_output('ccnN','Nuclei number', 3677 3675 ! & 'part/kg',3,pq(1:ngrid,1:nlayer,igcm_ccn_number)) 3678 3676 if (freedust) then 3679 call WRITEDIAGFI(ngrid,'dustq','Dust mass mr',3680 & 'kg/kg', 3,qdust)3681 call WRITEDIAGFI(ngrid,'dustN','Dust number',3682 & 'part/kg', 3,ndust)3683 call WRITEDIAGFI(ngrid,'ccn','CCN mass mr',3684 & 'kg/kg', 3,qccn)3685 call WRITEDIAGFI(ngrid,'ccnN','CCN number',3686 & 'part/kg', 3,nccn)3677 call write_output('dustq','Dust mass mr', 3678 & 'kg/kg',qdust) 3679 call write_output('dustN','Dust number', 3680 & 'part/kg',ndust) 3681 call write_output('ccn','CCN mass mr', 3682 & 'kg/kg',qccn) 3683 call write_output('ccnN','CCN number', 3684 & 'part/kg',nccn) 3687 3685 else 3688 call WRITEDIAGFI(ngrid,'dustq','Dust mass mr',3689 & 'kg/kg', 3,pq(1,1,igcm_dust_mass))3690 call WRITEDIAGFI(ngrid,'dustN','Dust number',3691 & 'part/kg', 3,pq(1,1,igcm_dust_number))3692 call WRITEDIAGFI(ngrid,'ccn','Nuclei mass mr',3693 & 'kg/kg', 3,pq(1,1,igcm_ccn_mass))3694 call WRITEDIAGFI(ngrid,'ccnN','Nuclei number',3695 & 'part/kg', 3,pq(1,1,igcm_ccn_number))3686 call write_output('dustq','Dust mass mr', 3687 & 'kg/kg',pq(:,:,igcm_dust_mass)) 3688 call write_output('dustN','Dust number', 3689 & 'part/kg',pq(:,:,igcm_dust_number)) 3690 call write_output('ccn','Nuclei mass mr', 3691 & 'kg/kg',pq(:,:,igcm_ccn_mass)) 3692 call write_output('ccnN','Nuclei number', 3693 & 'part/kg',pq(:,:,igcm_ccn_number)) 3696 3694 endif 3697 3695 #endif … … 3704 3702 3705 3703 if(calllott_nonoro) then 3706 call WRITEDIAGFI(ngrid,"dugwno","GW non-oro dU","m/s2",3707 $ 3,d_u_hin/ptimestep)3708 call WRITEDIAGFI(ngrid,"dvgwno","GW non-oro dV","m/s2",3709 $ 3,d_v_hin/ptimestep)3704 call write_output("dugwno","GW non-oro dU","m/s2", 3705 $ d_u_hin(:,:)/ptimestep) 3706 call write_output("dvgwno","GW non-oro dV","m/s2", 3707 $ d_v_hin(:,:)/ptimestep) 3710 3708 endif !(calllott_nonoro) 3711 3709 … … 3716 3714 if(callthermos) then 3717 3715 3718 call WRITEDIAGFI(ngrid,"q15um","15 um cooling","K/s",3719 $ 3,zdtnlte)3720 call WRITEDIAGFI(ngrid,"quv","UV heating","K/s",3721 $ 3,zdteuv)3722 call WRITEDIAGFI(ngrid,"cond","Thermal conduction","K/s",3723 $ 3,zdtconduc)3724 call WRITEDIAGFI(ngrid,"qnir","NIR heating","K/s",3725 $ 3,zdtnirco2)3716 call write_output("q15um","15 um cooling","K/s", 3717 $ zdtnlte(:,:)) 3718 call write_output("quv","UV heating","K/s", 3719 $ zdteuv(:,:)) 3720 call write_output("cond","Thermal conduction","K/s", 3721 $ zdtconduc(:,:)) 3722 call write_output("qnir","NIR heating","K/s", 3723 $ zdtnirco2(:,:)) 3726 3724 3727 3725 !H, H2 and D escape fluxes 3728 3726 3729 call WRITEDIAGFI(ngrid,"PhiH","H escape flux","s-1",3730 $ 0,[PhiEscH])3731 call WRITEDIAGFI(ngrid,"PhiH2","H2 escape flux","s-1",3732 $ 0,[PhiEscH2])3733 call WRITEDIAGFI(ngrid,"PhiD","D escape flux","s-1",3734 $ 0,[PhiEscD])3727 call write_output("PhiH","H escape flux","s-1", 3728 $ PhiEscH) 3729 call write_output("PhiH2","H2 escape flux","s-1", 3730 $ PhiEscH2) 3731 call write_output("PhiD","D escape flux","s-1", 3732 $ PhiEscD) 3735 3733 3736 3734 endif !(callthermos) 3737 3735 3738 call WRITEDIAGFI(ngrid,"q15um","15 um cooling","K/s",3739 $ 3,zdtnlte)3740 call WRITEDIAGFI(ngrid,"qnir","NIR heating","K/s",3741 $ 3,zdtnirco2)3736 call write_output("q15um","15 um cooling","K/s", 3737 $ zdtnlte(:,:)) 3738 call write_output("qnir","NIR heating","K/s", 3739 $ zdtnirco2(:,:)) 3742 3740 3743 3741 c ---------------------------------------------------------- … … 3751 3749 c ---------------------------------------------------------- 3752 3750 if (calltherm) then 3753 call WRITEDIAGFI(ngrid,'lmax_th',3751 call write_output('lmax_th', 3754 3752 & 'hauteur du thermique','point', 3755 & 2,lmax_th_out)3756 call WRITEDIAGFI(ngrid,'zmax_th',3753 & lmax_th_out(:)) 3754 call write_output('zmax_th', 3757 3755 & 'hauteur du thermique','m', 3758 & 2,zmax_th)3759 call WRITEDIAGFI(ngrid,'hfmax_th',3756 & zmax_th(:)) 3757 call write_output('hfmax_th', 3760 3758 & 'maximum TH heat flux','K.m/s', 3761 & 2,hfmax_th)3762 call WRITEDIAGFI(ngrid,'wstar',3759 & hfmax_th(:)) 3760 call write_output('wstar', 3763 3761 & 'maximum TH vertical velocity','m/s', 3764 & 2,wstar)3762 & wstar(:)) 3765 3763 end if 3766 3764 … … 3778 3776 3779 3777 ! Write soil temperature 3780 call write diagsoil(ngrid,"soiltemp","Soil temperature","K",3781 & 3,tsoil(:,:,iflat))3778 call write_output("soiltemp","Soil temperature","K", 3779 & tsoil(:,:,iflat)) 3782 3780 do islope=1,nslope 3783 3781 write(str2(1:2),'(i2.2)') islope 3784 call write diagsoil(ngrid,"soiltemp_slope"//str2,3782 call write_output("soiltemp_slope"//str2, 3785 3783 & "Soil temperature","K", 3786 & 3,tsoil(:,:,islope))3784 & tsoil(:,:,islope)) 3787 3785 ENDDO 3788 3786 3789 3787 !PREVIOUSLY IN 1D ONLY 3790 call WRITEDIAGFI(ngrid,"dtrad","rad. heat. rate",3791 & "K.s-1", 3,dtrad)3788 call write_output("dtrad","rad. heat. rate", 3789 & "K.s-1",dtrad(:,:)) 3792 3790 3793 3791 if (rdstorm) then 3794 call write diagfi(1,'aerosol_dust','opacity of env. dust',''3795 & , 3,aerosol(:,:,iaer_dust_doubleq))3796 call write diagfi(1,'aerosol_stormdust',3792 call write_output('aerosol_dust','opacity of env. dust','' 3793 & ,aerosol(:,:,iaer_dust_doubleq)) 3794 call write_output('aerosol_stormdust', 3797 3795 & 'opacity of storm dust','' 3798 & , 3,aerosol(:,:,iaer_stormdust_doubleq))3799 call WRITEDIAGFI(ngrid,'dqsdifdustq','diffusion',3800 & 'kg.m-2.s-1', 2,zdqsdif(:,igcm_dust_mass,iflat))3796 & ,aerosol(:,:,iaer_stormdust_doubleq)) 3797 call write_output('dqsdifdustq','diffusion', 3798 & 'kg.m-2.s-1',zdqsdif(:,igcm_dust_mass,iflat)) 3801 3799 do islope=1,nslope 3802 3800 write(str2(1:2),'(i2.2)') islope 3803 call WRITEDIAGFI(ngrid,'dqsdifdustq_slope'//str2,3801 call write_output('dqsdifdustq_slope'//str2, 3804 3802 & 'diffusion', 3805 & 'kg.m-2.s-1', 2,zdqsdif(:,igcm_dust_mass,islope))3803 & 'kg.m-2.s-1',zdqsdif(:,igcm_dust_mass,islope)) 3806 3804 ENDDO 3807 call WRITEDIAGFI(ngrid,'dqsdifrdsq','diffusion',3808 & 'kg.m-2.s-1', 2,zdqsdif(:,igcm_stormdust_mass,iflat))3805 call write_output('dqsdifrdsq','diffusion', 3806 & 'kg.m-2.s-1',zdqsdif(:,igcm_stormdust_mass,iflat)) 3809 3807 do islope=1,nslope 3810 3808 write(str2(1:2),'(i2.2)') islope 3811 call WRITEDIAGFI(ngrid,'dqsdifrdsq_slope'//str2,3809 call write_output('dqsdifrdsq_slope'//str2, 3812 3810 & 'diffusion', 3813 & 'kg.m-2.s-1', 2,zdqsdif(:,igcm_stormdust_mass,islope))3811 & 'kg.m-2.s-1',zdqsdif(:,igcm_stormdust_mass,islope)) 3814 3812 ENDDO 3815 3813 endif !(rdstorm) … … 3817 3815 if(water) then 3818 3816 if (.not.scavenging) then 3819 call WRITEDIAGFI(ngrid,'zdqcloud_ice','cloud ice',3820 & 'kg.m-2.s-1', 1,zdqcloud(1,:,igcm_h2o_ice))3821 call WRITEDIAGFI(ngrid,'zdqcloud_vap','cloud vap',3822 & 'kg.m-2.s-1', 1,zdqcloud(1,:,igcm_h2o_vap))3823 call WRITEDIAGFI(ngrid,'zdqcloud','cloud ice',3824 & 'kg.m-2.s-1', 1,zdqcloud(1,:,igcm_h2o_ice)3825 & +zdqcloud( 1,:,igcm_h2o_vap))3817 call write_output('zdqcloud_ice','cloud ice', 3818 & 'kg.m-2.s-1',zdqcloud(:,:,igcm_h2o_ice)) 3819 call write_output('zdqcloud_vap','cloud vap', 3820 & 'kg.m-2.s-1',zdqcloud(:,:,igcm_h2o_vap)) 3821 call write_output('zdqcloud','cloud ice', 3822 & 'kg.m-2.s-1',zdqcloud(:,:,igcm_h2o_ice) 3823 & +zdqcloud(:,:,igcm_h2o_vap)) 3826 3824 IF (hdo) THEN 3827 call WRITEDIAGFI(ngrid,'zdqcloud_iceD','cloud ice hdo',3828 & 'kg.m-2.s-1', 1,zdqcloud(1,:,igcm_hdo_ice))3829 call WRITEDIAGFI(ngrid,'zdqcloud_vapD','cloud vap hdo',3830 & 'kg.m-2.s-1', 1,zdqcloud(1,:,igcm_hdo_vap))3825 call write_output('zdqcloud_iceD','cloud ice hdo', 3826 & 'kg.m-2.s-1',zdqcloud(:,:,igcm_hdo_ice)) 3827 call write_output('zdqcloud_vapD','cloud vap hdo', 3828 & 'kg.m-2.s-1',zdqcloud(:,:,igcm_hdo_vap)) 3831 3829 ENDIF ! hdo 3832 3830 endif !not.scavenging … … 3873 3871 endif ! of if (igcm_co2_ice.ne.0) 3874 3872 co2conservation = (co2totA-co2totB)/co2totA 3875 call WRITEDIAGFI(ngrid,'co2conservation',3873 call write_output( 'co2conservation', 3876 3874 & 'Total CO2 mass conservation in physic', 3877 & ' ', 0,co2conservation)3875 & ' ', co2conservation) 3878 3876 ! XIOS outputs 3879 3877 #ifdef CPP_XIOS -
trunk/LMDZ.MARS/libf/phymars/rocketduststorm_mod.F90
r2826 r2932 44 44 USE surfdat_h, only: emis,zmea, zstd, zsig, hmons 45 45 USE callradite_mod, only: callradite 46 use write_output_mod, only: write_output 46 47 IMPLICIT NONE 47 48 … … 525 526 ! WRITEDIAGFI 526 527 527 call WRITEDIAGFI(ngrid,'lapserate','lapse rate in the storm', &528 & 'k/m', 3,lapserate)529 call WRITEDIAGFI(ngrid,'deltahr','extra heating rates', &530 & 'K/s', 3,deltahr)531 call write diagfi(ngrid,'scheme','which scheme',&532 ' ', 2,real(scheme))528 call write_output('lapserate','lapse rate in the storm', & 529 & 'k/m',lapserate(:,:)) 530 call write_output('deltahr','extra heating rates', & 531 & 'K/s',deltahr(:,:)) 532 call write_output('scheme','which scheme',& 533 ' ',real(scheme(:))) 533 534 534 535 END SUBROUTINE rocketduststorm -
trunk/LMDZ.MARS/libf/phymars/topmons_mod.F90
r2931 r2932 42 42 hsummit,contains_mons 43 43 USE callradite_mod, only: callradite 44 use write_output_mod, only: write_output 44 45 45 46 IMPLICIT NONE … … 642 643 ! WRITEDIAGFI 643 644 ! ********************************************************************** 644 CALL WRITEDIAGFI(ngrid,'wup_top', &645 'wup_top','', 3,wup(:,:))646 CALL WRITEDIAGFI(ngrid,'wlwmax_top', &647 'wlwmax_top','', 2,wup(:,lwmax(1)))648 CALL WRITEDIAGFI(ngrid,'w0_top', &649 'w0_top','', 2,wup(:,lsummit(1)+1))650 CALL WRITEDIAGFI(ngrid,'wup2_top', &651 'wup2_top','', 3,wup2(:,:))652 CALL WRITEDIAGFI(ngrid,'wrad_top', &653 'wrad_top','', 3,wrad(:,:))654 CALL WRITEDIAGFI(ngrid,'wfin_top', &655 'wfin_top','', 3,wfin(:,:))656 CALL WRITEDIAGFI(ngrid,'hmons', &657 'hmons','', 2,hmons)658 CALL WRITEDIAGFI(ngrid,'hsummit', &659 'hsummit','', 2,hsummit)660 CALL WRITEDIAGFI(ngrid,'alpha_hmons', &661 'alpha_hmons','', 2,alpha_hmons)662 CALL WRITEDIAGFI(ngrid,'zt_top', &663 'zt_top','', 3,t_top(:,:))664 CALL WRITEDIAGFI(ngrid,'dt_top', &665 'dt_top','', 2,dt_top(:))666 CALL WRITEDIAGFI(ngrid,'ztemp', &667 'envtemp','', 3,zt(:,:))668 CALL WRITEDIAGFI(ngrid,'zt_env', &669 't_env','', 3,t_env(:,:))670 CALL WRITEDIAGFI(ngrid,'zdtvert_top', &671 'zdtvert_top','', 3,zdtvert(:,:))672 CALL WRITEDIAGFI(ngrid,'newzt_top', &673 'newzt_top','', 3,newzt(:,:))674 CALL WRITEDIAGFI(ngrid,'deltahr_top', &675 'deltahr_top','', 3,deltahr(:,:))676 CALL WRITEDIAGFI(ngrid,'rhobarz', &677 'rhobarz','', 3,rhobarz(:,:))678 CALL WRITEDIAGFI(ngrid,'zlwmax', &679 'zlwmax','', 2,zlaywmax(:))680 CALL WRITEDIAGFI(ngrid,'coefdetrain', &681 'coefdetrain','', 3,coefdetrain(:,:))682 CALL WRITEDIAGFI(ngrid,'detrain_rate', &645 CALL write_output('wup_top', & 646 'wup_top','',wup(:,:)) 647 CALL write_output('wlwmax_top', & 648 'wlwmax_top','',wup(:,lwmax(1))) 649 CALL write_output('w0_top', & 650 'w0_top','',wup(:,lsummit(1)+1)) 651 CALL write_output('wup2_top', & 652 'wup2_top','',wup2(:,:)) 653 CALL write_output('wrad_top', & 654 'wrad_top','',wrad(:,:)) 655 CALL write_output('wfin_top', & 656 'wfin_top','',wfin(:,:)) 657 CALL write_output('hmons', & 658 'hmons','',hmons(:)) 659 CALL write_output('hsummit', & 660 'hsummit','',hsummit(:)) 661 CALL write_output('alpha_hmons', & 662 'alpha_hmons','',alpha_hmons(:)) 663 CALL write_output('zt_top', & 664 'zt_top','',t_top(:,:)) 665 CALL write_output('dt_top', & 666 'dt_top','',dt_top(:)) 667 CALL write_output('ztemp', & 668 'envtemp','',zt(:,:)) 669 CALL write_output('zt_env', & 670 't_env','',t_env(:,:)) 671 CALL write_output('zdtvert_top', & 672 'zdtvert_top','',zdtvert(:,:)) 673 CALL write_output('newzt_top', & 674 'newzt_top','',newzt(:,:)) 675 CALL write_output('deltahr_top', & 676 'deltahr_top','',deltahr(:,:)) 677 CALL write_output('rhobarz', & 678 'rhobarz','',rhobarz(:,:)) 679 CALL write_output('zlwmax', & 680 'zlwmax','',zlaywmax(:)) 681 CALL write_output('coefdetrain', & 682 'coefdetrain','',coefdetrain(:,:)) 683 CALL write_output('detrain_rate', & 683 684 'detrain_rate', & 684 '', 3,detrain_rate(:,:))685 CALL WRITEDIAGFI(ngrid,'rholev', &686 'rholev','', 3,rho(:,:))687 CALL WRITEDIAGFI(ngrid,'zlsummit', &688 'zlsummit','', 2,pzlay(:,lsummit(1)))689 CALL WRITEDIAGFI(ngrid,'pzlev_top', &690 'pzlev_top','', 3,pzlev(:,:))691 CALL WRITEDIAGFI(ngrid,'entr', &692 'entr','', 2,entr(:))685 '',detrain_rate(:,:)) 686 CALL write_output('rholev', & 687 'rholev','',rho(:,:)) 688 CALL write_output('zlsummit', & 689 'zlsummit','',pzlay(:,lsummit(1))) 690 CALL write_output('pzlev_top', & 691 'pzlev_top','',pzlev(:,:)) 692 CALL write_output('entr', & 693 'entr','',entr(:)) 693 694 694 695 END SUBROUTINE topmons -
trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F
r2840 r2932 28 28 c use geometry_mod, only: longitude_deg,latitude_deg ! Joseph 29 29 use dust_param_mod, only: doubleq, submicron, lifting 30 use write_output_mod, only: write_output 30 31 31 32 IMPLICIT NONE … … 395 396 ! Some usefull diagnostics for the new surface layer parametrization : 396 397 397 ! call WRITEDIAGFI(ngrid,'vdifc_zcdv_true',398 ! call write_output('vdifc_zcdv_true', 398 399 ! & 'momentum drag','no units', 399 ! & 2,zcdv_true)400 ! call WRITEDIAGFI(ngrid,'vdifc_zcdh_true',400 ! & zcdv_true(:)) 401 ! call write_output('vdifc_zcdh_true', 401 402 ! & 'heat drag','no units', 402 ! & 2,zcdh_true)403 ! call WRITEDIAGFI(ngrid,'vdifc_ust',404 ! & 'friction velocity','m/s', 2,ust)405 ! call WRITEDIAGFI(ngrid,'vdifc_tst',406 ! & 'friction temperature','K', 2,tst)407 ! call WRITEDIAGFI(ngrid,'vdifc_zcdv',403 ! & zcdh_true(:)) 404 ! call write_output('vdifc_ust', 405 ! & 'friction velocity','m/s',ust(:)) 406 ! call write_output('vdifc_tst', 407 ! & 'friction temperature','K',tst(:)) 408 ! call write_output('vdifc_zcdv', 408 409 ! & 'aerodyn momentum conductance','m/s', 409 ! & 2,zcdv)410 ! call WRITEDIAGFI(ngrid,'vdifc_zcdh',410 ! & zcdv(:)) 411 ! call write_output('vdifc_zcdh', 411 412 ! & 'aerodyn heat conductance','m/s', 412 ! & 2,zcdh)413 ! & zcdh(:)) 413 414 414 415 c ** schema de diffusion turbulente dans la couche limite … … 1057 1058 c --------- end of tracers ---------------------------- 1058 1059 1059 call WRITEDIAGFI(ngrid,"surf_h2o_lh",1060 call write_output("surf_h2o_lh", 1060 1061 & "Ground ice latent heat flux", 1061 & "W.m-2", 2,surf_h2o_lh(:))1062 & "W.m-2",surf_h2o_lh(:)) 1062 1063 1063 1064 C Diagnostic output for HDO 1064 1065 if (hdo) then 1065 CALL WRITEDIAGFI(ngrid,'hdoflux',1066 CALL write_output('hdoflux', 1066 1067 & 'hdoflux', 1067 & ' ', 2,hdoflux)1068 CALL WRITEDIAGFI(ngrid,'h2oflux',1068 & ' ',hdoflux(:)) 1069 CALL write_output('h2oflux', 1069 1070 & 'h2oflux', 1070 & ' ', 2,h2oflux)1071 & ' ',h2oflux(:)) 1071 1072 endif 1072 1073 -
trunk/LMDZ.MARS/libf/phymars/watercloud_mod.F
r2801 r2932 27 27 & qperemin 28 28 use dimradmars_mod, only: naerkind 29 use write_output_mod, only: write_output 29 30 IMPLICIT NONE 30 31 … … 268 269 & cloudfrac(:,:) 269 270 !! CLFvarying outputs 270 CALL WRITEDIAGFI(ngrid,'pqeffice','pqeffice',271 & 'kg/kg', 3,pqeff(:,:,igcm_h2o_ice))272 CALL WRITEDIAGFI(ngrid,'pteff','pteff',273 & 'K', 3,pteff(:,:))274 CALL WRITEDIAGFI(ngrid,'tcond','tcond',275 & 'K', 3,tcond(:,:))276 CALL WRITEDIAGFI(ngrid,'cloudfrac','cloudfrac',277 & 'K', 3,cloudfrac(:,:))271 CALL write_output('pqeffice','pqeffice', 272 & 'kg/kg',pqeff(:,:,igcm_h2o_ice)) 273 CALL write_output('pteff','pteff', 274 & 'K',pteff(:,:)) 275 CALL write_output('tcond','tcond', 276 & 'K',tcond(:,:)) 277 CALL write_output('cloudfrac','cloudfrac', 278 & 'K',cloudfrac(:,:)) 278 279 END IF ! end if (CLFvarying) 279 280 c------------------------------------------------------------------ … … 713 714 #ifndef MESOSCALE 714 715 c======================================================================= 715 call WRITEDIAGFI(ngrid,"pdqice2","pdqcloudice apres microphysique"716 & ,"kg/kg.s-1", 3,pdqcloud(1:ngrid,1:nlay,igcm_h2o_ice))717 call WRITEDIAGFI(ngrid,"pdqvap2","pdqcloudvap apres microphysique"718 & ,"kg/kg.s-1", 3,pdqcloud(1:ngrid,1:nlay,716 call write_output("pdqice2","pdqcloudice apres microphysique" 717 & ,"kg/kg.s-1",pdqcloud(:,:,igcm_h2o_ice)) 718 call write_output("pdqvap2","pdqcloudvap apres microphysique" 719 & ,"kg/kg.s-1",pdqcloud(:,:, 719 720 & igcm_h2o_vap)) 720 721 if (hdo) then 721 call WRITEDIAGFI(ngrid,"pdqiceD","pdqiceD apres microphysique"722 & ,"kg/kg.s-1", 3,pdqcloud(1:ngrid,1:nlay,igcm_hdo_ice))723 call WRITEDIAGFI(ngrid,"pdqvapD","pdqvapD apres microphysique"724 & ,"kg/kg.s-1", 3,pdqcloud(1:ngrid,1:nlay,722 call write_output("pdqiceD","pdqiceD apres microphysique" 723 & ,"kg/kg.s-1",pdqcloud(:,:,igcm_hdo_ice)) 724 call write_output("pdqvapD","pdqvapD apres microphysique" 725 & ,"kg/kg.s-1",pdqcloud(:,:, 725 726 & igcm_hdo_vap)) 726 727 endif 727 call WRITEDIAGFI(ngrid,"pdqccn2","pdqcloudccn apres microphysique"728 & ,"kg/kg.s-1", 3,pdqcloud(1:ngrid,1:nlay,728 call write_output("pdqccn2","pdqcloudccn apres microphysique" 729 & ,"kg/kg.s-1",pdqcloud(:,:, 729 730 & igcm_ccn_mass)) 730 call WRITEDIAGFI(ngrid,"pdqccnN2","pdqcloudccnN apres "//731 & "microphysique","nb/kg.s-1", 3,pdqcloud(1:ngrid,1:nlay,731 call write_output("pdqccnN2","pdqcloudccnN apres "// 732 & "microphysique","nb/kg.s-1",pdqcloud(:,:, 732 733 & igcm_ccn_number)) 733 call WRITEDIAGFI(ngrid,"pdqdust2", "pdqclouddust apres "//734 & "microphysique","kg/kg.s-1", 3,pdqcloud(1:ngrid,1:nlay,734 call write_output("pdqdust2", "pdqclouddust apres "// 735 & "microphysique","kg/kg.s-1",pdqcloud(:,:, 735 736 & igcm_dust_mass)) 736 call WRITEDIAGFI(ngrid,"pdqdustN2", "pdqclouddustN apres "//737 & "microphysique","nb/kg.s-1", 3,pdqcloud(1:ngrid,1:nlay,737 call write_output("pdqdustN2", "pdqclouddustN apres "// 738 & "microphysique","nb/kg.s-1",pdqcloud(:,:, 738 739 & igcm_dust_number)) 739 740 c=======================================================================
Note: See TracChangeset
for help on using the changeset viewer.