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

Last change on this file since 4197 was 4190, checked in by dubos, 6 years ago

simple_physics : cleanup astronomy

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