Changeset 2989 for LMDZ5/trunk


Ignore:
Timestamp:
Sep 18, 2017, 5:32:12 PM (7 years ago)
Author:
musat
Message:

The 4co2 output fields are now managed by the XIOS server via
file*lmdz*xml files and the ok_4xCO2atm logical flag.
ok_4xCO2atm is initialized to TRUE if

  • one of the 4co2 variables (rsut4cO2, rlut4co2, etc) are asked for

by XIOS sefrver or

  • if one of the perturbed GES concentration (RCO2_per, RCH4_per, etc)

is different from the actual (RCO2, RCH4, etc) GES concentration.

Location:
LMDZ5/trunk/libf/phylmd
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/clesphys.h

    r2973 r2989  
    2020       REAL(kind=8) CH4_ppb, N2O_ppb, CFC11_ppt, CFC12_ppt
    2121!IM ajout CFMIP2/CMIP5
    22        LOGICAL ok_4xCO2atm
    2322       REAL(kind=8) RCO2_per,RCH4_per,RN2O_per,RCFC11_per,RCFC12_per
    2423       REAL(kind=8) CH4_ppb_per,N2O_ppb_per,CFC11_ppt_per,CFC12_ppt_per
     
    124123     &     , iflag_con, nbapp_cv, nbapp_wk                              &
    125124     &     , iflag_ener_conserv                                         &
    126      &     , ok_4xCO2atm                                                &
    127125     &     , ok_suntime_rrtm                                            &
    128126     &     , overlap                                                    &
  • LMDZ5/trunk/libf/phylmd/conf_phys_m.F90

    r2952 r2989  
    157157    REAL,SAVE :: CFC11_ppt_omp,RCFC11_omp,CFC11_ppt_per_omp,RCFC11_per_omp
    158158    REAL,SAVE :: CFC12_ppt_omp,RCFC12_omp,CFC12_ppt_per_omp,RCFC12_per_omp
    159     LOGICAL,SAVE :: ok_4xCO2atm_omp
    160159    REAL,SAVE :: epmax_omp
    161160    REAL,SAVE :: coef_epmax_cape_omp
     
    664663    !Config Help =
    665664
    666     ok_4xCO2atm_omp = .FALSE.
    667     CALL getin('ok_4xCO2atm',ok_4xCO2atm_omp)
    668 
    669665    !Config Key  = RCH4_per
    670666    !Config Desc = Concentration du CH4_per
     
    21522148    RCFC11_act = RCFC11
    21532149    RCFC12_act = RCFC12
    2154     ok_4xCO2atm = ok_4xCO2atm_omp
    21552150    RCO2_per = RCO2_per_omp
    21562151    RCH4_per = RCH4_per_omp
     
    25012496    write(lunout,*)' CFC11_ppt=',CFC11_ppt,' RCFC11_act=  ',RCFC11_act
    25022497    write(lunout,*)' CFC12_ppt=',CFC12_ppt,' RCFC12_act=  ',RCFC12_act
    2503     write(lunout,*)' ok_4xCO2atm=',ok_4xCO2atm
    25042498    write(lunout,*)' RCO2_per = ',RCO2_per,' RCH4_per = ', RCH4_per
    25052499    write(lunout,*)' RN2O_per = ',RN2O_per,' RCFC11_per = ', RCFC11_per
  • LMDZ5/trunk/libf/phylmd/iophy.F90

    r2856 r2989  
    459459    USE mod_phys_lmdz_para, ONLY: jj_nb
    460460    USE phys_output_var_mod, ONLY: type_ecri, zoutm, zdtime_moy, lev_files, &
    461                                    nid_files, nhorim, swaero_diag, dryaod_diag, nfiles
     461                                   nid_files, nhorim, swaero_diag, dryaod_diag, nfiles, &
     462                                   ok_4xCO2atm
    462463    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    463464    USE aero_mod, ONLY : naero_tot, name_aero_tau
     
    517518    ENDDO
    518519
     520    ! Set ok_4xCO2atm=true if at least one of the concerned variables are
     521    ! defined
     522    IF (nomvar=='rsut4co2'.OR.nomvar=='rlut4co2'.OR.nomvar=='rsutcs4co2' &
     523        .OR. nomvar=='rlutcs4co2'.OR.nomvar=='rsu4co2'.OR.nomvar=='rsucs4co2' &
     524        .OR.nomvar=='rsu4co2'.OR.nomvar=='rsucs4co2'.OR.nomvar=='rsd4co2'.OR. &
     525        nomvar=='rsdcs4co2'.OR.nomvar=='rlu4co2'.OR.nomvar=='rlucs4co2'.OR.&
     526        nomvar=='rld4co2'.OR.nomvar=='rldcs4co2') THEN
     527        IF ( flag_var(iff)<=lev_files(iff) ) ok_4xCO2atm=.TRUE.
     528    ENDIF
    519529  END SUBROUTINE histdef2d_old
    520530
     
    573583    USE phys_output_var_mod, ONLY: ctrl_out, type_ecri_files, zoutm, zdtime_moy, &
    574584                                   clef_stations, phys_out_filenames, lev_files, &
    575                                    nid_files, nhorim, swaero_diag, dryaod_diag
     585                                   nid_files, nhorim, swaero_diag, dryaod_diag,&
     586                                   ok_4xCO2atm
    576587    USE print_control_mod, ONLY: prt_level,lunout
    577588    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
     
    663674      ENDIF
    664675    ENDDO
     676    ! Set ok_4xCO2atm=true if at least one of the concerned variables are
     677    ! defined
     678    IF (var%name=='rsut4co2'.OR.var%name=='rlut4co2'.OR.var%name=='rsutcs4co2' &
     679        .OR. var%name=='rlutcs4co2'.OR.var%name=='rsu4co2'.OR.var%name=='rsucs4co2' &
     680        .OR.var%name=='rsu4co2'.OR.var%name=='rsucs4co2'.OR.var%name=='rsd4co2'.OR. &
     681        var%name=='rsdcs4co2'.OR.var%name=='rlu4co2'.OR.var%name=='rlucs4co2'.OR.&
     682        var%name=='rld4co2'.OR.var%name=='rldcs4co2') THEN
     683        IF ( var%flag(iff)<=lev_files(iff) ) ok_4xCO2atm=.TRUE.
     684    ENDIF
    665685  END SUBROUTINE histdef2d
    666686
  • LMDZ5/trunk/libf/phylmd/phys_output_mod.F90

    r2854 r2989  
    520520      WRITE(lunout,*)'swaero_diag=',swaero_diag
    521521      WRITE(lunout,*)'dryaod_diag=',dryaod_diag
     522      WRITE(lunout,*)'ok_4xCO2atm=',ok_4xCO2atm
    522523      WRITE(lunout,*)'phys_output_open: ends here'
    523524    ENDIF
  • LMDZ5/trunk/libf/phylmd/phys_output_var_mod.F90

    r2958 r2989  
    9292  LOGICAL, SAVE                                :: dryaod_diag=.TRUE.
    9393  !$OMP THREADPRIVATE(swaero_diag, dryaod_diag)
     94  ! ok_4xCO2atm : flag indicates if it is necessary to do a second call of
     95  ! radiation code with a 4xCO2 or another different GES to assess SW/LW
     96  ! in this case
     97  !--IM: as for swaero_diag or dryaod_diag this needs to be set to TRUE by default and
     98  !--    changed back to FALSE after first radiation call and corrected back to TRUE
     99  !--    based on output requests
     100  LOGICAL, SAVE                                :: ok_4xCO2atm=.FALSE.
     101  !$OMP THREADPRIVATE(ok_4xCO2atm)
    94102
    95103  INTEGER, SAVE:: levmin(nfiles) = 1
  • LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90

    r2973 r2989  
    320320         map_emis_ThCi,map_pcld_ThCi,map_tcld_ThCi,&
    321321         map_emis_Anv,map_pcld_Anv,map_tcld_Anv, &
    322          alt_tropo
     322         alt_tropo, &
     323!Ionela
     324         ok_4xCO2atm
    323325
    324326    USE ocean_slab_mod, ONLY: nslay, tslab, slab_bils, slab_bilg, tice, &
     
    17331735       CALL histwrite_phy(o_ref_liq, ref_liq)
    17341736       CALL histwrite_phy(o_ref_ice, ref_ice)
    1735        IF (RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR. &
    1736             RN2O_per.NE.RN2O_act.OR.RCFC11_per.NE.RCFC11_act.OR. &
    1737             RCFC12_per.NE.RCFC12_act) THEN
     1737!
     1738       IF (ok_4xCO2atm) THEN
    17381739          IF (vars_defined) zx_tmp_fi2d(:) = swupp(:,klevp1)*swradcorr(:)
    17391740          CALL histwrite_phy(o_rsut4co2, zx_tmp_fi2d)
     
    17641765          CALL histwrite_phy(o_rld4co2, lwdnp)
    17651766          CALL histwrite_phy(o_rldcs4co2, lwdn0p)
    1766        ENDIF
     1767       ENDIF !ok_4xCO2atm
    17671768!!!!!!!!!!!! Sorties niveaux de pression NMC !!!!!!!!!!!!!!!!!!!!
    17681769#ifdef CPP_IOIPSL
  • LMDZ5/trunk/libf/phylmd/physiq_mod.F90

    r2984 r2989  
    16101610         IF (xios_field_is_active("dryod550_"//name_aero_tau(naero))) dryaod_diag=.TRUE.
    16111611       ENDDO
     1612       !
     1613       !--setting up ok_4xCO2atm to TRUE in XIOS case
     1614       IF (xios_field_is_active("rsut4co2").OR.xios_field_is_active("rlut4co2").OR. &
     1615           xios_field_is_active("rsutcs4co2").OR.xios_field_is_active("rlutcs4co2").OR. &
     1616           xios_field_is_active("rsu4co2").OR.xios_field_is_active("rsucs4co2").OR. &
     1617           xios_field_is_active("rsd4co2").OR.xios_field_is_active("rsdcs4co2").OR. &
     1618           xios_field_is_active("rlu4co2").OR.xios_field_is_active("rlucs4co2").OR. &
     1619           xios_field_is_active("rld4co2").OR.xios_field_is_active("rldcs4co2")) &
     1620           ok_4xCO2atm=.TRUE.
    16121621#endif
    16131622
     
    37253734          IF (debut) swaero_diag = .FALSE.
    37263735          IF (debut) dryaod_diag = .FALSE.
     3736          !--IM 15/09/2017 here we return ok_4xCO2atm to FALSE
     3737          !--as for swaero_diag, see above
     3738          IF (debut) ok_4xCO2atm = .FALSE.
    37273739#endif
    37283740          !
     
    37313743          !IM Par defaut on a les taux perturbes egaux aux taux actuels
    37323744          !
     3745          IF (RCO2_per.NE.RCO2_act.OR. &
     3746              RCH4_per.NE.RCH4_act.OR. &
     3747              RN2O_per.NE.RN2O_act.OR. &
     3748              RCFC11_per.NE.RCFC11_act.OR. &
     3749              RCFC12_per.NE.RCFC12_act) ok_4xCO2atm =.TRUE.
     3750   !
    37333751          IF (ok_4xCO2atm) THEN
    3734              IF (RCO2_per.NE.RCO2_act.OR.RCH4_per.NE.RCH4_act.OR.     &
    3735                  RN2O_per.NE.RN2O_act.OR.RCFC11_per.NE.RCFC11_act.OR. &
    3736                  RCFC12_per.NE.RCFC12_act) THEN
    37373752                !
    37383753                RCO2 = RCO2_per
     
    37823797                     ZLWFT0_i, ZFLDN0, ZFLUP0, &
    37833798                     ZSWFT0_i, ZFSDN0, ZFSUP0)
    3784              endif
    37853799          endif
    37863800          !
Note: See TracChangeset for help on using the changeset viewer.