Changeset 1181
- Timestamp:
- Jun 15, 2009, 6:49:35 PM (16 years ago)
- Location:
- LMDZ4/branches/LMDZ4-dev/libf/phylmd
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/phylmd/aeropt_2bands.F90
r1150 r1181 6 6 7 7 USE dimphy 8 8 USE aerosol_mod 9 9 10 10 ! Yves Balkanski le 12 avril 2006 … … 23 23 REAL, INTENT(in) :: pdel(KLON,KLEV) 24 24 REAL, INTENT(in) :: delt 25 REAL, DIMENSION(klon,klev, 8), INTENT(in) :: m_allaer25 REAL, DIMENSION(klon,klev,naero_spc), INTENT(in) :: m_allaer 26 26 REAL, INTENT(in) :: RHcl(KLON,KLEV) ! humidite relative ciel clair 27 REAL, DIMENSION(klon, 10),INTENT(in) :: fractnat_allaer27 REAL, DIMENSION(klon,naero_tot),INTENT(in) :: fractnat_allaer 28 28 INTEGER, INTENT(in) :: flag_aerosol 29 29 REAL, INTENT(in) :: pplay(klon,klev) … … 33 33 ! Output arguments: 34 34 ! 35 REAL, DIMENSION(klon,klev, 9,2), INTENT(out) :: tau_allaer ! epaisseur optique aerosol36 REAL, DIMENSION(klon,klev, 9,2), INTENT(out) :: piz_allaer ! single scattering albedo aerosol37 REAL, DIMENSION(klon,klev, 9,2), INTENT(out) :: cg_allaer ! asymmetry parameter aerosol35 REAL, DIMENSION(klon,klev,naero_grp,nbands), INTENT(out) :: tau_allaer ! epaisseur optique aerosol 36 REAL, DIMENSION(klon,klev,naero_grp,nbands), INTENT(out) :: piz_allaer ! single scattering albedo aerosol 37 REAL, DIMENSION(klon,klev,naero_grp,nbands), INTENT(out) :: cg_allaer ! asymmetry parameter aerosol 38 38 39 39 ! 40 40 ! Local 41 41 ! 42 REAL, DIMENSION(klon,klev, 10,2) :: tau_ae43 REAL, DIMENSION(klon,klev, 10,2) :: piz_ae44 REAL, DIMENSION(klon,klev, 10,2) :: cg_ae42 REAL, DIMENSION(klon,klev,naero_tot,nbands) :: tau_ae 43 REAL, DIMENSION(klon,klev,naero_tot,nbands) :: piz_ae 44 REAL, DIMENSION(klon,klev,naero_tot,nbands) :: cg_ae 45 45 LOGICAL :: soluble 46 46 INTEGER :: i, k, inu, m, mrfspecies … … 49 49 50 50 PARAMETER (nbre_RH=12) 51 PARAMETER (nbsol_compaer=5) ! 1- Seasalt AS :2- Sesalt CS; 3- BC soluble; 4- POM soluble; 5- SO4.51 PARAMETER (nbsol_compaer=5) ! 1- Seasalt AS; 2- Sesalt CS; 3- BC soluble; 4- POM soluble; 5- SO4. 52 52 PARAMETER (nbinsol_compaer=3) ! 1- Dust; 2- BC insoluble; 3- POM insoluble 53 53 REAL:: RH_tab(nbre_RH) 54 54 REAL:: RH_MAX, DELTA, rh 55 REAL:: tau_ae2b_int(KLON,KLEV, 2) ! Intermediate computation of epaisseur optique aerosol56 REAL:: piz_ae2b_int(KLON,KLEV, 2) ! Intermediate computation of Single scattering albedo57 REAL:: cg_ae2b_int(KLON,KLEV, 2) ! Intermediate computation of Assymetry parameter55 REAL:: tau_ae2b_int(KLON,KLEV,nbands) ! Intermediate computation of epaisseur optique aerosol 56 REAL:: piz_ae2b_int(KLON,KLEV,nbands) ! Intermediate computation of Single scattering albedo 57 REAL:: cg_ae2b_int(KLON,KLEV,nbands) ! Intermediate computation of Assymetry parameter 58 58 PARAMETER (RH_MAX=95.) 59 59 DATA RH_tab/0.,10.,20.,30.,40.,50.,60.,70.,80.,85.,90.,95./ … … 62 62 REAL :: zdp1(klon,klev) 63 63 REAL, PARAMETER :: gravit = 9.80616 ! m2/s 64 INTEGER, ALLOCATABLE, DIMENSION(:) :: aerosol_name 65 INTEGER, PARAMETER :: id_SSSSM = 1 66 INTEGER, PARAMETER :: id_CSSSM = 2 67 INTEGER, PARAMETER :: id_ASSSM = 3 68 INTEGER, PARAMETER :: id_ASBCM = 4 69 INTEGER, PARAMETER :: id_ASPOMM = 5 70 INTEGER, PARAMETER :: id_ASSO4M = 6 71 INTEGER, PARAMETER :: id_CSSO4M = 7 72 INTEGER, PARAMETER :: id_CIDUSTM = 8 73 INTEGER, PARAMETER :: id_AIBCM = 9 74 INTEGER, PARAMETER :: id_AIPOMM = 10 64 INTEGER, ALLOCATABLE, DIMENSION(:) :: aerosol_name 75 65 INTEGER :: nb_aer 76 REAL, DIMENSION(klon,klev, 8) :: mass_temp66 REAL, DIMENSION(klon,klev,naero_spc) :: mass_temp 77 67 78 68 ! 79 69 ! Proprietes optiques 80 70 ! 81 REAL:: alpha_aers_2bands(nbre_RH, 2,nbsol_compaer) !--unit m2/g SO482 REAL:: alpha_aeri_2bands( 2,nbinsol_compaer)83 REAL:: cg_aers_2bands(nbre_RH, 2,nbsol_compaer) !--unit84 REAL:: cg_aeri_2bands( 2,nbinsol_compaer)85 REAL:: piz_aers_2bands(nbre_RH, 2,nbsol_compaer) !-- unit86 REAL:: piz_aeri_2bands( 2,nbinsol_compaer) !-- unit71 REAL:: alpha_aers_2bands(nbre_RH,nbands,nbsol_compaer) !--unit m2/g SO4 72 REAL:: alpha_aeri_2bands(nbands,nbinsol_compaer) 73 REAL:: cg_aers_2bands(nbre_RH,nbands,nbsol_compaer) !--unit 74 REAL:: cg_aeri_2bands(nbands,nbinsol_compaer) 75 REAL:: piz_aers_2bands(nbre_RH,nbands,nbsol_compaer) !-- unit 76 REAL:: piz_aeri_2bands(nbands,nbinsol_compaer) !-- unit 87 77 88 78 … … 233 223 aerosol_name(2) = id_AIPOMM 234 224 ELSEIF (flag_aerosol .EQ. 4) THEN 235 nb_aer = 5225 nb_aer = 3 236 226 ALLOCATE (aerosol_name(nb_aer)) 237 aerosol_name(1) = id_ASSO4M 227 aerosol_name(1) = id_CSSSM 228 aerosol_name(2) = id_SSSSM 229 aerosol_name(3) = id_ASSSM 230 ELSEIF (flag_aerosol .EQ. 5) THEN 231 nb_aer = 1 232 ALLOCATE (aerosol_name(nb_aer)) 233 aerosol_name(1) = id_CIDUSTM 234 ELSEIF (flag_aerosol .EQ. 6) THEN 235 nb_aer = 9 236 ALLOCATE (aerosol_name(nb_aer)) 237 aerosol_name(1) = id_ASSO4M 238 238 aerosol_name(2) = id_ASBCM 239 239 aerosol_name(3) = id_AIBCM 240 240 aerosol_name(4) = id_ASPOMM 241 241 aerosol_name(5) = id_AIPOMM 242 ELSEIF (flag_aerosol .EQ. 5) THEN 243 nb_aer = 4 244 ALLOCATE (aerosol_name(nb_aer)) 245 aerosol_name(1) = id_ASBCM 246 aerosol_name(2) = id_AIBCM 247 aerosol_name(3) = id_ASPOMM 248 aerosol_name(4) = id_AIPOMM 249 ELSEIF (flag_aerosol .EQ. 6) THEN 250 nb_aer = 3 251 ALLOCATE (aerosol_name(nb_aer)) 252 aerosol_name(1) = id_ASSO4M 253 aerosol_name(2) = id_ASPOMM 254 aerosol_name(3) = id_AIPOMM 242 aerosol_name(6) = id_CSSSM 243 aerosol_name(7) = id_SSSSM 244 aerosol_name(8) = id_ASSSM 245 aerosol_name(9) = id_CIDUSTM 255 246 ENDIF 256 247 … … 327 318 DELTA=(rh-RH_tab(RH_num))/(RH_tab(RH_num+1)-RH_tab(RH_num)) 328 319 329 DO inu=1, 2320 DO inu=1,nbands 330 321 IF (soluble) THEN 331 322 tau_ae2b_int(i,k,inu)= & … … 344 335 cg_aers_2bands(RH_num,inu,spsol)) 345 336 346 tau_ae(i,k,aerosol_name(m),inu) = mass_temp(i,k,spsol)*1000.*zdp1(i,k)*delt*tau_ae2b_int(i,k,inu)*fac 337 tau_ae(i,k,aerosol_name(m),inu) = & 338 mass_temp(i,k,spsol)*1000.*zdp1(i,k)*delt*tau_ae2b_int(i,k,inu)*fac 347 339 348 340 ELSE … … 351 343 cg_ae2b_int(i,k,inu) = cg_aeri_2bands(inu,spinsol) 352 344 353 tau_ae(i,k,aerosol_name(m),inu) = mass_temp(i,k,5+ spinsol)*1000.*zdp1(i,k)*delt*tau_ae2b_int(i,k,inu)*fac 345 tau_ae(i,k,aerosol_name(m),inu) = & 346 mass_temp(i,k,5+ spinsol)*1000.*zdp1(i,k)*delt*tau_ae2b_int(i,k,inu)*fac 354 347 ENDIF 355 348 … … 365 358 366 359 367 DO inu=1, 2368 DO mrfspecies=1, 9360 DO inu=1, nbands 361 DO mrfspecies=1,naero_grp 369 362 DO k=1, KLEV 370 363 DO i=1, KLON -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/aeropt_5wv.F90
r1150 r1181 4 4 pdel, m_allaer, delt, & 5 5 RHcl, ai, flag_aerosol, & 6 pplay, t_seri) 6 pplay, t_seri, & 7 tausum, tau) 7 8 8 9 USE DIMPHY 10 USE aerosol_mod 9 11 10 12 ! … … 50 52 REAL, DIMENSION(klon,klev), INTENT(in) :: pdel 51 53 REAL, INTENT(in) :: delt 52 REAL, DIMENSION(klon,klev, 8), INTENT(in) :: m_allaer54 REAL, DIMENSION(klon,klev,naero_spc), INTENT(in) :: m_allaer 53 55 REAL, DIMENSION(klon,klev), INTENT(in) :: RHcl ! humidite relative ciel clair 54 56 INTEGER,INTENT(in) :: flag_aerosol 55 57 REAL, DIMENSION(klon,klev), INTENT(in) :: pplay 56 58 REAL, DIMENSION(klon,klev), INTENT(in) :: t_seri 57 58 59 ! 59 60 ! Output arguments: 60 61 ! 61 REAL, DIMENSION(klon), INTENT(out) :: ai ! POLDER aerosol index 62 REAL, DIMENSION(klon), INTENT(out) :: ai ! POLDER aerosol index 63 REAL, DIMENSION(klon,nwave,naero_spc), INTENT(out) :: tausum 64 REAL, DIMENSION(klon,klev,nwave,naero_spc), INTENT(out) :: tau 65 62 66 63 67 ! 64 68 ! Local 65 69 ! 66 INTEGER, PARAMETER :: las = 570 INTEGER, PARAMETER :: las = nwave 67 71 LOGICAL :: soluble 68 72 … … 92 96 REAL, PARAMETER :: gravit = 9.80616 ! m2/s 93 97 INTEGER, ALLOCATABLE, DIMENSION(:) :: aerosol_name 94 INTEGER, PARAMETER :: id_SSSSM = 195 INTEGER, PARAMETER :: id_CSSSM = 296 INTEGER, PARAMETER :: id_ASSSM = 397 INTEGER, PARAMETER :: id_ASBCM = 498 INTEGER, PARAMETER :: id_ASPOMM = 599 INTEGER, PARAMETER :: id_ASSO4M = 6100 INTEGER, PARAMETER :: id_CSSO4M = 7101 INTEGER, PARAMETER :: id_CIDUSTM = 8102 INTEGER, PARAMETER :: id_AIBCM = 9103 INTEGER, PARAMETER :: id_AIPOMM = 10104 98 INTEGER :: nb_aer 105 99 … … 118 112 REAL :: piz_aeri_5wv(las,nbinsol_compaer) ! Insoluble comp. 1- Dust: 2- BC; 3- POM 119 113 120 REAL, ALLOCATABLE :: TAUSUM(:,:,:) ! Aerosol optical thickness per species 121 REAL, ALLOCATABLE :: TAU(:,:,:,:) ! Aerosol optical thickness per species 122 REAL, DIMENSION(klon,klev,8) :: mass_temp 114 REAL, DIMENSION(klon,klev,naero_spc) :: mass_temp 123 115 124 116 ! … … 330 322 0.972, 0.963, 0.943, 0.923, 0.897/ 331 323 324 ! Initialisations 325 ai(:) = 0. 326 tau_ae5wv_int(:,:,:) = 0. 327 piz_ae5wv_int(:,:,:) = 0. 328 cg_ae5wv_int(:,:,:) = 0. 329 tausum(:,:,:) = 0. 330 tau(:,:,:,:) = 0. 332 331 333 332 … … 344 343 345 344 346 347 345 IF (flag_aerosol .EQ. 1) THEN 348 349 350 346 nb_aer = 1 347 ALLOCATE (aerosol_name(nb_aer)) 348 aerosol_name(1) = id_ASSO4M 351 349 ELSEIF (flag_aerosol .EQ. 2) THEN 352 353 354 355 350 nb_aer = 2 351 ALLOCATE (aerosol_name(nb_aer)) 352 aerosol_name(1) = id_ASBCM 353 aerosol_name(2) = id_AIBCM 356 354 ELSEIF (flag_aerosol .EQ. 3) THEN 357 358 359 360 355 nb_aer = 2 356 ALLOCATE (aerosol_name(nb_aer)) 357 aerosol_name(1) = id_ASPOMM 358 aerosol_name(2) = id_AIPOMM 361 359 ELSEIF (flag_aerosol .EQ. 4) THEN 362 nb_aer = 5 363 ALLOCATE (aerosol_name(nb_aer)) 364 aerosol_name(1) = id_ASSO4M 365 aerosol_name(2) = id_ASBCM 366 aerosol_name(3) = id_AIBCM 367 aerosol_name(4) = id_ASPOMM 368 aerosol_name(5) = id_AIPOMM 360 nb_aer = 3 361 ALLOCATE (aerosol_name(nb_aer)) 362 aerosol_name(1) = id_CSSSM 363 aerosol_name(2) = id_SSSSM 364 aerosol_name(3) = id_ASSSM 369 365 ELSEIF (flag_aerosol .EQ. 5) THEN 370 nb_aer = 4 371 ALLOCATE (aerosol_name(nb_aer)) 372 aerosol_name(1) = id_ASBCM 373 aerosol_name(2) = id_AIBCM 374 aerosol_name(3) = id_ASPOMM 375 aerosol_name(4) = id_AIPOMM 366 nb_aer = 1 367 ALLOCATE (aerosol_name(nb_aer)) 368 aerosol_name(1) = id_CIDUSTM 376 369 ELSEIF (flag_aerosol .EQ. 6) THEN 377 nb_aer = 3 378 ALLOCATE (aerosol_name(nb_aer)) 379 aerosol_name(1) = id_ASSO4M 380 aerosol_name(2) = id_ASPOMM 381 aerosol_name(3) = id_AIPOMM 370 nb_aer = 9 371 ALLOCATE (aerosol_name(nb_aer)) 372 aerosol_name(1) = id_ASSO4M 373 aerosol_name(2) = id_ASBCM 374 aerosol_name(3) = id_AIBCM 375 aerosol_name(4) = id_ASPOMM 376 aerosol_name(5) = id_AIPOMM 377 aerosol_name(6) = id_CSSSM 378 aerosol_name(7) = id_SSSSM 379 aerosol_name(8) = id_ASSSM 380 aerosol_name(9) = id_CIDUSTM 382 381 ENDIF 383 384 ALLOCATE (tausum(klon,las,nb_aer))385 ALLOCATE (tau(klon,klev,las,nb_aer))386 387 388 389 382 390 383 ! … … 395 388 ! compute optical_thickness_at_gridpoint_per_species 396 389 397 ai(:)=0. 398 399 tau_ae5wv_int(:,:,:)=0. 400 piz_ae5wv_int(:,:,:)=0. 401 cg_ae5wv_int(:,:,:)=0. 402 tausum(:,:,:)=0. 403 404 tau(:,:,:,:)=0. 390 405 391 ! 406 392 ! Calculations that need to be done since we are not in the subroutines INCA 407 393 ! 408 394 ! air mass auxiliary variable --> zdp1 [kg/(m^2 *s)] 409 zdp1=pdel /(gravit*delt)395 zdp1=pdel(:,:)/(gravit*delt) 410 396 411 397 DO m=1,nb_aer ! tau is only computed for each mass … … 491 477 ENDDO ! Boucle sur les points géographiques (grille horizontale) 492 478 ENDDO ! Boucle sur les niveaux verticaux 479 480 IF (soluble) THEN 481 482 tau(:,:,la,spsol)=tau3d(:,:) 493 483 494 tau(:,:,la,m)=tau3d(:,:) 484 DO k=1, KLEV 485 DO i=1,KLON 486 tausum(i,la,spsol)=tausum(i,la,spsol)+tau3d(i,k) 487 ENDDO 488 ENDDO 489 ELSE 490 tau(:,:,la,spsol)=tau3d(:,:) 495 491 496 DO k=1, KLEV 497 DO i=1,KLON 498 tausum(i,la,m)=tausum(i,la,m)+tau3d(i,k) 499 ENDDO 500 ENDDO 501 492 DO k=1, KLEV 493 DO i=1,KLON 494 tausum(i,la,5+spinsol)=tausum(i,la,5+spinsol)+tau3d(i,k) 495 ENDDO 496 ENDDO 497 ENDIF 498 499 500 502 501 ENDDO ! boucle sur les longueurs d'onde 503 502 ENDDO ! Boucle sur les masses de traceurs 504 505 506 taue670(:) = SUM(tausum(:,la670,:),dim=2) 507 taue865(:) = SUM(tausum(:,la865,:),dim=2) 508 509 DO i=1, klon 510 ai(i)=-LOG(MAX(taue670(i),0.0001)/ & 511 MAX(taue865(i),0.0001))/LOG(670./865.) 512 ENDDO 513 503 ! 504 ! 505 ! taue670(:) = SUM(tausum(:,la670,:),dim=2) 506 ! taue865(:) = SUM(tausum(:,la865,:),dim=2) 507 ! 508 ! DO i=1, klon 509 ! ai(i)=-LOG(MAX(taue670(i),0.0001)/ & 510 ! MAX(taue865(i),0.0001))/LOG(670./865.) 511 ! ENDDO 512 513 DEALLOCATE(aerosol_name) 514 514 515 515 END SUBROUTINE AEROPT_5WV -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/conf_phys.F90
r1176 r1181 259 259 ! - flag_aerosol=2 => bc only 260 260 ! - flag_aerosol=3 => pom only 261 ! - flag_aerosol=4 => all aerosol262 ! - flag_aerosol=5 => bcpom263 ! - flag_aerosol=6 => pomsulf261 ! - flag_aerosol=4 => seasalt only 262 ! - flag_aerosol=5 => dust only 263 ! - flag_aerosol=6 => all aerosol 264 264 265 265 flag_aerosol_omp = 1 -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/phys_local_var_mod.F90
r1179 r1181 3 3 ! 4 4 MODULE phys_local_var_mod 5 6 USE aerosol_mod 5 7 ! Variables locales pour effectuer les appels en serie 6 8 !====================================================================== … … 81 83 REAL, SAVE, ALLOCATABLE :: topsw0_aero(:,:), solsw0_aero(:,:) ! pas utilise, eventuellment pour diag 82 84 !$OMP THREADPRIVATE(topsw0_aero,solsw0_aero) 85 REAL, SAVE, ALLOCATABLE :: tausum_aero(:,:,:) 86 !$OMP THREADPRIVATE(tausum_aero) 87 REAL, SAVE, ALLOCATABLE :: tau3d_aero(:,:,:,:) 88 !$OMP THREADPRIVATE(tau3d_aero) 89 83 90 CONTAINS 84 91 … … 115 122 allocate(topswai_aero(klon), solswai_aero(klon)) 116 123 allocate(topswad0_aero(klon), solswad0_aero(klon)) 117 allocate(topsw_aero(klon, 9), solsw_aero(klon,9))118 allocate(topsw0_aero(klon, 9), solsw0_aero(klon,9))124 allocate(topsw_aero(klon,naero_grp), solsw_aero(klon,naero_grp)) 125 allocate(topsw0_aero(klon,naero_grp), solsw0_aero(klon,naero_grp)) 119 126 allocate(d_u_hin(klon,klev),d_v_hin(klon,klev),d_t_hin(klon,klev)) 127 allocate(tausum_aero(klon,nwave,naero_spc)) 128 allocate(tau3d_aero(klon,klev,nwave,naero_spc)) 120 129 121 130 END SUBROUTINE phys_local_var_init … … 154 163 deallocate(topsw_aero,solsw_aero) 155 164 deallocate(topsw0_aero,solsw0_aero) 165 deallocate(tausum_aero) 166 deallocate(tau3d_aero) 156 167 deallocate(d_u_hin,d_v_hin,d_t_hin) 157 168 -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/phys_state_var_mod.F90
r1179 r1181 284 284 SUBROUTINE phys_state_var_init 285 285 use dimphy 286 use aerosol_mod 286 287 IMPLICIT NONE 287 288 #include "indicesol.h" … … 381 382 ALLOCATE(topswad(klon), solswad(klon)) 382 383 ALLOCATE(topswai(klon), solswai(klon)) 383 ALLOCATE(tau_aero(klon,klev, 9,2),piz_aero(klon,klev,9,2),cg_aero(klon,klev,9,2))384 ALLOCATE(ccm(klon,klev, 2))384 ALLOCATE(tau_aero(klon,klev,naero_grp,nbands),piz_aero(klon,klev,naero_grp,nbands),cg_aero(klon,klev,naero_grp,nbands)) 385 ALLOCATE(ccm(klon,klev,nbands)) 385 386 386 387 END SUBROUTINE phys_state_var_init -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/physiq.F
r1179 r1181 1064 1064 1065 1065 ! Aerosol optical properties 1066 CHARACTER*4, DIMENSION( 9):: rfname1066 CHARACTER*4, DIMENSION(naero_grp) :: rfname 1067 1067 REAL, DIMENSION(klon) :: aerindex ! POLDER aerosol index 1068 1068 REAL, DIMENSION(klon,klev) :: mass_ins_aero! total mass concentration for all indissoluble aerosols[ug/m3] … … 2639 2639 & pplay, paprs, t_seri, rhcl, 2640 2640 & mass_ins_aero, mass_ins_aero_pi, 2641 & tau_aero, piz_aero, cg_aero ) 2641 & tau_aero, piz_aero, cg_aero, 2642 & tausum_aero, tau3d_aero) 2642 2643 ELSE 2643 2644 tau_aero(:,:,:,:) = 0. -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/readaerosol_interp.F90
r1179 r1181 16 16 USE mod_phys_lmdz_para, ONLY : mpi_rank 17 17 USE readaerosol_mod 18 USE aerosol_mod, ONLY : naero_spc, name_aero 18 19 USE write_field_phy 19 20 … … 49 50 INTEGER, SAVE :: klev_src ! Number of vertical levles in source field 50 51 !$OMP THREADPRIVATE(klev_src) 51 INTEGER, PARAMETER :: nb_aero=852 53 CHARACTER(len=7),DIMENSION(nb_aero) :: name_aero54 52 55 53 REAL, DIMENSION(klon) :: psurf_day, pi_psurf_day … … 77 75 LOGICAL :: lnewday ! Indicates if first time step at a new day 78 76 LOGICAL,SAVE :: vert_interp ! Indicates if vertical interpolation will be done 79 LOGICAL,SAVE :: debug=. TRUE.! Debugging in this subroutine77 LOGICAL,SAVE :: debug=.FALSE.! Debugging in this subroutine 80 78 !$OMP THREADPRIVATE(vert_interp, debug) 81 79 … … 85 83 ! 86 84 !**************************************************************************************** 87 ! Variable containing aerosols name88 name_aero(1) = "SSSSM "89 name_aero(2) = "ASSSM "90 name_aero(3) = "ASBCM "91 name_aero(4) = "ASPOMM "92 name_aero(5) = "SO4 "93 name_aero(6) = "CIDUSTM"94 name_aero(7) = "AIBCM "95 name_aero(8) = "AIPOMM "96 85 97 86 ! Calculation to find if it is a new day … … 106 95 107 96 IF (.NOT. ALLOCATED(var_day)) THEN 108 ALLOCATE( var_day(klon, klev, n b_aero), stat=ierr)97 ALLOCATE( var_day(klon, klev, naero_spc), stat=ierr) 109 98 IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 1',1) 110 ALLOCATE( pi_var_day(klon, klev, n b_aero), stat=ierr)99 ALLOCATE( pi_var_day(klon, klev, naero_spc), stat=ierr) 111 100 IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 2',1) 112 101 113 ALLOCATE( psurf_year(klon, 12, n b_aero), pi_psurf_year(klon, 12, nb_aero), stat=ierr)102 ALLOCATE( psurf_year(klon, 12, naero_spc), pi_psurf_year(klon, 12, naero_spc), stat=ierr) 114 103 IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 3',1) 115 104 116 ALLOCATE( load_year(klon, 12, n b_aero), pi_load_year(klon, 12, nb_aero), stat=ierr)105 ALLOCATE( load_year(klon, 12, naero_spc), pi_load_year(klon, 12, naero_spc), stat=ierr) 117 106 IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 4',1) 118 107 … … 136 125 psurf_year(:,:,id_aero), load_year(:,:,id_aero)) 137 126 IF (.NOT. ALLOCATED(var_year)) THEN 138 ALLOCATE(var_year(klon, klev_src, 12, n b_aero), stat=ierr)127 ALLOCATE(var_year(klon, klev_src, 12, naero_spc), stat=ierr) 139 128 IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 5',1) 140 129 END IF … … 154 143 155 144 IF (.NOT. ALLOCATED(pi_var_year)) THEN 156 ALLOCATE(pi_var_year(klon, klev_src, 12, n b_aero), stat=ierr)145 ALLOCATE(pi_var_year(klon, klev_src, 12, naero_spc), stat=ierr) 157 146 IF (ierr /= 0) CALL abort_gcm('readaerosol_interp', 'pb in allocation 6',1) 158 147 END IF -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/readaerosol_optic.F90
r1179 r1181 4 4 pplay, paprs, t_seri, rhcl, & 5 5 mass_ins_aero, mass_ins_aero_pi, & 6 tau_aero, piz_aero, cg_aero ) 6 tau_aero, piz_aero, cg_aero, & 7 tausum_aero, tau3d_aero ) 7 8 8 9 ! This routine will : … … 12 13 13 14 USE dimphy 15 USE aerosol_mod 14 16 IMPLICIT NONE 15 17 … … 30 32 REAL, DIMENSION(klon,klev), INTENT(OUT) :: mass_ins_aero ! Total mass for all indissoluble aerosols 31 33 REAL, DIMENSION(klon,klev), INTENT(OUT) :: mass_ins_aero_pi ! -"- preindustrial values 32 REAL, DIMENSION(klon,klev,9,2), INTENT(OUT) :: tau_aero ! Aerosol optical thickness 33 REAL, DIMENSION(klon,klev,9,2), INTENT(OUT) :: piz_aero ! Single scattering albedo aerosol 34 REAL, DIMENSION(klon,klev,9,2), INTENT(OUT) :: cg_aero ! asymmetry parameter aerosol 34 REAL, DIMENSION(klon,klev,naero_grp,nbands), INTENT(OUT) :: tau_aero ! Aerosol optical thickness 35 REAL, DIMENSION(klon,klev,naero_grp,nbands), INTENT(OUT) :: piz_aero ! Single scattering albedo aerosol 36 REAL, DIMENSION(klon,klev,naero_grp,nbands), INTENT(OUT) :: cg_aero ! asymmetry parameter aerosol 37 REAL, DIMENSION(klon,nwave,naero_spc), INTENT(OUT) :: tausum_aero 38 REAL, DIMENSION(klon,klev,nwave,naero_spc), INTENT(OUT) :: tau3d_aero 35 39 36 40 ! Local variables 37 41 !**************************************************************************************** 38 42 REAL, DIMENSION(klon) :: aerindex ! POLDER aerosol index 39 REAL, DIMENSION(klon,10) :: fractnat_allaer40 43 REAL, DIMENSION(klon,klev) :: sulfate ! SO4 aerosol concentration [ug/m3] 41 44 REAL, DIMENSION(klon,klev) :: bcsol ! BC soluble concentration [ug/m3] … … 43 46 REAL, DIMENSION(klon,klev) :: pomsol ! POM soluble concentration [ug/m3] 44 47 REAL, DIMENSION(klon,klev) :: pomins ! POM insoluble concentration [ug/m3] 48 REAL, DIMENSION(klon,klev) :: cidust ! DUST aerosol concentration [ug/m3] 49 REAL, DIMENSION(klon,klev) :: sscoarse ! SS Coarse concentration [ug/m3] 50 REAL, DIMENSION(klon,klev) :: sssupco ! SS Super Coarse concentration [ug/m3] 51 REAL, DIMENSION(klon,klev) :: ssacu ! SS Acumulation concentration [ug/m3] 45 52 REAL, DIMENSION(klon,klev) :: sulfate_pi 46 53 REAL, DIMENSION(klon,klev) :: bcsol_pi … … 48 55 REAL, DIMENSION(klon,klev) :: pomsol_pi 49 56 REAL, DIMENSION(klon,klev) :: pomins_pi 57 REAL, DIMENSION(klon,klev) :: cidust_pi 58 REAL, DIMENSION(klon,klev) :: sscoarse_pi 59 REAL, DIMENSION(klon,klev) :: sssupco_pi 60 REAL, DIMENSION(klon,klev) :: ssacu_pi 50 61 REAL, DIMENSION(klon,klev) :: pdel 51 REAL, DIMENSION(klon,klev,8) :: m_allaer 62 REAL, DIMENSION(klon,klev,naero_spc) :: m_allaer 63 REAL, DIMENSION(klon,naero_tot) :: fractnat_allaer 52 64 53 65 INTEGER :: k, i … … 59 71 ! Read and interpolate sulfate 60 72 IF ( flag_aerosol .EQ. 1 .OR. & 61 flag_aerosol .EQ. 4 .OR. &62 73 flag_aerosol .EQ. 6 ) THEN 63 74 … … 69 80 ! Read and interpolate bcsol and bcins 70 81 IF ( flag_aerosol .EQ. 2 .OR. & 71 flag_aerosol .EQ. 4 .OR. & 72 flag_aerosol .EQ. 5 ) THEN 82 flag_aerosol .EQ. 6 ) THEN 73 83 74 84 ! Get bc aerosol distribution … … 83 93 ! Read and interpolate pomsol and pomins 84 94 IF ( flag_aerosol .EQ. 3 .OR. & 85 flag_aerosol .EQ. 4 .OR. &86 flag_aerosol .EQ. 5 .OR. &87 95 flag_aerosol .EQ. 6 ) THEN 88 96 … … 95 103 96 104 105 ! Read and interpolate csssm, ssssm, assssm 106 IF (flag_aerosol .EQ. 4 .OR. & 107 flag_aerosol .EQ. 6 ) THEN 108 109 CALL readaerosol_interp(1 ,rjourvrai, debut, pplay, paprs, sscoarse,sscoarse_pi) 110 CALL readaerosol_interp(2 ,rjourvrai, debut, pplay, paprs, ssacu, ssacu_pi) 111 112 ELSE 113 sscoarse(:,:) = 0. ; sscoarse_pi(:,:) = 0. 114 ssacu(:,:) = 0. ; ssacu_pi(:,:) = 0. 115 ENDIF 116 117 ! Read and interpolate cidustm 118 IF (flag_aerosol .EQ. 5 .OR. & 119 flag_aerosol .EQ. 6 ) THEN 120 121 CALL readaerosol_interp(6 , rjourvrai, debut, pplay, paprs, cidust, cidust_pi) 122 123 ELSE 124 cidust(:,:) = 0. ; cidust_pi(:,:) = 0. 125 ENDIF 126 127 ! 97 128 ! Store all aerosols in one variable 98 129 ! 99 ! ACo pour couplage aerosol offline 07/04/2009 100 ! Tableau contenant les masses pour tous les aerosols 101 ! les valeurs a zero seront a remplacer par les bons 102 ! tableaux lorsque les routines de lectures seront 103 ! ajoutees. 104 m_allaer(:,:,1) = 0. ! SSSSM || CSSSM ! Coarse Soluble Sea Salt Mass 105 m_allaer(:,:,2) = 0. ! ASSSM 130 m_allaer(:,:,1) = sscoarse(:,:) ! SSSSM || CSSSM 131 m_allaer(:,:,2) = ssacu(:,:) ! ASSSM 106 132 m_allaer(:,:,3) = bcsol(:,:) ! ASBCM 107 133 m_allaer(:,:,4) = pomsol(:,:) ! ASPOMM 108 134 m_allaer(:,:,5) = sulfate(:,:) ! ASSO4M || CSSO4M 109 m_allaer(:,:,6) = 0. ! CIDUSTM ! Coarse Insoluble DUST Mass135 m_allaer(:,:,6) = cidust(:,:) ! CIDUSTM 110 136 m_allaer(:,:,7) = bcins(:,:) ! AIBCM 111 137 m_allaer(:,:,8) = pomins(:,:) ! AIPOMM … … 114 140 ! Calculate the total mass of all indissoluble aersosols 115 141 ! 116 mass_ins_aero(:,:) = sulfate(:,:) + bcsol(:,:) + pomsol(:,:) 117 mass_ins_aero_pi(:,:) = sulfate_pi(:,:) + bcsol_pi(:,:) + pomsol_pi(:,:) 142 mass_ins_aero(:,:) = sulfate(:,:) + bcsol(:,:) + pomsol(:,:) + & 143 sscoarse(:,:) + ssacu(:,:) + cidust(:,:) 144 mass_ins_aero_pi(:,:) = sulfate_pi(:,:) + bcsol_pi(:,:) + pomsol_pi(:,:) + & 145 sscoarse_pi(:,:) + ssacu_pi(:,:) + cidust_pi(:,:) 118 146 119 147 !**************************************************************************************** … … 137 165 138 166 ! aeropt_5wv only for validation and diagnostics. 139 ! In this version no diagnostics are set.140 ! jg : may be desactivated if no diagnostics added.141 167 CALL aeropt_5wv( & 142 168 pdel, m_allaer, & 143 169 pdtphys, rhcl, aerindex, & 144 flag_aerosol, pplay, t_seri) 170 flag_aerosol, pplay, t_seri, & 171 tausum_aero, tau3d_aero) 145 172 ELSE 146 173
Note: See TracChangeset
for help on using the changeset viewer.