Skip to content
Snippets Groups Projects
Commit da116bf2 authored by RODIER Quentin's avatar RODIER Quentin
Browse files

Philippe 05/03/2019: deallocate XMI and XSOLORG if already allocated in...

Philippe 05/03/2019: deallocate XMI and XSOLORG if already allocated in ini_modeln but size=0 with respect to commit 77ee6c7a (29/01/2019)
parent b0e04b95
No related branches found
No related tags found
No related merge requests found
...@@ -49,6 +49,7 @@ END MODULE MODI_CH_AER_EQM_INIT_n ...@@ -49,6 +49,7 @@ END MODULE MODI_CH_AER_EQM_INIT_n
!! MODIFICATIONS !! MODIFICATIONS
!! ------------- !! -------------
!! M.Leriche 2015 : masse molaire Black carbon 12 g/mol !! M.Leriche 2015 : masse molaire Black carbon 12 g/mol
!! P.Wautelet 03/2019 : deallocate XMI and XSOLORG if already allocated in ini_modeln but size=0
!! !!
!! EXTERNAL !! EXTERNAL
!! -------- !! --------
...@@ -116,15 +117,24 @@ END DO ...@@ -116,15 +117,24 @@ END DO
ZDEN2MOL = 1E-6 * XAVOGADRO / XMD ZDEN2MOL = 1E-6 * XAVOGADRO / XMD
IF ( SIZE(XMI) == 0 ) THEN
DEALLOCATE( XMI )
XMI => NULL()
END IF
IF (.NOT.(ASSOCIATED(XMI))) THEN IF (.NOT.(ASSOCIATED(XMI))) THEN
ALLOCATE(XMI(SIZE(PCHEM,1),SIZE(PCHEM,2),SIZE(PCHEM,3),NSP+NCARB+NSOA)) ALLOCATE(XMI(SIZE(PCHEM,1),SIZE(PCHEM,2),SIZE(PCHEM,3),NSP+NCARB+NSOA))
END IF END IF
!
IF ( SIZE(XSOLORG) == 0 ) THEN
DEALLOCATE( XSOLORG )
XSOLORG => NULL()
END IF
IF (.NOT.(ASSOCIATED(XSOLORG))) THEN IF (.NOT.(ASSOCIATED(XSOLORG))) THEN
ALLOCATE(XSOLORG(SIZE(PCHEM,1),SIZE(PCHEM,2),SIZE(PCHEM,3),10)) ALLOCATE(XSOLORG(SIZE(PCHEM,1),SIZE(PCHEM,2),SIZE(PCHEM,3),10))
XSOLORG(:,:,:,:) = 0. XSOLORG(:,:,:,:) = 0.
END IF END IF
!
! Default values of molar mass ! Default values of molar mass
XMI(:,:,:,:) = 250. XMI(:,:,:,:) = 250.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment