Ignore:
Timestamp:
Mar 29, 2022, 11:12:45 AM (3 years ago)
Author:
idelkadi
Message:

Implementation of Ecrad in LMDZ (continued):

  • Add diagnostics for online and offline comparison under the keys "lldebug_for_offline" (defaults to false)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/radlwsw_m.F90

    r4045 r4116  
    4040   toplwad_aero, sollwad_aero,&
    4141   toplwai_aero, sollwai_aero, &
    42    toplwad0_aero, sollwad0_aero,&
     42   toplwad0_aero, sollwad0_aero, &
    4343!-end
    4444   ZLWFT0_i, ZFLDN0, ZFLUP0,&
     
    224224  REAL,    INTENT(in)  :: piz_aero_sw_rrtm(KLON,KLEV,2,NSW)                 ! aerosol optical properties RRTM
    225225  REAL,    INTENT(in)  :: cg_aero_sw_rrtm(KLON,KLEV,2,NSW)                  ! aerosol optical properties RRTM
     226! AI
    226227!--OB fin
    227228
     
    335336  REAL(KIND=8) ZSWDIFFUSEBAND(klon,NSW), &  ! SW DN flux in diffuse albedo band
    336337               ZSWDIRECTBAND(klon,NSW)      ! SW DN flux in direct albedo band
     338  REAL(KIND=8) SOLARIRAD
    337339  REAL(KIND=8) seuilmach
     340! AI 10 mars 22 : Pour les tests Offline
     341  logical   :: lldebug_for_offline = .false.
     342  REAL(KIND=8) solaire_off(klon), &
     343               ZCO2_off(klon,klev), &
     344               ZCH4_off(klon,klev), &           ! CH4 mass mixing ratios on full levels
     345               ZN2O_off(klon,klev), &           ! N2O mass mixing ratios on full levels
     346               ZNO2_off(klon,klev), &           ! NO2 mass mixing ratios on full levels
     347               ZCFC11_off(klon,klev), &         ! CFC11
     348               ZCFC12_off(klon,klev), &         ! CFC12
     349               ZHCFC22_off(klon,klev), &        ! HCFC22
     350               ZCCL4_off(klon,klev), &          ! CCL4
     351               ZO2_off(klon,klev)               ! O2#endif
    338352#endif
    339353!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    11691183!      DO i = 1, kdlon
    11701184!      DO k = 1, kflev
     1185!      DO kk= 1, naero_tot
    11711186!      DO kk=1, NSW
    11721187!
     
    11781193!      PPIZA_NAT(i,kflev+1-k,kk)=piz_aero_sw_rrtm(i,k,1,kk)
    11791194!      PCGA_NAT(i,kflev+1-k,kk)=cg_aero_sw_rrtm(i,k,1,kk)
     1195!       ZAEROSOL(i,kflev+1-k,kk)=m_allaer(i,k,kk)
    11801196!
    11811197!      ENDDO
     
    12821298         ENDDO
    12831299
    1284 ! AI ATTENTION TESTS
    1285 !      PALBD_NEW = 0.0
    1286 !      PALBP_NEW = 0.0
    1287 !      ZCO2 = RCO2
    1288 !      ZCH4 = RCH4
    1289 !      ZN2O = RN2O
    1290 !      ZNO2 = 0.0
    1291 !      ZCFC11 = RCFC11
    1292 !      ZCFC12 = RCFC12
    1293 !      ZHCFC22 = 0.0
    1294 !      ZO2 = 0.0
    1295 !      ZCCL4 = 0.0
    12961300
    12971301      print *,'RADLWSW: avant RADIATION_SCHEME '
    1298 !      print*,'RCFC11=',RCFC11
    1299 !      print*,'RCFC12=',RCFC12
    1300 
    1301       IF (lldebug) THEN
     1302   
     1303! AI mars 2022
     1304    SOLARIRAD = solaire/zdist/zdist
     1305!! diagnos pour la comparaison a la version offline
     1306!!! - Gas en VMR pour offline et MMR pour online
     1307!!! - on utilise pour solarirrad une valeur constante
     1308    if (lldebug_for_offline) then
     1309       SOLARIRAD = 1366.0896
     1310       ZCH4_off = CH4_ppb*1e-9
     1311       ZN2O_off = N2O_ppb*1e-9
     1312       ZNO2_off = 0.0
     1313       ZCFC11_off = CFC11_ppt*1e-12
     1314       ZCFC12_off = CFC12_ppt*1e-12
     1315       ZHCFC22_off = 0.0
     1316       ZCCL4_off = 0.0
     1317       ZO2_off = 0.0
     1318       ZCO2_off = co2_ppm*1e-6
     1319
    13021320        CALL writefield_phy('rmu0',rmu0,1)
    13031321        CALL writefield_phy('tsol',tsol,1)
    13041322        CALL writefield_phy('emissiv_out',ZEMIS,1)
    1305 !        CALL writefield_phy('emissiv_in',ZEMISW,1)
    1306 !        CALL writefield_phy('pctsrf_ter',pctsrf(:,is_ter),1)
    1307 !        CALL writefield_phy('pctsrf_oce',pctsrf(:,is_oce),1)
    1308 !        CALL writefield_phy('ZGELAM',ZGELAM,1)
    1309 !        CALL writefield_phy('ZGEMU',ZGEMU,1)
    1310 !        CALL writefield_phy('zmasq',zmasq,1)
    13111323        CALL writefield_phy('paprs_i',paprs_i,klev+1)
    1312 !        CALL writefield_phy('pplay_i',pplay_i,klev)
    1313 !        CALL writefield_phy('t_i',t_i,klev)
    13141324        CALL writefield_phy('ZTH_i',ZTH_i,klev+1)
    13151325        CALL writefield_phy('cldfra_i',cldfra_i,klev)
     
    13201330        CALL writefield_phy('palbp_new',PALBP_NEW,NSW)
    13211331        CALL writefield_phy('POZON',POZON_i(:,:,1),klev)
    1322 !        CALL writefield_phy('ZCO2',ZCO2,klev)
    1323 !        CALL writefield_phy('ZCH4',ZCH4,klev)
    1324 !        CALL writefield_phy('ZN2O',ZN2O,klev)
    1325 !        CALL writefield_phy('ZO2',ZO2,klev)
    1326 !        CALL writefield_phy('ZNO2',ZNO2,klev)
    1327 !        CALL writefield_phy('ZCFC11',ZCFC11,klev)
    1328 !        CALL writefield_phy('ZCFC12',ZCFC12,klev)
    1329 !        CALL writefield_phy('ZHCFC22',ZHCFC22,klev)
    1330 !        CALL writefield_phy('ZCCL4',ZCCL4,klev)
     1332        CALL writefield_phy('ZCO2',ZCO2_off,klev)
     1333        CALL writefield_phy('ZCH4',ZCH4_off,klev)
     1334        CALL writefield_phy('ZN2O',ZN2O_off,klev)
     1335        CALL writefield_phy('ZO2',ZO2_off,klev)
     1336        CALL writefield_phy('ZNO2',ZNO2_off,klev)
     1337        CALL writefield_phy('ZCFC11',ZCFC11_off,klev)
     1338        CALL writefield_phy('ZCFC12',ZCFC12_off,klev)
     1339        CALL writefield_phy('ZHCFC22',ZHCFC22_off,klev)
     1340        CALL writefield_phy('ZCCL4',ZCCL4_off,klev)
    13311341        CALL writefield_phy('ref_liq_i',ref_liq_i,klev)
    13321342        CALL writefield_phy('ref_ice_i',ref_ice_i,klev)
    1333       ENDIF
     1343      endif
     1344! lldebug_for_offline
    13341345 
    13351346      CALL RADIATION_SCHEME &
     
    13371348! ??? naero_tot
    13381349      & day_cur, current_time, &
    1339       & PSCT, &
    1340       & rmu0, tsol, PALBD_NEW,PALBP_NEW, &   
    1341 !       PEMIS_WINDOW (???), &
     1350      & SOLARIRAD, &
     1351      & rmu0, tsol, &
     1352!       Albedo diffuse et directe
     1353      & PALBD_NEW,PALBP_NEW, &   
     1354!       Emessivite : PEMIS_WINDOW (???), &
    13421355      & ZEMIS, ZEMISW, &
    13431356!       PCCN_LAND, PCCN_SEA, & ???
     
    13741387      print *,'========= RADLWSW: apres RADIATION_SCHEME ==================== '
    13751388
    1376       IF (lldebug) THEN
     1389     if (lldebug_for_offline) then
    13771390        CALL writefield_phy('FLUX_LW',ZLWFT_i,klev+1)
    13781391        CALL writefield_phy('FLUX_LW_CLEAR',ZLWFT0_ii,klev+1)
     
    13891402        CALL writefield_phy('FLUX_UP_SW',ZFSUP_i,klev+1)
    13901403        CALL writefield_phy('FLUX_UP_SW_CLEAR',ZFCUP_i,klev+1)
    1391       ENDIF
     1404      endif
     1405
    13921406! ---------
    13931407! On retablit l'ordre des niveaux lmd pour les tableaux de sortie
Note: See TracChangeset for help on using the changeset viewer.