1 | c======================================================================= |
---|
2 | SUBROUTINE tabfi(ngrid,nid,Lmodif,tab0,day_ini,lmax,p_rad, |
---|
3 | . p_omeg,p_g,p_cpp,p_mugaz,p_daysec,time) |
---|
4 | c======================================================================= |
---|
5 | c |
---|
6 | c C. Hourdin 15/11/96 |
---|
7 | c |
---|
8 | c Object: Lecture du tab_cntrl physique dans un fichier |
---|
9 | c ------ et initialisation des constantes physiques |
---|
10 | c |
---|
11 | c Arguments: |
---|
12 | c ---------- |
---|
13 | c |
---|
14 | c Inputs: |
---|
15 | c ------ |
---|
16 | c |
---|
17 | c - nid: unitne logique du fichier ou on va lire le tab_cntrl |
---|
18 | c (ouvert dans le programme appellant) |
---|
19 | c |
---|
20 | c si nid=0: |
---|
21 | c pas de lecture du tab_cntrl mais |
---|
22 | c Valeurs par default des constantes physiques |
---|
23 | c |
---|
24 | c - tab0: Offset de tab_cntrl a partir duquel sont ranges |
---|
25 | c les parametres physiques (50 pour start_archive) |
---|
26 | c |
---|
27 | c - Lmodif: si on souhaite modifier les constantes Lmodif = 1 = TRUE |
---|
28 | c |
---|
29 | c |
---|
30 | c Outputs: |
---|
31 | c -------- |
---|
32 | c |
---|
33 | c - day_ini: tab_cntrl(tab0+3) (Dans les cas ou l'on souhaite |
---|
34 | c comparer avec le day_ini dynamique) |
---|
35 | c |
---|
36 | c - lmax: tab_cntrl(tab0+2) (pour test avec nlayermx) |
---|
37 | c |
---|
38 | c - p_rad |
---|
39 | c - p_omeg ! |
---|
40 | c - p_g ! Constantes physiques ayant des |
---|
41 | c - p_mugaz ! homonymes dynamiques |
---|
42 | c - p_daysec ! |
---|
43 | c |
---|
44 | c======================================================================= |
---|
45 | ! to use 'getin' |
---|
46 | use ioipsl_getincom , only: getin |
---|
47 | |
---|
48 | use surfdat_h, only: albedice, emisice, iceradius, dtemisice, |
---|
49 | & emissiv |
---|
50 | use comsoil_h, only: volcapa |
---|
51 | use iostart, only: get_var |
---|
52 | use mod_phys_lmdz_para, only: is_parallel |
---|
53 | |
---|
54 | implicit none |
---|
55 | |
---|
56 | #include "comcstfi.h" |
---|
57 | #include "planete.h" |
---|
58 | #include "netcdf.inc" |
---|
59 | #include "callkeys.h" |
---|
60 | |
---|
61 | c----------------------------------------------------------------------- |
---|
62 | c Declarations |
---|
63 | c----------------------------------------------------------------------- |
---|
64 | |
---|
65 | c Arguments |
---|
66 | c --------- |
---|
67 | INTEGER,INTENT(IN) :: ngrid,nid,tab0 |
---|
68 | INTEGER*4,INTENT(OUT) :: day_ini |
---|
69 | INTEGER,INTENT(IN) :: Lmodif |
---|
70 | INTEGER,INTENT(OUT) :: lmax |
---|
71 | REAL,INTENT(OUT) :: p_rad,p_omeg,p_g,p_cpp,p_mugaz,p_daysec,time |
---|
72 | |
---|
73 | c Variables |
---|
74 | c --------- |
---|
75 | INTEGER,PARAMETER :: length=100 |
---|
76 | REAL tab_cntrl(length) ! array in which are stored the run's parameters |
---|
77 | INTEGER ierr,nvarid |
---|
78 | INTEGER size |
---|
79 | CHARACTER modif*20 |
---|
80 | LOGICAL :: found |
---|
81 | |
---|
82 | write(*,*)"tabfi: nid=",nid," tab0=",tab0," Lmodif=",Lmodif |
---|
83 | |
---|
84 | IF (nid.eq.0) then |
---|
85 | c----------------------------------------------------------------------- |
---|
86 | c Initialization of various physical constants to defaut values (nid = 0 case) |
---|
87 | c----------------------------------------------------------------------- |
---|
88 | ELSE |
---|
89 | c----------------------------------------------------------------------- |
---|
90 | c Initialization of physical constants by reading array tab_cntrl(:) |
---|
91 | c which contains these parameters (nid != 0 case) |
---|
92 | c----------------------------------------------------------------------- |
---|
93 | c Read 'controle' array |
---|
94 | c |
---|
95 | |
---|
96 | call get_var("controle",tab_cntrl,found) |
---|
97 | if (.not.found) then |
---|
98 | write(*,*)"tabfi: Failed reading <controle> array" |
---|
99 | call abort |
---|
100 | else |
---|
101 | write(*,*)'tabfi: tab_cntrl',tab_cntrl |
---|
102 | endif |
---|
103 | c |
---|
104 | c Initialization of some physical constants |
---|
105 | c informations on physics grid |
---|
106 | ! if(ngrid.ne.tab_cntrl(tab0+1)) then |
---|
107 | ! print*,'tabfi: WARNING !!! tab_cntrl(tab0+1).ne.ngrid' |
---|
108 | ! print*,tab_cntrl(tab0+1),ngrid |
---|
109 | ! endif |
---|
110 | lmax = nint(tab_cntrl(tab0+2)) |
---|
111 | day_ini = tab_cntrl(tab0+3) |
---|
112 | time = tab_cntrl(tab0+4) |
---|
113 | write (*,*) 'IN tabfi day_ini=',day_ini |
---|
114 | c Informations about planet for dynamics and physics |
---|
115 | rad = tab_cntrl(tab0+5) |
---|
116 | omeg = tab_cntrl(tab0+6) |
---|
117 | g = tab_cntrl(tab0+7) |
---|
118 | mugaz = tab_cntrl(tab0+8) |
---|
119 | rcp = tab_cntrl(tab0+9) |
---|
120 | cpp=(8.314511/(mugaz/1000.0))/rcp |
---|
121 | daysec = tab_cntrl(tab0+10) |
---|
122 | dtphys = tab_cntrl(tab0+11) |
---|
123 | c Informations about planet for the physics only |
---|
124 | year_day = tab_cntrl(tab0+14) |
---|
125 | periastr = tab_cntrl(tab0+15) |
---|
126 | apoastr = tab_cntrl(tab0+16) |
---|
127 | peri_day = tab_cntrl(tab0+17) |
---|
128 | obliquit = tab_cntrl(tab0+18) |
---|
129 | c boundary layer and turbeulence |
---|
130 | z0 = tab_cntrl(tab0+19) |
---|
131 | lmixmin = tab_cntrl(tab0+20) |
---|
132 | emin_turb = tab_cntrl(tab0+21) |
---|
133 | c optical properties of polar caps and ground emissivity |
---|
134 | albedice(1)= tab_cntrl(tab0+22) |
---|
135 | albedice(2)= tab_cntrl(tab0+23) |
---|
136 | emisice(1) = tab_cntrl(tab0+24) |
---|
137 | emisice(2) = tab_cntrl(tab0+25) |
---|
138 | emissiv = tab_cntrl(tab0+26) |
---|
139 | iceradius(1)= tab_cntrl(tab0+31) ! mean scat radius of CO2 snow (north) |
---|
140 | iceradius(2)= tab_cntrl(tab0+32) ! mean scat radius of CO2 snow (south) |
---|
141 | dtemisice(1)= tab_cntrl(tab0+33) !time scale for snow metamorphism (north) |
---|
142 | dtemisice(2)= tab_cntrl(tab0+34) !time scale for snow metamorphism (south) |
---|
143 | c soil properties |
---|
144 | volcapa = tab_cntrl(tab0+35) ! volumetric heat capacity |
---|
145 | c----------------------------------------------------------------------- |
---|
146 | c Save some constants for later use (as routine arguments) |
---|
147 | c----------------------------------------------------------------------- |
---|
148 | p_omeg = omeg |
---|
149 | p_g = g |
---|
150 | p_cpp = cpp |
---|
151 | p_mugaz = mugaz |
---|
152 | p_daysec = daysec |
---|
153 | p_rad=rad |
---|
154 | |
---|
155 | ENDIF ! end of (nid = 0) |
---|
156 | |
---|
157 | c----------------------------------------------------------------------- |
---|
158 | c Write physical constants to output before modifying them |
---|
159 | c----------------------------------------------------------------------- |
---|
160 | |
---|
161 | 6 FORMAT(a20,e15.6,e15.6) |
---|
162 | 5 FORMAT(a20,f12.2,f12.2) |
---|
163 | |
---|
164 | write(*,*) '*****************************************************' |
---|
165 | write(*,*) 'Reading tab_cntrl when calling tabfi before changes' |
---|
166 | write(*,*) '*****************************************************' |
---|
167 | write(*,5) '(1) = ngrid?',tab_cntrl(tab0+1),float(ngrid) |
---|
168 | write(*,5) '(2) lmax',tab_cntrl(tab0+2),float(lmax) |
---|
169 | write(*,5) '(3) day_ini',tab_cntrl(tab0+3),float(day_ini) |
---|
170 | write(*,5) '(5) rad',tab_cntrl(tab0+5),rad |
---|
171 | write(*,5) '(10) daysec',tab_cntrl(tab0+10),daysec |
---|
172 | write(*,6) '(6) omeg',tab_cntrl(tab0+6),omeg |
---|
173 | write(*,5) '(7) g',tab_cntrl(tab0+7),g |
---|
174 | write(*,5) '(8) mugaz',tab_cntrl(tab0+8),mugaz |
---|
175 | write(*,5) '(9) rcp',tab_cntrl(tab0+9),rcp |
---|
176 | write(*,6) '(11) dtphys?',tab_cntrl(tab0+11),dtphys |
---|
177 | |
---|
178 | write(*,5) '(14) year_day',tab_cntrl(tab0+14),year_day |
---|
179 | write(*,5) '(15) periastr',tab_cntrl(tab0+15),periastr |
---|
180 | write(*,5) '(16) apoastr',tab_cntrl(tab0+16),apoastr |
---|
181 | write(*,5) '(17) peri_day',tab_cntrl(tab0+17),peri_day |
---|
182 | write(*,5) '(18) obliquit',tab_cntrl(tab0+18),obliquit |
---|
183 | |
---|
184 | write(*,6) '(19) z0',tab_cntrl(tab0+19),z0 |
---|
185 | write(*,6) '(21) emin_turb',tab_cntrl(tab0+21),emin_turb |
---|
186 | write(*,5) '(20) lmixmin',tab_cntrl(tab0+20),lmixmin |
---|
187 | |
---|
188 | write(*,5) '(26) emissiv',tab_cntrl(tab0+26),emissiv |
---|
189 | write(*,5) '(24) emisice(1)',tab_cntrl(tab0+24),emisice(1) |
---|
190 | write(*,5) '(25) emisice(2)',tab_cntrl(tab0+25),emisice(2) |
---|
191 | write(*,5) '(22) albedice(1)',tab_cntrl(tab0+22),albedice(1) |
---|
192 | write(*,5) '(23) albedice(2)',tab_cntrl(tab0+23),albedice(2) |
---|
193 | write(*,6) '(31) iceradius(1)',tab_cntrl(tab0+31),iceradius(1) |
---|
194 | write(*,6) '(32) iceradius(2)',tab_cntrl(tab0+32),iceradius(2) |
---|
195 | write(*,5) '(33) dtemisice(1)',tab_cntrl(tab0+33),dtemisice(1) |
---|
196 | write(*,5) '(34) dtemisice(2)',tab_cntrl(tab0+34),dtemisice(2) |
---|
197 | |
---|
198 | write(*,5) '(35) volcapa',tab_cntrl(tab0+35),volcapa |
---|
199 | |
---|
200 | write(*,*) |
---|
201 | write(*,*) 'Lmodif in tabfi!!!!!!!',Lmodif |
---|
202 | |
---|
203 | c----------------------------------------------------------------------- |
---|
204 | c Modifications... |
---|
205 | ! NB: Modifying controls should only be done by newstart, and in seq mode |
---|
206 | if ((Lmodif.eq.1).and.is_parallel) then |
---|
207 | write(*,*) "tabfi: Error modifying tab_control should", |
---|
208 | & " only happen in serial mode (eg: by newstart)" |
---|
209 | stop |
---|
210 | endif |
---|
211 | c----------------------------------------------------------------------- |
---|
212 | |
---|
213 | IF(Lmodif.eq.1) then |
---|
214 | |
---|
215 | write(*,*) |
---|
216 | write(*,*) 'Change values in tab_cntrl ? :' |
---|
217 | write(*,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' |
---|
218 | write(*,*) '(Current values given above)' |
---|
219 | write(*,*) |
---|
220 | write(*,*) '(3) day_ini : Initial day (=0 at Ls=0)' |
---|
221 | write(*,*) '(19) z0 : surface roughness (m)' |
---|
222 | write(*,*) '(21) emin_turb : minimal energy (PBL)' |
---|
223 | write(*,*) '(20) lmixmin : mixing length (PBL)' |
---|
224 | write(*,*) '(26) emissiv : ground emissivity' |
---|
225 | write(*,*) '(24 et 25) emisice : CO2 ice max emissivity ' |
---|
226 | write(*,*) '(22 et 23) albedice : CO2 ice cap albedos' |
---|
227 | write(*,*) '(31 et 32) iceradius : mean scat radius of CO2 snow' |
---|
228 | write(*,*) '(33 et 34) dtemisice : time scale for snow', |
---|
229 | & 'metamorphism' |
---|
230 | write(*,*) '(35) volcapa : soil volumetric heat capacity' |
---|
231 | write(*,*) '(18) obliquit : planet obliquity (deg)' |
---|
232 | write(*,*) '(17) peri_day : periastron date (sols since Ls=0)' |
---|
233 | write(*,*) '(15) periastr : min. star-planet dist (UA)' |
---|
234 | write(*,*) '(16) apoastr : max. star-planet (UA)' |
---|
235 | write(*,*) '(14) year_day : length of year (in sols)' |
---|
236 | write(*,*) '(5) rad : radius of the planet (m)' |
---|
237 | write(*,*) '(6) omeg : planet rotation rate (rad/s)' |
---|
238 | write(*,*) '(7) g : gravity (m/s2)' |
---|
239 | write(*,*) '(8) mugaz : molecular mass ' |
---|
240 | write(*,*) ' of the atmosphere (g/mol)' |
---|
241 | write(*,*) '(9) rcp : r/Cp' |
---|
242 | write(*,*) '(8)+(9) calc_cpp_mugaz : r/Cp and mugaz ' |
---|
243 | write(*,*) ' computed from gases.def' |
---|
244 | write(*,*) '(10) daysec : length of a sol (s)' |
---|
245 | write(*,*) |
---|
246 | |
---|
247 | |
---|
248 | do while(modif(1:1).ne.'hello') |
---|
249 | write(*,*) |
---|
250 | write(*,*) |
---|
251 | write(*,*) 'Changes to perform ?' |
---|
252 | write(*,*) ' (enter keyword or return )' |
---|
253 | write(*,*) |
---|
254 | read(*,fmt='(a20)') modif |
---|
255 | if (modif(1:1) .eq. ' ') goto 999 |
---|
256 | |
---|
257 | write(*,*) |
---|
258 | write(*,*) modif(1:len_trim(modif)) , ' : ' |
---|
259 | |
---|
260 | if (modif(1:len_trim(modif)) .eq. 'day_ini') then |
---|
261 | write(*,*) 'current value:',day_ini |
---|
262 | write(*,*) 'enter new value:' |
---|
263 | 101 read(*,*,iostat=ierr) day_ini |
---|
264 | if(ierr.ne.0) goto 101 |
---|
265 | write(*,*) ' ' |
---|
266 | write(*,*) 'day_ini (new value):',day_ini |
---|
267 | |
---|
268 | else if (modif(1:len_trim(modif)) .eq. 'z0') then |
---|
269 | write(*,*) 'current value:',z0 |
---|
270 | write(*,*) 'enter new value:' |
---|
271 | 102 read(*,*,iostat=ierr) z0 |
---|
272 | if(ierr.ne.0) goto 102 |
---|
273 | write(*,*) ' ' |
---|
274 | write(*,*) ' z0 (new value):',z0 |
---|
275 | |
---|
276 | else if (modif(1:len_trim(modif)) .eq. 'emin_turb') then |
---|
277 | write(*,*) 'current value:',emin_turb |
---|
278 | write(*,*) 'enter new value:' |
---|
279 | 103 read(*,*,iostat=ierr) emin_turb |
---|
280 | if(ierr.ne.0) goto 103 |
---|
281 | write(*,*) ' ' |
---|
282 | write(*,*) ' emin_turb (new value):',emin_turb |
---|
283 | |
---|
284 | else if (modif(1:len_trim(modif)) .eq. 'lmixmin') then |
---|
285 | write(*,*) 'current value:',lmixmin |
---|
286 | write(*,*) 'enter new value:' |
---|
287 | 104 read(*,*,iostat=ierr) lmixmin |
---|
288 | if(ierr.ne.0) goto 104 |
---|
289 | write(*,*) ' ' |
---|
290 | write(*,*) ' lmixmin (new value):',lmixmin |
---|
291 | |
---|
292 | else if (modif(1:len_trim(modif)) .eq. 'emissiv') then |
---|
293 | write(*,*) 'current value:',emissiv |
---|
294 | write(*,*) 'enter new value:' |
---|
295 | 105 read(*,*,iostat=ierr) emissiv |
---|
296 | if(ierr.ne.0) goto 105 |
---|
297 | write(*,*) ' ' |
---|
298 | write(*,*) ' emissiv (new value):',emissiv |
---|
299 | |
---|
300 | else if (modif(1:len_trim(modif)) .eq. 'emisice') then |
---|
301 | write(*,*) 'current value emisice(1) North:',emisice(1) |
---|
302 | write(*,*) 'enter new value:' |
---|
303 | 106 read(*,*,iostat=ierr) emisice(1) |
---|
304 | if(ierr.ne.0) goto 106 |
---|
305 | write(*,*) |
---|
306 | write(*,*) ' emisice(1) (new value):',emisice(1) |
---|
307 | write(*,*) |
---|
308 | |
---|
309 | write(*,*) 'current value emisice(2) South:',emisice(2) |
---|
310 | write(*,*) 'enter new value:' |
---|
311 | 107 read(*,*,iostat=ierr) emisice(2) |
---|
312 | if(ierr.ne.0) goto 107 |
---|
313 | write(*,*) |
---|
314 | write(*,*) ' emisice(2) (new value):',emisice(2) |
---|
315 | |
---|
316 | else if (modif(1:len_trim(modif)) .eq. 'albedice') then |
---|
317 | write(*,*) 'current value albedice(1) North:',albedice(1) |
---|
318 | write(*,*) 'enter new value:' |
---|
319 | 108 read(*,*,iostat=ierr) albedice(1) |
---|
320 | if(ierr.ne.0) goto 108 |
---|
321 | write(*,*) |
---|
322 | write(*,*) ' albedice(1) (new value):',albedice(1) |
---|
323 | write(*,*) |
---|
324 | |
---|
325 | write(*,*) 'current value albedice(2) South:',albedice(2) |
---|
326 | write(*,*) 'enter new value:' |
---|
327 | 109 read(*,*,iostat=ierr) albedice(2) |
---|
328 | if(ierr.ne.0) goto 109 |
---|
329 | write(*,*) |
---|
330 | write(*,*) ' albedice(2) (new value):',albedice(2) |
---|
331 | |
---|
332 | else if (modif(1:len_trim(modif)) .eq. 'iceradius') then |
---|
333 | write(*,*) 'current value iceradius(1) North:',iceradius(1) |
---|
334 | write(*,*) 'enter new value:' |
---|
335 | 110 read(*,*,iostat=ierr) iceradius(1) |
---|
336 | if(ierr.ne.0) goto 110 |
---|
337 | write(*,*) |
---|
338 | write(*,*) ' iceradius(1) (new value):',iceradius(1) |
---|
339 | write(*,*) |
---|
340 | |
---|
341 | write(*,*) 'current value iceradius(2) South:',iceradius(2) |
---|
342 | write(*,*) 'enter new value:' |
---|
343 | 111 read(*,*,iostat=ierr) iceradius(2) |
---|
344 | if(ierr.ne.0) goto 111 |
---|
345 | write(*,*) |
---|
346 | write(*,*) ' iceradius(2) (new value):',iceradius(2) |
---|
347 | |
---|
348 | else if (modif(1:len_trim(modif)) .eq. 'dtemisice') then |
---|
349 | write(*,*) 'current value dtemisice(1) North:',dtemisice(1) |
---|
350 | write(*,*) 'enter new value:' |
---|
351 | 112 read(*,*,iostat=ierr) dtemisice(1) |
---|
352 | if(ierr.ne.0) goto 112 |
---|
353 | write(*,*) |
---|
354 | write(*,*) ' dtemisice(1) (new value):',dtemisice(1) |
---|
355 | write(*,*) |
---|
356 | |
---|
357 | write(*,*) 'current value dtemisice(2) South:',dtemisice(2) |
---|
358 | write(*,*) 'enter new value:' |
---|
359 | 113 read(*,*,iostat=ierr) dtemisice(2) |
---|
360 | if(ierr.ne.0) goto 113 |
---|
361 | write(*,*) |
---|
362 | write(*,*) ' dtemisice(2) (new value):',dtemisice(2) |
---|
363 | |
---|
364 | else if (modif(1:len_trim(modif)) .eq. 'obliquit') then |
---|
365 | write(*,*) 'current value:',obliquit |
---|
366 | write(*,*) 'obliquit should be 25.19 on current Mars' |
---|
367 | write(*,*) 'enter new value:' |
---|
368 | 115 read(*,*,iostat=ierr) obliquit |
---|
369 | if(ierr.ne.0) goto 115 |
---|
370 | write(*,*) |
---|
371 | write(*,*) ' obliquit (new value):',obliquit |
---|
372 | |
---|
373 | else if (modif(1:len_trim(modif)) .eq. 'peri_day') then |
---|
374 | write(*,*) 'current value:',peri_day |
---|
375 | write(*,*) 'peri_day should be 485 on current Mars' |
---|
376 | write(*,*) 'enter new value:' |
---|
377 | 116 read(*,*,iostat=ierr) peri_day |
---|
378 | if(ierr.ne.0) goto 116 |
---|
379 | write(*,*) |
---|
380 | write(*,*) ' peri_day (new value):',peri_day |
---|
381 | |
---|
382 | else if (modif(1:len_trim(modif)) .eq. 'periastr') then |
---|
383 | write(*,*) 'current value:',periastr |
---|
384 | write(*,*) 'periastr should be 206.66 on present-day Mars' |
---|
385 | write(*,*) 'enter new value:' |
---|
386 | 117 read(*,*,iostat=ierr) periastr |
---|
387 | if(ierr.ne.0) goto 117 |
---|
388 | write(*,*) |
---|
389 | write(*,*) ' periastr (new value):',periastr |
---|
390 | |
---|
391 | else if (modif(1:len_trim(modif)) .eq. 'apoastr') then |
---|
392 | write(*,*) 'current value:',apoastr |
---|
393 | write(*,*) 'apoastr should be 249.22 on present-day Mars' |
---|
394 | write(*,*) 'enter new value:' |
---|
395 | 118 read(*,*,iostat=ierr) apoastr |
---|
396 | if(ierr.ne.0) goto 118 |
---|
397 | write(*,*) |
---|
398 | write(*,*) ' apoastr (new value):',apoastr |
---|
399 | |
---|
400 | else if (modif(1:len_trim(modif)) .eq. 'volcapa') then |
---|
401 | write(*,*) 'current value:',volcapa |
---|
402 | write(*,*) 'enter new value:' |
---|
403 | 119 read(*,*,iostat=ierr) volcapa |
---|
404 | if(ierr.ne.0) goto 119 |
---|
405 | write(*,*) |
---|
406 | write(*,*) ' volcapa (new value):',volcapa |
---|
407 | |
---|
408 | else if (modif(1:len_trim(modif)).eq.'rad') then |
---|
409 | write(*,*) 'current value:',rad |
---|
410 | write(*,*) 'enter new value:' |
---|
411 | 120 read(*,*,iostat=ierr) rad |
---|
412 | if(ierr.ne.0) goto 120 |
---|
413 | write(*,*) |
---|
414 | write(*,*) ' rad (new value):',rad |
---|
415 | |
---|
416 | else if (modif(1:len_trim(modif)).eq.'omeg') then |
---|
417 | write(*,*) 'current value:',omeg |
---|
418 | write(*,*) 'enter new value:' |
---|
419 | 121 read(*,*,iostat=ierr) omeg |
---|
420 | if(ierr.ne.0) goto 121 |
---|
421 | write(*,*) |
---|
422 | write(*,*) ' omeg (new value):',omeg |
---|
423 | |
---|
424 | else if (modif(1:len_trim(modif)).eq.'g') then |
---|
425 | write(*,*) 'current value:',g |
---|
426 | write(*,*) 'enter new value:' |
---|
427 | 122 read(*,*,iostat=ierr) g |
---|
428 | if(ierr.ne.0) goto 122 |
---|
429 | write(*,*) |
---|
430 | write(*,*) ' g (new value):',g |
---|
431 | |
---|
432 | else if (modif(1:len_trim(modif)).eq.'mugaz') then |
---|
433 | write(*,*) 'current value:',mugaz |
---|
434 | write(*,*) 'enter new value:' |
---|
435 | 123 read(*,*,iostat=ierr) mugaz |
---|
436 | if(ierr.ne.0) goto 123 |
---|
437 | write(*,*) |
---|
438 | write(*,*) ' mugaz (new value):',mugaz |
---|
439 | r=8.314511/(mugaz/1000.0) |
---|
440 | write(*,*) ' R (new value):',r |
---|
441 | |
---|
442 | else if (modif(1:len_trim(modif)).eq.'rcp') then |
---|
443 | write(*,*) 'current value:',rcp |
---|
444 | write(*,*) 'enter new value:' |
---|
445 | 124 read(*,*,iostat=ierr) rcp |
---|
446 | if(ierr.ne.0) goto 124 |
---|
447 | write(*,*) |
---|
448 | write(*,*) ' rcp (new value):',rcp |
---|
449 | r=8.314511/(mugaz/1000.0) |
---|
450 | cpp=r/rcp |
---|
451 | write(*,*) ' cpp (new value):',cpp |
---|
452 | |
---|
453 | else if (modif(1:len_trim(modif)).eq.'calc_cpp_mugaz') then |
---|
454 | write(*,*) 'current value rcp, mugaz:',rcp,mugaz |
---|
455 | check_cpp_match=.false. |
---|
456 | force_cpp=.false. |
---|
457 | call su_gases |
---|
458 | call calc_cpp_mugaz |
---|
459 | write(*,*) |
---|
460 | write(*,*) ' cpp (new value):',cpp |
---|
461 | write(*,*) ' mugaz (new value):',mugaz |
---|
462 | r=8.314511/(mugaz/1000.0) |
---|
463 | rcp=r/cpp |
---|
464 | write(*,*) ' rcp (new value):',rcp |
---|
465 | |
---|
466 | else if (modif(1:len_trim(modif)).eq.'daysec') then |
---|
467 | write(*,*) 'current value:',daysec |
---|
468 | write(*,*) 'enter new value:' |
---|
469 | 125 read(*,*,iostat=ierr) daysec |
---|
470 | if(ierr.ne.0) goto 125 |
---|
471 | write(*,*) |
---|
472 | write(*,*) ' daysec (new value):',daysec |
---|
473 | |
---|
474 | ! added by RW! |
---|
475 | else if (modif(1:len_trim(modif)).eq.'year_day') then |
---|
476 | write(*,*) 'current value:',year_day |
---|
477 | write(*,*) 'enter new value:' |
---|
478 | 126 read(*,*,iostat=ierr) year_day |
---|
479 | if(ierr.ne.0) goto 126 |
---|
480 | write(*,*) |
---|
481 | write(*,*) ' year_day (new value):',year_day |
---|
482 | |
---|
483 | endif |
---|
484 | enddo ! of do while(modif(1:1).ne.'hello') |
---|
485 | |
---|
486 | 999 continue |
---|
487 | |
---|
488 | c----------------------------------------------------------------------- |
---|
489 | c Write values of physical constants after modifications |
---|
490 | c----------------------------------------------------------------------- |
---|
491 | |
---|
492 | write(*,*) '*****************************************************' |
---|
493 | write(*,*) 'Reading tab_cntrl when calling tabfi AFTER changes' |
---|
494 | write(*,*) '*****************************************************' |
---|
495 | write(*,5) '(1) = ngrid?',tab_cntrl(tab0+1),float(ngrid) |
---|
496 | write(*,5) '(2) lmax',tab_cntrl(tab0+2),float(lmax) |
---|
497 | write(*,5) '(3) day_ini',tab_cntrl(tab0+3),float(day_ini) |
---|
498 | write(*,5) '(5) rad',tab_cntrl(tab0+5),rad |
---|
499 | write(*,5) '(10) daysec',tab_cntrl(tab0+10),daysec |
---|
500 | write(*,6) '(6) omeg',tab_cntrl(tab0+6),omeg |
---|
501 | write(*,5) '(7) g',tab_cntrl(tab0+7),g |
---|
502 | write(*,5) '(8) mugaz',tab_cntrl(tab0+8),mugaz |
---|
503 | write(*,5) '(9) rcp',tab_cntrl(tab0+9),rcp |
---|
504 | write(*,6) '(11) dtphys?',tab_cntrl(tab0+11),dtphys |
---|
505 | |
---|
506 | write(*,5) '(14) year_day',tab_cntrl(tab0+14),year_day |
---|
507 | write(*,5) '(15) periastr',tab_cntrl(tab0+15),periastr |
---|
508 | write(*,5) '(16) apoastr',tab_cntrl(tab0+16),apoastr |
---|
509 | write(*,5) '(17) peri_day',tab_cntrl(tab0+17),peri_day |
---|
510 | write(*,5) '(18) obliquit',tab_cntrl(tab0+18),obliquit |
---|
511 | |
---|
512 | write(*,6) '(19) z0',tab_cntrl(tab0+19),z0 |
---|
513 | write(*,6) '(21) emin_turb',tab_cntrl(tab0+21),emin_turb |
---|
514 | write(*,5) '(20) lmixmin',tab_cntrl(tab0+20),lmixmin |
---|
515 | |
---|
516 | write(*,5) '(26) emissiv',tab_cntrl(tab0+26),emissiv |
---|
517 | write(*,5) '(24) emisice(1)',tab_cntrl(tab0+24),emisice(1) |
---|
518 | write(*,5) '(25) emisice(2)',tab_cntrl(tab0+25),emisice(2) |
---|
519 | write(*,5) '(22) albedice(1)',tab_cntrl(tab0+22),albedice(1) |
---|
520 | write(*,5) '(23) albedice(2)',tab_cntrl(tab0+23),albedice(2) |
---|
521 | write(*,6) '(31) iceradius(1)',tab_cntrl(tab0+31),iceradius(1) |
---|
522 | write(*,6) '(32) iceradius(2)',tab_cntrl(tab0+32),iceradius(2) |
---|
523 | write(*,5) '(33) dtemisice(1)',tab_cntrl(tab0+33),dtemisice(1) |
---|
524 | write(*,5) '(34) dtemisice(2)',tab_cntrl(tab0+34),dtemisice(2) |
---|
525 | |
---|
526 | write(*,5) '(35) volcapa',tab_cntrl(tab0+35),volcapa |
---|
527 | |
---|
528 | write(*,*) |
---|
529 | write(*,*) |
---|
530 | |
---|
531 | ENDIF ! of if (Lmodif == 1) |
---|
532 | |
---|
533 | c----------------------------------------------------------------------- |
---|
534 | c Save some constants for later use (as routine arguments) |
---|
535 | c----------------------------------------------------------------------- |
---|
536 | p_omeg = omeg |
---|
537 | p_g = g |
---|
538 | p_cpp = cpp |
---|
539 | p_mugaz = mugaz |
---|
540 | p_daysec = daysec |
---|
541 | p_rad=rad |
---|
542 | |
---|
543 | |
---|
544 | end |
---|