source: trunk/LMDZ.PLUTO.old/libf/phypluto/radii_mod.F90 @ 3232

Last change on this file since 3232 was 3175, checked in by emillour, 2 years ago

Pluto PCM:
Add the old Pluto LMDZ for reference (required prior step to making
an LMDZ.PLUTO using the same framework as the other physics packages).
TB+EM

File size: 4.1 KB
Line 
1!==================================================================
2module radii_mod
3!  module to centralize the radii calculations for aerosols
4!==================================================================
5
6contains
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.txt'
94        open(223,file=file_path,form='formatted')
95        do ifine=1,Nfine
96           read(223,*) levdat(ifine), raddat(ifine)
97        enddo
98        close(223)
99        print*, 'TB22 READ HAZERAD'
100      ENDIF
101
102      ! in radii mod levs has been put in km
103      DO ig=1,ngrid
104        CALL interp_line(levdat,raddat,Nfine,zzlay(ig,:)/1000,radvec(ig,:),nlayer)
105      enddo
106
107      do iaer=1,naerkind
108            if(iaer.eq.iaero_haze)then 
109                 ! spherical radius or eq spherical radius
110                 ! TB22: fractal has no impact on reffrad if haze_radproffix
111                 do ig=1,ngrid
112                    do l=1,nlayer
113                       reffrad(ig,l,iaer)=radvec(ig,l)*1.e-9    !  nm => m
114                    enddo
115                 enddo
116                 nueffrad(1:ngrid,1:nlayer,iaer) = 0.02 ! haze
117            endif
118      enddo
119
120   end subroutine haze_reffrad_fix
121!==================================================================
122
123end module radii_mod
124!==================================================================
Note: See TracBrowser for help on using the repository browser.