Ignore:
Timestamp:
May 11, 2014, 2:37:58 PM (11 years ago)
Author:
aslmd
Message:

LMDZ.MARS. Made number of scatterers a free dimension not in need to be prescribe at compiling time. Instead it must be set in callphys.def. See README for further information about this commit.

Location:
trunk/LMDZ.MARS/libf/phymars
Files:
3 deleted
24 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/aeropacity.F

    r1226 r1246  
    99     &                      nqdust
    1010      use comgeomfi_h, only: lati, sinlat ! grid point latitudes (rad)
    11       use yomaer_h, only: tauvis
    1211      use planete_h
    1312      USE comcstfi_h
     13      use dimradmars_mod, only: naerkind, name_iaer,
     14     &            iaerdust,tauvis,
     15     &            iaer_dust_conrath,iaer_dust_doubleq,
     16     &            iaer_dust_submicron,iaer_h2o_ice
    1417       IMPLICIT NONE
    1518c=======================================================================
     
    5861!#include "comgeomfi.h"
    5962!#include "dimradmars.h"
    60 !#include "yomaer.h"
    6163!#include "tracer.h"
    62 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    63 #include"scatterers.h"
    64 #include "aerkind.h"
    6564
    6665c-----------------------------------------------------------------------
     
    131130      CHARACTER(LEN=1) :: txt2 ! to temporarly store text
    132131! indexes of dust scatterers:
    133       INTEGER,SAVE :: iaerdust(naerkind)
    134132      INTEGER,SAVE :: naerdust ! number of dust scatterers
    135133
  • trunk/LMDZ.MARS/libf/phymars/aeroptproperties.F

    r1212 r1246  
    44     &                            QREFvis3d,QREFir3d,
    55     &                            omegaREFvis3d,omegaREFir3d)
    6       use dimradmars_mod, only: nir, nsun
    7       use yomaer_h, only: radiustab, nsize, QVISsQREF, omegavis, gvis,
    8      &                    QIRsQREF, omegaIR, gIR, QREFvis, QREFir,
    9      &                    omegaREFvis, omegaREFir
     6      use dimradmars_mod, only: nir, nsun, naerkind,
     7     &                radiustab, nsize, QVISsQREF, omegavis, gvis,
     8     &                QIRsQREF, omegaIR, gIR, QREFvis, QREFir,
     9     &                omegaREFvis, omegaREFir
    1010      IMPLICIT NONE
    1111c     =============================================================
     
    3131#include "callkeys.h"
    3232!#include "dimradmars.h"
    33 !#include "yomaer.h"
    34 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    35 #include"scatterers.h"
    3633
    3734c     Local variables
     
    3936
    4037c     =============================================================
    41       LOGICAL, PARAMETER :: varyingnueff(naerkind) = .false.
     38      LOGICAL,SAVE,ALLOCATABLE :: varyingnueff(:)
    4239c     =============================================================
    4340
    4441c     Min. and max radius of the interpolation grid (in METERS)
    45       REAL, SAVE :: refftabmin(naerkind,2)
    46       REAL, SAVE :: refftabmax(naerkind,2)
     42      REAL, SAVE, ALLOCATABLE :: refftabmin(:,:)
     43      REAL, SAVE, ALLOCATABLE :: refftabmax(:,:)
     44
    4745c     Log of the min and max variance of the interpolation grid
    4846      REAL, PARAMETER :: nuefftabmin = -4.6
     
    9795      REAL,SAVE,ALLOCATABLE :: nuefftab(:,:,:)
    9896c     Volume ratio of the grid
    99       REAL,SAVE :: logvratgrid(naerkind,2)
     97      REAL,SAVE,ALLOCATABLE :: logvratgrid(:,:)
    10098c     Grid used to remember which calculation is done
    101       LOGICAL,SAVE :: checkgrid(refftabsize,nuefftabsize,naerkind,2)
    102      &                = .false.
     99      LOGICAL,SAVE,ALLOCATABLE :: checkgrid(:,:,:,:)
    103100c     Optical properties of the grid (VISIBLE)
    104101      REAL,SAVE,ALLOCATABLE :: qsqrefVISgrid(:,:,:,:)
     
    114111      REAL,SAVE,ALLOCATABLE :: gIRgrid(:,:,:,:)
    115112c     Optical properties of the grid (REFERENCE WAVELENGTHS)
    116       REAL,SAVE :: qrefVISgrid(refftabsize,nuefftabsize,naerkind)
    117       REAL,SAVE :: qscatrefVISgrid(refftabsize,nuefftabsize,naerkind)
    118       REAL,SAVE :: qrefIRgrid(refftabsize,nuefftabsize,naerkind)
    119       REAL,SAVE :: qscatrefIRgrid(refftabsize,nuefftabsize,naerkind)
    120       REAL,SAVE :: omegrefVISgrid(refftabsize,nuefftabsize,naerkind)
    121       REAL,SAVE :: omegrefIRgrid(refftabsize,nuefftabsize,naerkind)
     113      REAL,SAVE,ALLOCATABLE :: qrefVISgrid(:,:,:)
     114      REAL,SAVE,ALLOCATABLE :: qscatrefVISgrid(:,:,:)
     115      REAL,SAVE,ALLOCATABLE :: qrefIRgrid(:,:,:)
     116      REAL,SAVE,ALLOCATABLE :: qscatrefIRgrid(:,:,:)
     117      REAL,SAVE,ALLOCATABLE :: omegrefVISgrid(:,:,:)
     118      REAL,SAVE,ALLOCATABLE :: omegrefIRgrid(:,:,:)
    122119c     Firstcall
    123120      LOGICAL,SAVE :: firstcall = .true.
    124121c     Variables used by the Gauss-Legendre integration:
    125       REAL,SAVE :: normd(refftabsize,nuefftabsize,naerkind,2)
    126       REAL,SAVE :: dista(refftabsize,nuefftabsize,naerkind,2,ngau)
    127       REAL,SAVE :: distb(refftabsize,nuefftabsize,naerkind,2,ngau)
    128 
    129       REAL,SAVE :: radGAUSa(ngau,naerkind,2)
    130       REAL,SAVE :: radGAUSb(ngau,naerkind,2)
     122      REAL,SAVE,ALLOCATABLE :: normd(:,:,:,:)
     123      REAL,SAVE,ALLOCATABLE :: dista(:,:,:,:,:)
     124      REAL,SAVE,ALLOCATABLE :: distb(:,:,:,:,:)
     125      REAL,SAVE,ALLOCATABLE :: radGAUSa(:,:,:)
     126      REAL,SAVE,ALLOCATABLE :: radGAUSb(:,:,:)
    131127
    132128      REAL,SAVE,ALLOCATABLE :: qsqrefVISa(:,:,:)
     
    233229        allocate(gIRa(nir,ngau,naerkind))
    234230        allocate(gIRb(nir,ngau,naerkind))
    235        
     231       
     232        allocate(qrefVISgrid(refftabsize,nuefftabsize,naerkind))
     233        allocate(qscatrefVISgrid(refftabsize,nuefftabsize,naerkind))
     234        allocate(qrefIRgrid(refftabsize,nuefftabsize,naerkind))
     235        allocate(qscatrefIRgrid(refftabsize,nuefftabsize,naerkind))
     236        allocate(omegrefVISgrid(refftabsize,nuefftabsize,naerkind))
     237        allocate(omegrefIRgrid(refftabsize,nuefftabsize,naerkind))
     238
     239        allocate(normd(refftabsize,nuefftabsize,naerkind,2))
     240        allocate(dista(refftabsize,nuefftabsize,naerkind,2,ngau))
     241        allocate(distb(refftabsize,nuefftabsize,naerkind,2,ngau))
     242        allocate(radGAUSa(ngau,naerkind,2))
     243        allocate(radGAUSb(ngau,naerkind,2))
     244
     245        allocate(checkgrid(refftabsize,nuefftabsize,naerkind,2))
     246        checkgrid(1:refftabsize,1:nuefftabsize,1:naerkind,1:2) = .false.
     247
     248        allocate(logvratgrid(naerkind,2))
     249
     250        allocate(refftabmin(naerkind,2))
     251        allocate(refftabmax(naerkind,2))
     252
     253        allocate(varyingnueff(naerkind))
     254        varyingnueff(1:naerkind) = .false.
     255
    236256c       0.1 Pi!
    237257        pi = 2. * asin(1.e0)
  • trunk/LMDZ.MARS/libf/phymars/callradite.F

    r1226 r1246  
    66
    77      use dimradmars_mod, only: ndomainsz, nflev, nsun, nir
     8      use dimradmars_mod, only: naerkind, name_iaer,
     9     &            iaer_dust_conrath,iaer_dust_doubleq,
     10     &            iaer_dust_submicron,iaer_h2o_ice
    811      use yomlw_h, only: gcp, nlaylte
    912      USE comcstfi_h
     
    153156#include "callkeys.h"
    154157!#include "yomlw.h"
    155 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    156 #include"scatterers.h"
    157 #include "aerkind.h"
    158158
    159159c-----------------------------------------------------------------------
     
    272272        allocate(pview(ngrid))
    273273
    274 c        Please name the different scatterers here ----------------
    275 c        PLEASE MAKE SURE that you set up the right number of
    276 c          scatterers in scatterers.h (naerkind);
    277           name_iaer(1) = "dust_conrath"   !! default choice is good old Conrath profile
    278           IF (doubleq.AND.active) name_iaer(1) = "dust_doubleq" !! two-moment scheme
    279           if (nq.gt.1) then
    280            ! trick to avoid problems compiling with 1 tracer
    281            ! and picky compilers who know name_iaer(2) is out of bounds
    282            j=2
    283           IF (water.AND.activice) name_iaer(j) = "h2o_ice"      !! radiatively-active clouds
    284           IF (submicron.AND.active) name_iaer(j) = "dust_submicron" !! JBM experimental stuff
    285           endif ! of if (nq.gt.1)
    286 c        ----------------------------------------------------------
    287 
    288274c        Assign a number to the different scatterers
    289275c        -------------------------------------------
     
    352338         ENDDO
    353339         gcp = g/cpp
    354 
    355 c        Logical tests for radiatively active water-ice clouds:
    356          IF ( (activice.AND.(.NOT.water)).OR.
    357      &        (activice.AND.(naerkind.LT.2)) ) THEN
    358            WRITE(*,*) 'If activice is TRUE, water has to be set'
    359            WRITE(*,*) 'to TRUE, and "naerkind" must be at least'
    360            WRITE(*,*) 'equal to 2 in scatterers.h.'
    361            CALL ABORT
    362          ELSE IF ( (.NOT.activice).AND.(naerkind.GT.1) ) THEN
    363            WRITE(*,*) 'naerkind is greater than unity, but'
    364            WRITE(*,*) 'activice has not been set to .true.'
    365            WRITE(*,*) 'in callphys.def; this is not logical!'
    366            CALL ABORT
    367          ENDIF
    368340
    369341c        Loading the optical properties in external look-up tables:
  • trunk/LMDZ.MARS/libf/phymars/conf_phys.F

    r1240 r1246  
    1       SUBROUTINE conf_phys(nq)
     1      SUBROUTINE conf_phys(ngrid,nlayer,nq)
    22 
    33!=======================================================================
     
    3838      use surfdat_h, only: albedo_h2o_ice, inert_h2o_ice,
    3939     &                     frost_albedo_threshold
    40       use yomaer_h,only: tauvis
    4140      use control_mod, only: ecritphy
    4241      use planete_h
    4342      USE comcstfi_h, only: daysec,dtphys
     43      use dimradmars_mod, only: naerkind, name_iaer,
     44     &                      ini_scatterers,tauvis
    4445
    4546      IMPLICIT NONE
     
    5253!#include "surfdat.h"
    5354!#include "dimradmars.h"
    54 !#include "yomaer.h"
    5555#include "datafile.h"
    5656!#include "slope.h"
    5757#include "microphys.h"
    5858!#include "tracer.h"
    59 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    60 #include"scatterers.h"
    61 
    62       INTEGER,INTENT(IN) :: nq
    63       INTEGER ig,ierr
     59
     60      INTEGER,INTENT(IN) :: ngrid,nlayer,nq
     61      INTEGER ig,ierr,j
    6462 
    6563      CHARACTER ch1*12
     
    536534
    537535
     536! SCATTERERS
     537         write(*,*) "how many scatterers?"
     538         naerkind=1 ! default value
     539         call getin("naerkind",naerkind)
     540         write(*,*)" naerkind = ",naerkind
     541
     542! Test of incompatibility
     543c        Logical tests for radiatively active water-ice clouds:
     544         IF ( (activice.AND.(.NOT.water)).OR.
     545     &        (activice.AND.(naerkind.LT.2)) ) THEN
     546           WRITE(*,*) 'If activice is TRUE, water has to be set'
     547           WRITE(*,*) 'to TRUE, and "naerkind" must be at least'
     548           WRITE(*,*) 'equal to 2.'
     549           CALL ABORT
     550         ELSE IF ( (.NOT.activice).AND.(naerkind.GT.1) ) THEN
     551           WRITE(*,*) 'naerkind is greater than unity, but'
     552           WRITE(*,*) 'activice has not been set to .true.'
     553           WRITE(*,*) 'in callphys.def; this is not logical!'
     554           CALL ABORT
     555         ENDIF
     556
     557!------------------------------------------
     558!------------------------------------------
     559! once naerkind is known allocate arrays
     560! -- we do it here and not in phys_var_init
     561! -- because we need to know naerkind first
     562         CALL ini_scatterers(ngrid,nlayer)
     563!------------------------------------------
     564!------------------------------------------
     565
     566
     567c        Please name the different scatterers here ----------------
     568         name_iaer(1) = "dust_conrath"   !! default choice is good old Conrath profile
     569         IF (doubleq.AND.active) name_iaer(1) = "dust_doubleq" !! two-moment scheme
     570         if (nq.gt.1) then
     571          ! trick to avoid problems compiling with 1 tracer
     572          ! and picky compilers who know name_iaer(2) is out of bounds
     573          j=2
     574         IF (water.AND.activice) name_iaer(j) = "h2o_ice"      !! radiatively-active clouds
     575         IF (submicron.AND.active) name_iaer(j) = "dust_submicron" !! JBM experimental stuff
     576         endif ! of if (nq.gt.1)
     577c        ----------------------------------------------------------
     578
    538579! THERMOSPHERE
    539580
  • trunk/LMDZ.MARS/libf/phymars/dimradmars_mod.F90

    r1224 r1246  
    1616! Number of kind of tracer radiative properties
    1717! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    18 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    19 
    20 #include"scatterers.h"
    21 ! NB: May have to change value of nsizemax below when changing scatterers
     18! naerkind is set by reading callphys.def
     19! -- see conf_phys
     20! -- value of nsizemax below is comfortably high
     21!    but beware in case you add a lot of scatterers
     22  INTEGER, SAVE :: naerkind
     23
     24  ! AS: previously in aerkind.h
     25  character*20, SAVE, ALLOCATABLE :: name_iaer(:)  ! name of the scatterers
     26  integer iaer_dust_conrath ! Typical dust profiles using a
     27                            ! Conrath type analytical equation
     28  integer iaer_dust_doubleq ! Dust profile is given by the
     29                            ! mass mixing ratio of the two-
     30                            ! moment scheme method (doubleq)
     31  integer iaer_dust_submicron ! Dust profile is given by a
     32                              ! submicron population of dust
     33                              ! particles
     34  integer iaer_h2o_ice ! Water ice particles
     35
     36  ! AS: was in aeropacity
     37  INTEGER,SAVE,ALLOCATABLE :: iaerdust(:)
     38
     39  ! AS: was in suaer
     40  CHARACTER(LEN=30), SAVE, ALLOCATABLE :: file_id(:,:)
    2241
    2342! Reference wavelengths used to compute reference optical depth (m)
    2443! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    25 
    26   real,save :: longrefir(naerkind),longrefvis(naerkind)
     44  REAL,SAVE,ALLOCATABLE :: longrefir(:),longrefvis(:)
    2745 
    2846! Definition of spectral intervals at thermal infrared wavelengths (LW)
     
    86104  REAL,SAVE,ALLOCATABLE :: nueffdust(:,:) ! Dust effective variance
    87105
     106!! ------------------------------------------------------
     107!! AS: what was previously in yomaer
     108!   Shortwave
     109!   ~~~~~~~~~
     110!
     111! tauvis: dust optical depth at reference wavelength  ("longrefvis" set
     112! in dimradmars_mod : typically longrefvis = 0.67E-6 m, as measured by Viking )
     113
     114! For the "naerkind" kind of aerosol radiative properties :
     115! QVISsQREF  :  Qext / Qext("longrefvis")   <--- For both solar bands
     116! omegavis   :  sinle scattering albedo     <--- For both solar bands
     117! gvis       :  assymetry factor            <--- For both solar bands
     118!
     119!   Longwave
     120!   ~~~~~~~~
     121!
     122! For the "naerkind" kind of aerosol radiative properties :
     123! QIRsQREF :  Qext / Qext("longrefvis")     <--- For the nir bandes IR
     124! omegaIR  :  mean single scattering albedo <--- For the nir bandes IR
     125! gIR      :  mean assymetry factor         <--- For the nir bandes IR
     126!
     127  real,save :: tauvis
     128  real,save,allocatable :: QVISsQREF(:,:,:)
     129  real,save,allocatable :: omegavis(:,:,:)
     130  real,save,allocatable :: gvis(:,:,:)
     131  real,save,allocatable :: QIRsQREF(:,:,:)
     132  real,save,allocatable :: omegaIR(:,:,:)
     133  real,save,allocatable :: gIR(:,:,:)
     134! Actual number of grain size classes in each domain for a
     135!   given aerosol:
     136  integer,save,allocatable :: nsize(:,:)
     137! Particle size axis (depend on the kind of aerosol and the
     138!   radiation domain)
     139  real,save,allocatable :: radiustab(:,:,:)
     140! Extinction coefficient at reference wavelengths;
     141!   These wavelengths are defined in dimradmars_mod, and called
     142!   longrefvis and longrefir.
     143  real,save,allocatable :: QREFvis(:,:)
     144  real,save,allocatable :: QREFir(:,:)
     145  real,save,allocatable :: omegaREFvis(:,:)
     146  real,save,allocatable :: omegaREFir(:,:)
     147!! ------------------------------------------------------
     148
    88149contains
    89  
     150
    90151  subroutine ini_dimradmars_mod(ngrid,nlayer)
    91152 
     
    107168   allocate(fluxrad(ngrid))
    108169   allocate(tauscaling(ngrid))
     170   allocate(nueffdust(ngrid,nlayer))
     171
     172  end subroutine ini_dimradmars_mod
     173 
     174  subroutine ini_scatterers(ngrid,nlayer)
     175
     176  implicit none
     177
     178  integer,intent(in) :: ngrid ! number of atmospheric columns
     179  integer,intent(in) :: nlayer ! number of atmospheric layers
     180
     181   allocate(name_iaer(naerkind))
    109182   allocate(aerosol(ngrid,nlayer,naerkind))
    110    allocate(nueffdust(ngrid,nlayer))
    111 
    112   end subroutine ini_dimradmars_mod
    113  
     183   allocate(longrefir(naerkind))
     184   allocate(longrefvis(naerkind))
     185   allocate(iaerdust(naerkind))
     186   allocate(file_id(naerkind,2))
     187
     188   allocate(QVISsQREF(nsun,naerkind,nsizemax))
     189   allocate(omegavis(nsun,naerkind,nsizemax))
     190   allocate(gvis(nsun,naerkind,nsizemax))
     191   allocate(QIRsQREF(nir,naerkind,nsizemax))
     192   allocate(omegaIR(nir,naerkind,nsizemax))
     193   allocate(gIR(nir,naerkind,nsizemax))
     194   allocate(nsize(naerkind,2))
     195   allocate(radiustab(naerkind,2,nsizemax))
     196   allocate(QREFvis(naerkind,nsizemax))
     197   allocate(QREFir(naerkind,nsizemax))
     198   allocate(omegaREFvis(naerkind,nsizemax))
     199   allocate(omegaREFir(naerkind,nsizemax))
     200
     201  end subroutine ini_scatterers
     202
    114203end module dimradmars_mod
  • trunk/LMDZ.MARS/libf/phymars/iniphysiq.F90

    r1233 r1246  
    7373                         punjours,ptimestep,prad,pg,pr,pcpp)
    7474call ini_fillgeom(ngrid,rlatd,rlond,airephy)
    75 call conf_phys(nqtot)
     75call conf_phys(ngrid,nlayer,nqtot)
    7676
    7777!$OMP END PARALLEL
  • trunk/LMDZ.MARS/libf/phymars/lect_start_archive.F

    r1232 r1246  
    2727!#include "comsoil.h"
    2828!#include "dimradmars.h"
    29 !#include "yomaer.h"
    3029#include "paramet.h"
    3130#include "comconst.h"
  • trunk/LMDZ.MARS/libf/phymars/lwdiff.F

    r1226 r1246  
    1515#include "callkeys.h"
    1616
    17 !#include "yomaer.h"
    1817!#include "yomlw.h"
    1918C-----------------------------------------------------------------------
  • trunk/LMDZ.MARS/libf/phymars/lwmain.F

    r1047 r1246  
    1313
    1414      use dimradmars_mod, only: ndlo2, nflev, nir, ndlon, nuco2
     15      use dimradmars_mod, only: naerkind
    1516      use yomlw_h, only: nlaylte, xi
    1617      implicit none
     
    2122#include "callkeys.h"
    2223#include "comg1d.h"
    23 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    24 #include"scatterers.h"
    2524!#include "yomlw.h"
    2625
  • trunk/LMDZ.MARS/libf/phymars/lwu.F

    r1226 r1246  
    3232 
    3333      use dimradmars_mod, only: ndlo2, nir, nuco2, ndlon, nflev
     34      use dimradmars_mod, only: naerkind
    3435      use yomlw_h, only: nlaylte, tref, at, bt, cst_voigt
    3536      USE comcstfi_h
     
    4041!#include "dimradmars.h"
    4142
    42 !#include "yomaer.h"
    4343!#include "yomlw.h"
    44 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    45 #include"scatterers.h"
    4644
    4745#include "callkeys.h"
  • trunk/LMDZ.MARS/libf/phymars/newstart.F

    r1241 r1246  
    4343!#include "comsoil.h"
    4444!#include "dimradmars.h"
    45 !#include "yomaer.h"
    4645#include "paramet.h"
    4746#include "comconst.h"
     
    391390     .                         daysec,dtphys,rad,g,r,cpp)
    392391      call ini_fillgeom(ngridmx,latfi,lonfi,airefi)
    393       call conf_phys(nqtot)
     392      call conf_phys(ngridmx,llm,nqtot)
    394393
    395394c=======================================================================
  • trunk/LMDZ.MARS/libf/phymars/phyetat0.F90

    r1229 r1246  
    2828!#include "surfdat.h"
    2929!#include "dimradmars.h"
    30 !#include "yomaer.h"
    3130!#include "tracer.h"
    3231!#include "advtrac.h"
  • trunk/LMDZ.MARS/libf/phymars/phyredem.F90

    r1226 r1246  
    1818                       z0_default, albedice, emisice, emissiv, &
    1919                       iceradius, dtemisice, phisfi, z0
    20   use yomaer_h, only: tauvis
     20  use dimradmars_mod, only: tauvis
    2121  use iostart, only : open_restartphy, close_restartphy, &
    2222                      put_var, put_field, length
  • trunk/LMDZ.MARS/libf/phymars/phys_state_var_init.F

    r1233 r1246  
    3535      use comsoil_h, only: ini_comsoil_h
    3636      use dimradmars_mod, only: ini_dimradmars_mod
    37       use yomaer_h,only: ini_yomaer_h
    3837      use yomlw_h, only: ini_yomlw_h
    3938      use conc_mod, only: ini_conc_mod
     
    8079      call ini_dimradmars_mod(ngrid,nlayer)
    8180
    82       ! allocate arrays in "yomaer_h"
    83       call ini_yomaer_h
    84 
    8581      ! allocate arrays in "yomlw_h"
    8682      call ini_yomlw_h(ngrid)
  • trunk/LMDZ.MARS/libf/phymars/physiq.F

    r1242 r1246  
    2727      use control_mod, only: iphysiq, day_step, ecritstart
    2828      use dimradmars_mod, only: tauscaling, aerosol,
    29      &                          dtrad, fluxrad_sky, fluxrad, albedo
     29     &                          dtrad, fluxrad_sky, fluxrad, albedo,
     30     &                          naerkind
    3031      use turb_mod, only: q2, wstar, ustar, sensibFlux,
    3132     &                    zmax_th, hfmax_th, turb_resolved
     
    152153!#include "control.h"
    153154!#include "dimradmars.h"
    154 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    155 #include"scatterers.h"
    156155#include "comg1d.h"
    157156!#include "tracer.h"
     
    237236      real,parameter :: odpref=610. ! DOD reference pressure (Pa)
    238237      REAL tau(ngrid,naerkind)     ! Column dust optical depth at each point
     238                                   ! AS: TBD: this one should be in a module !
    239239      REAL zls                       !  solar longitude (rad)
    240240      REAL zday                      ! date (time since Ls=0, in martian days)
     
    11681168
    11691169!           dust and ice surface area
    1170             call surfacearea(ngrid, nlayer, ptimestep, zplay, zzlay,
     1170            call surfacearea(ngrid, nlayer, naerkind,
     1171     $                       ptimestep, zplay, zzlay,
    11711172     $                       pt, pq, pdq, nq,
    11721173     $                       rdust, rice, tau, tauscaling,
  • trunk/LMDZ.MARS/libf/phymars/simpleclouds.F

    r1226 r1246  
    66      use tracer_mod, only: igcm_h2o_vap, igcm_h2o_ice
    77      USE comcstfi_h
     8      use dimradmars_mod, only: naerkind
    89      implicit none
    910c------------------------------------------------------------------
     
    3637!#include "comgeomfi.h"
    3738!#include "dimradmars.h"
    38 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    39 #include"scatterers.h"
    4039
    4140c------------------------------------------------------------------
  • trunk/LMDZ.MARS/libf/phymars/suaer.F90

    r1047 r1246  
    11SUBROUTINE suaer
    22use dimradmars_mod, only: longrefvis, longrefir, nsizemax, long1vis, &
    3                          long2vis, long3vis, long1ir, long2ir, long1co2, &
    4                          long2co2, nsun, nir
    5 use yomaer_h, only: radiustab, gvis, omegavis, QVISsQREF, gIR, omegaIR, &
    6                     QIRsQREF, QREFvis, QREFir, omegaREFvis, omegaREFir, &
     3                    long2vis, long3vis, long1ir, long2ir, long1co2, &
     4                    long2co2, nsun, nir,&
     5                    naerkind, name_iaer, &
     6                    iaer_dust_conrath,iaer_dust_doubleq,&
     7                    iaer_dust_submicron,iaer_h2o_ice,&
     8                    file_id,radiustab, gvis, omegavis, &
     9                    QVISsQREF, gIR, omegaIR, &
     10                    QIRsQREF, QREFvis, QREFir, &
     11                    omegaREFvis, omegaREFir, &
    712                    nsize
    813IMPLICIT NONE
     
    4348!#include "dimphys.h"
    4449!#include "dimradmars.h"     
    45 !#include "yomaer.h"
    46 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    47 #include"scatterers.h"
    48 #include "aerkind.h"
    4950
    5051! Optical properties (read in external ASCII files)
     
    9293REAL omegav(nir)     ! Average sing.scat.albedo
    9394REAL gav(nir)        ! Average assymetry parameter
    94 
    95 ! Local saved variables:
    96 
    97 CHARACTER(LEN=30), DIMENSION(naerkind,2), SAVE :: file_id
    9895
    9996!==================================================================
  • trunk/LMDZ.MARS/libf/phymars/swmain.F

    r1047 r1246  
    55     &                QVISsQREF3d,omegaVIS3d,gVIS3d)
    66
    7       use dimradmars_mod, only: ndlo2, ndlon, nflev, nsun
     7      use dimradmars_mod, only: ndlo2, ndlon, nflev,
     8     &                          nsun,naerkind
    89      use yomlw_h, only: nlaylte, gcp
    910      IMPLICIT NONE
     
    1314!#include "dimradmars.h"
    1415
    15 !#include "yomaer.h"
    1616!#include "yomlw.h"
    17 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    18 #include"scatterers.h"
    1917#include "callkeys.h"
    2018c     
  • trunk/LMDZ.MARS/libf/phymars/swr_fouquart.F

    r1047 r1246  
    44     S     ,  PFD,PFU )
    55
    6       use dimradmars_mod, only: sunfr, ndlo2, nsun, ndlon, nflev
     6      use dimradmars_mod, only: sunfr, ndlo2, nsun,
     7     &                          ndlon, nflev, naerkind
    78      use yomlw_h, only: nlaylte
    89      IMPLICIT NONE
     
    1213!#include "dimradmars.h"
    1314#include "callkeys.h"
    14 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    15 #include"scatterers.h"
    16 !#include "yomaer.h"
    1715!#include "yomlw.h"
    1816
  • trunk/LMDZ.MARS/libf/phymars/swr_toon.F

    r1047 r1246  
    44     S     ,  PFD,PFU )
    55
    6       use dimradmars_mod, only: sunfr, ndlo2, nsun, nflev, ndlon
     6      use dimradmars_mod, only: sunfr, ndlo2, nsun, nflev,
     7     &                          ndlon, naerkind
    78      use yomlw_h, only: nlaylte
    89     
     
    1314!#include "dimradmars.h"
    1415#include "callkeys.h"
    15 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    16 #include"scatterers.h"
    1716!#include "yomaer.h"
    1817!#include "yomlw.h"
  • trunk/LMDZ.MARS/libf/phymars/tabfi.F

    r1226 r1246  
    4747      use surfdat_h, only: z0_default, emissiv, emisice, albedice,
    4848     &                     iceradius, dtemisice, iceradius
    49       use yomaer_h, only: tauvis
     49      use dimradmars_mod, only: tauvis
    5050      use iostart, only: get_var
    5151      use mod_phys_lmdz_para, only: is_parallel
     
    6161#include "netcdf.inc"
    6262!#include "dimradmars.h"
    63 !#include "yomaer.h"
    6463
    6564c-----------------------------------------------------------------------
  • trunk/LMDZ.MARS/libf/phymars/testphys1d.F

    r1233 r1246  
    66      use comsoil_h, only: volcapa, layer, mlayer, inertiedat, nsoilmx
    77      use comgeomfi_h, only: lati, long, area, sinlat, ini_fillgeom
    8 
    98      use surfdat_h, only: albedodat, z0_default, emissiv, emisice,
    109     &                     albedice, iceradius, dtemisice, z0,
     
    1211     &                     watercaptag
    1312      use slope_mod, only: theta_sl, psi_sl
    14       use yomaer_h, only: tauvis
    1513      use control_mod, only: day_step
    1614      use phyredem, only: physdem0,physdem1
     
    2018      use comcstfi_h, only: pi, rad, daysec, omeg, g, mugaz, rcp, r,
    2119     &                      cpp, dtphys
    22       use dimradmars_mod, only: tauscaling
     20      use dimradmars_mod, only: tauscaling,tauvis
    2321      IMPLICIT NONE
    2422
     
    5351#include "callkeys.h"
    5452!#include "comsaison.h"
    55 !#include "yomaer.h"
    5653!#include "control.h"
    5754#include "comvert.h"
     
    483480     .          daysec,dtphys,rad,g,r,cpp)
    484481      call ini_fillgeom(1,latitude,longitude,1.0)
    485       call conf_phys(nq)
     482      call conf_phys(1,llm,nq)
    486483
    487484
  • trunk/LMDZ.MARS/libf/phymars/updatereffrad.F

    r1226 r1246  
    88     &                       igcm_ccn_number, nuice_ref, varian,
    99     &                       ref_r0, igcm_dust_submicron
    10        USE dimradmars_mod, only: nueffdust
     10       USE dimradmars_mod, only: nueffdust,naerkind,
     11     &            name_iaer,
     12     &            iaer_dust_conrath,iaer_dust_doubleq,
     13     &            iaer_dust_submicron,iaer_h2o_ice
    1114       USE comcstfi_h
    1215       IMPLICIT NONE
     
    3740!#include "dimradmars.h"
    3841!#include "tracer.h"
    39 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    40 #include"scatterers.h"
    41 #include "aerkind.h"
    4242!#include "yomaer.h"
    4343
  • trunk/LMDZ.MARS/libf/phymars/watercloud.F

    r1226 r1246  
    1212     &                      igcm_ccn_mass, igcm_ccn_number,
    1313     &                      rho_dust, nuice_sed, nuice_ref
     14      use dimradmars_mod, only: naerkind
    1415      IMPLICIT NONE
    1516
     
    4142!#include "comgeomfi.h"
    4243!#include "dimradmars.h"
    43 ! naerkind is set in scatterers.h (built when compiling with makegcm -s #)
    44 #include"scatterers.h"
    4544
    4645c   Inputs:
Note: See TracChangeset for help on using the changeset viewer.