source: trunk/LMDZ.PLUTO/libf/phypluto/inifis_mod.F90 @ 4102

Last change on this file since 4102 was 4078, checked in by tbertrand, 4 weeks ago

Pluto PCM:
Allowing atmospheric temperatures to be fixed following an input profile (fixed_temp_prof option)
TB

File size: 59.4 KB
Line 
1MODULE inifis_mod
2IMPLICIT NONE
3
4CONTAINS
5
6  SUBROUTINE inifis(ngrid,nlayer,nq, &
7             day_ini,pdaysec,nday,ptimestep, &
8             plat,plon,parea, &
9             prad,pg,pr,pcpp)
10
11  use init_print_control_mod, only: init_print_control
12  use radinc_h, only: ini_radinc_h, naerkind
13  use radcommon_h, only: ini_radcommon_h
14  use radii_mod, only: radfixed
15  use datafile_mod, only: datadir,hazeprop_file,hazerad_file,hazemmr_file,hazedens_file, &
16                          config_mufi, mugasflux_file, aersprop_file, aerfprop_file, clddprop_file
17  use comdiurn_h, only: sinlat, coslat, sinlon, coslon
18  use comgeomfi_h, only: totarea, totarea_planet
19  use comsoil_h, only: ini_comsoil_h, nsoilmx, lay1_soil, alpha_soil
20  use time_phylmdz_mod, only: diagfi_output_rate,startfi_output_rate,slow_diagfi, &
21                              init_time, daysec, dtphys
22  use comcstfi_mod, only: rad, cpp, g, r, rcp, &
23                          mugaz, pi, avocado
24  use planetwide_mod, only: planetwide_sumval
25  use nonoro_gwd_mix_mod, only: calljliu_gwimix
26  use callkeys_mod
27  use nonoro_gwd_ran_mod, only: ini_nonoro_gwd_ran, &
28                                end_nonoro_gwd_ran
29  use nonoro_gwd_mix_mod, only: ini_nonoro_gwd_mix, &
30                                end_nonoro_gwd_mix
31                               
32  use surfdat_h
33  use wstats_mod, only: callstats
34  use writediagsoil_mod, only: diagsoil
35  use ioipsl_getin_p_mod, only : getin_p
36  use mod_phys_lmdz_para, only : is_parallel, is_master, bcast
37
38!=======================================================================
39!
40!   purpose:
41!   -------
42!
43!   Initialisation for the physical parametrisations of the LMD
44!   Generic Model.
45!
46!   author: Frederic Hourdin 15 / 10 /93
47!   -------
48!   modified: Sebastien Lebonnois 11/06/2003 (new callphys.def)
49!             Ehouarn Millour (oct. 2008) tracers are now identified
50!              by their names and may not be contiguously
51!              stored in the q(:,:,:,:) array
52!             E.M. (june 2009) use getin routine to load parameters
53!
54!
55!   arguments:
56!   ----------
57!
58!   input:
59!   ------
60!
61!    ngrid                 Size of the horizontal grid.
62!                          All internal loops are performed on that grid.
63!    nlayer                Number of vertical layers.
64!    pdayref               Day of reference for the simulation
65!    pday                  Number of days counted from the North. Spring
66!                          equinoxe.
67!
68!=======================================================================
69!
70!-----------------------------------------------------------------------
71!   declarations:
72!   -------------
73  use datafile_mod, only: datadir
74  use ioipsl_getin_p_mod, only: getin_p
75  IMPLICIT NONE
76
77
78
79  REAL,INTENT(IN) :: prad,pg,pr,pcpp,pdaysec,ptimestep
80  INTEGER,INTENT(IN) :: nday
81  INTEGER,INTENT(IN) :: ngrid,nlayer,nq
82  REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid)
83  integer,intent(in) :: day_ini
84
85  INTEGER ig
86  CHARACTER(len=20) :: rname="inifis" ! routine name, for messages
87
88  EXTERNAL iniorbit,orbite
89  EXTERNAL SSUM
90  REAL SSUM
91
92  ! deprecated parameters
93  REAL :: ecritphy ! to check that this obsolete flag is no longer used...
94  logical aerohaze
95
96  ! Initialize flags lunout, prt_level, debug (in print_control_mod)
97  CALL init_print_control
98
99  ! initialize constants in comcstfi_mod
100  rad=prad
101  cpp=pcpp
102  g=pg
103  r=pr
104  rcp=r/cpp
105  mugaz=8.314*1000./pr ! dummy init
106  pi=2.*asin(1.)
107  avocado = 6.02214179e23   ! added by RW
108
109  ! Initialize some "temporal and calendar" related variables
110#ifndef MESOSCALE
111  CALL init_time(day_ini,pdaysec,nday,ptimestep)
112#endif
113
114
115  ! read in some parameters from "run.def" for physics,
116  ! or shared between dynamics and physics.
117  ecritphy=-666 ! dummy default value
118  call getin_p("ecritphy",ecritphy) ! frequency of outputs in physics,
119                                    ! in dynamical steps
120  if (ecritphy/=-666) then
121    call abort_physic(rname, &
122         "Error: parameter ecritphy is obsolete! Remove it! "//&
123         "And use diagfi_output_rate instead",1)
124  endif
125
126  ! do we read a startphy.nc file? (default: .true.)
127  call getin_p("startphy_file",startphy_file)
128
129! --------------------------------------------------------------
130!  Reading the "callphys.def" file controlling some key options
131! --------------------------------------------------------------
132
133  IF (is_master) THEN
134    ! check if 'callphys.def' file is around
135    inquire(file="callphys.def",exist=iscallphys)
136    write(*,*) trim(rname)//": iscallphys=",iscallphys
137  ENDIF
138  call bcast(iscallphys)
139
140  IF(iscallphys) THEN
141
142     if (is_master) then
143       write(*,*)
144       write(*,*)'--------------------------------------------'
145       write(*,*)trim(rname)//': Parameters for the physics (callphys.def)'
146       write(*,*)'--------------------------------------------'
147     endif
148
149     if (is_master) write(*,*) trim(rname)//&
150       ": Directory where external input files are:"
151     ! default 'datadir' is set in "datadir_mod"
152     call getin_p("datadir",datadir) ! default path
153     if (is_master) write(*,*) trim(rname)//": datadir = ",trim(datadir)
154
155     if (is_master) write(*,*) "Haze optical properties datafile"
156     hazeprop_file="optprop_tholins_fractal050nm.dat"  ! default file
157     call getin_p("hazeprop_file",hazeprop_file)
158     if (is_master) write(*,*) trim(rname)//" hazeprop_file = ",trim(hazeprop_file)
159
160     if (is_master) write(*,*) "Haze radii datafile"
161     hazerad_file="hazerad.txt"  ! default file
162     call getin_p("hazerad_file",hazerad_file)
163     if (is_master) write(*,*) trim(rname)//" hazerad_file = ",trim(hazerad_file)
164
165     if (is_master) write(*,*) "Haze mmr datafile"
166     hazemmr_file="None"  ! default file
167     call getin_p("hazemmr_file",hazemmr_file)
168     if (is_master) write(*,*) trim(rname)//" hazemmr_file = ",trim(hazemmr_file)
169     if (is_master) write(*,*) "Haze density datafile"
170     hazedens_file="None"  ! default file
171     call getin_p("hazedens_file",hazedens_file)
172     if (is_master) write(*,*) trim(rname)//" hazedens_file = ",trim(hazedens_file)
173
174     if (is_master) write(*,*) trim(rname)//&
175       ": Run with or without tracer transport ?"
176     tracer=.false. ! default value
177     call getin_p("tracer",tracer)
178     if (is_master) write(*,*) trim(rname)//": tracer = ",tracer
179
180     if (is_master) write(*,*) trim(rname)//&
181       ": Output rate for diagfi.nc file (in physics steps) ?"
182     diagfi_output_rate=24 !default value
183     call getin_p("diagfi_output_rate",diagfi_output_rate)
184     if (is_master) write(*,*) trim(rname)//": diagfi_output_rate = ",&
185                               diagfi_output_rate
186
187     if ((is_master).and.(ngrid.eq.1)) write(*,*) trim(rname)//&
188       ": Open/close diagfi.nc at output rate (rather than once) ?"
189     slow_diagfi =.false. ! default value, open/close diagfi once (1D only)
190           call getin_p("slow_diagfi",slow_diagfi) ! if true, open/close the diagfi.nc
191                                                   ! at output frequency instead of once
192                                                   ! (slower but required for debug)
193           if ((is_master).and.(ngrid.eq.1)) write(*,*) trim(rname)//&
194             ": slow_diagfi = ", slow_diagfi
195     
196     if (is_master) write(*,*) trim(rname)//&
197       ": Output rate for start/startfi.nc files (in physics steps) ?"
198     startfi_output_rate=0 !default value
199     call getin_p("startfi_output_rate",startfi_output_rate)
200     if (is_master) write(*,*) trim(rname)//": startfi_output_rate = ",&
201                               startfi_output_rate
202
203     if (is_master) write(*,*) trim(rname)//&
204       ": Run with or without atm mass update "//&
205       " due to tracer evaporation/condensation?"
206     mass_redistrib=.false. ! default value
207     call getin_p("mass_redistrib",mass_redistrib)
208     if (is_master) write(*,*) trim(rname)//&
209       ": mass_redistrib = ",mass_redistrib
210
211     if (is_master) then
212       write(*,*) trim(rname)//": Diurnal cycle ?"
213       write(*,*) trim(rname)//&
214       ": (if diurnal=false, diurnal averaged solar heating)"
215     endif
216     diurnal=.true. ! default value
217     call getin_p("diurnal",diurnal)
218     if (is_master) write(*,*) trim(rname)//": diurnal = ",diurnal
219
220     if (is_master) then
221       write(*,*) trim(rname)//": Seasonal cycle ?"
222       write(*,*) trim(rname)//&
223       ": (if season=false, Ls stays constant, to value ", &
224       "set in 'start'"
225     endif
226     season=.true. ! default value
227     call getin_p("season",season)
228     if (is_master) write(*,*) trim(rname)//": season = ",season
229
230     evol1d=.false. ! default value
231     call getin_p("evol1d",evol1d)
232     if (is_master) write(*,*) trim(rname)//": evol1d = ",evol1d
233
234     if (is_master) then
235       write(*,*) trim(rname)//": Fast mode (nogcm) ?"
236     endif
237     fast=.false. ! default value
238     call getin_p("fast",fast)
239     if (is_master) write(*,*) trim(rname)//": fast = ",fast
240
241     if (is_master) write(*,*) trim(rname)//"Run with Triton orbit ?"
242     triton=.false. ! default value
243     call getin_p("triton",triton)
244     if (is_master) write(*,*) trim(rname)//" triton = ",triton
245     convergeps=.false. ! default value
246     call getin_p("convergeps",convergeps)
247     if (is_master) write(*,*) trim(rname)//" convergeps = ",convergeps
248
249     conservn2=.false. ! default value
250     call getin_p("conservn2",conservn2)
251     if (is_master) write(*,*) trim(rname)//" conservn2 = ",conservn2
252     conservch4=.false. ! default value
253     call getin_p("conservch4",conservch4)
254     if (is_master) write(*,*) trim(rname)//" conservch4 = ",conservch4
255
256     if (is_master) write(*,*) trim(rname)//"KBO runs (eris, makemake) ?"
257     kbo=.false. ! default value
258     call getin_p("kbo",kbo)
259     if (is_master) write(*,*) trim(rname)//" kbo = ",kbo
260
261     if (is_master) write(*,*) trim(rname)//"Specific paleo run ?"
262     paleo=.false. ! default value
263     call getin_p("paleo",paleo)
264     if (is_master) write(*,*) trim(rname)//" paleo = ",paleo
265
266     if (is_master) write(*,*) trim(rname)//"paleoclimate step (Earth years) "
267     paleoyears=10000. ! default value
268     call getin_p("paleoyears",paleoyears)
269     if (is_master) write(*,*) trim(rname)//" paleoyears = ",paleoyears
270
271     if (is_master) write(*,*) trim(rname)//&
272       ": No seasonal cycle: initial day to lock the run during restart"
273     noseason_day=0.0 ! default value
274     call getin_p("noseason_day",noseason_day)
275     if (is_master) write(*,*) trim(rname)//": noseason_day=", noseason_day
276
277     if (is_master) write(*,*) trim(rname)//&
278       ": Write some extra output to the screen ?"
279     lwrite=.false. ! default value
280     call getin_p("lwrite",lwrite)
281     if (is_master) write(*,*) trim(rname)//": lwrite = ",lwrite
282
283     if (is_master) write(*,*) trim(rname)//&
284       ": Save statistics in file stats.nc ?"
285     callstats=.true. ! default value
286     call getin_p("callstats",callstats)
287     if (is_master) write(*,*) trim(rname)//": callstats = ",callstats
288
289     if (is_master) write(*,*) trim(rname)//&
290       ": Write sub-surface fields in file diagsoil.nc ?"
291     diagsoil=.false. ! default value
292     call getin_p("diagsoil",diagsoil)
293     if (is_master) write(*,*) trim(rname)//" diagsoil = ",diagsoil
294
295     if (is_master) write(*,*) trim(rname)//&
296       ": Test energy conservation of model physics ?"
297     enertest=.false. ! default value
298     call getin_p("enertest",enertest)
299     if (is_master) write(*,*) trim(rname)//": enertest = ",enertest
300
301     if (is_master) write(*,*) trim(rname)//": call radiative transfer ?"
302     callrad=.true. ! default value
303     call getin_p("callrad",callrad)
304     if (is_master) write(*,*) trim(rname)//": callrad = ",callrad
305
306     if (is_master) write(*,*) trim(rname)//&
307       ": call correlated-k radiative transfer ?"
308     corrk=.true. ! default value
309     call getin_p("corrk",corrk)
310     if (is_master) write(*,*) trim(rname)//": corrk = ",corrk
311
312     if (is_master) write(*,*) trim(rname)//&
313       ": call simple fixed temperature profile"
314     fixed_temp_prof=.false. ! default value
315     call getin_p("fixed_temp_prof",fixed_temp_prof)
316     if (is_master) write(*,*) trim(rname)//": fixed_temp_prof = ",fixed_temp_prof
317     tau_temp=1. ! default value
318     call getin_p("tau_temp",tau_temp)
319
320     if (is_master) write(*,*) trim(rname)//&
321       ": prohibit calculations outside corrk T grid?"
322     strictboundcorrk=.true. ! default value
323     call getin_p("strictboundcorrk",strictboundcorrk)
324     if (is_master) write(*,*) trim(rname)//&
325       ": strictboundcorrk = ",strictboundcorrk
326
327     if (is_master) write(*,*) trim(rname)//&
328       ": prohibit calculations outside CIA T grid?"
329     strictboundcia=.true. ! default value
330     call getin_p("strictboundcia",strictboundcia)
331     if (is_master) write(*,*) trim(rname)//&
332       ": strictboundcia = ",strictboundcia
333
334     if (is_master) write(*,*) trim(rname)//&
335       ": Minimum atmospheric temperature for Planck function integration ?"
336     tplanckmin=30.0 ! default value
337     call getin_p("tplanckmin",tplanckmin)
338     if (is_master) write(*,*) trim(rname)//": tplanckmin = ",tplanckmin
339
340     if (is_master) write(*,*) trim(rname)//&
341       ": Maximum atmospheric temperature for Planck function integration ?"
342     tplanckmax=1500.0 ! default value
343     call getin_p("tplanckmax",tplanckmax)
344     if (is_master) write(*,*) trim(rname)//": tplanckmax = ",tplanckmax
345
346     if (is_master) write(*,*) trim(rname)//&
347       ": Temperature step for Planck function integration ?"
348     dtplanck=0.1 ! default value
349     call getin_p("dtplanck",dtplanck)
350     if (is_master) write(*,*) trim(rname)//": dtplanck = ",dtplanck
351
352     if (is_master) write(*,*) trim(rname)//&
353       ": call gaseous absorption in the visible bands?"//&
354       " (matters only if callrad=T)"
355     callgasvis=.false. ! default value
356     call getin_p("callgasvis",callgasvis)
357     if (is_master) write(*,*) trim(rname)//": callgasvis = ",callgasvis
358
359     if (is_master) write(*,*) trim(rname)//&
360       ": call continuum opacities in radiative transfer ?"//&
361       " (matters only if callrad=T)"
362     continuum=.true. ! default value
363     call getin_p("continuum",continuum)
364     if (is_master) write(*,*) trim(rname)//": continuum = ",continuum
365
366     if (is_master) write(*,*) trim(rname)//&
367       ": call turbulent vertical diffusion ?"
368     calldifv=.false. ! default value
369     call getin_p("calldifv",calldifv)
370     if (is_master) write(*,*) trim(rname)//": calldifv = ",calldifv
371     vertdiff=.true. ! default value
372     call getin_p("vertdiff",vertdiff)
373     if (is_master) write(*,*) trim(rname)//": vertdiff = ",vertdiff
374
375     if (is_master) write(*,*) trim(rname)//": use turbdiff instead of vdifc ?"
376     UseTurbDiff=.false. ! default value
377     call getin_p("UseTurbDiff",UseTurbDiff)
378     if (is_master) write(*,*) trim(rname)//": UseTurbDiff = ",UseTurbDiff
379
380     if (is_master) write(*,*) trim(rname)//": call convective adjustment ?"
381     calladj=.false. ! default value
382     call getin_p("calladj",calladj)
383     if (is_master) write(*,*) trim(rname)//": calladj = ",calladj
384
385     if (is_master) write(*,*) trim(rname)//&
386     ": Radiative timescale for Newtonian cooling (in Earth days)?"
387     tau_relax=30. ! default value
388     call getin_p("tau_relax",tau_relax)
389     if (is_master) write(*,*) trim(rname)//": tau_relax = ",tau_relax
390     tau_relax=tau_relax*24*3600 ! convert Earth days --> seconds
391
392     if (is_master) write(*,*)trim(rname)//&
393       ": call thermal conduction in the soil ?"
394     callsoil=.true. ! default value
395     call getin_p("callsoil",callsoil)
396     if (is_master) write(*,*) trim(rname)//": callsoil = ",callsoil
397
398     if (is_master) write(*,*)trim(rname)//&
399       ": call orographic gravity waves ?"
400     calllott=.false. ! default value
401     call getin_p("calllott",calllott)
402     if (is_master) write(*,*)trim(rname)//": calllott = ",calllott
403
404     if (is_master) write(*,*)trim(rname)//&
405       ": call  non-orographic gravity waves ?"
406     calllott_nonoro=.false. ! default value
407     call getin_p("calllott_nonoro",calllott_nonoro)
408     if (is_master) write(*,*)trim(rname)//&
409       ": calllott_nonoro = ",calllott_nonoro
410
411     if (is_master) write(*,*)trim(rname)//&       
412       ": call jliu's non-orogrphic GW-induced turbulence"
413     calljliu_gwimix=.false. ! default value
414     call getin_p("calljliu_gwimix",calljliu_gwimix)
415     if (is_master) write(*,*)trim(rname)//&   
416       ": calljliu_gwimix = ",calljliu_gwimix
417
418     if (is_master) write(*,*)trim(rname)//&
419       ": Rad transfer is computed every iradia", &
420       " physical timestep"
421     iradia=1 ! default value
422     call getin_p("iradia",iradia)
423     if (is_master) write(*,*)trim(rname)//": iradia = ",iradia
424
425     if (is_master) write(*,*)trim(rname)//": Rayleigh scattering ?"
426     rayleigh=.false.
427     call getin_p("rayleigh",rayleigh)
428     if (is_master) write(*,*)trim(rname)//": rayleigh = ",rayleigh
429
430     if (is_master) write(*,*) trim(rname)//&
431       ": Use blackbody for stellar spectrum ?"
432     stelbbody=.false. ! default value
433     call getin_p("stelbbody",stelbbody)
434     if (is_master) write(*,*) trim(rname)//": stelbbody = ",stelbbody
435
436     if (is_master) write(*,*) trim(rname)//": Stellar blackbody temperature ?"
437     stelTbb=5800.0 ! default value
438     call getin_p("stelTbb",stelTbb)
439     if (is_master) write(*,*) trim(rname)//": stelTbb = ",stelTbb
440
441     if (is_master) write(*,*) trim(rname)//": Output mean OLR in 1D?"
442     meanOLR=.false.
443     call getin_p("meanOLR",meanOLR)
444     if (is_master) write(*,*) trim(rname)//": meanOLR = ",meanOLR
445
446     if (is_master) write(*,*)trim(rname)//": Output spectral OLR in 3D?"
447     specOLR=.false.
448     call getin_p("specOLR",specOLR)
449     if (is_master) write(*,*)trim(rname)//": specOLR = ",specOLR
450
451     if (is_master) write(*,*)trim(rname)//": Operate in kastprof mode?"
452     kastprof=.false.
453     call getin_p("kastprof",kastprof)
454     if (is_master) write(*,*)trim(rname)//": kastprof = ",kastprof
455
456     if (is_master) write(*,*)trim(rname)//&
457       ": Uniform absorption in radiative transfer?"
458     graybody=.false.
459     call getin_p("graybody",graybody)
460     if (is_master) write(*,*)trim(rname)//": graybody = ",graybody
461
462! Soil model
463     if (is_master) write(*,*)trim(rname)//&
464       ": Number of sub-surface layers for soil scheme?"
465     ! default value of nsoilmx set in comsoil_h
466     call getin_p("nsoilmx",nsoilmx)
467     if (is_master) write(*,*)trim(rname)//": nsoilmx=",nsoilmx
468
469     if (is_master) write(*,*)trim(rname)//&
470       ": Thickness of topmost soil layer (m)?"
471     ! default value of lay1_soil set in comsoil_h
472     call getin_p("lay1_soil",lay1_soil)
473     if (is_master) write(*,*)trim(rname)//": lay1_soil = ",lay1_soil
474
475     if (is_master) write(*,*)trim(rname)//&
476       ": Coefficient for soil layer thickness distribution?"
477     ! default value of alpha_soil set in comsoil_h
478     call getin_p("alpha_soil",alpha_soil)
479     if (is_master) write(*,*)trim(rname)//": alpha_soil = ",alpha_soil
480
481     if (is_master) write(*,*)trim(rname)//&
482       "Geothermal flux (W) at the bottom layer"
483     fluxgeo=0. ! default value
484     call getin_p("fluxgeo",fluxgeo)
485     if (is_master) write(*,*)trim(rname)//" fluxgeo = ",fluxgeo
486
487     if (is_master) write(*,*)trim(rname)//&
488       "Assymetry flux (W) at the bottom layer"
489     assymflux=.false. ! default value
490     call getin_p("assymflux",assymflux)
491     if (is_master) write(*,*)trim(rname)//" assymflux = ",assymflux
492
493     if (is_master) write(*,*)trim(rname)//&
494       "Geothermal flux (W) for assymetry"
495     fluxgeo2=fluxgeo ! default value
496     call getin_p("fluxgeo2",fluxgeo2)
497     if (is_master) write(*,*)trim(rname)//" fluxgeo2 = ",fluxgeo2
498
499     if (is_master) write(*,*)trim(rname)//&
500       "Warm patch of flux"
501     patchflux=0 ! default value
502     call getin_p("patchflux",patchflux)
503     if (is_master) write(*,*)trim(rname)//" patchflux = ",patchflux
504
505! Chemistry in the thermosphere
506     if (is_master) write(*,*) trim(rname)//": Use deposition ?"
507     depos=.false.         ! default value
508     call getin_p("depos",depos)
509     if (is_master) write(*,*) trim(rname)//": depos = ",depos
510
511     if (is_master) write(*,*)trim(rname)//": Production of haze ?"
512     haze=.false. ! default value
513     call getin_p("haze",haze)
514     if (is_master) write(*,*)trim(rname)//": haze = ",haze
515
516
517
518      if (is_master) write(*,*)trim(rname)// "call thermal conduction ?"
519      callconduct=.false. ! default value
520      call getin_p("callconduct",callconduct)
521      if (is_master) write(*,*)trim(rname)// " callconduct = ",callconduct
522
523      if (is_master) write(*,*)trim(rname)// "call phitop ?"
524      phitop=0. ! default value
525      call getin_p("phitop",phitop)
526      if (is_master) write(*,*)trim(rname)// " phitop = ",phitop
527
528      if (is_master) write(*,*)trim(rname)// "call molecular viscosity ?"
529      callmolvis=.false. ! default value
530      call getin_p("callmolvis",callmolvis)
531      if (is_master) write(*,*)trim(rname)// " callmolvis = ",callmolvis
532
533      if (is_master) write(*,*)trim(rname)// "call molecular diffusion ?"
534      callmoldiff=.false. ! default value
535      call getin_p("callmoldiff",callmoldiff)
536      if (is_master) write(*,*)trim(rname)// " callmoldiff = ",callmoldiff
537
538! Global1D mean and solar zenith angle
539
540     if (ngrid.eq.1) then
541      PRINT*, 'Simulate global averaged conditions ?'
542      global1d = .false. ! default value
543      call getin_p("global1d",global1d)
544      write(*,*) "global1d = ",global1d
545
546      ! Test of incompatibility : if global1d is true, there should not be any diurnal cycle.
547      if (global1d.and.diurnal) then
548         call abort_physic(rname,'if global1d is true, diurnal must be set to false',1)
549      endif
550
551      if (global1d) then
552         PRINT *,'Solar Zenith angle (deg.) ?'
553         PRINT *,'(assumed for averaged solar flux S/4)'
554         szangle=60.0  ! default value
555         call getin_p("szangle",szangle)
556         write(*,*) "szangle = ",szangle
557      endif
558   endif ! of if (ngrid.eq.1)
559
560! Test of incompatibility:
561! if kastprof used, we must be in 1D
562     if (kastprof.and.(ngrid.gt.1)) then
563       call abort_physic(rname,'kastprof can only be used in 1D!',1)
564     endif
565
566     if (is_master) write(*,*)trim(rname)//&
567       ": Stratospheric temperature for kastprof mode?"
568     Tstrat=167.0
569     call getin_p("Tstrat",Tstrat)
570     if (is_master) write(*,*)trim(rname)//": Tstrat = ",Tstrat
571
572     if (is_master) write(*,*)trim(rname)//": Remove lower boundary?"
573     nosurf=.false.
574     call getin_p("nosurf",nosurf)
575     if (is_master) write(*,*)trim(rname)//": nosurf = ",nosurf
576
577! Tests of incompatibility:
578     if (nosurf.and.callsoil) then
579       if (is_master) then
580         write(*,*)trim(rname)//'nosurf not compatible with soil scheme!'
581         write(*,*)trim(rname)//'... got to make a choice!'
582       endif
583       call abort_physic(rname,"nosurf not compatible with soil scheme!",1)
584     endif
585
586     if (is_master) write(*,*)trim(rname)//": Add an internal heat flux?", &
587                   "... matters only if callsoil=F"
588     intheat=0.
589     call getin_p("intheat",intheat)
590     if (is_master) write(*,*)trim(rname)//": intheat = ",intheat
591
592
593     if (is_master) write(*,*)trim(rname)//": Test physics timescale in 1D?"
594     testradtimes=.false.
595     call getin_p("testradtimes",testradtimes)
596     if (is_master) write(*,*)trim(rname)//": testradtimes = ",testradtimes
597
598! Test of incompatibility:
599! if testradtimes used, we must be in 1D
600     if (testradtimes.and.(ngrid.gt.1)) then
601       call abort_physic(rname,'testradtimes can only be used in 1D!',1)
602     endif
603
604     if (is_master) write(*,*)trim(rname)//": Default planetary temperature?"
605     tplanet=215.0
606     call getin_p("tplanet",tplanet)
607     if (is_master) write(*,*)trim(rname)//": tplanet = ",tplanet
608
609     if (is_master) write(*,*)trim(rname)//": Which star?"
610     startype=1 ! default value = Sol
611     call getin_p("startype",startype)
612     if (is_master) write(*,*)trim(rname)//": startype = ",startype
613
614     if (is_master) write(*,*)trim(rname)//": Value of stellar flux at 1 AU?"
615     Fat1AU=1356.0 ! default value = Sol today
616     call getin_p("Fat1AU",Fat1AU)
617     if (is_master) write(*,*)trim(rname)//": Fat1AU = ",Fat1AU
618
619
620! TRACERS:
621
622     if (is_master) write(*,*)trim(rname)//": fixed radii for Cloud particles?"
623     radfixed=.false. ! default value
624     call getin_p("radfixed",radfixed)
625     if (is_master) write(*,*)trim(rname)//": radfixed = ",radfixed
626
627     if(kastprof)then
628        radfixed=.true.
629     endif
630
631      if (is_master) write(*,*)trim(rname)//&
632       "Number of radiatively active aerosols:"
633     naerkind=0 ! default value
634     call getin_p("naerkind",naerkind)
635     if (is_master) write(*,*)trim(rname)//": naerkind = ",naerkind
636
637
638!***************************************************************
639         !! TRACERS options
640
641     if (is_master)write(*,*)trim(rname)//&
642      "call N2 condensation ?"
643     n2cond=.true. ! default value
644     call getin_p("n2cond",n2cond)
645     if (is_master)write(*,*)trim(rname)//&
646      " n2cond = ",n2cond
647
648     if (is_master)write(*,*)trim(rname)//&
649      "call N2 cloud condensation ?"
650     condensn2=.false. ! default value
651     call getin_p("condensn2",condensn2)
652     if (is_master)write(*,*)trim(rname)//&
653      "condensn2 = ",condensn2
654
655     if (is_master)write(*,*)trim(rname)//&
656      "call no N2 frost formation?"
657     no_n2frost=.false. ! default value
658     call getin_p("no_n2frost",no_n2frost)
659     if (is_master)write(*,*)trim(rname)//&
660      "no_n2frost = ",no_n2frost
661
662     if (is_master)write(*,*)trim(rname)//&
663      "N2 condensation subtimestep?"
664     nbsub=20 ! default value
665     call getin_p("nbsub",nbsub)
666     if (is_master)write(*,*)trim(rname)//&
667      " nbsub = ",nbsub
668
669     if (is_master)write(*,*)trim(rname)//&
670      "Gravitationnal sedimentation ?"
671     sedimentation=.true. ! default value
672     call getin_p("sedimentation",sedimentation)
673     if (is_master)write(*,*)trim(rname)//&
674      " sedimentation = ",sedimentation
675
676     if (is_master)write(*,*)trim(rname)//&
677      "Compute glacial flow ?"
678     glaflow=.false. ! default value
679     call getin_p("glaflow",glaflow)
680     if (is_master)write(*,*)trim(rname)//&
681      " glaflow = ",glaflow
682
683     if (is_master)write(*,*)trim(rname)//&
684      "Compute methane cycle ?"
685     methane=.false. ! default value
686     call getin_p("methane",methane)
687     if (is_master)write(*,*)trim(rname)//&
688      " methane = ",methane
689     condmetsurf=.true. ! default value
690     call getin_p("condmetsurf",condmetsurf)
691     if (is_master)write(*,*)trim(rname)//&
692      " condmetsurf = ",condmetsurf
693     if (is_master)write(*,*)trim(rname)//&
694      "call no CH4 frost formation?"
695     no_ch4frost=.false. ! default value
696     call getin_p("no_ch4frost",no_ch4frost)
697     if (is_master)write(*,*)trim(rname)//&
698      " no_ch4frost = ",no_ch4frost
699
700     if (is_master)write(*,*)trim(rname)//&
701      "Compute methane clouds ?"
702     metcloud=.false. ! default value
703     call getin_p("metcloud",metcloud)
704     if (is_master)write(*,*)trim(rname)//&
705      " metcloud = ",metcloud
706
707     if (is_master)write(*,*)trim(rname)//&
708      "Compute CO cycle ?"
709     carbox=.false. ! default value
710     call getin_p("carbox",carbox)
711     if (is_master)write(*,*)trim(rname)//&
712      " carbox = ",carbox
713     condcosurf=.true. ! default value
714     call getin_p("condcosurf",condcosurf)
715     if (is_master)write(*,*)trim(rname)//&
716      " condcosurf = ",condcosurf
717
718     if (is_master)write(*,*)trim(rname)//&
719      "Compute CO clouds ?"
720     monoxcloud=.false. ! default value
721     call getin_p("monoxcloud",monoxcloud)
722     if (is_master)write(*,*)trim(rname)//&
723      " monoxcloud = ",monoxcloud
724
725     if (is_master)write(*,*)trim(rname)//&
726     "atmospheric redistribution (s):"
727     tau_n2=1. ! default value
728     call getin_p("tau_n2",tau_n2)
729     if (is_master)write(*,*)trim(rname)//&
730     " tau_n2 = ",tau_n2
731     tau_ch4=1.E7 ! default value
732     call getin_p("tau_ch4",tau_ch4)
733     if (is_master)write(*,*)trim(rname)//&
734     " tau_ch4 = ",tau_ch4
735     tau_co=1. ! default value
736     call getin_p("tau_co",tau_co)
737     if (is_master)write(*,*)trim(rname)//&
738     " tau_co = ",tau_co
739     tau_prechaze=1. ! default value
740     call getin_p("tau_prechaze",tau_prechaze)
741     if (is_master)write(*,*)trim(rname)//&
742     " tau_prechaze = ",tau_prechaze
743
744     if (is_master)write(*,*)trim(rname)//&
745      "Day fraction for limited cold trap in SP?"
746     dayfrac=0. ! default value
747     call getin_p("dayfrac",dayfrac)
748     if (is_master)write(*,*)trim(rname)//&
749      " dayfrac = ",dayfrac
750     thresh_non2=0. ! default value
751     call getin_p("thresh_non2",thresh_non2)
752     if (is_master)write(*,*)trim(rname)//&
753      " thresh_non2 = ",thresh_non2
754
755    ! use Pluto.old routines
756     if (is_master) write(*,*) trim(rname)//": use vdifc from old Pluto ?"
757     oldplutovdifc=.false. ! default value
758     call getin_p("oldplutovdifc",oldplutovdifc)
759     if (is_master) write(*,*) trim(rname)//": oldplutovdifc = ",oldplutovdifc
760
761     if (is_master) write(*,*) trim(rname)//&
762       ": call pluto.old correlated-k radiative transfer ?"
763     oldplutocorrk=.false. ! default value
764     call getin_p("oldplutocorrk",oldplutocorrk)
765     if (is_master) write(*,*) trim(rname)//": oldplutocorrk = ",oldplutocorrk
766
767     if (is_master) write(*,*) trim(rname)//&
768       ": call pluto.old sedimentation ?"
769     oldplutosedim=.false. ! default value
770     call getin_p("oldplutosedim",oldplutosedim)
771     if (is_master) write(*,*) trim(rname)//": oldplutosedim = ",oldplutosedim
772
773!***************************************************************
774     !! Haze options
775
776     ! Microphysical moment model
777     ! ~~~~~~~~~~~~~~~~~~~~~~~~~~
778     if (is_master) write(*,*) "Run with or without microphysics?"
779     callmufi=.false. ! default value
780     call getin_p("callmufi",callmufi)
781     if (is_master) write(*,*)" callmufi = ",callmufi
782
783     if (is_master) write(*,*) "Run with or without microphysical clouds?"
784     callmuclouds=.false. ! default value
785     call getin_p("callmuclouds",callmuclouds)
786     if (is_master) write(*,*)" callmuclouds = ",callmuclouds
787
788     ! sanity check
789     if (callmufi.and.(.not.tracer)) then
790       print*,"You are running microphysics without tracer"
791       print*,"Please start again with tracer =.true."
792       stop
793     endif
794     if (callmuclouds.and.(.not.callmufi)) then
795       print*,"You are running microphysical clouds without microphysics"
796       print*,"Please start again with callmufi =.true."
797       stop
798     endif
799
800     if (is_master) write(*,*) "Path to microphysical config file?"
801     config_mufi='datagcm/microphysics/config.cfg' ! default value
802     call getin_p("config_mufi",config_mufi)
803     if (is_master) write(*,*) trim(rname)//" config_mufi = ",config_mufi
804
805     if (is_master) write(*,*) "Condensable gas fluxes datafile"
806     mugasflux_file='None' ! default file
807     call getin_p("mugasflux_file",mugasflux_file)
808     if (is_master) write(*,*) trim(rname)//" mugasflux_file = ",trim(mugasflux_file)
809
810     if (is_master) write(*,*) "Spherical aerosol optical properties datafile"
811     aersprop_file="optprop_rannou_r2-200nm_nu003.dat"  ! default file
812     call getin_p("aersprop_file",aersprop_file)
813     if (is_master) write(*,*) trim(rname)//" aersprop_file = ",trim(aersprop_file)
814
815     if (is_master) write(*,*) "Fractal aerosol optical properties datafile"
816     aerfprop_file="optprop_rannou_fractal_r010nm_N1_1e4_d2.dat"  ! default file
817     call getin_p("aerfprop_file",aerfprop_file)
818     if (is_master) write(*,*) trim(rname)//" aerfprop_file = ",trim(aerfprop_file)
819
820     if (is_master) write(*,*) "Cloud drop optical properties datafile"
821     clddprop_file="optprop_rannou_r2-200nm_nu003.dat"  ! default file
822     call getin_p("clddprop_file",clddprop_file)
823     if (is_master) write(*,*) trim(rname)//" clddprop_file = ",trim(clddprop_file)
824
825     if (is_master) write(*,*) "Use haze production from CH4 photolysis or production rate?"
826     call_haze_prod_pCH4=.false. ! default value
827     call getin_p("call_haze_prod_pCH4",call_haze_prod_pCH4)
828     if (is_master) write(*,*)" call_haze_prod_pCH4 = ",call_haze_prod_pCH4
829
830     if (is_master) write(*,*) "Pressure level of aerosols production (Pa)?"
831     haze_p_prod=1.0e-2 ! default value
832     call getin_p("haze_p_prod",haze_p_prod)
833     if (is_master) write(*,*)" haze_p_prod = ",haze_p_prod
834
835     if (is_master) write(*,*) "Aerosol production rate (kg.m-2.s-1)?"
836     haze_tx_prod=9.8e-14 ! default value
837     call getin_p("haze_tx_prod",haze_tx_prod)
838     if (is_master) write(*,*)" haze_tx_prod = ",haze_tx_prod
839
840     if (is_master) write(*,*) "Equivalent radius production (m)?"
841     haze_rc_prod=1.0e-9 ! default value
842     call getin_p("haze_rc_prod",haze_rc_prod)
843     if (is_master) write(*,*)" haze_rc_prod = ",haze_rc_prod
844
845     if (is_master) write(*,*) "Monomer radius (m)?"
846     haze_rm=1.0e-8 ! default value
847     call getin_p("haze_rm",haze_rm)
848     if (is_master) write(*,*)" haze_rm = ",haze_rm
849
850     if (is_master) write(*,*) "Aerosol's fractal dimension?"
851     haze_df=2.0 ! default value
852     call getin_p("haze_df",haze_df)
853     if (is_master) write(*,*)" haze_df = ",haze_df
854
855     if (is_master) write(*,*) "Aerosol density (kg.m-3)?"
856     haze_rho=800.0 ! default value
857     call getin_p("haze_rho",haze_rho)
858     if (is_master) write(*,*)" haze_rho = ",haze_rho
859
860     if (is_master) write(*,*) "Radius of air molecule (m)?"
861     air_rad=1.75e-10 ! default value
862     call getin_p("air_rad",air_rad)
863     if (is_master) write(*,*)" air_rad = ",air_rad
864
865     ! Conversion precursor to haze
866     ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
867     if (is_master) write(*,*) "Time constant of conversion in aerosol (s)?"
868     tcon_ch4=1.e7 ! default value
869     call getin_p("tcon_ch4",tcon_ch4)
870     if (is_master) write(*,*)" tcon_ch4 = ",tcon_ch4
871
872     if (is_master) write(*,*) "Ratio CH4 photolysis?"
873     k_ch4=1. ! default value
874     call getin_p("k_ch4",k_ch4)
875     if (is_master) write(*,*)" k_ch4 = ",k_ch4
876
877     if (is_master) write(*,*) "Nitrogen contribution ratio N/C?"
878     ncratio_ch4=0.5 ! default value
879     call getin_p("ncratio_ch4",ncratio_ch4)
880     if (is_master) write(*,*)" ncratio_ch4 = ",ncratio_ch4
881
882     ! Variables for aerosol absorption
883     ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
884     if (is_master) write(*,*) "Sph. aer. absorption correction in VI?"
885     Fabs_aers_VI=1. ! default value
886     call getin_p("Fabs_aers_VI",Fabs_aers_VI)
887     if (is_master) write(*,*)" Fabs_aers_VI = ",Fabs_aers_VI
888
889     if (is_master) write(*,*) "Fra. aer. absorption correction in VI?"
890     Fabs_aerf_VI=1. ! default value
891     call getin_p("Fabs_aerf_VI",Fabs_aerf_VI)
892     if (is_master) write(*,*)" Fabs_aerf_VI = ",Fabs_aerf_VI
893
894     if (is_master) write(*,*) "Sph. aer. absorption correction in IR?"
895     Fabs_aers_IR=1. ! default value
896     call getin_p("Fabs_aers_IR",Fabs_aers_IR)
897     if (is_master) write(*,*)" Fabs_aers_IR = ",Fabs_aers_IR
898
899     if (is_master) write(*,*) "Fra. aer. absorption correction in IR?"
900     Fabs_aerf_IR=1. ! default value
901     call getin_p("Fabs_aerf_IR",Fabs_aerf_IR)
902     if (is_master) write(*,*)" Fabs_aerf_IR = ",Fabs_aerf_IR
903
904     if (is_master) write(*,*) "Cloud drop absorption correction in VI?"
905     Fabs_cldd_VI=1. ! default value
906     call getin_p("Fabs_cldd_VI",Fabs_cldd_VI)
907     if (is_master) write(*,*)" Fabs_cldd_VI = ",Fabs_cldd_VI
908
909     if (is_master) write(*,*) "Cloud drop absorption correction in IR?"
910     Fabs_cldd_IR=1. ! default value
911     call getin_p("Fabs_cldd_IR",Fabs_cldd_IR)
912     if (is_master) write(*,*)" Fabs_cldd_IR = ",Fabs_cldd_IR
913
914     ! Pluto haze model
915     ! ~~~~~~~~~~~~~~~~
916     if (is_master)write(*,*)trim(rname)//&
917     "Production of haze ?"
918     haze=.false. ! default value
919     call getin_p("haze",haze)
920     if (is_master)write(*,*)trim(rname)//&
921     " haze = ",haze
922     hazeconservch4=.false. ! conservch4, by default value ch4 is photolyzed
923     call getin_p("hazeconservch4",hazeconservch4)
924     if (is_master)write(*,*)trim(rname)//&
925     "hazconservch4 = ",hazeconservch4
926     if (is_master) write(*,*) "Production of haze with CH4 fix profile?"
927     haze_ch4proffix=.false. ! default value
928     call getin_p("haze_ch4proffix",haze_ch4proffix)
929     if (is_master) write(*,*)" haze_ch4proffix = ",haze_ch4proffix
930     if (is_master)write(*,*)trim(rname)//&
931     "Production of haze (fast version) ?"
932     fasthaze=.false. ! default value
933     call getin_p("fasthaze",fasthaze)
934     if (is_master)write(*,*)trim(rname)//&
935     "fasthaze = ",fasthaze
936
937     if (is_master)write(*,*)trim(rname)//&
938     "Add source of haze ?"
939     source_haze=.false. ! default value
940     call getin_p("source_haze",source_haze)
941     if (is_master)write(*,*)trim(rname)//&
942     " source_haze = ",source_haze
943     mode_hs=0 ! mode haze source default value
944     call getin_p("mode_hs",mode_hs)
945     if (is_master)write(*,*)trim(rname)//&
946     " mode_hs",mode_hs
947     kfix=1 ! default value
948     call getin_p("kfix",kfix)
949     if (is_master)write(*,*)trim(rname)//&
950     "levels kfix",kfix
951     fracsource=0.1 ! default value
952     call getin_p("fracsource",fracsource)
953     if (is_master)write(*,*)trim(rname)//&
954     " fracsource",fracsource
955     latsource=30. ! default value
956     call getin_p("latsource",latsource)
957     if (is_master)write(*,*)trim(rname)//&
958     " latsource",latsource
959     lonsource=180. ! default value
960     call getin_p("lonsource",lonsource)
961     if (is_master)write(*,*)trim(rname)//&
962     " lonsource",lonsource
963
964     if (is_master)write(*,*)trim(rname)//&
965     "Radiatively active haze ?"
966     optichaze=.false. ! default value
967     call getin_p("optichaze",optichaze)
968     if (is_master)write(*,*)trim(rname)//&
969     "optichaze = ",optichaze
970
971     aerohaze=.false. ! default value
972     call getin_p("aerohaze",aerohaze)
973     if (aerohaze) then
974      if (is_master) write(*,*)trim(rname)//": aerohaze is deprecated.",&
975      "it is now called optichaze=.true."
976      call abort_physic(rname,"aerohaze is deprecated. It is now called optichaze",1)
977     endif
978
979     if (is_master)write(*,*)trim(rname)//&
980     "Haze monomer radius ?"
981     rad_haze=10.e-9 ! default value
982     call getin_p("rad_haze",rad_haze)
983     if (is_master)write(*,*)trim(rname)//&
984     "rad_haze = ",rad_haze
985
986     if (is_master)write(*,*)trim(rname)//&
987     "fractal particle ?"
988     fractal=.false. ! default value
989     call getin_p("fractal",fractal)
990     if (is_master)write(*,*)trim(rname)//&
991     "fractal = ",fractal
992     nb_monomer=10 ! default value
993     call getin_p("nb_monomer",nb_monomer)
994     if (is_master)write(*,*)trim(rname)//&
995     "nb_monomer = ",nb_monomer
996
997     if (is_master)write(*,*)trim(rname)//&
998     "fixed gaseous CH4 mixing ratio for rad transfer ?"
999    ch4fix=.false. ! default value
1000    call getin_p("ch4fix",ch4fix)
1001    if (is_master)write(*,*)trim(rname)//&
1002     " ch4fix = ",ch4fix
1003    if (is_master)write(*,*)trim(rname)//&
1004     "fixed gaseous CH4 mixing ratio for rad transfer ?"
1005    vmrch4fix=0.5 ! default value
1006    call getin_p("vmrch4fix",vmrch4fix)
1007    if (is_master)write(*,*)trim(rname)//&
1008     " vmrch4fix = ",vmrch4fix
1009    vmrch4_proffix=.false. ! default value
1010    call getin_p("vmrch4_proffix",vmrch4_proffix)
1011    if (is_master)write(*,*)trim(rname)//&
1012     " vmrch4_proffix = ",vmrch4_proffix
1013
1014    if (is_master)write(*,*)trim(rname)//&
1015     "call specific cooling for radiative transfer ?"
1016    cooling=.false.  ! default value
1017    call getin_p("cooling",cooling)
1018    if (is_master)write(*,*)trim(rname)//&
1019     " cooling = ",cooling
1020
1021    if (is_master)write(*,*)trim(rname)//&
1022     "NLTE correction for methane heating rates?"
1023    nlte=.false.  ! default value
1024    call getin_p("nlte",nlte)
1025    if (is_master)write(*,*)trim(rname)//&
1026     " nlte = ",nlte
1027    strobel=.true.  ! default value
1028    call getin_p("strobel",strobel)
1029    if (is_master)write(*,*)trim(rname)//&
1030     " strobel = ",strobel
1031
1032     if (is_master)write(*,*)trim(rname)//&
1033     "fixed radius profile from txt file ?"
1034     haze_radproffix=.false. ! default value
1035     call getin_p("haze_radproffix",haze_radproffix)
1036     if (is_master)write(*,*)trim(rname)//&
1037     "haze_radproffix = ",haze_radproffix
1038     if (is_master)write(*,*)trim(rname)//&
1039     "fixed MMR profile from txt file ?"
1040     haze_proffix=.false. ! default value
1041     call getin_p("haze_proffix",haze_proffix)
1042     if (is_master)write(*,*)trim(rname)//&
1043     "haze_proffix = ",haze_proffix
1044
1045     if (is_master)write(*,*)trim(rname)//&
1046     "Number mix ratio of haze particles for co clouds:"
1047     Nmix_co=100000. ! default value
1048     call getin_p("Nmix_co",Nmix_co)
1049     if (is_master)write(*,*)trim(rname)//&
1050     " Nmix_co = ",Nmix_co
1051
1052     if (is_master)write(*,*)trim(rname)//&
1053     "Number mix ratio of haze particles for ch4 clouds:"
1054     Nmix_ch4=100000. ! default value
1055     call getin_p("Nmix_ch4",Nmix_ch4)
1056     if (is_master)write(*,*)trim(rname)//&
1057     " Nmix_ch4 = ",Nmix_ch4
1058
1059!***************************************************************
1060     !! Surface properties
1061
1062!*********** N2 *********************************
1063
1064     if (is_master)write(*,*)trim(rname)//&
1065      "Mode for changing N2 albedo"
1066     mode_n2=0 ! default value
1067     call getin_p("mode_n2",mode_n2)
1068     if (is_master)write(*,*)trim(rname)//&
1069      " mode_n2 = ",mode_n2
1070     thres_n2ice=1. ! default value
1071     call getin_p("thres_n2ice",thres_n2ice)
1072     if (is_master)write(*,*)trim(rname)//&
1073      " thres_n2ice = ",thres_n2ice
1074
1075     if (is_master)write(*,*)trim(rname)//&
1076      "Diff of N2 albedo with thickness"
1077     deltab=0. ! default value
1078     call getin_p("deltab",deltab)
1079     if (is_master)write(*,*)trim(rname)//&
1080      " deltab = ",deltab
1081
1082     if (is_master)write(*,*)trim(rname)//&
1083      "albedo N2 beta "
1084     alb_n2b=0.7 ! default value
1085     call getin_p("alb_n2b",alb_n2b)
1086     if (is_master)write(*,*)trim(rname)//&
1087      " alb_n2b = ",alb_n2b
1088
1089     if (is_master)write(*,*)trim(rname)//&
1090      "albedo N2 alpha "
1091     alb_n2a=0.7 ! default value
1092     call getin_p("alb_n2a",alb_n2a)
1093     if (is_master)write(*,*)trim(rname)//&
1094      " alb_n2a = ",alb_n2a
1095
1096     if (is_master)write(*,*)trim(rname)//&
1097      "emis N2 beta "
1098     emis_n2b=0.7 ! default value
1099     call getin_p("emis_n2b",emis_n2b)
1100     if (is_master)write(*,*)trim(rname)//&
1101      " emis_n2b = ",emis_n2b
1102
1103     if (is_master)write(*,*)trim(rname)//&
1104      "emis N2 alpha "
1105     emis_n2a=0.7 ! default value
1106     call getin_p("emis_n2a",emis_n2a)
1107     if (is_master)write(*,*)trim(rname)//&
1108      " emis_n2a = ",emis_n2a
1109
1110!*********** CH4 *********************************
1111
1112     if (is_master)write(*,*)trim(rname)//&
1113      "Mode for changing CH4 albedo"
1114     mode_ch4=0 ! default value
1115     call getin_p("mode_ch4",mode_ch4)
1116     if (is_master)write(*,*)trim(rname)//&
1117      " mode_ch4 = ",mode_ch4
1118     feedback_met=0 ! default value
1119     call getin_p("feedback_met",feedback_met)
1120     if (is_master)write(*,*)trim(rname)//&
1121      " feedback_met = ",feedback_met
1122     thres_ch4ice=1. ! default value, mm
1123     call getin_p("thres_ch4ice",thres_ch4ice)
1124     if (is_master)write(*,*)trim(rname)//&
1125      " thres_ch4ice = ",thres_ch4ice
1126     fdch4_latn=-1.
1127     fdch4_lats=0.
1128     fdch4_lone=0.
1129     fdch4_lonw=-1.
1130     fdch4_depalb=0.5
1131     fdch4_finalb=0.95
1132     fdch4_maxalb=0.99
1133     fdch4_ampl=200.
1134     fdch4_maxice=100.
1135     call getin_p("fdch4_latn",fdch4_latn)
1136     call getin_p("fdch4_lats",fdch4_lats)
1137     call getin_p("fdch4_lone",fdch4_lone)
1138     call getin_p("fdch4_lonw",fdch4_lonw)
1139     call getin_p("fdch4_depalb",fdch4_depalb)
1140     call getin_p("fdch4_finalb",fdch4_finalb)
1141     call getin_p("fdch4_maxalb",fdch4_maxalb)
1142     call getin_p("fdch4_maxice",fdch4_maxice)
1143     call getin_p("fdch4_ampl",fdch4_ampl)
1144     if (is_master)write(*,*)trim(rname)//&
1145      " Values for albedo feedback = ",fdch4_latn,&
1146     fdch4_lats,fdch4_lone,fdch4_lonw,fdch4_depalb,&
1147     fdch4_finalb,fdch4_maxalb,fdch4_maxice,fdch4_ampl
1148
1149     if (is_master)write(*,*)trim(rname)//&
1150      "Latitude for diff albedo methane"
1151     metlateq=25. ! default value
1152     call getin_p("metlateq",metlateq)
1153     if (is_master)write(*,*)trim(rname)//&
1154      " metlateq = ",metlateq
1155
1156     if (is_master)write(*,*)trim(rname)//&
1157      "Ls1 and Ls2 for change of ch4 albedo"
1158     metls1=-1. ! default value
1159     metls2=-2. ! default value
1160     call getin_p("metls1",metls1)
1161     call getin_p("metls2",metls2)
1162
1163     if (is_master)write(*,*)trim(rname)//&
1164      "albedo CH4 "
1165     alb_ch4=0.5 ! default value
1166     call getin_p("alb_ch4",alb_ch4)
1167     if (is_master)write(*,*)trim(rname)//&
1168      " alb_ch4 = ",alb_ch4
1169
1170     if (is_master)write(*,*)trim(rname)//&
1171      "albedo equatorial CH4 "
1172     alb_ch4_eq=alb_ch4 ! default value
1173     call getin_p("alb_ch4_eq",alb_ch4_eq)
1174     if (is_master)write(*,*)trim(rname)//&
1175      " alb_ch4_eq = ",alb_ch4_eq
1176
1177     if (is_master)write(*,*)trim(rname)//&
1178      "albedo south hemis CH4 "
1179     alb_ch4_s=alb_ch4 ! default value
1180     call getin_p("alb_ch4_s",alb_ch4_s)
1181     if (is_master)write(*,*)trim(rname)//&
1182      " alb_ch4_s = ",alb_ch4_s
1183
1184     if (is_master)write(*,*)trim(rname)//&
1185      "emis CH4 "
1186     emis_ch4=0.5 ! default value
1187     call getin_p("emis_ch4",emis_ch4)
1188     if (is_master)write(*,*)trim(rname)//&
1189      " emis_ch4 = ",emis_ch4
1190
1191     if (is_master)write(*,*)trim(rname)//&
1192      "CH4 lag for n2 sublimation limitation"
1193     ch4lag=.false. ! default value
1194     latlag=-90. ! default value
1195     vmrlag=1. ! default value
1196     call getin_p("ch4lag",ch4lag)
1197     call getin_p("latlag",latlag)
1198     call getin_p("vmrlag",vmrlag)
1199     if (is_master)write(*,*)trim(rname)//&
1200      " ch4lag = ",ch4lag
1201     if (is_master)write(*,*)trim(rname)//&
1202      " latlag = ",latlag
1203     if (is_master)write(*,*)trim(rname)//&
1204      " vmrlag = ",vmrlag
1205
1206     if (is_master)write(*,*)trim(rname)//&
1207      "Max temperature for surface ?"
1208     tsurfmax=.false. ! default value
1209     albmin_ch4=0.3 ! default value
1210     call getin_p("tsurfmax",tsurfmax)
1211     call getin_p("albmin_ch4",albmin_ch4)
1212     if (is_master)write(*,*)trim(rname)//&
1213      " tsurfmax = ",tsurfmax
1214     if (is_master)write(*,*)trim(rname)//&
1215      " albmin_ch4 = ",albmin_ch4
1216
1217
1218     if (is_master)write(*,*)trim(rname)//&
1219     "fixed gaseous CH4 mixing ratio for rad transfer ?"
1220     ch4fix=.false. ! default value
1221     call getin_p("ch4fix",ch4fix)
1222     if (is_master)write(*,*)trim(rname)//&
1223       " ch4fix = ",ch4fix
1224     if (is_master)write(*,*)trim(rname)//&
1225       "fixed gaseous CH4 mixing ratio for rad transfer ?"
1226     vmrch4fix=0.5 ! default value
1227     call getin_p("vmrch4fix",vmrch4fix)
1228     if (is_master)write(*,*)trim(rname)//&
1229        " vmrch4fix = ",vmrch4fix
1230     vmrch4_proffix=.false. ! default value
1231     call getin_p("vmrch4_proffix",vmrch4_proffix)
1232     if (is_master)write(*,*)trim(rname)//&
1233        " vmrch4_proffix = ",vmrch4_proffix
1234
1235
1236!*********** CO *********************************
1237
1238     if (is_master)write(*,*)trim(rname)//&
1239      "albedo CO "
1240     alb_co=0.4 ! default value
1241     call getin_p("alb_co",alb_co)
1242     if (is_master)write(*,*)trim(rname)//&
1243      " alb_co = ",alb_co
1244     thres_coice=1. ! default value, mm
1245     call getin_p("thres_coice",thres_coice)
1246     if (is_master)write(*,*)trim(rname)//&
1247      " thres_coice = ",thres_coice
1248
1249     if (is_master)write(*,*)trim(rname)//&
1250      "emis CO "
1251     emis_co=0.4 ! default value
1252     call getin_p("emis_co",emis_co)
1253     if (is_master)write(*,*)trim(rname)//&
1254      " emis_co = ",emis_co
1255
1256!*********** THOLINS *********************************
1257     if (is_master)write(*,*)trim(rname)//&
1258      "Mode for changing tholins albedo/emis"
1259     mode_tholins=0 ! default value
1260     call getin_p("mode_tholins",mode_tholins)
1261     if (is_master)write(*,*)trim(rname)//&
1262      " mode_tholins = ",mode_tholins
1263
1264     if (is_master)write(*,*)trim(rname)//&
1265      "albedo tho "
1266     alb_tho=0.1 ! default value
1267     call getin_p("alb_tho",alb_tho)
1268     if (is_master)write(*,*)trim(rname)//&
1269      " alb_tho = ",alb_tho
1270
1271     if (is_master)write(*,*)trim(rname)//&
1272      "albedo tho eq"
1273     alb_tho_eq=0.1 ! default value
1274     call getin_p("alb_tho_eq",alb_tho_eq)
1275     if (is_master)write(*,*)trim(rname)//&
1276      " alb_tho_eq = ",alb_tho_eq
1277
1278     if (is_master)write(*,*)trim(rname)//&
1279      "emis tholins "
1280     emis_tho=1. ! default value
1281     call getin_p("emis_tho",emis_tho)
1282     if (is_master)write(*,*)trim(rname)//&
1283      " emis_tho = ",emis_tho
1284
1285     if (is_master)write(*,*)trim(rname)//&
1286      "emis tholins eq"
1287     emis_tho_eq=1. ! default value
1288     call getin_p("emis_tho_eq",emis_tho_eq)
1289     if (is_master)write(*,*)trim(rname)//&
1290      " emis_tho_eq = ",emis_tho_eq
1291
1292     if (is_master)write(*,*)trim(rname)//&
1293      "Latitude for diff albedo tholins"
1294     tholateq=25. ! default value
1295     call getin_p("tholateq",tholateq)
1296     if (is_master)write(*,*)trim(rname)//&
1297      " tholateq = ",tholateq
1298     tholatn=-1.
1299     tholats=0.
1300     tholone=0.
1301     tholonw=-1.
1302     alb_tho_spe=0.1 ! default value
1303     emis_tho_spe=1. ! default value
1304     call getin_p("  tholatn",tholatn)
1305     call getin_p("  tholats",tholats)
1306     call getin_p("  tholone",tholone)
1307     call getin_p("  tholonw",tholonw)
1308     if (is_master)write(*,*)trim(rname)//&
1309      " Values for special tholins albedo = ",tholatn,&
1310        tholats,tholone,tholonw,alb_tho_spe,emis_tho_spe
1311
1312     if (is_master)write(*,*)trim(rname)//&
1313      "Specific albedo"
1314     spelon1=-180. ! default value
1315     spelon2=180. ! default value
1316     spelat1=-90. ! default value
1317     spelat2=90. ! default value
1318     specalb=.false. ! default value
1319     if (is_master)write(*,*)trim(rname)//&
1320      "albedo/emis spe "
1321     albspe=0.1 ! default value
1322     emispe=1. ! default value
1323     call getin_p("spelon1",spelon1)
1324     call getin_p("spelon2",spelon2)
1325     call getin_p("spelat1",spelat1)
1326     call getin_p("spelat2",spelat2)
1327     call getin_p("specalb",specalb)
1328     call getin_p("albspe",albspe)
1329     call getin_p("emispe",emispe)
1330
1331     if (is_master)write(*,*)trim(rname)//&
1332      " specific = ",specalb
1333
1334!********************** TI *****************************
1335
1336     if (is_master)write(*,*)trim(rname)//&
1337      "Change TI with time"
1338     changeti=.false. ! default value
1339     call getin_p("changeti",changeti)
1340     if (is_master)write(*,*)trim(rname)//&
1341      " changeti = ",changeti
1342     changetid=.false. ! default value for diurnal TI
1343     call getin_p("changetid",changetid)
1344     if (is_master)write(*,*)trim(rname)//&
1345      " changetid = ",changetid
1346
1347     if (is_master)write(*,*)trim(rname)//&
1348      "IT N2 "
1349     ITN2=800. ! default value
1350     call getin_p("ITN2",ITN2)
1351     if (is_master)write(*,*)trim(rname)//&
1352      " ITN2 = ",ITN2
1353     ITN2d=20. ! default value
1354     call getin_p("ITN2d",ITN2d)
1355     if (is_master)write(*,*)trim(rname)//&
1356      " ITN2d = ",ITN2d
1357
1358     if (is_master)write(*,*)trim(rname)//&
1359      "IT CH4"
1360     ITCH4=800. ! default value
1361     call getin_p("ITCH4",ITCH4)
1362     if (is_master)write(*,*)trim(rname)//&
1363      " ITCH4 = ",ITCH4
1364     ITCH4d=20. ! default value
1365     call getin_p("ITCH4d",ITCH4d)
1366     if (is_master)write(*,*)trim(rname)//&
1367      " ITCH4d = ",ITCH4d
1368
1369     if (is_master)write(*,*)trim(rname)//&
1370      "IT H2O"
1371     ITH2O=800. ! default value
1372     call getin_p("ITH2O",ITH2O)
1373     if (is_master)write(*,*)trim(rname)//&
1374      " ITH2O = ",ITH2O
1375     ITH2Od=20. ! default value
1376     call getin_p("ITH2Od",ITH2Od)
1377     if (is_master)write(*,*)trim(rname)//&
1378      " ITH2Od = ",ITH2Od
1379
1380!************** COOLING ***************
1381
1382     alpha_top=5e-11 ! default value
1383     call getin_p("alpha_top",alpha_top)
1384     if (is_master)write(*,*)trim(rname)//&
1385      " alpha_top = ",alpha_top
1386     pref=0.02 ! default value
1387     call getin_p("pref",pref)
1388     if (is_master)write(*,*)trim(rname)//&
1389      " pref = ",pref
1390     deltap=0.1 ! default value
1391     call getin_p("deltap",deltap)
1392     if (is_master)write(*,*)trim(rname)//&
1393      " deltap = ",deltap
1394
1395!=================================
1396
1397     if (is_master) write(*,*)trim(rname)//&
1398       ": Is the variable gas species radiatively active?"
1399     Tstrat=167.0
1400     varactive=.false.
1401     call getin_p("varactive",varactive)
1402     if (is_master) write(*,*)trim(rname)//": varactive = ",varactive
1403
1404     if (is_master) write(*,*)trim(rname)//&
1405       ": Is the variable gas species distribution set?"
1406     varfixed=.false.
1407     call getin_p("varfixed",varfixed)
1408     if (is_master) write(*,*)trim(rname)//": varfixed = ",varfixed
1409
1410! Test of incompatibility:
1411! if varactive, then varfixed should be false
1412     if (varactive.and.varfixed) then
1413       call abort_physic(rname,'if varactive, varfixed must be OFF!',1)
1414     endif
1415
1416     if (is_master) write(*,*)trim(rname)//": Gravitationnal sedimentation ?"
1417     sedimentation=.false. ! default value
1418     call getin_p("sedimentation",sedimentation)
1419     if (is_master) write(*,*)trim(rname)//": sedimentation = ",sedimentation
1420
1421     if (is_master) write(*,*)trim(rname)//": Spectral Dependant albedo ?"
1422     albedo_spectral_mode=.false. ! default value
1423     call getin_p("albedo_spectral_mode",albedo_spectral_mode)
1424     if (is_master) write(*,*)trim(rname)//&
1425     ": albedo_spectral_mode = ",albedo_spectral_mode
1426
1427     if (is_master) then
1428       write(*,*)trim(rname)//": Snow albedo ?"
1429       write(*,*)trim(rname)//": If albedo_spectral_mode=.true., then this "
1430       write(*,*)trim(rname)//": corresponds to the 0.5 microns snow albedo."
1431     endif
1432     albedosnow=0.5         ! default value
1433     call getin_p("albedosnow",albedosnow)
1434     if (is_master) write(*,*)trim(rname)//": albedosnow = ",albedosnow
1435
1436     if (is_master) write(*,*)trim(rname)//": N2 ice albedo ?"
1437     albedon2ice=0.5       ! default value
1438     call getin_p("albedon2ice",albedon2ice)
1439     if (is_master) write(*,*)trim(rname)//": albedon2ice = ",albedon2ice
1440
1441     if (is_master) write(*,*)trim(rname)//": Maximum ice thickness ?"
1442     maxicethick=2.0         ! default value
1443     call getin_p("maxicethick",maxicethick)
1444     if (is_master) write(*,*)trim(rname)//": maxicethick = ",maxicethick
1445
1446     if (is_master) write(*,*)trim(rname)//": Minimum eddy mix coeff in 1D ?"
1447     kmixmin=1.0e-2         ! default value
1448     call getin_p("kmixmin",kmixmin)
1449     if (is_master) write(*,*)trim(rname)//": kmixmin = ",kmixmin
1450     kmix_proffix=.false.  ! default value
1451     call getin_p("kmix_proffix",kmix_proffix)
1452     if (is_master) write(*,*)trim(rname)//": kmix_proffix = ",kmix_proffix
1453
1454     if (is_master) write(*,*)'Predefined Cp from dynamics is ',cpp,'J kg^-1 K^-1'
1455     if (is_master) write(*,*)'Predefined Mg from dynamics is ',mugaz,'amu'
1456
1457     force_cpp=.false. ! default value
1458     call getin_p("force_cpp",force_cpp)
1459     if (force_cpp) then
1460      if (is_master) write(*,*)trim(rname)//": force_cpp = ",force_cpp
1461      if (is_master) write(*,*)trim(rname)//": force_cpp is deprecated.",&
1462      "Set cpp_mugaz_mode=1 in callfis to emulate force_cpp=.true."
1463      call abort_physic(rname,"Anyway, you need to set force_cpp=.false. to continue.",1)
1464     endif
1465
1466     if (is_master) write(*,*)trim(rname)//&
1467     ": where do you want your cpp/mugaz value to come from?",&
1468     "=> 0: dynamics (3d), 1: forced in callfis (1d), 2: computed from gases.def (1d)?"
1469     cpp_mugaz_mode = 0 ! default value
1470     call getin_p("cpp_mugaz_mode",cpp_mugaz_mode)
1471     if (is_master) write(*,*)trim(rname)//": cpp_mugaz_mode = ",cpp_mugaz_mode
1472
1473
1474! Test of incompatibility:
1475
1476     if ((.not.tracer).and.(haze)) then
1477       call abort_physic(rname, 'if haze are on, tracers must be on!', 1)
1478     endif
1479     if ((callmufi).and.(haze)) then
1480       call abort_physic(rname, 'if haze are on, microphysics should be deactivated!', 1)
1481     endif
1482     if ((haze).and.(naerkind.gt.1)) then
1483      call abort_physic(rname, 'if haze are on, naerkind must be equal to 1!', 1)
1484     endif
1485     if ((callmufi).and..not.(naerkind.gt.1)) then
1486      call abort_physic(rname, 'if microphysics is on, naerkind must be > 1!', 1)
1487     endif
1488     if ((callmufi).and..not.(callmuclouds).and.(naerkind.gt.2)) then
1489      call abort_physic(rname, 'Warning: here microphysical clouds are on, naerkind must be = 2!', 1)
1490     endif
1491     if ((callmufi).and.(callmuclouds).and..not.(naerkind.gt.2)) then
1492      call abort_physic(rname, 'if microphysical clouds are on, naerkind must be > 2!', 1)
1493     endif
1494     if (.not.(callmufi.or.haze).and.(optichaze)) then
1495      call abort_physic(rname, 'if microphysics and haze are off, optichaze must be deactivated!', 1)
1496     endif
1497     if ((callmufi.and.call_haze_prod_pCH4).and..not.(methane)) then
1498      call abort_physic(rname, 'if haze production from CH4 photolysis is on, methane must be activated!', 1)
1499     endif
1500     if (haze_proffix.and.sedimentation) then
1501         call abort_physic(rname, 'if haze profile is set, sedimentation must be deactivated', 1)
1502     endif
1503     if (callmolvis.and..not.callconduct) then
1504         call abort_physic(rname, 'if callmolvis is set, callconduct must be true', 1)
1505     endif
1506     if (glaflow.and..not.fast) then
1507         call abort_physic(rname, 'if glaflow is set, fast must be true', 1)
1508     endif
1509     if (paleo.and..not.fast) then
1510         call abort_physic(rname, 'if paleo is set, fast must be true', 1)
1511     endif
1512     if ((haze_proffix.or.haze_radproffix).and..not.optichaze) then
1513         call abort_physic(rname, 'for now, haze/rad_proffix only works with optichaze=T', 1)
1514     endif
1515     ! if (carbox.and.condcosurf.and.no_n2frost) then
1516     !   call abort_physic(rname, "CO surface condensation and no_n2frost are both active which may not be relevant", 1)
1517     ! end if
1518
1519     if ((cpp_mugaz_mode >= 1).and.(is_master).and.(ngrid>1)) then
1520        write(*,*)'    !!!!! Be aware that having different values for cpp and mugaz in the dynamics and physics'
1521        write(*,*)'    in 3D can result in very pathological behavior. You have been warned !!!!!'
1522      else if ((cpp_mugaz_mode == 0).and.(is_master).and.(ngrid==1)) then
1523        ! for this specific 1D error we will remove run.def before aborting JL22
1524        call system("rm -rf run.def")
1525        call abort_physic(rname,"cpp_mugaz_mode must be >= 1 in 1d",1)
1526     endif
1527
1528     if (cpp_mugaz_mode == 1) then
1529       mugaz = -99999.
1530       if (is_master) write(*,*)trim(rname)//&
1531         ": MEAN MOLECULAR MASS in g mol-1 ?"
1532       call getin_p("mugaz",mugaz)
1533       IF (mugaz.eq.-99999.) THEN
1534         call abort_physic(rname,"mugaz must be set if cpp_mugaz_mode = 1",1)
1535       ENDIF
1536       cpp = -99999.
1537       if (is_master) write(*,*)trim(rname)//&
1538         ": SPECIFIC HEAT CAPACITY in J K-1 kg-1 ?"
1539       call getin_p("cpp",cpp)
1540       IF (cpp.eq.-99999.) THEN
1541           PRINT *, "cpp must be set if cpp_mugaz_mode = 1"
1542           STOP
1543       ENDIF
1544       if (is_master) write(*,*)'New Cp from callfis is ',cpp,'J kg^-1 K^-1'
1545       if (is_master) write(*,*)'New Mg from callfis is ',mugaz,'amu'
1546
1547     endif ! of if (cpp_mugaz_mode == 1)
1548     call su_gases
1549     call calc_cpp_mugaz
1550
1551     if (is_master) then
1552       PRINT*,'--------------------------------------------'
1553       PRINT*
1554       PRINT*
1555     endif
1556  ELSE
1557     call abort_physic(rname,'Cannot read file callphys.def. Is it here ?',1)
1558  ENDIF ! of IF(iscallphys)
1559
1560  if (is_master) then
1561    PRINT*
1562    PRINT*,'inifis: daysec',daysec
1563    PRINT*
1564    PRINT*,'inifis: The radiative transfer is computed:'
1565    PRINT*,'           each ',iradia,' physical time-step'
1566    PRINT*,'        or each ',iradia*dtphys,' seconds'
1567    PRINT*
1568  endif
1569
1570!-----------------------------------------------------------------------
1571!     Some more initialization:
1572!     ------------------------
1573
1574  ! Initializations for comgeomfi_h
1575#ifndef MESOSCALE
1576  totarea=SSUM(ngrid,parea,1)
1577  call planetwide_sumval(parea,totarea_planet)
1578
1579  !! those are defined in comdiurn_h.F90
1580  IF (.not.ALLOCATED(sinlat)) ALLOCATE(sinlat(ngrid))
1581  IF (.not.ALLOCATED(coslat)) ALLOCATE(coslat(ngrid))
1582  IF (.not.ALLOCATED(sinlon)) ALLOCATE(sinlon(ngrid))
1583  IF (.not.ALLOCATED(coslon)) ALLOCATE(coslon(ngrid))
1584
1585  DO ig=1,ngrid
1586     sinlat(ig)=sin(plat(ig))
1587     coslat(ig)=cos(plat(ig))
1588     sinlon(ig)=sin(plon(ig))
1589     coslon(ig)=cos(plon(ig))
1590  ENDDO
1591#endif
1592  ! initialize variables in radinc_h
1593  call ini_radinc_h(nlayer,tplanckmin,tplanckmax,dtplanck)
1594
1595  ! initialize variables and allocate arrays in radcommon_h
1596  call ini_radcommon_h(naerkind)
1597
1598  ! allocate "comsoil_h" arrays
1599  call ini_comsoil_h(ngrid)
1600
1601  ! allocate arrays in "nonoro_gwd_ran_mod"
1602  call end_nonoro_gwd_ran
1603  call ini_nonoro_gwd_ran(ngrid,nlayer)
1604
1605  ! allocate arrays in "nonoro_gwd_mix_mod"
1606  call end_nonoro_gwd_mix
1607  call ini_nonoro_gwd_mix(ngrid,nlayer,nq)
1608
1609  END SUBROUTINE inifis
1610
1611END MODULE inifis_mod
Note: See TracBrowser for help on using the repository browser.