Ignore:
Timestamp:
Jun 29, 2018, 11:12:44 AM (7 years ago)
Author:
Laurent Fairhead
Message:

Commiting variables initialisation as found by Yann
LF

Location:
LMDZ6/branches/DYNAMICO-conv/libf
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/DYNAMICO-conv/libf/dyn3dmem/caladvtrac_mod.F90

    r1907 r3355  
    4444    CALL allocate_u(massem,llm,d)
    4545    CALL allocate_u(pbaruc,llm,d)
     46    pbaruc(:,:)=0
    4647    CALL allocate_v(pbarvc,llm,d)
     48    pbarvc(:,:)=0
    4749    CALL allocate_u(pbarug,llm,d)
    4850    CALL allocate_v(pbarvg,llm,d)
  • LMDZ6/branches/DYNAMICO-conv/libf/dyn3dmem/call_calfis_mod.F90

    r2603 r3355  
    5252    CALL allocate_u(p,llmp1,d)
    5353    CALL allocate_u(pks,d)
     54    pks(:)=0
    5455    CALL allocate_u(pk,llm,d)
     56    pk(:,:)=0
    5557    CALL allocate_u(pkf,llm,d)
    5658    CALL allocate_u(phi,llm,d)
  • LMDZ6/branches/DYNAMICO-conv/libf/dyn3dmem/call_dissip_mod.F90

    r1987 r3355  
    3131
    3232    CALL allocate_u(ucov,llm,d)
     33    ucov(:,:)=0
    3334    CALL allocate_v(vcov,llm,d)
     35    vcov(:,:)=0
    3436    CALL allocate_u(teta,llm,d)
    3537    CALL allocate_u(p,llmp1,d)
  • LMDZ6/branches/DYNAMICO-conv/libf/dyn3dmem/integrd_mod.F90

    r1907 r3355  
    2323    CALL allocate_u(deltap,llm,d)
    2424    CALL allocate_u(ps,d)
     25    ps(:)=0
    2526
    2627   
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/coef_diff_turb_mod.F90

    r2952 r3355  
    6565
    6666
     67    ykmm = 0 !ym missing init
     68    ykmn = 0 !ym missing init
     69    ykmq = 0 !ym missing init
     70   
     71   
    6772!****************************************************************************************   
    6873! Calcul de coefficients de diffusion turbulent de l'atmosphere :
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cv3_routines.F90

    r2908 r3355  
    37473747    END DO ! cld
    37483748
     3749!ym BIG Warning : it seems that the k loop is missing !!!
     3750!ym Strong advice to check this
     3751!ym add a k loop temporary
     3752
    37493753! (particular case: no detraining level is found)                              ! cld
    3750     DO il = 1, ncum                                                            ! cld
    3751       IF (i<=inb(il) .AND. nent(il,i)==0 .AND. iflag(il)<=1) THEN              ! cld
    3752         qcond(il, i) = qcond(il, i) + (1.-ep(il,i))*clw(il, i)                 ! cld
    3753         qtment(il, i) = qent(il,k,i) + qtment(il,i)                          ! cld
    3754         nqcond(il, i) = nqcond(il, i) + 1.                                     ! cld
    3755       END IF                                                                   ! cld
    3756     END DO                                                                     ! cld
     3754    DO k = i + 1, nl
     3755      DO il = 1, ncum        !ym k loop added                                                      ! cld
     3756        IF (i<=inb(il) .AND. nent(il,i)==0 .AND. iflag(il)<=1) THEN              ! cld
     3757          qcond(il, i) = qcond(il, i) + (1.-ep(il,i))*clw(il, i)                 ! cld
     3758!jyg<   Bug correction 20180620
     3759!      PROBLEM: Should not qent(il,i,i) be taken into account even if nent(il,i)/=0?
     3760!!        qtment(il, i) = qent(il,k,i) + qtment(il,i)
     3761! cld
     3762          qtment(il, i) = qent(il,i,i) + qtment(il,i)
     3763! cld
     3764!>jyg
     3765
     3766          nqcond(il, i) = nqcond(il, i) + 1.                                     ! cld
     3767        END IF                                                                   ! cld
     3768      END DO
     3769    ENDDO                                                                     ! cld
    37573770
    37583771    DO il = 1, ncum                                                            ! cld
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/cva_driver.F90

    r2902 r3355  
    613613  asupmaxmin1(:) = 0.
    614614
     615  tvp(:, :) = 0. !ym missing init, need to have a look by developpers
     616  tv(:, :) = 0. !ym missing init, need to have a look by developpers
     617   
    615618  DO il = 1, len
    616619    cin1(il) = -100000.
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/pbl_surface_mod.F90

    r3055 r3355  
    18951895               ywindsp, rmu0, yfder, yts, &
    18961896               itap, dtime, jour, knon, ni, &
    1897                ypplay(:,1), zgeo1/RG, ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),&
     1897               ypplay(:,1), zgeo1(1:knon)/RG, ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),&    ! ym missing init
    18981898               AcoefH, AcoefQ, BcoefH, BcoefQ, &
    18991899               AcoefU, AcoefV, BcoefU, BcoefV, &
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/phys_local_var_mod.F90

    r3050 r3355  
    573573      ALLOCATE(dv_gwd_rando(klon,klev),dv_gwd_front(klon,klev))
    574574      ALLOCATE(east_gwstress(klon,klev),west_gwstress(klon,klev))
     575      east_gwstress(:,:)=0 !ym missing init
     576      west_gwstress(:,:)=0 !ym missing init
    575577      ALLOCATE(d_t_hin(klon,klev))
    576578      ALLOCATE(d_q_ch4(klon,klev))
     
    688690!>jyg
    689691      ALLOCATE(dtvdf_x(klon,klev), dtvdf_w(klon,klev))
     692      dtvdf_x = 0 ; dtvdf_w=0 ;   !ym missing init
    690693      ALLOCATE(dqvdf_x(klon,klev), dqvdf_w(klon,klev))
     694      dqvdf_x = 0 ; dqvdf_w=0 ;   !ym missing init
    691695      ALLOCATE(pbl_tke_input(klon,klev+1,nbsrf))
    692696      ALLOCATE(t_therm(klon,klev), q_therm(klon,klev),u_therm(klon,klev), v_therm(klon,klev))
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/phys_output_write_mod.F90

    r3336 r3355  
    691691       CALL histwrite_phy(o_fsnow, zfra_o)
    692692       CALL histwrite_phy(o_evap, evap)
    693        CALL histwrite_phy(o_tops, topsw*swradcorr)
    694        CALL histwrite_phy(o_tops0, topsw0*swradcorr)
     693
     694       IF (vars_defined) THEN
     695         zx_tmp_fi2d = topsw*swradcorr
     696       ENDIF
     697       CALL histwrite_phy(o_tops, zx_tmp_fi2d)
     698
     699       IF (vars_defined) THEN
     700         zx_tmp_fi2d = topsw0*swradcorr
     701       ENDIF
     702       CALL histwrite_phy(o_tops0, zx_tmp_fi2d)
     703
    695704       CALL histwrite_phy(o_topl, toplw)
    696705       CALL histwrite_phy(o_topl0, toplw0)
     
    720729       ENDIF
    721730       CALL histwrite_phy(o_nettop, zx_tmp_fi2d)
    722        CALL histwrite_phy(o_SWup200, SWup200*swradcorr)
    723        CALL histwrite_phy(o_SWup200clr, SWup200clr*swradcorr)
    724        CALL histwrite_phy(o_SWdn200, SWdn200*swradcorr)
    725        CALL histwrite_phy(o_SWdn200clr, SWdn200clr*swradcorr)
     731       
     732       IF (vars_defined) THEN
     733          zx_tmp_fi2d = SWup200*swradcorr
     734       ENDIF
     735       CALL histwrite_phy(o_SWup200, zx_tmp_fi2d)
     736       
     737       IF (vars_defined) THEN
     738          zx_tmp_fi2d = SWup200clr*swradcorr
     739       ENDIF
     740       CALL histwrite_phy(o_SWup200clr, zx_tmp_fi2d)
     741       
     742       IF (vars_defined) THEN
     743          zx_tmp_fi2d = SWdn200*swradcorr
     744       ENDIF
     745       CALL histwrite_phy(o_SWdn200, zx_tmp_fi2d)
     746       
     747       
     748       IF (vars_defined) THEN
     749          zx_tmp_fi2d = SWdn200clr*swradcorr
     750       ENDIF
     751       CALL histwrite_phy(o_SWdn200clr, zx_tmp_fi2d)
     752       
    726753       CALL histwrite_phy(o_LWup200, LWup200)
    727754       CALL histwrite_phy(o_LWup200clr, LWup200clr)
    728755       CALL histwrite_phy(o_LWdn200, LWdn200)
    729756       CALL histwrite_phy(o_LWdn200clr, LWdn200clr)
    730        CALL histwrite_phy(o_sols, solsw*swradcorr)
    731        CALL histwrite_phy(o_sols0, solsw0*swradcorr)
     757       
     758       IF (vars_defined) THEN
     759          zx_tmp_fi2d = solsw*swradcorr
     760       ENDIF
     761       CALL histwrite_phy(o_sols, zx_tmp_fi2d)
     762       
     763       
     764       IF (vars_defined) THEN
     765          zx_tmp_fi2d = solsw0*swradcorr
     766       ENDIF
     767       CALL histwrite_phy(o_sols0, zx_tmp_fi2d)
    732768       CALL histwrite_phy(o_soll, sollw)
    733769       CALL histwrite_phy(o_soll0, sollw0)
     
    900936       CALL histwrite_phy(o_cldt, cldt)
    901937       CALL histwrite_phy(o_JrNt, JrNt)
    902        CALL histwrite_phy(o_cldljn, cldl*JrNt)
    903        CALL histwrite_phy(o_cldmjn, cldm*JrNt)
    904        CALL histwrite_phy(o_cldhjn, cldh*JrNt)
    905        CALL histwrite_phy(o_cldtjn, cldt*JrNt)
     938       
     939       IF (vars_defined)  zx_tmp_fi2d=cldl*JrNt     
     940       CALL histwrite_phy(o_cldljn, zx_tmp_fi2d)
     941       
     942       IF (vars_defined)  zx_tmp_fi2d=cldm*JrNt     
     943       CALL histwrite_phy(o_cldmjn, zx_tmp_fi2d)
     944       
     945       IF (vars_defined)  zx_tmp_fi2d=cldh*JrNt
     946       CALL histwrite_phy(o_cldhjn, zx_tmp_fi2d)
     947       
     948       IF (vars_defined)  zx_tmp_fi2d=cldt*JrNt
     949       CALL histwrite_phy(o_cldtjn, zx_tmp_fi2d)
     950       
    906951       CALL histwrite_phy(o_cldq, cldq)
    907952       IF (vars_defined)       zx_tmp_fi2d(1:klon) = flwp(1:klon)
     
    10541099             CALL histwrite_phy(o_alp_wk, alp_wake)
    10551100             IF (iflag_pbl_split>=1) THEN
     1101               !ym warning : dtvdf_x, dtvdf_w, dqvdf_x, dqvdf_w are not defined by model
     1102               !ym => init to 0 in phys_local_var_mod
    10561103               IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=dtvdf_x(1:klon,1:klev)/pdtphys
    10571104               CALL histwrite_phy(o_dtvdf_x    ,zx_tmp_fi3d)
     
    10891136             IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_wake(1:klon,1:klev)/pdtphys
    10901137             CALL histwrite_phy(o_dqwak, zx_tmp_fi3d)
    1091              CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
     1138             IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
    10921139             CALL histwrite_phy(o_dqwak2d, zx_tmp_fi2d)
    10931140          ENDIF ! iflag_wake>=1
     
    12551302
    12561303! ThL -- In the following, we assume read_climoz == 1
    1257        zx_tmp_fi2d = 0.0    ! Computation for strato, added ThL
    1258        DO k=1, klev
    1259           zx_tmp_fi2d(:) = zx_tmp_fi2d(:) + wo(:,k,1) * stratomask(:,k) * 1.e3
    1260        END DO
     1304       IF (vars_defined) THEN
     1305         zx_tmp_fi2d = 0.0    ! Computation for strato, added ThL
     1306         DO k=1, klev
     1307            zx_tmp_fi2d(:) = zx_tmp_fi2d(:) + wo(:,k,1) * stratomask(:,k) * 1.e3
     1308         END DO
     1309       ENDIF
    12611310       CALL histwrite_phy(o_col_O3_strato, zx_tmp_fi2d) ! Added ThL
    1262        zx_tmp_fi2d = 0.0    ! Computation for tropo, added ThL
    1263        DO k=1, klev
    1264           zx_tmp_fi2d(:) = zx_tmp_fi2d(:) + wo(:,k,1) * (1.0-stratomask(:,k)) * 1.e3
    1265        END DO
     1311
     1312       IF (vars_defined) THEN
     1313         zx_tmp_fi2d = 0.0    ! Computation for tropo, added ThL
     1314         DO k=1, klev
     1315            zx_tmp_fi2d(:) = zx_tmp_fi2d(:) + wo(:,k,1) * (1.0-stratomask(:,k)) * 1.e3
     1316         END DO
     1317       ENDIF
    12661318       CALL histwrite_phy(o_col_O3_tropo, zx_tmp_fi2d)   ! Added ThL
    12671319! end add ThL
     
    13001352#endif
    13011353       IF (ok_ade) THEN
    1302           CALL histwrite_phy(o_topswad, topswad_aero*swradcorr)
    1303           CALL histwrite_phy(o_topswad0, topswad0_aero*swradcorr)
    1304           CALL histwrite_phy(o_solswad, solswad_aero*swradcorr)
    1305           CALL histwrite_phy(o_solswad0, solswad0_aero*swradcorr)
     1354          IF (vars_defined) zx_tmp_fi2d(:)=topswad_aero*swradcorr
     1355          CALL histwrite_phy(o_topswad, zx_tmp_fi2d)
     1356         
     1357          IF (vars_defined) zx_tmp_fi2d(:)=topswad0_aero*swradcorr
     1358          CALL histwrite_phy(o_topswad0, zx_tmp_fi2d)
     1359                   
     1360          IF (vars_defined) zx_tmp_fi2d(:)=solswad_aero*swradcorr
     1361          CALL histwrite_phy(o_solswad, zx_tmp_fi2d)
     1362                   
     1363          IF (vars_defined) zx_tmp_fi2d(:)=solswad0_aero*swradcorr
     1364          CALL histwrite_phy(o_solswad0, zx_tmp_fi2d)
     1365         
    13061366          IF (type_trac .ne. 'inca') THEN
    13071367             IF (config_inca .ne. 'aeNP') THEN
     
    13141374          !====MS forcing diagnostics
    13151375          IF (new_aod) THEN
    1316              zx_tmp_fi2d(:)=topsw_aero(:,1)*swradcorr(:)
     1376          !ym warning : topsw_aero, solsw_aero, topsw0_aero, solsw0_aero are not defined by model
     1377          !ym => init to 0 in radlwsw_m.F90 ztopsw_aero, zsolsw_aero, ztopsw0_aero, zsolsw0_aero
     1378
     1379             IF (vars_defined) zx_tmp_fi2d(:)=topsw_aero(:,1)*swradcorr(:)
    13171380             CALL histwrite_phy(o_swtoaas_nat,zx_tmp_fi2d)
    1318              zx_tmp_fi2d(:)=solsw_aero(:,1)*swradcorr(:)
     1381             IF (vars_defined) zx_tmp_fi2d(:)=solsw_aero(:,1)*swradcorr(:)
    13191382             CALL histwrite_phy(o_swsrfas_nat,zx_tmp_fi2d)
    1320              zx_tmp_fi2d(:)=topsw0_aero(:,1)*swradcorr(:)
     1383             IF (vars_defined) zx_tmp_fi2d(:)=topsw0_aero(:,1)*swradcorr(:)
    13211384             CALL histwrite_phy(o_swtoacs_nat,zx_tmp_fi2d)
    1322              zx_tmp_fi2d(:)=solsw0_aero(:,1)*swradcorr(:)
     1385             IF (vars_defined) zx_tmp_fi2d(:)=solsw0_aero(:,1)*swradcorr(:)
    13231386             CALL histwrite_phy(o_swsrfcs_nat,zx_tmp_fi2d)
    13241387             !ant
    1325              zx_tmp_fi2d(:)=topsw_aero(:,2)*swradcorr(:)
     1388             IF (vars_defined) zx_tmp_fi2d(:)=topsw_aero(:,2)*swradcorr(:)
    13261389             CALL histwrite_phy(o_swtoaas_ant,zx_tmp_fi2d)
    1327              zx_tmp_fi2d(:)=solsw_aero(:,2)*swradcorr(:)
     1390             IF (vars_defined) zx_tmp_fi2d(:)=solsw_aero(:,2)*swradcorr(:)
    13281391             CALL histwrite_phy(o_swsrfas_ant,zx_tmp_fi2d)
    1329              zx_tmp_fi2d(:)=topsw0_aero(:,2)*swradcorr(:)
     1392             IF (vars_defined) zx_tmp_fi2d(:)=topsw0_aero(:,2)*swradcorr(:)
    13301393             CALL histwrite_phy(o_swtoacs_ant,zx_tmp_fi2d)
    1331              zx_tmp_fi2d(:)=solsw0_aero(:,2)*swradcorr(:)
     1394             IF (vars_defined) zx_tmp_fi2d(:)=solsw0_aero(:,2)*swradcorr(:)
    13321395             CALL histwrite_phy(o_swsrfcs_ant,zx_tmp_fi2d)
    13331396             !cf
    13341397             IF (.not. aerosol_couple) THEN
    1335                 zx_tmp_fi2d(:)=topswcf_aero(:,1)*swradcorr(:)
     1398                IF (vars_defined) zx_tmp_fi2d(:)=topswcf_aero(:,1)*swradcorr(:)
    13361399                CALL histwrite_phy(o_swtoacf_nat,zx_tmp_fi2d)
    1337                 zx_tmp_fi2d(:)=solswcf_aero(:,1)*swradcorr(:)
     1400                IF (vars_defined) zx_tmp_fi2d(:)=solswcf_aero(:,1)*swradcorr(:)
    13381401                CALL histwrite_phy(o_swsrfcf_nat,zx_tmp_fi2d)
    1339                 zx_tmp_fi2d(:)=topswcf_aero(:,2)*swradcorr(:)
     1402                IF (vars_defined) zx_tmp_fi2d(:)=topswcf_aero(:,2)*swradcorr(:)
    13401403                CALL histwrite_phy(o_swtoacf_ant,zx_tmp_fi2d)
    1341                 zx_tmp_fi2d(:)=solswcf_aero(:,2)*swradcorr(:)
     1404                IF (vars_defined) zx_tmp_fi2d(:)=solswcf_aero(:,2)*swradcorr(:)
    13421405                CALL histwrite_phy(o_swsrfcf_ant,zx_tmp_fi2d)
    1343                 zx_tmp_fi2d(:)=topswcf_aero(:,3)*swradcorr(:)
     1406                IF (vars_defined) zx_tmp_fi2d(:)=topswcf_aero(:,3)*swradcorr(:)
    13441407                CALL histwrite_phy(o_swtoacf_zero,zx_tmp_fi2d)
    1345                 zx_tmp_fi2d(:)=solswcf_aero(:,3)*swradcorr(:)
     1408                IF (vars_defined) zx_tmp_fi2d(:)=solswcf_aero(:,3)*swradcorr(:)
    13461409                CALL histwrite_phy(o_swsrfcf_zero,zx_tmp_fi2d)
    13471410             ENDIF
     
    13501413       ENDIF
    13511414       IF (ok_aie) THEN
    1352           CALL histwrite_phy(o_topswai, topswai_aero*swradcorr)
    1353           CALL histwrite_phy(o_toplwai, toplwai_aero*swradcorr)
    1354           CALL histwrite_phy(o_solswai, solswai_aero*swradcorr)
    1355           CALL histwrite_phy(o_sollwai, sollwai_aero*swradcorr)
     1415          IF (vars_defined) zx_tmp_fi2d(:)= topswai_aero*swradcorr
     1416          CALL histwrite_phy(o_topswai, zx_tmp_fi2d)
     1417         
     1418          IF (vars_defined) zx_tmp_fi2d(:)=toplwai_aero*swradcorr
     1419          CALL histwrite_phy(o_toplwai, zx_tmp_fi2d)
     1420         
     1421          IF (vars_defined) zx_tmp_fi2d(:)=solswai_aero*swradcorr
     1422          CALL histwrite_phy(o_solswai, zx_tmp_fi2d)
     1423         
     1424          IF (vars_defined) zx_tmp_fi2d(:)=sollwai_aero*swradcorr
     1425          CALL histwrite_phy(o_sollwai, zx_tmp_fi2d)
    13561426       ENDIF
    13571427       IF (flag_aerosol.GT.0.AND.ok_cdnc) THEN
     
    13781448       CALL histwrite_phy(o_ovap, q_seri)
    13791449       CALL histwrite_phy(o_oliq, ql_seri)
    1380        CALL histwrite_phy(o_ocond, ql_seri+qs_seri)
     1450
     1451       IF (vars_defined) zx_tmp_fi3d = ql_seri+qs_seri
     1452       CALL histwrite_phy(o_ocond, zx_tmp_fi3d)
     1453
    13811454       CALL histwrite_phy(o_geop, zphi)
    13821455       CALL histwrite_phy(o_vitu, u_seri)
     
    13851458       CALL histwrite_phy(o_pres, pplay)
    13861459       CALL histwrite_phy(o_paprs, paprs(:,1:klev))
    1387        CALL histwrite_phy(o_zfull,zphi/RG)
     1460       
     1461       IF (vars_defined) zx_tmp_fi3d = zphi/RG
     1462       CALL histwrite_phy(o_zfull,zx_tmp_fi3d)
    13881463
    13891464       IF (flag_aerosol_strat.EQ.2) THEN
     
    14151490       CALL histwrite_phy(o_rnebjn, zx_tmp_fi3d)
    14161491       CALL histwrite_phy(o_rhum, zx_rh)
    1417        CALL histwrite_phy(o_ozone, &
    1418             wo(:, :, 1) * dobson_u * 1e3 / zmasse / rmo3 * rmd)
     1492       
     1493       IF (vars_defined) zx_tmp_fi3d = wo(:, :, 1) * dobson_u * 1e3 / zmasse / rmo3 * rmd
     1494       CALL histwrite_phy(o_ozone, zx_tmp_fi3d)
    14191495
    14201496       IF (read_climoz == 2) THEN
    1421           CALL histwrite_phy(o_ozone_light, &
    1422                wo(:, :, 2) * dobson_u * 1e3 / zmasse / rmo3 * rmd)
     1497         IF (vars_defined) zx_tmp_fi3d = wo(:, :, 2) * dobson_u * 1e3 / zmasse / rmo3 * rmd
     1498         CALL histwrite_phy(o_ozone_light, zx_tmp_fi3d)
    14231499       ENDIF
    14241500
     
    14281504
    14291505       CALL histwrite_phy(o_dqphy,  d_qx(:,:,ivap))
    1430        CALL water_int(klon,klev,d_qx(:,:,ivap),zmasse,zx_tmp_fi2d)
     1506       IF (vars_defined) CALL water_int(klon,klev,d_qx(:,:,ivap),zmasse,zx_tmp_fi2d)
    14311507       CALL histwrite_phy(o_dqphy2d,  zx_tmp_fi2d)
    14321508
    14331509       CALL histwrite_phy(o_dqlphy,  d_qx(:,:,iliq))
    1434        CALL water_int(klon,klev,d_qx(:,:,iliq),zmasse,zx_tmp_fi2d)
     1510       IF (vars_defined) CALL water_int(klon,klev,d_qx(:,:,iliq),zmasse,zx_tmp_fi2d)
    14351511       CALL histwrite_phy(o_dqlphy2d,  zx_tmp_fi2d)
    14361512
    14371513       IF (nqo.EQ.3) THEN
    14381514       CALL histwrite_phy(o_dqsphy,  d_qx(:,:,isol))
    1439        CALL water_int(klon,klev,d_qx(:,:,isol),zmasse,zx_tmp_fi2d)
     1515       IF (vars_defined) CALL water_int(klon,klev,d_qx(:,:,isol),zmasse,zx_tmp_fi2d)
    14401516       CALL histwrite_phy(o_dqsphy2d,  zx_tmp_fi2d)
    14411517       ELSE
     
    15221598       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_con(1:klon,1:klev)/pdtphys
    15231599       CALL histwrite_phy(o_dqcon, zx_tmp_fi3d)
    1524        CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
     1600       IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
    15251601       CALL histwrite_phy(o_dqcon2d, zx_tmp_fi2d)
    15261602
     
    15441620       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lsc(1:klon,1:klev)/pdtphys
    15451621       CALL histwrite_phy(o_dqlsc, zx_tmp_fi3d)
    1546        CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
     1622       IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
    15471623       CALL histwrite_phy(o_dqlsc2d, zx_tmp_fi2d)
    15481624       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=beta_prec(1:klon,1:klev)
     
    15571633          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscth(1:klon,1:klev)/pdtphys
    15581634          CALL histwrite_phy(o_dqlscth, zx_tmp_fi3d)
    1559           CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
     1635          IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
    15601636          CALL histwrite_phy(o_dqlscth2d, zx_tmp_fi2d)
    15611637          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_lscst(1:klon,1:klev)/pdtphys
    15621638          CALL histwrite_phy(o_dqlscst, zx_tmp_fi3d)
    1563           CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
     1639          IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
    15641640          CALL histwrite_phy(o_dqlscst2d, zx_tmp_fi2d)
    15651641          CALL histwrite_phy(o_plulth, plul_th)
     
    15911667       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_vdf(1:klon,1:klev)/pdtphys
    15921668       CALL histwrite_phy(o_dqvdf, zx_tmp_fi3d)
    1593        CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
     1669       IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
    15941670       CALL histwrite_phy(o_dqvdf2d, zx_tmp_fi2d)
    15951671       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_eva(1:klon,1:klev)/pdtphys
     
    15971673       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_eva(1:klon,1:klev)/pdtphys
    15981674       CALL histwrite_phy(o_dqeva, zx_tmp_fi3d)
    1599        CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
     1675       IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
    16001676       CALL histwrite_phy(o_dqeva2d, zx_tmp_fi2d)
    16011677       zpt_conv = 0.
     
    16381714          ENDIF
    16391715          CALL histwrite_phy(o_dqthe, zx_tmp_fi3d)
    1640           CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
     1716          IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
    16411717          CALL histwrite_phy(o_dqthe2d, zx_tmp_fi2d)
    16421718       ENDIF !iflag_thermals
     
    16451721       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_q_ajsb(1:klon,1:klev)/pdtphys
    16461722       CALL histwrite_phy(o_dqajs, zx_tmp_fi3d)
    1647        CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
     1723       IF (vars_defined) CALL water_int(klon,klev,zx_tmp_fi3d,zmasse,zx_tmp_fi2d)
    16481724       CALL histwrite_phy(o_dqajs2d, zx_tmp_fi2d)
    16491725       IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_swr(1:klon,1:klev)/pdtphys
     
    16811757
    16821758       IF (ok_hines) THEN
    1683           CALL histwrite_phy(o_du_gwd_hines, du_gwd_hines/pdtphys)
    1684           CALL histwrite_phy(o_dv_gwd_hines, dv_gwd_hines/pdtphys)
     1759          IF (vars_defined) zx_tmp_fi3d=du_gwd_hines/pdtphys
     1760          CALL histwrite_phy(o_du_gwd_hines, zx_tmp_fi3d)
     1761
     1762          IF (vars_defined) zx_tmp_fi3d= dv_gwd_hines/pdtphys         
     1763          CALL histwrite_phy(o_dv_gwd_hines, zx_tmp_fi3d)
     1764         
    16851765          IF (vars_defined) zx_tmp_fi3d(1:klon,1:klev)=d_t_hin(1:klon,1:klev)/pdtphys
    16861766          CALL histwrite_phy(o_dthin, zx_tmp_fi3d)
     
    16901770
    16911771       IF (.not. ok_hines .and. ok_gwd_rando) THEN
    1692           CALL histwrite_phy(o_du_gwd_front, du_gwd_front / pdtphys)
    1693           CALL histwrite_phy(o_dv_gwd_front, dv_gwd_front / pdtphys)
     1772          IF (vars_defined)  zx_tmp_fi3d=du_gwd_front / pdtphys
     1773          CALL histwrite_phy(o_du_gwd_front, zx_tmp_fi3d)
     1774         
     1775          IF (vars_defined)  zx_tmp_fi3d=dv_gwd_front / pdtphys
     1776          CALL histwrite_phy(o_dv_gwd_front, zx_tmp_fi3d)
     1777         
    16941778          CALL histwrite_phy(o_ustr_gwd_front, zustr_gwd_front)
    16951779          CALL histwrite_phy(o_vstr_gwd_front, zvstr_gwd_front)
     
    16971781
    16981782       IF (ok_gwd_rando) THEN
    1699           CALL histwrite_phy(o_du_gwd_rando, du_gwd_rando / pdtphys)
    1700           CALL histwrite_phy(o_dv_gwd_rando, dv_gwd_rando / pdtphys)
     1783          IF (vars_defined)  zx_tmp_fi3d=du_gwd_rando / pdtphys
     1784          CALL histwrite_phy(o_du_gwd_rando, zx_tmp_fi3d)
     1785         
     1786          IF (vars_defined)  zx_tmp_fi3d=dv_gwd_rando / pdtphys
     1787          CALL histwrite_phy(o_dv_gwd_rando, zx_tmp_fi3d)
    17011788          CALL histwrite_phy(o_ustr_gwd_rando, zustr_gwd_rando)
    17021789          CALL histwrite_phy(o_vstr_gwd_rando, zvstr_gwd_rando)
     
    17061793
    17071794       IF (ok_qch4) THEN
    1708           CALL histwrite_phy(o_dqch4, d_q_ch4 / pdtphys)
    1709        ENDIF
    1710 
    1711        DO k=1, klevp1
    1712          zx_tmp_fi3d1(:,k)=swup(:,k)*swradcorr(:)
    1713        ENDDO
     1795          IF (vars_defined) zx_tmp_fi3d=d_q_ch4 / pdtphys
     1796          CALL histwrite_phy(o_dqch4, zx_tmp_fi3d)
     1797       ENDIF
     1798       
     1799       IF (vars_defined) THEN
     1800         DO k=1, klevp1
     1801           zx_tmp_fi3d1(:,k)=swup(:,k)*swradcorr(:)
     1802         ENDDO
     1803       ENDIF
     1804       
    17141805       CALL histwrite_phy(o_rsu, zx_tmp_fi3d1)
    1715        DO k=1, klevp1
    1716          zx_tmp_fi3d1(:,k)=swdn(:,k)*swradcorr(:)
    1717        ENDDO
     1806
     1807
     1808       IF (vars_defined) THEN
     1809         DO k=1, klevp1
     1810           zx_tmp_fi3d1(:,k)=swdn(:,k)*swradcorr(:)
     1811         ENDDO
     1812       ENDIF
     1813       
    17181814       CALL histwrite_phy(o_rsd, zx_tmp_fi3d1)
    1719        DO k=1, klevp1
    1720          zx_tmp_fi3d1(:,k)=swup0(:,k)*swradcorr(:)
    1721        ENDDO
     1815
     1816       IF (vars_defined) THEN
     1817         DO k=1, klevp1
     1818           zx_tmp_fi3d1(:,k)=swup0(:,k)*swradcorr(:)
     1819         ENDDO
     1820       ENDIF
     1821       
    17221822       CALL histwrite_phy(o_rsucs, zx_tmp_fi3d1)
    1723        DO k=1, klevp1
    1724          zx_tmp_fi3d1(:,k)=swdn0(:,k)*swradcorr(:)
    1725        ENDDO
     1823
     1824       IF (vars_defined) THEN
     1825         DO k=1, klevp1
     1826           zx_tmp_fi3d1(:,k)=swdn0(:,k)*swradcorr(:)
     1827         ENDDO
     1828       ENDIF
    17261829       CALL histwrite_phy(o_rsdcs, zx_tmp_fi3d1)
    17271830
     
    17771880       ELSE IF (iflag_con == 2) THEN
    17781881          CALL histwrite_phy(o_mcd,  pmfd)
    1779           CALL histwrite_phy(o_dmc,  pmfu + pmfd)
     1882          IF (vars_defined) zx_tmp_fi3d = pmfu + pmfd
     1883          CALL histwrite_phy(o_dmc,  zx_tmp_fi3d)
    17801884       ENDIF
    17811885       CALL histwrite_phy(o_ref_liq, ref_liq)
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/physiq_mod.F90

    r3336 r3355  
    15171517            ENDDO
    15181518          ENDDO
     1519        ELSE
     1520          pbl_tke(:,:,is_ave) = 0. !ym missing init : maybe must be initialized in the same way that for klon_glo==1 ??
    15191521!>jyg
    15201522       ENDIF
     
    22382240       !
    22392241       !-------gustiness calculation-------!
     2242       !ym : Warning gustiness non inialized for iflag_gusts=2 & iflag_gusts=3
     2243       gustiness=0  !ym missing init
     2244       
    22402245       IF (iflag_gusts==0) THEN
    22412246          gustiness(1:klon)=0
     
    40654070
    40664071    IF (.not. ok_hines .and. ok_gwd_rando) then
     4072       ! ym missing init for east_gwstress & west_gwstress -> added in phys_local_var_mod
    40674073       CALL acama_GWD_rando(PHYS_TSTEP, pplay, latitude_deg, t_seri, u_seri, &
    40684074            v_seri, rot, zustr_gwd_front, zvstr_gwd_front, du_gwd_front, &
     
    47274733       !         write(97) u_seri,v_seri,t_seri,q_seri
    47284734       !         close(97)
    4729        !$OMP MASTER
     4735!       !$OMP MASTER
    47304736       IF (read_climoz >= 1) THEN
    47314737          IF (is_mpi_root) THEN
     
    47354741          DEALLOCATE(press_cen_climoz) ! pointer
    47364742       ENDIF
    4737        !$OMP END MASTER
     4743!       !$OMP END MASTER
    47384744#ifdef CPP_XIOS
    47394745       IF (is_omp_master) CALL xios_context_finalize
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/radlwsw_m.F90

    r2611 r3355  
    384384  cgaero(:,:,:,:)=0.
    385385  lldebug=.FALSE.
     386
    386387 
    387388  !
     
    596597      ztopswaiaero(i)=0.
    597598      zsolswaiaero(i)=0.
     599      ztopsw_aero(i,:)  = 0. !ym missing init : warning : not initialized in SW_AEROAR4
     600      ztopsw0_aero(i,:) = 0. !ym missing init : warning : not initialized in SW_AEROAR4
     601      zsolsw_aero(i,:)  = 0. !ym missing init : warning : not initialized in SW_AEROAR4
     602      zsolsw0_aero(i,:) = 0. !ym missing init : warning : not initialized in SW_AEROAR4
    598603      ENDDO
    599604!     print *,'Avant SW_LMDAR4: PSCT zrmu0 zfract',PSCT, zrmu0, zfract
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/rrtm/suinit.F90

    r1990 r3355  
    126126ALLOCATE(VDELA  (MAX(JPMXLE,NFLEVG)))
    127127ALLOCATE(VDELB  (MAX(JPMXLE,NFLEVG)))
     128VDELB = 0  !ym missing init
    128129ALLOCATE( VC      (NFLEVG) )
     130VC = 0    !ym missing init
    129131ALLOCATE( NLOEN   (NPROMA) )
    130132ALLOCATE( NLOENG   (NPROMA) )
Note: See TracChangeset for help on using the changeset viewer.