Ignore:
Timestamp:
Jan 11, 2021, 11:24:08 PM (4 years ago)
Author:
lguez
Message:

Sync latest trunk changes to Ocean_skin

Location:
LMDZ6/branches/Ocean_skin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin

  • LMDZ6/branches/Ocean_skin/libf/phylmd/phys_output_write_mod.F90

    r3767 r3798  
    1717  SUBROUTINE phys_output_write(itap, pdtphys, paprs, pphis, &
    1818       pplay, lmax_th, aerosol_couple,         &
    19        ok_ade, ok_aie, ok_volcan, ivap, iliq, isol, new_aod, ok_sync, &
     19       ok_ade, ok_aie, ok_volcan, ivap, iliq, isol, ok_sync, &
    2020       ptconv, read_climoz, clevSTD, ptconvth, &
    2121       d_u, d_t, qx, d_qx, zmasse, flag_aerosol, flag_aerosol_strat, ok_cdnc)
     
    3939         o_t2m_min_mon, o_t2m_max_mon, &
    4040         o_q2m, o_ustar, o_u10m, o_v10m, &
    41          o_wind10m, o_wind10max, o_gusts, o_sicf, &
     41         o_wind10m, o_wind10max, o_wind100m, o_gusts, o_sicf, &
     42         o_loadfactor_wind_onshore, o_loadfactor_wind_offshore, &
    4243         o_psol, o_mass, o_qsurf, o_qsol, &
    4344         o_precip, o_rain_fall, o_rain_con, o_ndayrain, o_plul, o_pluc, o_plun, &
    4445         o_snow, o_msnow, o_fsnow, o_evap, o_ep,o_epmax_diag, & ! epmax_cape
    4546         o_tops, o_tops0, o_topl, o_topl0, &
    46          o_SWupTOA, o_SWupTOAclr, o_SWupTOAcleanclr, o_SWdnTOA, &
     47         o_SWupTOA, o_SWupTOAclr, o_SWupTOAcleanclr, o_SWdnTOA, o_fdiffSWdnSFC, &
    4748         o_SWdnTOAclr, o_nettop, o_SWup200, &
    4849         o_SWup200clr, o_SWdn200, o_SWdn200clr, &
     
    132133         o_vitu, o_vitv, o_vitw, o_pres, o_paprs, &
    133134         o_zfull, o_zhalf, o_rneb, o_rnebjn, o_rnebcon, &
    134          o_rnebls, o_rneblsvol, o_rhum, o_ozone, o_ozone_light, &
     135         o_rnebls, o_rneblsvol, o_rhum, o_rhl, o_rhi, o_ozone, o_ozone_light, &
    135136         o_duphy, o_dtphy, o_dqphy, o_dqphy2d, o_dqlphy, o_dqlphy2d, &
    136137         o_dqsphy, o_dqsphy2d, o_albe_srf, o_z0m_srf, o_z0h_srf, &
    137          o_ages_srf, o_snow_srf, o_alb1, o_alb2, o_tke, &
     138         o_ages_srf, o_snow_srf, o_alb1, o_alb2, o_tke, o_tke_dissip, &
    138139         o_tke_max, o_kz, o_kz_max, o_clwcon, &
    139140         o_dtdyn, o_dqdyn, o_dqdyn2d, o_dqldyn, o_dqldyn2d, &
     
    172173         o_uxv, o_vxq, o_vxT, o_wxq, o_vxphi, &
    173174         o_wxT, o_uxu, o_vxv, o_TxT, o_trac, &
    174 #ifdef REPROBUS
    175          o_nas, &
    176 #endif
    177175         o_dtr_vdf, o_dtr_the, o_dtr_con, &
    178176         o_dtr_lessi_impa, o_dtr_lessi_nucl, &
     
    226224         qsol, z0m, z0h, fevap, agesno, &
    227225         nday_rain, rain_con, snow_con, &
    228          topsw, toplw, toplw0, swup, swdn, &
     226         topsw, toplw, toplw0, swup, swdn, solswfdiff, &
    229227         topsw0, swupc0, swdnc0, swup0, swdn0, SWup200, SWup200clr, &
    230228         SWdn200, SWdn200clr, LWup200, LWup200clr, &
     
    255253         zt2m_cor,zq2m_cor,zu10m_cor,zv10m_cor, zrh2m_cor, zqsat2m_cor, &
    256254         t2m_min_mon, t2m_max_mon, evap, &
    257          l_mixmin,l_mix, &
     255         l_mixmin,l_mix, tke_dissip, &
    258256         zu10m, zv10m, zq2m, zustar, zxqsurf, &
    259257         rain_lsc, rain_num, snow_lsc, bils, sens, fder, &
     
    262260         sissnow, runoff, albsol3_lic, evap_pot, &
    263261         t2m, fluxt, fluxlat, fsollw, fsolsw, &
    264          wfbils, wfbilo, wfevap, wfrain, wfsnow, & 
     262         wfbils, wfbilo, wfevap, wfrain, wfsnow, &
    265263         cdragm, cdragh, cldl, cldm, &
    266          cldh, cldt, JrNt, cldljn, cldmjn, cldhjn, &
    267          cldtjn, cldq, flwp, fiwp, ue, ve, uq, vq, &
     264         cldh, cldt, JrNt,   & ! only output names: cldljn,cldmjn,cldhjn,cldtjn
     265         cldq, flwp, fiwp, ue, ve, uq, vq, &
    268266         uwat, vwat, &
    269267         plcl, plfc, wbeff, convoccur, upwd, dnwd, dnwd0, prw, prlw, prsw, &
     
    301299         ql_seri, qs_seri, tr_seri, &
    302300         zphi, u_seri, v_seri, omega, cldfra, &
    303          rneb, rnebjn, rneblsvol, zx_rh, d_t_dyn,  &
     301         rneb, rnebjn, rneblsvol, zx_rh, zx_rhl, zx_rhi, d_t_dyn,  &
    304302         d_q_dyn,  d_ql_dyn, d_qs_dyn, &
    305303         d_q_dyn2d,  d_ql_dyn2d, d_qs_dyn2d, &
     
    333331         surf_PM25_sulf, tau_strat_550, tausum_strat, &
    334332         vsed_aer, tau_strat_1020, f_r_wet
    335 #endif
    336 
    337 #ifdef REPROBUS
    338     USE CHEM_REP, ONLY : nas, nbnas, tnamenas, ttextnas
    339333#endif
    340334
     
    369363    USE infotrac_phy, ONLY: nqtot, nqo, type_trac, tname, niadv
    370364    USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg
    371     USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, ok_snow
     365    USE surface_data, ONLY: type_ocean, version_ocean, ok_veget, landice_opt
    372366    USE aero_mod, ONLY: naero_tot, id_STRAT_phy
    373367    USE ioipsl, ONLY: histend, histsync
     
    390384    use config_ocean_skin_m, only: activate_ocean_skin
    391385
     386    USE vertical_layers_mod, ONLY: presnivs
     387
    392388    IMPLICIT NONE
    393389
     
    401397    INTEGER, DIMENSION(klon) :: lmax_th
    402398    LOGICAL :: aerosol_couple, ok_sync
    403     LOGICAL :: ok_ade, ok_aie, ok_volcan, new_aod
     399    LOGICAL :: ok_ade, ok_aie, ok_volcan
    404400    LOGICAL, DIMENSION(klon, klev) :: ptconv, ptconvth
    405401    REAL :: pdtphys
     
    419415    INTEGER :: itau_w
    420416    INTEGER :: i, iinit, iinitend=1, iff, iq, iiq, nsrf, k, ll, naero
    421     REAL, DIMENSION (klon) :: zx_tmp_fi2d, zpt_conv2d
     417    REAL, DIMENSION (klon) :: zx_tmp_fi2d, zpt_conv2d, wind100m
    422418    REAL, DIMENSION (klon,klev) :: zx_tmp_fi3d, zpt_conv
    423419    REAL, DIMENSION (klon,klev+1) :: zx_tmp_fi3d1
     
    431427    REAL, DIMENSION(klev,2) :: Ahyb_mid_bounds, Bhyb_mid_bounds
    432428    INTEGER :: ilev
     429    INTEGER, SAVE :: kmax_100m
     430!$OMP THREADPRIVATE(kmax_100m)
     431    REAL :: x
    433432#ifndef CPP_XIOS
    434433    REAL :: missing_val
     
    446445    LOGICAL, PARAMETER :: debug_strataer=.FALSE.
    447446#endif
     447    REAL,DIMENSION(klon,klev) :: z, dz
     448    REAL,DIMENSION(klon)      :: zrho, zt
    448449
    449450    ! On calcul le nouveau tau:
     
    461462    CALL wxios_set_context
    462463#endif
     464
     465#ifndef CPP_XIOS
     466    missing_val=missing_val_nf90
     467#endif
     468
     469    IF (.NOT.vars_defined) THEN
     470      kmax_100m=1
     471      DO k=1, klev-1
     472        IF (presnivs(k).GT.0.97*101325.) kmax_100m = k !--finding out max level for 100 m with a good margin
     473      ENDDO
     474    ENDIF
    463475
    464476    Ahyb_bounds(1,1) = 0.
     
    694706
    695707       IF (vars_defined) THEN
     708          DO k = 1, kmax_100m                                      !--we could stop much lower
     709            zrho(:) = pplay(:,k)/t_seri(:,k)/RD                    ! air density in kg/m3
     710            dz(:,k) = (paprs(:,k)-paprs(:,k+1))/zrho(:)/RG         ! layer thickness in m
     711            IF (k==1) THEN
     712              z(:,1) = (paprs(:,1)-pplay(:,1))/zrho(:)/RG          ! altitude middle of first layer in m
     713              zt(:)  = dz(:,1)                                     ! altitude top of first layer in m
     714            ELSE
     715              z(:,k) = zt(:) + (paprs(:,k)-pplay(:,k))/zrho(:)/RG  ! altitude middle of layer k in m
     716              zt(:)  = zt(:) + dz(:,k)                             ! altitude top of layer k in m
     717            ENDIF
     718          ENDDO
     719          wind100m(:)=missing_val
     720          DO k=1, kmax_100m-1                                      !--we could stop much lower
     721            DO i=1,klon
     722              IF (z(i,k).LT.100..AND.z(i,k+1).GE.100.) THEN
     723                wind100m(i)=SQRT( (u_seri(i,k)+(100.-z(i,k))/(z(i,k+1)-z(i,k))*(u_seri(i,k+1)-u_seri(i,k)))**2.0 + &
     724                                  (v_seri(i,k)+(100.-z(i,k))/(z(i,k+1)-z(i,k))*(v_seri(i,k+1)-v_seri(i,k)))**2.0 )
     725              ENDIF
     726            ENDDO
     727          ENDDO
     728       ENDIF
     729       CALL histwrite_phy(o_wind100m, wind100m)
     730
     731       IF (vars_defined) THEN
     732         !--polynomial fit for 14,Vestas,1074,V136/3450 kW windmill - Olivier
     733         DO i=1,klon
     734           IF (pctsrf(i,is_ter).GT.0.05 .AND. wind100m(i).NE.missing_val) THEN
     735             x=wind100m(i)
     736             IF (x.LE.3.0 .OR. x.GE.22.5) THEN
     737               zx_tmp_fi2d(i)=0.0
     738             ELSE IF (x.GE.10.0) THEN
     739               zx_tmp_fi2d(i)=1.0
     740             ELSE
     741               zx_tmp_fi2d(i)= 10.73 + x*(-14.69 + x*(8.339 + x*(-2.59 + x*(0.4893 + x*(-0.05898 + x*(0.004627 + &
     742                               x*(-0.0002352 + x*(7.478e-06 + x*(-1.351e-07 + x*(1.059e-09))))))))))
     743               zx_tmp_fi2d(i)=MIN(MAX(zx_tmp_fi2d(i),0.0),1.0)
     744             ENDIF
     745           ELSE
     746             zx_tmp_fi2d(i)=missing_val
     747           ENDIF
     748         ENDDO
     749       ENDIF
     750       CALL histwrite_phy(o_loadfactor_wind_onshore, zx_tmp_fi2d)
     751
     752       IF (vars_defined) THEN
     753         !--polynomial fit for 14,Vestas,867,V164/8000 kW - Olivier
     754         DO i=1,klon
     755           IF (pctsrf(i,is_oce).GT.0.05 .AND. wind100m(i).NE.missing_val) THEN
     756             x=wind100m(i)
     757             IF (x.LE.3.0 .OR. x.GE.25.5) THEN
     758               zx_tmp_fi2d(i)=0.0
     759             ELSE IF (x.GE.12.5) THEN
     760               zx_tmp_fi2d(i)=1.0
     761             ELSE
     762               zx_tmp_fi2d(i)= 20.59 + x*(-22.39 + x*(10.25 + x*(-2.601 + x*(0.4065 + x*(-0.04099 + x*(0.002716 + &
     763                               x*(-0.0001175 + x*(3.195e-06 + x*(-4.959e-08 + x*(3.352e-10))))))))))
     764               zx_tmp_fi2d(i)=MIN(MAX(zx_tmp_fi2d(i),0.0),1.0)
     765             ENDIF
     766           ELSE
     767             zx_tmp_fi2d(i)=missing_val
     768           ENDIF
     769         ENDDO
     770       ENDIF
     771       CALL histwrite_phy(o_loadfactor_wind_offshore, zx_tmp_fi2d)
     772
     773       IF (vars_defined) THEN
    696774          DO i = 1, klon
    697775             zx_tmp_fi2d(i) = pctsrf(i,is_sic)
     
    863941       ENDIF
    864942       CALL histwrite_phy(o_SWdnSFCcleanclr, zx_tmp_fi2d)
     943
     944       CALL histwrite_phy(o_fdiffSWdnSFC, solswfdiff)
    865945
    866946       IF (vars_defined) THEN
     
    9241004       CALL histwrite_phy(o_tauy, zx_tmp_fi2d)
    9251005
    926        IF (ok_snow) THEN
     1006       IF (landice_opt .GE. 1) THEN
    9271007          CALL histwrite_phy(o_snowsrf, snow_o)
    9281008          CALL histwrite_phy(o_qsnow, qsnow)
     
    9821062             CALL histwrite_phy(o_l_mixmin(nsrf),  l_mixmin(:,1:klev,nsrf))
    9831063             CALL histwrite_phy(o_tke_max_srf(nsrf),  pbl_tke(:,1:klev,nsrf))
     1064
     1065                         
    9841066          ENDIF
    9851067!jyg<
     
    9921074!            ENDIF
    9931075
    994 
    9951076       ENDDO
     1077       
     1078               
     1079        IF (iflag_pbl > 1) THEN
     1080          zx_tmp_fi3d=0.
     1081          IF (vars_defined) THEN
     1082             DO nsrf=1,nbsrf
     1083                DO k=1,klev
     1084                   zx_tmp_fi3d(:,k)=zx_tmp_fi3d(:,k) &
     1085                        +pctsrf(:,nsrf)*tke_dissip(:,k,nsrf)
     1086                ENDDO
     1087             ENDDO
     1088          ENDIF
     1089         
     1090          CALL histwrite_phy(o_tke_dissip, zx_tmp_fi3d)   
     1091       ENDIF
    9961092
    9971093       IF (vars_defined) zx_tmp_fi2d(1 : klon) = sens_prec_liq_o(1 : klon, 1)
     
    11171213       ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX:
    11181214       ! Champs interpolles sur des niveaux de pression
    1119        missing_val=missing_val_nf90
    11201215       DO iff=1, nfiles
    11211216          ll=0
     
    13581453!--OLIVIER
    13591454!This is warranted by treating INCA aerosols as offline aerosols
    1360 !       IF (new_aod .and. (.not. aerosol_couple)) THEN
    1361        IF (new_aod) THEN
    1362           IF (flag_aerosol.GT.0) THEN
    1363              CALL histwrite_phy(o_od443aer, od443aer)
    1364              CALL histwrite_phy(o_od550aer, od550aer)
    1365              CALL histwrite_phy(o_od865aer, od865aer)
    1366              CALL histwrite_phy(o_abs550aer, abs550aer)
    1367              CALL histwrite_phy(o_od550lt1aer, od550lt1aer)
    1368              CALL histwrite_phy(o_sconcso4, sconcso4)
    1369              CALL histwrite_phy(o_sconcno3, sconcno3)
    1370              CALL histwrite_phy(o_sconcoa, sconcoa)
    1371              CALL histwrite_phy(o_sconcbc, sconcbc)
    1372              CALL histwrite_phy(o_sconcss, sconcss)
    1373              CALL histwrite_phy(o_sconcdust, sconcdust)
    1374              CALL histwrite_phy(o_concso4, concso4)
    1375              CALL histwrite_phy(o_concno3, concno3)
    1376              CALL histwrite_phy(o_concoa, concoa)
    1377              CALL histwrite_phy(o_concbc, concbc)
    1378              CALL histwrite_phy(o_concss, concss)
    1379              CALL histwrite_phy(o_concdust, concdust)
    1380              CALL histwrite_phy(o_loadso4, loadso4)
    1381              CALL histwrite_phy(o_loadoa, loadoa)
    1382              CALL histwrite_phy(o_loadbc, loadbc)
    1383              CALL histwrite_phy(o_loadss, loadss)
    1384              CALL histwrite_phy(o_loaddust, loaddust)
    1385              CALL histwrite_phy(o_loadno3, loadno3)
    1386              CALL histwrite_phy(o_dryod550aer, dryod550aer)
    1387              DO naero = 1, naero_tot-1
    1388                 CALL histwrite_phy(o_drytausumaero(naero),drytausum_aero(:,naero))
    1389              END DO
    1390           ENDIF
    1391           !--STRAT AER
    1392           IF (flag_aerosol.GT.0.OR.flag_aerosol_strat.GT.0) THEN
    1393              DO naero = 1, naero_tot
    1394                 CALL histwrite_phy(o_tausumaero(naero),tausum_aero(:,2,naero))
    1395              END DO
    1396           ENDIF
    1397           IF (flag_aerosol_strat.GT.0) THEN
    1398              CALL histwrite_phy(o_tausumaero_lw,tausum_aero(:,6,id_STRAT_phy))
    1399           ENDIF
     1455       IF (flag_aerosol.GT.0) THEN
     1456          CALL histwrite_phy(o_od443aer, od443aer)
     1457          CALL histwrite_phy(o_od550aer, od550aer)
     1458          CALL histwrite_phy(o_od865aer, od865aer)
     1459          CALL histwrite_phy(o_abs550aer, abs550aer)
     1460          CALL histwrite_phy(o_od550lt1aer, od550lt1aer)
     1461          CALL histwrite_phy(o_sconcso4, sconcso4)
     1462          CALL histwrite_phy(o_sconcno3, sconcno3)
     1463          CALL histwrite_phy(o_sconcoa, sconcoa)
     1464          CALL histwrite_phy(o_sconcbc, sconcbc)
     1465          CALL histwrite_phy(o_sconcss, sconcss)
     1466          CALL histwrite_phy(o_sconcdust, sconcdust)
     1467          CALL histwrite_phy(o_concso4, concso4)
     1468          CALL histwrite_phy(o_concno3, concno3)
     1469          CALL histwrite_phy(o_concoa, concoa)
     1470          CALL histwrite_phy(o_concbc, concbc)
     1471          CALL histwrite_phy(o_concss, concss)
     1472          CALL histwrite_phy(o_concdust, concdust)
     1473          CALL histwrite_phy(o_loadso4, loadso4)
     1474          CALL histwrite_phy(o_loadoa, loadoa)
     1475          CALL histwrite_phy(o_loadbc, loadbc)
     1476          CALL histwrite_phy(o_loadss, loadss)
     1477          CALL histwrite_phy(o_loaddust, loaddust)
     1478          CALL histwrite_phy(o_loadno3, loadno3)
     1479          CALL histwrite_phy(o_dryod550aer, dryod550aer)
     1480          DO naero = 1, naero_tot-1
     1481             CALL histwrite_phy(o_drytausumaero(naero),drytausum_aero(:,naero))
     1482          END DO
     1483       ENDIF
     1484       !--STRAT AER
     1485       IF (flag_aerosol.GT.0.OR.flag_aerosol_strat.GT.0) THEN
     1486          DO naero = 1, naero_tot
     1487             CALL histwrite_phy(o_tausumaero(naero),tausum_aero(:,2,naero))
     1488          END DO
     1489       ENDIF
     1490       IF (flag_aerosol_strat.GT.0) THEN
     1491          CALL histwrite_phy(o_tausumaero_lw,tausum_aero(:,6,id_STRAT_phy))
    14001492       ENDIF
    14011493
     
    14871579          CALL histwrite_phy(o_sollwad0, sollwad0_aero)
    14881580          !====MS forcing diagnostics
    1489           IF (new_aod) THEN
    14901581          !ym warning : topsw_aero, solsw_aero, topsw0_aero, solsw0_aero are not defined by model
    14911582          !ym => init to 0 in radlwsw_m.F90 ztopsw_aero, zsolsw_aero, ztopsw0_aero, zsolsw0_aero
    14921583
    1493              IF (vars_defined) zx_tmp_fi2d(:)=topsw_aero(:,1)*swradcorr(:)
    1494              CALL histwrite_phy(o_swtoaas_nat,zx_tmp_fi2d)
    1495              IF (vars_defined) zx_tmp_fi2d(:)=solsw_aero(:,1)*swradcorr(:)
    1496              CALL histwrite_phy(o_swsrfas_nat,zx_tmp_fi2d)
    1497              IF (vars_defined) zx_tmp_fi2d(:)=topsw0_aero(:,1)*swradcorr(:)
    1498              CALL histwrite_phy(o_swtoacs_nat,zx_tmp_fi2d)
    1499              IF (vars_defined) zx_tmp_fi2d(:)=solsw0_aero(:,1)*swradcorr(:)
    1500              CALL histwrite_phy(o_swsrfcs_nat,zx_tmp_fi2d)
    1501              !ant
    1502              IF (vars_defined) zx_tmp_fi2d(:)=topsw_aero(:,2)*swradcorr(:)
    1503              CALL histwrite_phy(o_swtoaas_ant,zx_tmp_fi2d)
    1504              IF (vars_defined) zx_tmp_fi2d(:)=solsw_aero(:,2)*swradcorr(:)
    1505              CALL histwrite_phy(o_swsrfas_ant,zx_tmp_fi2d)
    1506              IF (vars_defined) zx_tmp_fi2d(:)=topsw0_aero(:,2)*swradcorr(:)
    1507              CALL histwrite_phy(o_swtoacs_ant,zx_tmp_fi2d)
    1508              IF (vars_defined) zx_tmp_fi2d(:)=solsw0_aero(:,2)*swradcorr(:)
    1509              CALL histwrite_phy(o_swsrfcs_ant,zx_tmp_fi2d)
    1510              !cf
    1511              IF (.not. aerosol_couple) THEN
    1512                 IF (vars_defined) zx_tmp_fi2d(:)=topswcf_aero(:,1)*swradcorr(:)
    1513                 CALL histwrite_phy(o_swtoacf_nat,zx_tmp_fi2d)
    1514                 IF (vars_defined) zx_tmp_fi2d(:)=solswcf_aero(:,1)*swradcorr(:)
    1515                 CALL histwrite_phy(o_swsrfcf_nat,zx_tmp_fi2d)
    1516                 IF (vars_defined) zx_tmp_fi2d(:)=topswcf_aero(:,2)*swradcorr(:)
    1517                 CALL histwrite_phy(o_swtoacf_ant,zx_tmp_fi2d)
    1518                 IF (vars_defined) zx_tmp_fi2d(:)=solswcf_aero(:,2)*swradcorr(:)
    1519                 CALL histwrite_phy(o_swsrfcf_ant,zx_tmp_fi2d)
    1520                 IF (vars_defined) zx_tmp_fi2d(:)=topswcf_aero(:,3)*swradcorr(:)
    1521                 CALL histwrite_phy(o_swtoacf_zero,zx_tmp_fi2d)
    1522                 IF (vars_defined) zx_tmp_fi2d(:)=solswcf_aero(:,3)*swradcorr(:)
    1523                 CALL histwrite_phy(o_swsrfcf_zero,zx_tmp_fi2d)
    1524              ENDIF
    1525           ENDIF ! new_aod
     1584          IF (vars_defined) zx_tmp_fi2d(:)=topsw_aero(:,1)*swradcorr(:)
     1585          CALL histwrite_phy(o_swtoaas_nat,zx_tmp_fi2d)
     1586          IF (vars_defined) zx_tmp_fi2d(:)=solsw_aero(:,1)*swradcorr(:)
     1587          CALL histwrite_phy(o_swsrfas_nat,zx_tmp_fi2d)
     1588          IF (vars_defined) zx_tmp_fi2d(:)=topsw0_aero(:,1)*swradcorr(:)
     1589          CALL histwrite_phy(o_swtoacs_nat,zx_tmp_fi2d)
     1590          IF (vars_defined) zx_tmp_fi2d(:)=solsw0_aero(:,1)*swradcorr(:)
     1591          CALL histwrite_phy(o_swsrfcs_nat,zx_tmp_fi2d)
     1592          !ant
     1593          IF (vars_defined) zx_tmp_fi2d(:)=topsw_aero(:,2)*swradcorr(:)
     1594          CALL histwrite_phy(o_swtoaas_ant,zx_tmp_fi2d)
     1595          IF (vars_defined) zx_tmp_fi2d(:)=solsw_aero(:,2)*swradcorr(:)
     1596          CALL histwrite_phy(o_swsrfas_ant,zx_tmp_fi2d)
     1597          IF (vars_defined) zx_tmp_fi2d(:)=topsw0_aero(:,2)*swradcorr(:)
     1598          CALL histwrite_phy(o_swtoacs_ant,zx_tmp_fi2d)
     1599          IF (vars_defined) zx_tmp_fi2d(:)=solsw0_aero(:,2)*swradcorr(:)
     1600          CALL histwrite_phy(o_swsrfcs_ant,zx_tmp_fi2d)
     1601          !cf
     1602          IF (.not. aerosol_couple) THEN
     1603             IF (vars_defined) zx_tmp_fi2d(:)=topswcf_aero(:,1)*swradcorr(:)
     1604             CALL histwrite_phy(o_swtoacf_nat,zx_tmp_fi2d)
     1605             IF (vars_defined) zx_tmp_fi2d(:)=solswcf_aero(:,1)*swradcorr(:)
     1606             CALL histwrite_phy(o_swsrfcf_nat,zx_tmp_fi2d)
     1607             IF (vars_defined) zx_tmp_fi2d(:)=topswcf_aero(:,2)*swradcorr(:)
     1608             CALL histwrite_phy(o_swtoacf_ant,zx_tmp_fi2d)
     1609             IF (vars_defined) zx_tmp_fi2d(:)=solswcf_aero(:,2)*swradcorr(:)
     1610             CALL histwrite_phy(o_swsrfcf_ant,zx_tmp_fi2d)
     1611             IF (vars_defined) zx_tmp_fi2d(:)=topswcf_aero(:,3)*swradcorr(:)
     1612             CALL histwrite_phy(o_swtoacf_zero,zx_tmp_fi2d)
     1613             IF (vars_defined) zx_tmp_fi2d(:)=solswcf_aero(:,3)*swradcorr(:)
     1614             CALL histwrite_phy(o_swsrfcf_zero,zx_tmp_fi2d)
     1615          ENDIF
    15261616          !====MS forcing diagnostics
    15271617       ENDIF
     
    16241714       CALL histwrite_phy(o_rnebjn, zx_tmp_fi3d)
    16251715       CALL histwrite_phy(o_rhum, zx_rh)
     1716       IF (iflag_ice_thermo .GT. 0) THEN
     1717          IF (vars_defined) zx_tmp_fi3d = zx_rhl * 100.
     1718          CALL histwrite_phy(o_rhl, zx_tmp_fi3d)
     1719          IF (vars_defined) zx_tmp_fi3d = zx_rhi * 100.
     1720          CALL histwrite_phy(o_rhi, zx_tmp_fi3d)
     1721       ENDIF
     1722
    16261723       
    16271724       IF (vars_defined) zx_tmp_fi3d = wo(:, :, 1) * dobson_u * 1e3 / zmasse / rmo3 * rmd
     
    16821779          ENDIF
    16831780          CALL histwrite_phy(o_tke, zx_tmp_fi3d)
    1684 
    1685           CALL histwrite_phy(o_tke_max, zx_tmp_fi3d)
     1781          CALL histwrite_phy(o_tke_max, zx_tmp_fi3d) 
     1782
    16861783       ENDIF
    16871784
     
    21012198       ! ATTENTION, LES ANCIENS HISTWRITE ONT ETES CONSERVES EN ATTENDANT MIEUX:
    21022199       ! Champs interpolles sur des niveaux de pression
    2103        missing_val=missing_val_nf90
    21042200       DO iff=7, nfiles-1 !--OB: here we deal with files 7,8,9
    21052201
     
    22372333!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    22382334       IF (iflag_phytrac == 1 ) then
    2239          IF (type_trac == 'lmdz' .OR. type_trac == 'repr' .OR. type_trac == 'coag') THEN
     2335         IF (type_trac == 'lmdz' .OR. type_trac == 'coag') THEN
    22402336           DO iq=nqo+1, nqtot
    22412337             !--3D fields
     
    22622358                ENDDO
    22632359             ENDIF
    2264 #ifndef REPROBUS
    22652360             CALL histwrite_phy(o_trac_cum(iq-nqo), zx_tmp_fi2d)
    2266 #endif
    22672361           ENDDO !--iq
    22682362         ENDIF   !--type_trac
     
    22922386         ENDIF !--type_trac co2i
    22932387
    2294          IF (type_trac == 'repr') THEN
    2295 #ifdef REPROBUS
    2296            DO iq=1,nbnas
    2297              CALL histwrite_phy(o_nas(iq), nas(:,:,iq))
    2298            ENDDO
    2299 #endif
    2300          ENDIF
    2301 
    23022388       ENDIF   !(iflag_phytrac==1)
    23032389
Note: See TracChangeset for help on using the changeset viewer.