diff --git a/src/MNH/ch_aer_mod_init.f90 b/src/MNH/ch_aer_mod_init.f90 index b5a2409aae881e642fc93e797a0c011284024e94..6c22e54432cd4063b7c3facf2a3dc74ede01c378 100644 --- a/src/MNH/ch_aer_mod_init.f90 +++ b/src/MNH/ch_aer_mod_init.f90 @@ -1,4 +1,4 @@ -!ORILAM_LIC Copyright 1994-2019 CNRS, Meteo-France and Universite Paul Sabatier +!ORILAM_LIC Copyright 2006-2019 CNRS, Meteo-France and Universite Paul Sabatier !ORILAM_LIC This is part of the ORILAM software governed by the CeCILL-C licence !ORILAM_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !ORILAM_LIC for details. @@ -41,6 +41,7 @@ END MODULE MODI_CH_AER_MOD_INIT !! ------------- !! 20/03/03 P . Tulet (CNRM/GMEI) add initialization tabulation !! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O +! P. Wautelet: 07/06/2019: allocate weights only when needed !! !! EXTERNAL !! -------- @@ -83,6 +84,12 @@ TZFILE => NULL() ! ! Initialize the mineral tabulation IF (CMINERAL == 'NARES') THEN + ALLOCATE( W1IJA(100,100), W1JKA(100,100), W2IJA(100,100), W2JKA(100,100) ) + ALLOCATE( W1IJB(100,100), W1JKB(100,100), W2IJB(100,100), W2JKB(100,100) ) + ALLOCATE( W1IJC(100,100), W1JKC(100,100), W2IJC(100,100), W2JKC(100,100) ) + ALLOCATE( X1MINA(2,100), X1MAXA(2,100), X1MODA(2,100), X2MINA(2,100), X2MAXA(2,100), X2MODA(2,100) ) + ALLOCATE( X1MINB(2,100), X1MAXB(2,100), X1MODB(2,100), X2MINB(2,100), X2MAXB(2,100), X2MODB(2,100) ) + ALLOCATE( X1MINC(2,100), X1MAXC(2,100), X1MODC(2,100), X2MINC(2,100), X2MAXC(2,100), X2MODC(2,100) ) ! .. the file ares.w contains the weights of the model CALL IO_File_add2list(TZFILE,'ares1A.w','CHEMTAB','READ') CALL IO_File_open(TZFILE) diff --git a/src/MNH/modd_ch_aerosol.f90 b/src/MNH/modd_ch_aerosol.f90 index e0019a581fbb165a4ee631c4bca6c7918c18cd96..4eb7fed5cc8a2c7f1fbe9a6820d1206842dfa513 100644 --- a/src/MNH/modd_ch_aerosol.f90 +++ b/src/MNH/modd_ch_aerosol.f90 @@ -1,13 +1,8 @@ -!ORILAM_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier +!ORILAM_LIC Copyright 2006-2019 CNRS, Meteo-France and Universite Paul Sabatier !ORILAM_LIC This is part of the ORILAM software governed by the CeCILL-C licence !ORILAM_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !ORILAM_LIC for details. !----------------------------------------------------------------- -!--------------- special set of characters for RCS information -!----------------------------------------------------------------- -! $Source: /home/cvsroot/MNH-VX-Y-Z/src/MNH/modd_ch_aerosol.f90,v $ $Revision: 1.1.2.2.2.1.2.1.2.1.2.2 $ -! MASDEV4_7 modd 2007/03/02 13:59:38 -!----------------------------------------------------------------- !! ###################### MODULE MODD_CH_AEROSOL !! ###################### @@ -35,7 +30,8 @@ !! ------------- !! (30-01-01) P.Tulet (LA) * modifications for secondary biogenics aerosols !! (25-08-16) M.Leriche (LA) * NM6_AER is now in SAVE and assign in ini_nsv -!! +! P. Wautelet: 07/06/2019: allocate weights only when needed!! +! !!-------------------------------------------------------------------- !! DECLARATIONS !! ------------ @@ -231,12 +227,12 @@ REAL, SAVE, DIMENSION(:,:,:,:,:,:), ALLOCATABLE :: zf ! Declaration of the neuronal coefficients ! .. weights -REAL, SAVE, DIMENSION(100,100) :: W1IJA,W1JKA,W2IJA,W2JKA -REAL, SAVE, DIMENSION(100,100) :: W1IJB,W1JKB,W2IJB,W2JKB -REAL, SAVE, DIMENSION(100,100) :: W1IJC,W1JKC,W2IJC,W2JKC -REAL, SAVE, DIMENSION(2,100) :: X1MINA,X1MAXA,X1MODA,X2MINA,X2MAXA,X2MODA -REAL, SAVE, DIMENSION(2,100) :: X1MINB,X1MAXB,X1MODB,X2MINB,X2MAXB,X2MODB -REAL, SAVE, DIMENSION(2,100) :: X1MINC,X1MAXC,X1MODC,X2MINC,X2MAXC,X2MODC +REAL, SAVE, DIMENSION(:,:), ALLOCATABLE :: W1IJA,W1JKA,W2IJA,W2JKA +REAL, SAVE, DIMENSION(:,:), ALLOCATABLE :: W1IJB,W1JKB,W2IJB,W2JKB +REAL, SAVE, DIMENSION(:,:), ALLOCATABLE :: W1IJC,W1JKC,W2IJC,W2JKC +REAL, SAVE, DIMENSION(:,:), ALLOCATABLE :: X1MINA,X1MAXA,X1MODA,X2MINA,X2MAXA,X2MODA +REAL, SAVE, DIMENSION(:,:), ALLOCATABLE :: X1MINB,X1MAXB,X1MODB,X2MINB,X2MAXB,X2MODB +REAL, SAVE, DIMENSION(:,:), ALLOCATABLE :: X1MINC,X1MAXC,X1MODC,X2MINC,X2MAXC,X2MODC ! .. counters and indices INTEGER, SAVE :: I1IA,J1JA,K1KA,I2IA,J2JA,K2KA