Ignore:
Timestamp:
Feb 24, 2017, 7:50:33 PM (7 years ago)
Author:
jyg
Message:

New diagnostics to verify energy conservation.
Some corrections to improve energy conservation.
Some bug correction.

New output variables and new flags are

introduced:

(1)New variables: d_xx_col is the budget over

each column of variable "xx".

(2) fl_ebil: 0 -> no diag; 1 -> diags activated
(3) fl_cor_ebil: 0 -> no correction ensuring

energy conservation; 1 -> first set of
corrections.

+ ok_bad_ecmwf_thermo: if true, a bug setting

RVTMP2 to 0 is fixed; for backward compatibility
the default is "false".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/rrtm/suphec.F90

    r2345 r2799  
    129129
    130130IF (LHOOK) CALL DR_HOOK('SUPHEC',0,ZHOOK_HANDLE)
    131 !CALL GSTATS(1811,0) ! MPL 28.11.08
    132 !RVTMP2=RCPV/RCPD-1.0_JPRB   !use cp,moist
    133 RVTMP2=0.0_JPRB              !neglect cp,moist
    134 RHOH2O=RATM/100._JPRB
    135 R2ES=611.21_JPRB*RD/RV
    136 R3LES=17.502_JPRB
    137 R3IES=22.587_JPRB
    138 R4LES=32.19_JPRB
    139 R4IES=-0.7_JPRB
    140 R5LES=R3LES*(RTT-R4LES)
    141 R5IES=R3IES*(RTT-R4IES)
    142 R5ALVCP=R5LES*RLVTT/RCPD
    143 R5ALSCP=R5IES*RLSTT/RCPD
    144 RALVDCP=RLVTT/RCPD
    145 RALSDCP=RLSTT/RCPD
    146 RALFDCP=RLMLT/RCPD
    147 RTWAT=RTT
    148 RTBER=RTT-5._JPRB
    149 RTBERCU=RTT-5.0_JPRB
    150 RTICE=RTT-23._JPRB
    151 RTICECU=RTT-23._JPRB
    152 
    153 RTWAT_RTICE_R=1.0_JPRB/(RTWAT-RTICE)
    154 RTWAT_RTICECU_R=1.0_JPRB/(RTWAT-RTICECU)
    155 IF(NPHYINT == 0) THEN
    156   ISMAX=NSMAX
    157 ELSE
    158   ISMAX=PHYS_GRID%NSMAX
    159 ENDIF
    160 
    161 RKOOP1=2.583_JPRB
    162 RKOOP2=0.48116E-2_JPRB
     131!
     132  IF (OK_BAD_ECMWF_THERMO) THEN
     133!
     134     ! Modify constants defined in suphel.F90 and set RVTMP2 to 0.
     135     ! CALL GSTATS(1811,0) ! MPL 28.11.08
     136     ! RVTMP2=RCPV/RCPD-1.0_JPRB   !use cp,moist
     137     RVTMP2=0.0_JPRB              !neglect cp,moist
     138     RHOH2O=RATM/100._JPRB
     139     R2ES=611.21_JPRB*RD/RV
     140     R3LES=17.502_JPRB
     141     R3IES=22.587_JPRB
     142     R4LES=32.19_JPRB
     143     R4IES=-0.7_JPRB
     144     R5LES=R3LES*(RTT-R4LES)
     145     R5IES=R3IES*(RTT-R4IES)
     146     R5ALVCP=R5LES*RLVTT/RCPD
     147     R5ALSCP=R5IES*RLSTT/RCPD
     148     RALVDCP=RLVTT/RCPD
     149     RALSDCP=RLSTT/RCPD
     150     RALFDCP=RLMLT/RCPD
     151     RTWAT=RTT
     152     RTBER=RTT-5._JPRB
     153     RTBERCU=RTT-5.0_JPRB
     154     RTICE=RTT-23._JPRB
     155     RTICECU=RTT-23._JPRB
     156     
     157     RTWAT_RTICE_R=1.0_JPRB/(RTWAT-RTICE)
     158     RTWAT_RTICECU_R=1.0_JPRB/(RTWAT-RTICECU)
     159     IF(NPHYINT == 0) THEN
     160       ISMAX=NSMAX
     161     ELSE
     162       ISMAX=PHYS_GRID%NSMAX
     163     ENDIF
     164     
     165     RKOOP1=2.583_JPRB
     166     RKOOP2=0.48116E-2_JPRB
     167     
     168  ELSE
     169     ! Keep constants defined in suphel.F90
     170     RTICE=RTT-23._JPRB
     171!
     172  ENDIF  ! (OK_BAD_ECMWF_THERMO)
    163173
    164174!     ------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.