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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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)
Note: See TracChangeset for help on using the changeset viewer.