[3184] | 1 | !================================================================== |
---|
| 2 | module radii_mod |
---|
| 3 | !================================================================== |
---|
| 4 | ! module to centralize the radii calculations for aerosols |
---|
| 5 | !================================================================== |
---|
[3195] | 6 | |
---|
[3184] | 7 | ! N2 cloud properties (initialized in inifis) |
---|
| 8 | real,save :: Nmix_n2 ! Number mixing ratio of N2 ice particles |
---|
| 9 | !$OMP THREADPRIVATE(Nmix_n2) |
---|
| 10 | |
---|
| 11 | ! flag to specify if we assume a constant fixed radius for particles |
---|
| 12 | logical,save :: radfixed ! initialized in inifis |
---|
| 13 | !$OMP THREADPRIVATE(radfixed) |
---|
| 14 | |
---|
| 15 | contains |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | !================================================================== |
---|
| 19 | subroutine su_aer_radii(ngrid,nlayer,reffrad,nueffrad) |
---|
| 20 | !================================================================== |
---|
| 21 | ! Purpose |
---|
| 22 | ! ------- |
---|
[3195] | 23 | ! Compute the effective radii of haze particles (TB) |
---|
[3184] | 24 | ! |
---|
| 25 | ! |
---|
| 26 | !================================================================== |
---|
| 27 | use mod_phys_lmdz_para, only : is_master |
---|
| 28 | use ioipsl_getin_p_mod, only: getin_p |
---|
| 29 | use radinc_h, only: naerkind |
---|
[3329] | 30 | use datafile_mod, only: hazerad_file |
---|
[3572] | 31 | use aerosol_mod, only: iaero_haze, i_haze |
---|
[3195] | 32 | use tracer_h, only: radius, nqtot, is_rgcs, nmono |
---|
[3184] | 33 | Implicit none |
---|
| 34 | |
---|
| 35 | integer,intent(in) :: ngrid |
---|
| 36 | integer,intent(in) :: nlayer |
---|
| 37 | |
---|
| 38 | real, intent(out) :: reffrad(ngrid,nlayer,naerkind) !aerosols radii (K) |
---|
[3195] | 39 | real, intent(out) :: nueffrad(ngrid,nlayer,naerkind) !variance |
---|
[3184] | 40 | |
---|
[3195] | 41 | integer :: iaer, ia , iq, i_rad |
---|
[3184] | 42 | |
---|
| 43 | do iaer=1,naerkind |
---|
[3195] | 44 | print*, 'TB22 iaer',iaer,iaero_haze |
---|
| 45 | if(iaer.eq.iaero_haze)then |
---|
| 46 | ! Equivalent sphere radius |
---|
| 47 | reffrad(1:ngrid,1:nlayer,iaer)=radius(i_haze)*nmono**(1./3.) |
---|
| 48 | !reffrad(1:ngrid,1:nlayer,iaer) = 2.e-6 ! haze |
---|
| 49 | nueffrad(1:ngrid,1:nlayer,iaer) = 0.02 ! haze |
---|
[3184] | 50 | endif |
---|
[3195] | 51 | enddo |
---|
[3184] | 52 | |
---|
| 53 | end subroutine su_aer_radii |
---|
| 54 | !================================================================== |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | !================================================================== |
---|
[3195] | 58 | subroutine haze_reffrad_fix(ngrid,nlayer,zzlay,reffrad,nueffrad) |
---|
| 59 | !================================================================== |
---|
[3184] | 60 | ! Purpose |
---|
| 61 | ! ------- |
---|
[3195] | 62 | ! Compute the effective radii of haze particles |
---|
| 63 | ! fixed profile of radius (TB) |
---|
[3184] | 64 | ! |
---|
| 65 | !================================================================== |
---|
[3195] | 66 | use radinc_h, only: naerkind |
---|
| 67 | USE tracer_h, only:rho_n2,nmono |
---|
[3184] | 68 | use comcstfi_mod, only: pi |
---|
[3195] | 69 | use aerosol_mod, only: iaero_haze, i_haze |
---|
| 70 | use datafile_mod |
---|
[3184] | 71 | Implicit none |
---|
| 72 | |
---|
[3195] | 73 | integer,intent(in) :: ngrid,nlayer |
---|
| 74 | real,intent(in) :: zzlay(ngrid,nlayer) |
---|
| 75 | real, intent(out) :: reffrad(ngrid,nlayer,naerkind) ! haze particles radii (m) |
---|
| 76 | real, intent(out) :: nueffrad(ngrid,nlayer,naerkind) ! |
---|
[3184] | 77 | |
---|
[3195] | 78 | real :: zrad |
---|
| 79 | real,external :: CBRT |
---|
[3184] | 80 | |
---|
[3195] | 81 | logical, save :: firstcall=.true. |
---|
| 82 | !$OMP THREADPRIVATE(firstcall) |
---|
[3184] | 83 | |
---|
[3195] | 84 | ! Local variables |
---|
| 85 | integer :: iaer,l,ifine,ig |
---|
| 86 | real :: radvec(ngrid,nlayer) |
---|
[3184] | 87 | |
---|
[3195] | 88 | !!read altitudes and radius |
---|
| 89 | integer Nfine |
---|
| 90 | !parameter(Nfine=21) |
---|
| 91 | parameter(Nfine=701) |
---|
| 92 | character(len=100) :: file_path |
---|
| 93 | real,save :: levdat(Nfine),raddat(Nfine) |
---|
[3184] | 94 | |
---|
[3195] | 95 | !---------------- INPUT ------------------------------------------------ |
---|
[3184] | 96 | |
---|
[3195] | 97 | IF (firstcall) then |
---|
| 98 | firstcall=.false. |
---|
[3329] | 99 | file_path=trim(datadir)//'/haze_prop/'//hazerad_file |
---|
[3195] | 100 | open(223,file=file_path,form='formatted') |
---|
| 101 | do ifine=1,Nfine |
---|
| 102 | read(223,*) levdat(ifine), raddat(ifine) |
---|
| 103 | enddo |
---|
| 104 | close(223) |
---|
[3353] | 105 | print*, 'Read hazerad from ',file_path |
---|
[3195] | 106 | ENDIF |
---|
[3184] | 107 | |
---|
[3195] | 108 | ! in radii mod levs has been put in km |
---|
| 109 | DO ig=1,ngrid |
---|
| 110 | CALL interp_line(levdat,raddat,Nfine,zzlay(ig,:)/1000,radvec(ig,:),nlayer) |
---|
| 111 | enddo |
---|
[3184] | 112 | |
---|
[3195] | 113 | do iaer=1,naerkind |
---|
| 114 | if(iaer.eq.iaero_haze)then |
---|
| 115 | ! spherical radius or eq spherical radius |
---|
| 116 | ! TB22: fractal has no impact on reffrad if haze_radproffix |
---|
| 117 | do ig=1,ngrid |
---|
| 118 | do l=1,nlayer |
---|
| 119 | reffrad(ig,l,iaer)=radvec(ig,l)*1.e-9 ! nm => m |
---|
| 120 | enddo |
---|
| 121 | enddo |
---|
| 122 | nueffrad(1:ngrid,1:nlayer,iaer) = 0.02 ! haze |
---|
| 123 | endif |
---|
| 124 | enddo |
---|
[3184] | 125 | |
---|
[3195] | 126 | end subroutine haze_reffrad_fix |
---|
[3184] | 127 | !================================================================== |
---|
| 128 | |
---|
| 129 | |
---|
| 130 | end module radii_mod |
---|
| 131 | !================================================================== |
---|