source: dynamico_lmdz/simple_physics/phyparam/param/paramdef.F @ 4186

Last change on this file since 4186 was 4184, checked in by dubos, 6 years ago

simple_physics : planete.h => MODULE planet.F90

File size: 4.8 KB
Line 
1      SUBROUTINE paramdef(ngrid,rnatur,albedo,inertie,emissiv,z0)
2      USE  comgeomfi, ONLY : lati,sinlat,coslat
3      USE planet
4      IMPLICIT NONE
5c-----------------------------------------------------------------------
6c   declarations:
7c   -------------
8
9
10      INTEGER ngrid
11      REAL rnatur(ngrid)
12      REAL albedo(ngrid),inertie(ngrid),emissiv(ngrid)
13      REAL z0(ngrid)
14
15c   local:
16c   ------
17
18      character str1*1
19      INTEGER ig,ierr
20      real zz,z1,z2,pi
21
22      REAL I_mer,I_ter,z0_mer,z0_ter
23      REAL alb_mer,alb_ter,emi_mer,emi_ter
24
25c-----------------------------------------------------------------------
26c  Caracteristiques orbitales:
27c-----------------------------------------------------------------------
28
29      pi=2.*asin(1.)
30      year_day=360.
31      periheli=173.
32      aphelie=173.
33      peri_day=0.
34      obliquit=24.
35      z0_mer=0.1
36      z0_ter=10
37      I_mer=30000.
38      I_ter=2000.
39      alb_ter=.112
40      alb_mer=.112
41      emi_ter=1.
42      emi_mer=1.
43      emin_turb=1.e-6
44      lmixmin=30.
45      coefvis=.99
46      coefir=.08
47     
48      print*,'Do you want to change the default values for the'
49      print*,'physical paremetrisations (y,n)'
50      read(*,'(a)',iostat=ierr) str1
51      do while (ierr.eq.0.and.str1.eq.'y')
52         print*,'Do you want to change the following parameters?'
53         print*,'For each parameter enter a new value or RETURN'
54         print*,'At the end, you will have another chance'
55
56         print*
57         print*,'ASTRONOMY:'
58
59         print*,'Length of year: ',year_day,' (sideral days)'
60         read(*,*,iostat=ierr) zz
61         if(ierr.eq.0)  year_day=zz
62
63         print*,'Distance to Sun at perihelion: ',periheli,' (Mkm)'
64         read(*,*,iostat=ierr) zz
65         if(ierr.eq.0)  periheli=zz
66
67         print*,'Distance to Sun at aphelion: ',aphelie,' (Mkm)'
68         read(*,*,iostat=ierr) zz
69         if(ierr.eq.0)  aphelie=zz
70
71         print*,'Date of the perihelion: ',peri_day,' (days)'
72         read(*,*,iostat=ierr) zz
73         if(ierr.eq.0)  peri_day=zz
74
75         print*,'Obliquity: ',obliquit,' (degrees)'
76         read(*,*,iostat=ierr) zz
77         if(ierr.eq.0)  obliquit=zz
78
79         print*
80         print*,'SURFACE:'
81
82         print*,'roughness for 1. oceans and 2. solid surfaces: ',
83     s   z0_mer,z0_ter,' (m)'
84         read(*,*,iostat=ierr) z1,z2
85         if(ierr.eq.0)  then
86            z0_mer=z1
87            z0_ter=z2
88         endif
89
90         print*,'Thermal inertia for 1. oceans and 2. solid surfaces: ',
91     s   I_mer,I_ter,' (SI)'
92         read(*,*,iostat=ierr) z1,z2
93         if(ierr.eq.0)  then
94            I_mer=z1
95            I_ter=z2
96         endif
97
98         print*,'Visible albedo for 1. oceans and 2. solid surfaces: ',
99     s   alb_mer,alb_ter
100         read(*,*,iostat=ierr) z1,z2
101         if(ierr.eq.0)  then
102            alb_mer=z1
103            alb_ter=z2
104         endif
105
106         print*,'thermal emissivity for 1. oceans and 2. solid surf.: ',
107     s   emi_mer,emi_ter
108         read(*,*,iostat=ierr) z1,z2
109         if(ierr.eq.0)  then
110            emi_mer=z1
111            emi_ter=z2
112         endif
113
114         print*
115         print*,'PLANETARY BOUNDARY LAYER:'
116
117         print*,'Minimum turbulent kinetic energie: ',emin_turb,
118     s    ' (m2s-2)'
119         read(*,*,iostat=ierr) zz
120         if(ierr.eq.0)  emin_turb=zz
121
122         print*,'Mixing length: ',lmixmin,' (m)'
123         read(*,*,iostat=ierr) zz
124         if(ierr.eq.0)  lmixmin=zz
125
126         print*
127         print*,'RADIATION:'
128
129         print*,'Fraction of the incoming solar radiation ',
130     s    'reaching the surface directly: ',coefvis
131         read(*,*,iostat=ierr) zz
132         if(ierr.eq.0)  coefvis=zz
133
134         print*,'Fraction of the surface thermal emission ',
135     s    'reaching space directly: ',coefir
136         read(*,*,iostat=ierr) zz
137         if(ierr.eq.0)  coefir=zz
138
139         print*,'Do you want to change something once again?'
140         read(*,'(a)',iostat=ierr) str1
141      enddo
142
143c-----------------------------------------------------------------------
144
145      DO ig=1,ngrid
146c        inertie(ig)=(1.-rnatur(ig))*I_mer+rnatur(ig)*I_ter
147c        albedo(ig)=(1.-rnatur(ig))*alb_mer+rnatur(ig)*alb_ter
148              if (rnatur(ig).gt.0.5) then
149                   if (lati(ig).lt.-pi/3.) then
150c   antartique
151                       inertie(ig)=100000.
152                       albedo(ig)=0.6
153                   else
154c   continents normaux
155                       inertie(ig)=2000.
156                       albedo(ig)=0.112
157                   endif
158              else
159c   oceans
160                 inertie(ig)=100000.
161                 albedo(ig)=0.112
162              endif
163
164         z0(ig)=(1.-rnatur(ig))*z0_mer+rnatur(ig)*z0_ter
165         emissiv(ig)=(1.-rnatur(ig))*emi_mer+rnatur(ig)*emi_ter
166         if(rnatur(ig).ge..5.and.coslat(ig).lt..5.and.sinlat(ig).lt.0.)
167     .   albedo(ig)=.5
168      ENDDO
169
170      RETURN
171
1729000  FORMAT(3(/,a72))
1739001  FORMAT(/,a72,/,a8)
174      END
Note: See TracBrowser for help on using the repository browser.