Changeset 2539 for LMDZ5/trunk
- Timestamp:
- Jun 3, 2016, 7:06:41 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/rrtm/readaerosolstrato2_rrtm.F90
r2536 r2539 22 22 23 23 include "YOMCST.h" 24 INCLUDE "clesphys.h" 24 25 25 26 CHARACTER (len = 80) :: abort_message … … 71 72 !-------------------------------------------------------- 72 73 73 IF (.not.ALLOCATED(tau_aer_strat)) ALLOCATE(tau_aer_strat(klon,klev, nbands_sw_rrtm))74 IF (.not.ALLOCATED(piz_aer_strat)) ALLOCATE(piz_aer_strat(klon,klev, nbands_sw_rrtm))75 IF (.not.ALLOCATED(cg_aer_strat)) ALLOCATE(cg_aer_strat(klon,klev, nbands_sw_rrtm))76 77 IF (.not.ALLOCATED(taulw_aer_strat)) ALLOCATE(taulw_aer_strat(klon,klev, nbands_lw_rrtm))74 IF (.not.ALLOCATED(tau_aer_strat)) ALLOCATE(tau_aer_strat(klon,klev,NSW)) 75 IF (.not.ALLOCATED(piz_aer_strat)) ALLOCATE(piz_aer_strat(klon,klev,NSW)) 76 IF (.not.ALLOCATED(cg_aer_strat)) ALLOCATE(cg_aer_strat(klon,klev,NSW)) 77 78 IF (.not.ALLOCATED(taulw_aer_strat)) ALLOCATE(taulw_aer_strat(klon,klev,NLW)) 78 79 79 80 !--we only read monthly strat aerosol data … … 92 93 93 94 !--Starts with SW optical properties 94 IF (nbands_sw_rrtm.NE.6) THEN95 abort_message='nbands_sw_rrtm doit etre egal a 6 dans readaerosolstrat_rrtm'96 CALL abort_physic(modname,abort_message,1)97 ENDIF98 95 99 96 CALL nf95_open("tauswstrat.2D.nc", nf90_nowrite, ncid_in) … … 128 125 n_wav = size(wav) 129 126 print *, 'WAV aerosol strato=', n_wav, wav 130 IF (n_wav.NE. nbands_sw_rrtm) THEN127 IF (n_wav.NE.NSW) THEN 131 128 abort_message='Le nombre de wav n est pas egal a NSW' 132 129 CALL abort_physic(modname,abort_message,1) … … 176 173 177 174 !---reduce to a klon_glo grid 178 DO band=1, nbands_sw_rrtm175 DO band=1, NSW 179 176 CALL grid2dTo1d_glo(tauaerstrat_mois(:,:,:,band),tauaerstrat_mois_glo(:,:,band)) 180 177 CALL grid2dTo1d_glo(pizaerstrat_mois(:,:,:,band),pizaerstrat_mois_glo(:,:,band)) … … 184 181 !--Now LW optical properties 185 182 ! 186 IF (nbands_lw_rrtm .NE. NLW) then187 abort_message='different values for NLW and nbands_lw_rrtm'188 CALL abort_physic(modname,abort_message,1)189 ENDIF190 191 183 CALL nf95_open("taulwstrat.2D.nc", nf90_nowrite, ncid_in) 192 184 … … 219 211 n_wav = size(wav) 220 212 print *, 'WAV aerosol strato=', n_wav, wav 221 IF (n_wav.NE. nbands_lw_rrtm) THEN213 IF (n_wav.NE.NLW) THEN 222 214 abort_message='Le nombre de wav n est pas egal a NLW' 223 215 CALL abort_physic(modname,abort_message,1) … … 244 236 245 237 !---reduce to a klon_glo grid 246 DO band=1, nbands_lw_rrtm238 DO band=1, NLW 247 239 CALL grid2dTo1d_glo(taulwaerstrat_mois(:,:,:,band),taulwaerstrat_mois_glo(:,:,band)) 248 240 ENDDO … … 289 281 290 282 !--weighted average for cg, piz and tau, adding strat aerosols on top of tropospheric ones 291 DO band=1, nbands_sw_rrtm283 DO band=1, NSW 292 284 WHERE (stratomask.GT.0.999999) 293 !--anthropogenic aerosols bands 1 to nbands_sw_rrtm285 !--anthropogenic aerosols bands 1 to NSW 294 286 cg_aero_sw_rrtm(:,:,2,band) = ( cg_aero_sw_rrtm(:,:,2,band)*piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) + & 295 287 cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) / & … … 300 292 MAX( tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band), 1.e-15 ) 301 293 tau_aero_sw_rrtm(:,:,2,band) = tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band) 302 !--natural aerosols bands 1 to nbands_sw_rrtm294 !--natural aerosols bands 1 to NSW 303 295 cg_aero_sw_rrtm(:,:,1,band) = ( cg_aero_sw_rrtm(:,:,1,band)*piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) + & 304 296 cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) / & … … 316 308 ENDDO 317 309 318 DO band=1, nbands_lw_rrtm310 DO band=1, NLW 319 311 WHERE (stratomask.GT.0.999999) 320 312 tau_aero_lw_rrtm(:,:,2,band) = tau_aero_lw_rrtm(:,:,2,band) + taulw_aer_strat(:,:,band)
Note: See TracChangeset
for help on using the changeset viewer.