| 1 | !================================================================== |
|---|
| 2 | module radii_mod |
|---|
| 3 | ! module to centralize the radii calculations for aerosols |
|---|
| 4 | !================================================================== |
|---|
| 5 | |
|---|
| 6 | contains |
|---|
| 7 | |
|---|
| 8 | !================================================================== |
|---|
| 9 | subroutine haze_reffrad(ngrid,nlayer,reffrad,nueffrad) |
|---|
| 10 | !================================================================== |
|---|
| 11 | ! Purpose |
|---|
| 12 | ! ------- |
|---|
| 13 | ! Compute the effective radii of haze particles |
|---|
| 14 | ! uniform case |
|---|
| 15 | ! |
|---|
| 16 | !================================================================== |
|---|
| 17 | use radinc_h, only: naerkind |
|---|
| 18 | use aerosol_mod |
|---|
| 19 | |
|---|
| 20 | Implicit none |
|---|
| 21 | #include "dimensions.h" |
|---|
| 22 | #include "dimphys.h" |
|---|
| 23 | #include "tracer.h" |
|---|
| 24 | !----------------------------------------------------------------------- |
|---|
| 25 | ! Arguments |
|---|
| 26 | |
|---|
| 27 | integer,intent(in) :: ngrid |
|---|
| 28 | integer,intent(in) :: nlayer |
|---|
| 29 | integer :: iaer,l,ig |
|---|
| 30 | |
|---|
| 31 | real, intent(out) :: reffrad(ngrid,nlayer,naerkind) ! haze particles radii (m) |
|---|
| 32 | real, intent(out) :: nueffrad(ngrid,nlayer,naerkind) ! |
|---|
| 33 | |
|---|
| 34 | do iaer=1,naerkind |
|---|
| 35 | print*, 'TB22 iaer',iaer,iaero_haze |
|---|
| 36 | if(iaer.eq.iaero_haze)then |
|---|
| 37 | ! Equivalent sphere radius |
|---|
| 38 | reffrad(1:ngrid,1:nlayer,iaer)=radius(i_haze)*nmono**(1./3.) |
|---|
| 39 | !reffrad(1:ngrid,1:nlayer,iaer) = 2.e-6 ! haze |
|---|
| 40 | nueffrad(1:ngrid,1:nlayer,iaer) = 0.02 ! haze |
|---|
| 41 | print*, 'TB22 Hello2',radius(i_haze)*nmono**(1./3.) |
|---|
| 42 | endif |
|---|
| 43 | enddo |
|---|
| 44 | |
|---|
| 45 | end subroutine haze_reffrad |
|---|
| 46 | !================================================================== |
|---|
| 47 | |
|---|
| 48 | !================================================================== |
|---|
| 49 | subroutine haze_reffrad_fix(ngrid,nlayer,zzlay,reffrad,nueffrad) |
|---|
| 50 | !================================================================== |
|---|
| 51 | ! Purpose |
|---|
| 52 | ! ------- |
|---|
| 53 | ! Compute the effective radii of haze particles |
|---|
| 54 | ! fixed profile of radius |
|---|
| 55 | ! |
|---|
| 56 | !================================================================== |
|---|
| 57 | use radinc_h, only: naerkind |
|---|
| 58 | use aerosol_mod |
|---|
| 59 | use datafile_mod |
|---|
| 60 | |
|---|
| 61 | Implicit none |
|---|
| 62 | #include "dimensions.h" |
|---|
| 63 | #include "dimphys.h" |
|---|
| 64 | #include "tracer.h" |
|---|
| 65 | !----------------------------------------------------------------------- |
|---|
| 66 | ! Arguments |
|---|
| 67 | |
|---|
| 68 | integer,intent(in) :: ngrid |
|---|
| 69 | integer,intent(in) :: nlayer |
|---|
| 70 | real,intent(in) :: zzlay(ngrid,nlayer) |
|---|
| 71 | real, intent(out) :: reffrad(ngrid,nlayer,naerkind) ! haze particles radii (m) |
|---|
| 72 | real, intent(out) :: nueffrad(ngrid,nlayer,naerkind) ! |
|---|
| 73 | |
|---|
| 74 | ! Local variables |
|---|
| 75 | integer :: iaer,l,ifine,ig |
|---|
| 76 | real :: radvec(ngrid,nlayer) |
|---|
| 77 | |
|---|
| 78 | LOGICAL firstcall |
|---|
| 79 | SAVE firstcall |
|---|
| 80 | DATA firstcall/.true./ |
|---|
| 81 | |
|---|
| 82 | !!read altitudes and radius |
|---|
| 83 | integer Nfine |
|---|
| 84 | !parameter(Nfine=21) |
|---|
| 85 | parameter(Nfine=701) |
|---|
| 86 | character(len=100) :: file_path |
|---|
| 87 | real,save :: levdat(Nfine),raddat(Nfine) |
|---|
| 88 | |
|---|
| 89 | !---------------- INPUT ------------------------------------------------ |
|---|
| 90 | |
|---|
| 91 | IF (firstcall) then |
|---|
| 92 | firstcall=.false. |
|---|
| 93 | file_path=trim(datadir)//'/haze_prop/'//hazerad_file |
|---|
| 94 | ! file_path=trim(datadir)//'/haze_prop/hazerad.txt' |
|---|
| 95 | open(223,file=file_path,form='formatted') |
|---|
| 96 | do ifine=1,Nfine |
|---|
| 97 | read(223,*) levdat(ifine), raddat(ifine) |
|---|
| 98 | enddo |
|---|
| 99 | close(223) |
|---|
| 100 | print*, 'AF24 READ HAZERAD ', file_path |
|---|
| 101 | ENDIF |
|---|
| 102 | |
|---|
| 103 | ! in radii mod levs has been put in km |
|---|
| 104 | DO ig=1,ngrid |
|---|
| 105 | CALL interp_line(levdat,raddat,Nfine,zzlay(ig,:)/1000,radvec(ig,:),nlayer) |
|---|
| 106 | enddo |
|---|
| 107 | |
|---|
| 108 | do iaer=1,naerkind |
|---|
| 109 | if(iaer.eq.iaero_haze)then |
|---|
| 110 | ! spherical radius or eq spherical radius |
|---|
| 111 | ! TB22: fractal has no impact on reffrad if haze_radproffix |
|---|
| 112 | do ig=1,ngrid |
|---|
| 113 | do l=1,nlayer |
|---|
| 114 | reffrad(ig,l,iaer)=radvec(ig,l)*1.e-9 ! nm => m |
|---|
| 115 | enddo |
|---|
| 116 | enddo |
|---|
| 117 | nueffrad(1:ngrid,1:nlayer,iaer) = 0.02 ! haze |
|---|
| 118 | endif |
|---|
| 119 | enddo |
|---|
| 120 | |
|---|
| 121 | end subroutine haze_reffrad_fix |
|---|
| 122 | !================================================================== |
|---|
| 123 | |
|---|
| 124 | end module radii_mod |
|---|
| 125 | !================================================================== |
|---|