source: trunk/LMDZ.MARS/libf/phymars/initracer.F @ 2264

Last change on this file since 2264 was 2199, checked in by mvals, 6 years ago

Mars GCM:
Implementation of a new parametrization of the dust entrainment by slope winds above the sub-grid scale topography. The parametrization is activated with the flag slpwind=.true. (set to "false" by
default) in callphys.def. The new parametrization involves the new tracers topdust_mass and topdust_number.
MV

File size: 27.1 KB
Line 
1      SUBROUTINE initracer(ngrid,nq,qsurf)
2
3       use tracer_mod
4       USE comcstfi_h
5       IMPLICIT NONE
6c=======================================================================
7c   subject:
8c   --------
9c   Initialization related to tracer
10c   (transported dust, water, chemical species, ice...)
11c
12c   Name of the tracer
13c
14c   Test of dimension :
15c   Initialize tracer related data in tracer_mod, using tracer names provided
16c   by the dynamics in "infotrac"
17c
18c
19c   author: F.Forget
20c   ------
21c    Modifs: Franck Montmessin, Sebastien Lebonnois (june 2003)
22c            Ehouarn Millour (oct. 2008) identify tracers by their names
23c=======================================================================
24
25
26      include "callkeys.h"
27
28      integer,intent(in) :: ngrid ! number of atmospheric columns
29      integer,intent(in) :: nq ! number of tracers
30      real,intent(out) :: qsurf(ngrid,nq) ! tracer on surface (e.g.  kg.m-2)
31
32      integer iq,ig,count
33      real r0_lift , reff_lift, nueff_lift
34      real r0_storm,reff_storm
35c     Ratio of small over large dust particles (used when both
36c       doubleq and the submicron mode are active); In Montmessin
37c       et al. (2002), a value of 25 has been deduced;
38      real, parameter :: popratio = 25.
39      character(len=30) :: txt ! to store some text
40
41c-----------------------------------------------------------------------
42c  radius(nq)      ! aerosol particle radius (m)
43c  rho_q(nq)       ! tracer densities (kg.m-3)
44c  alpha_lift(nq)  ! saltation vertical flux/horiz flux ratio (m-1)
45c  alpha_devil(nq) ! lifting coeeficient by dust devil
46c  rho_dust          ! Mars dust density
47c  rho_ice           ! Water ice density
48c  nuice_ref         ! Effective variance nueff of the
49c                    !   water-ice size distributions
50c  doubleq           ! if method with mass (iq=1) and number(iq=2) mixing ratio
51c  varian            ! Characteristic variance of log-normal distribution
52c-----------------------------------------------------------------------
53
54
55c------------------------------------------------------------
56c         NAME and molar mass of the tracer
57c------------------------------------------------------------
58   
59! Identify tracers by their names: (and set corresponding values of mmol)
60      ! 0. initialize tracer indexes to zero:
61      igcm_dustbin(1:nq)=0
62      igcm_co2_ice=0
63      igcm_ccnco2_mass=0
64      igcm_ccnco2_number=0
65      igcm_dust_mass=0
66      igcm_dust_number=0
67      igcm_ccn_mass=0
68      igcm_ccn_number=0
69      igcm_dust_submicron=0
70      igcm_h2o_vap=0
71      igcm_h2o_ice=0
72      igcm_stormdust_mass=0
73      igcm_stormdust_number=0
74      igcm_topdust_mass=0
75      igcm_topdust_number=0
76      igcm_co2=0
77      igcm_co=0
78      igcm_o=0
79      igcm_o1d=0
80      igcm_o2=0
81      igcm_o3=0
82      igcm_h=0
83      igcm_h2=0
84      igcm_oh=0
85      igcm_ho2=0
86      igcm_h2o2=0
87      igcm_ch4=0
88      igcm_n2=0
89      igcm_ar=0
90      igcm_ar_n2=0
91      igcm_n=0
92      igcm_no=0
93      igcm_no2=0
94      igcm_n2d=0
95      igcm_he=0
96      igcm_co2plus=0
97      igcm_oplus=0
98      igcm_o2plus=0
99      igcm_coplus=0
100      igcm_cplus=0
101      igcm_nplus=0
102      igcm_noplus=0
103      igcm_n2plus=0
104      igcm_hplus=0
105      igcm_hco2plus=0
106      igcm_elec=0
107
108      ! 1. find dust tracers
109      count=0
110      if (dustbin.gt.0) then
111        do iq=1,nq
112          txt=" "
113          write(txt,'(a4,i2.2)')'dust',count+1
114          if (noms(iq).eq.txt) then
115            count=count+1
116            igcm_dustbin(count)=iq
117            mmol(iq)=100.
118          endif
119        enddo !do iq=1,nq
120      endif ! of if (dustbin.gt.0)
121      if (doubleq) then
122        do iq=1,nq
123          if (noms(iq).eq."dust_mass") then
124            igcm_dust_mass=iq
125            count=count+1
126          endif
127          if (noms(iq).eq."dust_number") then
128            igcm_dust_number=iq
129            count=count+1
130          endif
131        enddo
132      endif ! of if (doubleq)
133      if (microphys) then
134        do iq=1,nq
135          if (noms(iq).eq."ccn_mass") then
136            igcm_ccn_mass=iq
137            count=count+1
138          endif
139          if (noms(iq).eq."ccn_number") then
140            igcm_ccn_number=iq
141            count=count+1
142          endif
143        enddo
144      endif ! of if (microphys)
145      if (submicron) then
146        do iq=1,nq
147          if (noms(iq).eq."dust_submicron") then
148            igcm_dust_submicron=iq
149            mmol(iq)=100.
150            count=count+1
151          endif
152        enddo
153      endif ! of if (submicron)
154       if (rdstorm) then
155        do iq=1,nq
156          if (noms(iq).eq."stormdust_mass") then
157            igcm_stormdust_mass=iq
158            count=count+1
159          endif
160          if (noms(iq).eq."stormdust_number") then
161            igcm_stormdust_number=iq
162            count=count+1
163          endif
164        enddo
165      endif ! of if (rdstorm)
166       if (slpwind) then
167        do iq=1,nq
168          if (noms(iq).eq."topdust_mass") then
169            igcm_topdust_mass=iq
170            count=count+1
171          endif
172          if (noms(iq).eq."topdust_number") then
173            igcm_topdust_number=iq
174            count=count+1
175          endif
176        enddo
177      endif ! of if (slpwind)   
178      ! 2. find chemistry and water tracers
179      do iq=1,nq
180        if (noms(iq).eq."co2") then
181          igcm_co2=iq
182          mmol(igcm_co2)=44.
183          count=count+1
184        endif
185        if (noms(iq).eq."co") then
186          igcm_co=iq
187          mmol(igcm_co)=28.
188          count=count+1
189        endif
190        if (noms(iq).eq."o") then
191          igcm_o=iq
192          mmol(igcm_o)=16.
193          count=count+1
194        endif
195        if (noms(iq).eq."o1d") then
196          igcm_o1d=iq
197          mmol(igcm_o1d)=16.
198          count=count+1
199        endif
200        if (noms(iq).eq."o2") then
201          igcm_o2=iq
202          mmol(igcm_o2)=32.
203          count=count+1
204        endif
205        if (noms(iq).eq."o3") then
206          igcm_o3=iq
207          mmol(igcm_o3)=48.
208          count=count+1
209        endif
210        if (noms(iq).eq."h") then
211          igcm_h=iq
212          mmol(igcm_h)=1.
213          count=count+1
214        endif
215        if (noms(iq).eq."h2") then
216          igcm_h2=iq
217          mmol(igcm_h2)=2.
218          count=count+1
219        endif
220        if (noms(iq).eq."oh") then
221          igcm_oh=iq
222          mmol(igcm_oh)=17.
223          count=count+1
224        endif
225        if (noms(iq).eq."ho2") then
226          igcm_ho2=iq
227          mmol(igcm_ho2)=33.
228          count=count+1
229        endif
230        if (noms(iq).eq."h2o2") then
231          igcm_h2o2=iq
232          mmol(igcm_h2o2)=34.
233          count=count+1
234        endif
235        if (noms(iq).eq."n2") then
236          igcm_n2=iq
237          mmol(igcm_n2)=28.
238          count=count+1
239        endif
240        if (noms(iq).eq."ch4") then
241          igcm_ch4=iq
242          mmol(igcm_ch4)=16.
243          count=count+1
244        endif
245        if (noms(iq).eq."ar") then
246          igcm_ar=iq
247          mmol(igcm_ar)=40.
248          count=count+1
249        endif
250        if (noms(iq).eq."n") then
251          igcm_n=iq
252          mmol(igcm_n)=14.
253          count=count+1
254        endif
255        if (noms(iq).eq."no") then
256          igcm_no=iq
257          mmol(igcm_no)=30.
258          count=count+1
259        endif
260        if (noms(iq).eq."no2") then
261          igcm_no2=iq
262          mmol(igcm_no2)=46.
263          count=count+1
264        endif
265        if (noms(iq).eq."n2d") then
266          igcm_n2d=iq
267          mmol(igcm_n2d)=28.
268          count=count+1
269        endif
270        if (noms(iq).eq."he") then
271          igcm_he=iq
272          mmol(igcm_he)=4.
273          count=count+1
274        endif
275        if (noms(iq).eq."co2plus") then
276          igcm_co2plus=iq
277          mmol(igcm_co2plus)=44.
278          count=count+1
279        endif
280        if (noms(iq).eq."oplus") then
281          igcm_oplus=iq
282          mmol(igcm_oplus)=16.
283          count=count+1
284        endif
285        if (noms(iq).eq."o2plus") then
286          igcm_o2plus=iq
287          mmol(igcm_o2plus)=32.
288          count=count+1
289        endif
290        if (noms(iq).eq."coplus") then
291          igcm_coplus=iq
292          mmol(igcm_coplus)=28.
293          count=count+1
294        endif
295        if (noms(iq).eq."cplus") then
296          igcm_cplus=iq
297          mmol(igcm_cplus)=12.
298          count=count+1
299        endif
300        if (noms(iq).eq."nplus") then
301          igcm_nplus=iq
302          mmol(igcm_nplus)=14.
303          count=count+1
304        endif
305        if (noms(iq).eq."noplus") then
306          igcm_noplus=iq
307          mmol(igcm_noplus)=30.
308          count=count+1
309        endif
310        if (noms(iq).eq."n2plus") then
311          igcm_n2plus=iq
312          mmol(igcm_n2plus)=28.
313          count=count+1
314        endif
315        if (noms(iq).eq."hplus") then
316          igcm_hplus=iq
317          mmol(igcm_hplus)=1.
318          count=count+1
319        endif
320        if (noms(iq).eq."hco2plus") then
321          igcm_hco2plus=iq
322          mmol(igcm_hco2plus)=45.
323          count=count+1
324        endif
325        if (noms(iq).eq."elec") then
326          igcm_elec=iq
327          mmol(igcm_elec)=1./1822.89
328          count=count+1
329        endif
330        if (noms(iq).eq."h2o_vap") then
331          igcm_h2o_vap=iq
332          mmol(igcm_h2o_vap)=18.
333          count=count+1
334        endif
335        if (noms(iq).eq."co2_ice") then
336          igcm_co2_ice=iq
337          mmol(igcm_co2_ice)=44.
338          count=count+1
339        endif
340        if (noms(iq).eq."h2o_ice") then
341          igcm_h2o_ice=iq
342          mmol(igcm_h2o_ice)=18.
343          count=count+1
344        endif
345        ! Other stuff: e.g. for simulations using co2 + neutral gaz
346        if (noms(iq).eq."Ar_N2") then
347          igcm_ar_n2=iq
348          mmol(igcm_ar_n2)=30.
349          count=count+1
350        endif
351        if (co2clouds) then
352           if (noms(iq).eq."ccnco2_mass") then
353              igcm_ccnco2_mass=iq
354              count=count+1
355           endif
356           if (noms(iq).eq."ccnco2_number") then
357              igcm_ccnco2_number=iq
358              count=count+1
359           endif
360        endif
361      enddo                     ! of do iq=1,nq
362     
363      ! check that we identified all tracers:
364      if (count.ne.nq) then
365        write(*,*) "initracer: found only ",count," tracers"
366        write(*,*) "               expected ",nq
367        do iq=1,count
368          write(*,*)'      ',iq,' ',trim(noms(iq))
369        enddo
370        stop
371      else
372        write(*,*) "initracer: found all expected tracers, namely:"
373        do iq=1,nq
374          write(*,*)'      ',iq,' ',trim(noms(iq))
375        enddo
376      endif
377
378      ! if water cycle but iceparty=.false., there will nevertheless be
379      ! water ice at the surface (iceparty is not used anymore, but this
380      ! part is still relevant, as we want to stay compatible with the
381      ! older versions).
382      if (water.and.(igcm_h2o_ice.eq.0)) then
383        igcm_h2o_ice=igcm_h2o_vap ! so that qsurf(i_h2o_ice) is identified
384                                  ! even though there is no q(i_h2o_ice)
385      else
386       ! surface ice qsurf(i_h2o_ice) was loaded twice by phyetat0,
387       ! as qsurf(i_h2o_vap) & as qsurf(i_h2o_ice), so to be clean:
388       if (igcm_h2o_vap.ne.0) then
389         qsurf(1:ngrid,igcm_h2o_vap)=0
390       endif
391      endif
392
393c------------------------------------------------------------
394c     Initialize tracers .... (in tracer_mod)
395c------------------------------------------------------------
396      ! start by setting everything to (default) zero
397      rho_q(1:nq)=0     ! tracer density (kg.m-3)
398      radius(1:nq)=0.   ! tracer particle radius (m)
399      alpha_lift(1:nq) =0.  ! tracer saltation vertical flux/horiz flux ratio (m-1)
400      alpha_devil(1:nq)=0.  ! tracer lifting coefficient by dust devils
401
402
403      ! some reference values
404      rho_dust=2500.  ! Mars dust density (kg.m-3)
405      rho_ice=920.    ! Water ice density (kg.m-3)
406      rho_ice_co2=1650.
407      !Mangan et al., Icarus 2017 :CO2 density = 1.72391-2.53×10−4T – 2.87×10−6T^2
408      nuice_ref=0.1   ! Effective variance nueff of the
409                      ! water-ice size distribution
410      !!!nuice_sed=0.45   ! Sedimentation effective variance
411                      ! of the water-ice size distribution
412
413      if (doubleq) then
414c       "doubleq" technique
415c       -------------------
416c      (transport of mass and number mixing ratio)
417c       iq=1: Q mass mixing ratio, iq=2: N number mixing ratio
418
419        if( (nq.lt.2).or.(water.and.(nq.lt.4)) ) then
420          write(*,*)'initracer: nq is too low : nq=', nq
421          write(*,*)'water= ',water,' doubleq= ',doubleq   
422        end if
423
424        nueff_lift = 0.5
425        varian=sqrt(log(1.+nueff_lift))
426
427        rho_q(igcm_dust_mass)=rho_dust
428        rho_q(igcm_dust_number)=rho_dust
429
430c       Intermediate calcul for computing geometric mean radius r0
431c       as a function of mass and number mixing ratio Q and N
432c       (r0 = (r3n_q * Q/ N)^(1/3))
433        r3n_q = exp(-4.5*varian**2)*(3./4.)/(pi*rho_dust)
434
435c       Intermediate calcul for computing effective radius reff
436c       from geometric mean radius r0
437c       (reff = ref_r0 * r0)
438        ref_r0 = exp(2.5*varian**2)
439       
440c       lifted dust :
441c       '''''''''''
442        reff_lift = 3.0e-6 !3.e-6 !Effective radius of lifted dust (m)
443        alpha_devil(igcm_dust_mass)=9.e-9   !  dust devil lift mass coeff
444c       alpha_lift(igcm_dust_mass)=3.0e-15  !  Lifted mass coeff
445
446!! default lifting settings
447!! -- GCM: alpha_lift not zero because large-scale lifting by default
448!! -- MESOSCALE: alpha_lift zero because no lifting at all in mesoscale by default
449#ifdef MESOSCALE
450        alpha_lift(igcm_dust_mass)=0.0
451#else
452        alpha_lift(igcm_dust_mass)=1.e-6 !1.e-6 !Lifted mass coeff
453        IF (dustinjection.ge.1) THEN
454                reff_lift = 3.0e-6 ! Effective radius of lifted dust (m)
455                alpha_lift(igcm_dust_mass)=(4/3.)*reff_lift*rho_dust
456     &                                          /2.4
457        ENDIF
458#endif
459
460        r0_lift = reff_lift/ref_r0
461        alpha_devil(igcm_dust_number)=r3n_q*
462     &                        alpha_devil(igcm_dust_mass)/r0_lift**3
463        alpha_lift(igcm_dust_number)=r3n_q*
464     &                        alpha_lift(igcm_dust_mass)/r0_lift**3
465
466        radius(igcm_dust_mass) = reff_lift
467        radius(igcm_dust_number) = reff_lift
468
469        write(*,*) "initracer: doubleq_param reff_lift:", reff_lift
470        write(*,*) "initracer: doubleq_param nueff_lift:", nueff_lift
471        write(*,*) "initracer: doubleq_param alpha_lift:",
472     &    alpha_lift(igcm_dust_mass)
473!c ----------------------------------------------------------------------
474!c rocket dust storm scheme
475!c lifting tracer stormdust using same distribution than
476!c normal dust
477        if (rdstorm) then
478          reff_storm=3.e-6 ! reff_lift !3.e-6
479          r0_storm=reff_storm/ref_r0
480          rho_q(igcm_stormdust_mass)=rho_dust
481          rho_q(igcm_stormdust_number)=rho_dust
482
483          alpha_devil(igcm_stormdust_mass)=9.e-9   ! dust devil lift mass coeff
484          alpha_lift(igcm_stormdust_mass)=4./3./2.4*reff_storm*rho_dust
485
486          write(*,*) 'alpha_lift(rds):',alpha_lift(igcm_stormdust_mass)
487 
488          alpha_devil(igcm_stormdust_number)=r3n_q*
489     &                      alpha_devil(igcm_stormdust_mass)/r0_storm**3
490          alpha_lift(igcm_stormdust_number)=r3n_q*
491     &                       alpha_lift(igcm_stormdust_mass)/r0_storm**3
492 
493          radius(igcm_stormdust_mass) = reff_storm
494          radius(igcm_stormdust_number) = reff_storm
495        end if !(rdstorm)
496!c ----------------------------------------------------------------------
497!c slope wind scheme
498!c you need a radius value for topdust to active its sedimentation
499!c we take the same value as for the normal dust
500        if (slpwind) then
501          rho_q(igcm_topdust_mass)=rho_dust
502          rho_q(igcm_topdust_number)=rho_dust
503          radius(igcm_topdust_mass) = 3.e-6
504          radius(igcm_topdust_number) = 3.e-6
505        end if !(slpwind)
506!c ----------------------------------------------------------------------
507     
508      else
509
510       ! initialize varian, which may be used (e.g. by surfacearea)
511       ! even with conrath dust
512       nueff_lift = 0.5
513       varian=sqrt(log(1.+nueff_lift))
514
515       if (dustbin.gt.1) then
516        print*,'initracer: STOP!',
517     $   ' properties of dust need to be set in initracer !!!'
518        stop
519
520       else if (dustbin.eq.1) then
521
522c       This will be used for 1 dust particle size:
523c       ------------------------------------------
524        radius(igcm_dustbin(1))=3.e-6
525        alpha_lift(igcm_dustbin(1))=0.0e-6
526        alpha_devil(igcm_dustbin(1))=7.65e-9
527        rho_q(igcm_dustbin(1))=rho_dust
528
529       endif
530      end if    ! (doubleq)
531
532
533c     Scavenging of dust particles by H2O clouds:
534c     ------------------------------------------
535c     Initialize the two tracers used for the CCNs
536      if (water.AND.doubleq.AND.scavenging) then
537        radius(igcm_ccn_mass) = radius(igcm_dust_mass)
538        alpha_lift(igcm_ccn_mass) = 1e-30
539        alpha_devil(igcm_ccn_mass) = 1e-30
540        rho_q(igcm_ccn_mass) = rho_dust
541
542        radius(igcm_ccn_number) = radius(igcm_ccn_mass)
543        alpha_lift(igcm_ccn_number) = alpha_lift(igcm_ccn_mass)
544        alpha_devil(igcm_ccn_number) = alpha_devil(igcm_ccn_mass)
545        rho_q(igcm_ccn_number) = rho_q(igcm_ccn_mass)
546      endif ! of if (water.AND.doubleq.AND.scavenging)
547
548c     Submicron dust mode:
549c     --------------------
550
551      if (submicron) then
552        radius(igcm_dust_submicron)=0.1e-6
553        rho_q(igcm_dust_submicron)=rho_dust
554        if (doubleq) then
555c         If doubleq is also active, we use the population ratio:
556          alpha_lift(igcm_dust_submicron) =
557     &      alpha_lift(igcm_dust_number)*popratio*
558     &      rho_q(igcm_dust_submicron)*4./3.*pi*
559     &      radius(igcm_dust_submicron)**3.
560          alpha_devil(igcm_dust_submicron)=1.e-30
561        else
562          alpha_lift(igcm_dust_submicron)=1e-6
563          alpha_devil(igcm_dust_submicron)=1.e-30
564        endif ! (doubleq)
565      end if  ! (submicron)
566
567c     Initialization for water vapor
568c     ------------------------------
569      if(water) then
570         radius(igcm_h2o_vap)=0.
571         alpha_lift(igcm_h2o_vap) =0.
572         alpha_devil(igcm_h2o_vap)=0.
573         if(water.and.(nq.ge.2)) then
574           radius(igcm_h2o_ice)=3.e-6
575           rho_q(igcm_h2o_ice)=rho_ice
576           alpha_lift(igcm_h2o_ice) =0.
577           alpha_devil(igcm_h2o_ice)=0.
578         elseif(water.and.(nq.lt.2)) then
579            write(*,*) 'nq is too low : nq=', nq
580            write(*,*) 'water= ',water
581         endif
582
583      end if  ! (water)
584     
585! Initialisation for CO2 clouds
586      if (co2clouds ) then
587        radius(igcm_ccnco2_mass) = radius(igcm_dust_mass)
588        alpha_lift(igcm_ccnco2_mass) = 1e-30
589        alpha_devil(igcm_ccnco2_mass) = 1e-30
590        rho_q(igcm_ccnco2_mass) = rho_dust
591        radius(igcm_ccnco2_number) = radius(igcm_ccnco2_mass)
592        alpha_lift(igcm_ccnco2_number) = alpha_lift(igcm_ccnco2_mass)
593        alpha_devil(igcm_ccnco2_number) = alpha_devil(igcm_ccnco2_mass)
594        rho_q(igcm_ccnco2_number) = rho_q(igcm_ccnco2_mass)
595     
596        radius(igcm_co2)=0.
597        alpha_lift(igcm_co2) =0.
598        alpha_devil(igcm_co2)=0.
599        radius(igcm_co2_ice)=1.e-8
600        rho_q(igcm_co2_ice)=rho_ice_co2
601        alpha_lift(igcm_co2_ice) =0.
602        alpha_devil(igcm_co2_ice)=0.
603
604      endif
605     
606c     Output for records:
607c     ~~~~~~~~~~~~~~~~~~
608      write(*,*)
609      Write(*,*) '******** initracer : dust transport parameters :'
610      write(*,*) 'alpha_lift = ', alpha_lift
611      write(*,*) 'alpha_devil = ', alpha_devil
612      write(*,*) 'radius  = ', radius
613      if(doubleq) then
614        write(*,*) 'reff_lift (um) =  ', reff_lift
615        write(*,*) 'size distribution variance  = ', varian
616        write(*,*) 'r3n_q , ref_r0 : ', r3n_q , ref_r0
617      end if
618
619!
620!     some extra (possibly redundant) sanity checks for tracers:
621!     ---------------------------------------------------------
622
623       if (doubleq) then
624       ! verify that we indeed have dust_mass and dust_number tracers
625         if (igcm_dust_mass.eq.0) then
626           write(*,*) "initracer: error !!"
627           write(*,*) "  cannot use doubleq option without ",
628     &                "a dust_mass tracer !"
629           stop
630         endif
631         if (igcm_dust_number.eq.0) then
632           write(*,*) "initracer: error !!"
633           write(*,*) "  cannot use doubleq option without ",
634     &                "a dust_number tracer !"
635           stop
636         endif
637       endif
638
639       if ((.not.doubleq).and.(dustbin.gt.0)) then
640       ! verify that we indeed have 'dustbin' dust tracers
641         count=0
642         do iq=1,dustbin
643           if (igcm_dustbin(iq).ne.0) then
644             count=count+1
645           endif
646         enddo
647         if (count.ne.dustbin) then
648           write(*,*) "initracer: error !!"
649           write(*,*) "  dusbin is set to ",dustbin,
650     &                " but we only have the following dust tracers:"
651           do iq=1,count
652             write(*,*)"   ",trim(noms(igcm_dustbin(iq)))
653           enddo
654           stop
655         endif
656       endif
657
658       if (water) then
659       ! verify that we indeed have h2o_vap and h2o_ice tracers
660         if (igcm_h2o_vap.eq.0) then
661           write(*,*) "initracer: error !!"
662           write(*,*) "  cannot use water option without ",
663     &                "an h2o_vap tracer !"
664           stop
665         endif
666         if (igcm_h2o_ice.eq.0) then
667           write(*,*) "initracer: error !!"
668           write(*,*) "  cannot use water option without ",
669     &                "an h2o_ice tracer !"
670           stop
671         endif
672       endif
673
674       if (co2clouds) then
675          !verify that we have co2_ice and co2 tracers
676          if (igcm_co2 .eq. 0) then
677             write(*,*) "initracer: error !!"
678             write(*,*) "  cannot use co2 clouds option without ",
679     &            "a co2 tracer !"
680          stop
681          endif
682          if (igcm_co2_ice .eq. 0) then
683             write(*,*) "initracer: error !!"
684             write(*,*) "  cannot use co2 clouds option without ",
685     &            "a co2_ice tracer !"
686             stop
687          endif
688       endif
689 
690       if (rdstorm) then
691       ! verify that we indeed have stormdust_mass and stormdust_number tracers
692         if (igcm_stormdust_mass.eq.0) then
693           write(*,*) "initracer: error !!"
694           write(*,*) "  cannot use rdstorm option without ",
695     &                "a stormdust_mass tracer !"
696           stop
697         endif
698         if (igcm_stormdust_number.eq.0) then
699           write(*,*) "initracer: error !!"
700           write(*,*) "  cannot use rdstorm option without ",
701     &                "a stormdust_number tracer !"
702           stop
703         endif
704       endif
705
706       if (slpwind) then
707       ! verify that we indeed have topdust_mass and topdust_number tracers
708         if (igcm_topdust_mass.eq.0) then
709           write(*,*) "initracer: error !!"
710           write(*,*) "  cannot use slpwind option without ",
711     &                "a topdust_mass tracer !"
712           stop
713         endif
714         if (igcm_topdust_number.eq.0) then
715           write(*,*) "initracer: error !!"
716           write(*,*) "  cannot use slpwind option without ",
717     &                "a topdust_number tracer !"
718           stop
719         endif
720       endif
721     
722       if (callnlte) then ! NLTE requirements
723         if (nltemodel.ge.1) then
724           ! check that co2, co, o and n2 tracers are available
725           if (igcm_co2.eq.0) then
726             write(*,*) "initracer: error !!"
727             write(*,*) "  with nltemodel>0, we need the co2 tracer!"
728             stop
729           endif
730           if (igcm_co.eq.0) then
731             write(*,*) "initracer: error !!"
732             write(*,*) "  with nltemodel>0, we need the co tracer!"
733             stop
734           endif
735           if (igcm_o.eq.0) then
736             write(*,*) "initracer: error !!"
737             write(*,*) "  with nltemodel>0, we need the o tracer!"
738             stop
739           endif
740           if (igcm_n2.eq.0) then
741             write(*,*) "initracer: error !!"
742             write(*,*) "  with nltemodel>0, we need the n2 tracer!"
743             stop
744           endif
745         endif
746       endif
747
748       if (scavenging) then
749       ! verify that we indeed have ccn_mass and ccn_number tracers
750         if (igcm_ccn_mass.eq.0 .and. igcm_ccnco2_mass.eq.0) then
751           write(*,*) "initracer: error !!"
752           write(*,*) "  cannot use scavenging option without ",
753     &                "a ccn_mass or ccnco2_mass tracer !"
754           stop
755         endif
756         if (igcm_ccn_number.eq.0 .and. igcm_ccnco2_number.eq.0 ) then
757           write(*,*) "initracer: error !!"
758           write(*,*) "  cannot use scavenging option without ",
759     &                "a ccn_number or ccnco2_number tracer !"
760           stop
761         endif
762       endif ! of if (scavenging)
763
764       if (photochem .or. callthermos) then
765       ! verify that we indeed have the chemistry tracers
766         if (igcm_co2.eq.0) then
767           write(*,*) "initracer: error !!"
768           write(*,*) "  cannot use chemistry option without ",
769     &                "a co2 tracer !"
770         stop
771         endif
772         if (igcm_co.eq.0) then
773           write(*,*) "initracer: error !!"
774           write(*,*) "  cannot use chemistry option without ",
775     &                "a co tracer !"
776         stop
777         endif
778         if (igcm_o.eq.0) then
779           write(*,*) "initracer: error !!"
780           write(*,*) "  cannot use chemistry option without ",
781     &                "a o tracer !"
782         stop
783         endif
784         if (igcm_o1d.eq.0) then
785           write(*,*) "initracer: error !!"
786           write(*,*) "  cannot use chemistry option without ",
787     &                "a o1d tracer !"
788         stop
789         endif
790         if (igcm_o2.eq.0) then
791           write(*,*) "initracer: error !!"
792           write(*,*) "  cannot use chemistry option without ",
793     &                "an o2 tracer !"
794         stop
795         endif
796         if (igcm_o3.eq.0) then
797           write(*,*) "initracer: error !!"
798           write(*,*) "  cannot use chemistry option without ",
799     &                "an o3 tracer !"
800         stop
801         endif
802         if (igcm_h.eq.0) then
803           write(*,*) "initracer: error !!"
804           write(*,*) "  cannot use chemistry option without ",
805     &                "a h tracer !"
806         stop
807         endif
808         if (igcm_h2.eq.0) then
809           write(*,*) "initracer: error !!"
810           write(*,*) "  cannot use chemistry option without ",
811     &                "a h2 tracer !"
812         stop
813         endif
814         if (igcm_oh.eq.0) then
815           write(*,*) "initracer: error !!"
816           write(*,*) "  cannot use chemistry option without ",
817     &                "an oh tracer !"
818         stop
819         endif
820         if (igcm_ho2.eq.0) then
821           write(*,*) "initracer: error !!"
822           write(*,*) "  cannot use chemistry option without ",
823     &                "a ho2 tracer !"
824         stop
825      endif
826         if (igcm_h2o2.eq.0) then
827           write(*,*) "initracer: error !!"
828           write(*,*) "  cannot use chemistry option without ",
829     &                "a h2o2 tracer !"
830         stop
831         endif
832         if (igcm_n2.eq.0) then
833           write(*,*) "initracer: error !!"
834           write(*,*) "  cannot use chemistry option without ",
835     &                "a n2 tracer !"
836         stop
837         endif
838         if (igcm_ar.eq.0) then
839           write(*,*) "initracer: error !!"
840           write(*,*) "  cannot use chemistry option without ",
841     &                "an ar tracer !"
842         stop
843         endif
844       endif ! of if (photochem .or. callthermos)
845
846      end
Note: See TracBrowser for help on using the repository browser.