Index: LMDZ6/trunk/libf/phylmd/macv2sp.f90
===================================================================
--- LMDZ6/trunk/libf/phylmd/macv2sp.f90	(revision 6102)
+++ LMDZ6/trunk/libf/phylmd/macv2sp.f90	(revision 6128)
@@ -1,3 +1,3 @@
-SUBROUTINE MACv2SP(pphis,pplay,paprs,xlon,xlat,tau_allaer,piz_allaer,cg_allaer)
+SUBROUTINE macv2sp(pphis,pplay,paprs,xlon,xlat,tau_allaer,piz_allaer,cg_allaer,dNovrN)
   !
   !--routine to read the MACv2SP plume and compute optical properties
@@ -13,10 +13,10 @@
   !--dNovrN   = enhancement factor for CDNC
   !
-  USE mo_simple_plumes, ONLY: sp_aop_profile, sp_setup, sp_initialized, aerosols_SP_forcing_year
+  USE mo_simple_plumes, ONLY: sp_aod550_profile, sp_aop_profile, sp_setup 	! subroutines
+  USE mo_simple_plumes, ONLY: nplumes, sp_initialized, aerosols_SP_forcing_year ! variables
   USE phys_cal_mod, ONLY : year_cur, year_len, days_elapsed
   USE dimphy
   USE aero_mod
-  USE phys_local_var_mod, ONLY: t_seri, od443aer, od550aer, od865aer, ec550aer, dryod550aer, od550lt1aer, od550SPaer, dNovrN
-  !!USE YOMCST, ONLY : RD, RG
+  USE phys_local_var_mod, ONLY: t_seri, od443aer, od550aer, od865aer, ec550aer, dryod550aer, od550lt1aer, od550SPaer
   !
   USE yomcst_mod_h
@@ -35,11 +35,12 @@
   REAL, DIMENSION(klon,klev,2,nbands_sw_rrtm), INTENT(INOUT) :: cg_allaer  !  asymmetry parameter aerosol
   !
+  REAL,DIMENSION(klon),INTENT(OUT)       :: dNovrN   !< anthropogenic increase in cloud drop number concentration (factor)
+  !
+  REAL,DIMENSION(klon,klev,nplumes) :: aod550
   REAL,DIMENSION(klon,klev) :: aod_prof, ssa_prof, asy_prof
   REAL,DIMENSION(klon,klev) :: z, dz
   REAL,DIMENSION(klon)      :: oro, zrho, zt
   !
-  INTEGER, PARAMETER :: nmon = 12
-  !
-  REAL, PARAMETER    :: l443 = 443.0, l550 = 550.0, l865 = 865.0 !--wavelengths in nm
+  REAL, PARAMETER    :: l443 = 443.0, l865 = 865.0 !--wavelengths in nm for diagnostics (other than 550 nm calculated by default)
   !
   INTEGER, PARAMETER :: Nwvmax=25
@@ -58,5 +59,4 @@
   !
   REAL :: zlambda, zweight
-!  REAL :: year_fr  ! also a dimension name in SP aerosol file ; renamed more properly "decimal_year" 
   REAL :: decimal_year 
   !
@@ -83,11 +83,8 @@
   IF (.NOT.sp_initialized) CALL sp_setup
 
-  !--fractional year
-  !
-  ! Original version, bugged :
-  ! year_fr = FLOAT(year_cur) + (FLOAT(day_cur)-0.5) / FLOAT(year_len)
-  ! Correction ASima & FH :
-!  year_fr= float(year_cur) + float(days_elapsed)/float(year_len)
-! Choice between yearly vs fixed_year forcing, depending on 'aerosols_SP_forcing_year'
+  !--fractional year : 
+  !   Original version, bugged :       year_fr = FLOAT(year_cur) + (FLOAT(day_cur)-0.5) / FLOAT(year_len)
+  !   Correction 2026-03, FH & ASima : year_fr= float(year_cur) + float(days_elapsed)/float(year_len)
+  ! Name changed in decimal_year ; choice between yearly vs fixed_year forcing, depending on 'aerosols_SP_forcing_year'
   IF (aerosols_SP_forcing_year.EQ.-9999) THEN
      decimal_year= float(year_cur) + float(days_elapsed)/float(year_len)
@@ -99,25 +96,18 @@
      CALL abort_physic ('macv2sp','year not supported by plume model',1)
   ENDIF
-  !
-  !--call to sp routine -- 443 nm
-  !
-  CALL sp_aop_profile                                    ( &
-       klev     ,klon ,l443 ,oro    ,xlon     ,xlat      , &
-       decimal_year  ,z    ,dz   ,dNovrN ,aod_prof ,ssa_prof  , &
-       asy_prof )
-  !
-  !--AOD calculations for diagnostics
-  od443aer(:)= od443aer(:)+SUM(aod_prof(:,:),dim=2)
-  !
-  !--call to sp routine -- 550 nm
-  !
-  CALL sp_aop_profile                                    ( &
-       klev     ,klon ,l550 ,oro    ,xlon     ,xlat      , &
-       decimal_year  ,z    ,dz   ,dNovrN ,aod_prof ,ssa_prof  , &
-       asy_prof )
-  !
-  !--AOD calculations for diagnostics
-  ! (ASima : new diagnostic od550SPaer; corrected od550lt1aer and dryod550aer)
-  !--a/ AOD of SP aerosols = vertical sum of SP aod profile
+
+  !
+  !--call SUBROUTINE sp_aod550_profile once ; all the wavelength-dependent profiles and 2D diagnostics will use aod550 profile
+  !
+  CALL sp_aod550_profile                                                 ( &
+       klev           ,klon       ,oro        ,xlon           ,xlat      , &
+       decimal_year   ,z          ,dz         ,dNovrN         , aod550   )
+
+  !--AOD550 calculations for diagnostics
+  !
+  ! aod550 profile = sum over the 'nplumes' dimension
+  aod_prof(:,:)=SUM(aod550(:,:,:),dim=3)
+  !
+  !--a/ AOD of SP anthropic aerosols = vertical sum of SP aod profile
   od550SPaer(:)=SUM(aod_prof(:,:),dim=2)
   !
@@ -126,26 +116,32 @@
   !
   !--c/ fine-mode AOD = Inca1850(fine mode) + SP
-  ! original, bugged : includes od550aer of Inca1850 
-  !od550lt1aer(:)=od550lt1aer(:)+od550aer(:)
   od550lt1aer(:)=od550lt1aer(:)+od550SPaer(:)
   !
   !--d/ dry AOD 
-  ! original, bugged : includes od550aer of Inca1850
-  !dryod550aer(:)=dryod550aer(:)+od550aer(:)
   dryod550aer(:)=dryod550aer(:)+od550SPaer(:)
-  !
   !
   !--extinction coefficient for diagnostic
   ec550aer(:,:)=ec550aer(:,:)+aod_prof(:,:)/dz(:,:)
   !
+
+  ! Diagnostic AOD calculations for other wavelengths : 443 and 865 nm  
+  !--call to sp routine -- 443 nm
+  !
+  CALL sp_aop_profile                                    ( &
+       klev     ,klon ,  l443         , &
+       aod550   ,aod_prof ,ssa_prof  , &
+       asy_prof )
+
+  od443aer(:)= od443aer(:)+SUM(aod_prof(:,:),dim=2)
+
   !--call to sp routine -- 865 nm
   !
   CALL sp_aop_profile                                    ( &
-       klev     ,klon ,l865 ,oro    ,xlon     ,xlat      , &
-       decimal_year  ,z    ,dz   ,dNovrN ,aod_prof ,ssa_prof  , &
+       klev     ,klon ,  l865         , &
+       aod550   ,aod_prof ,ssa_prof  , &
        asy_prof )
-  !
-  !--AOD calculations for diagnostics
+
   od865aer(:)=od865aer(:)+SUM(aod_prof(:,:),dim=2)
+
   !
   !--re-weighting of piz and cg arrays before adding the anthropogenic aerosols
@@ -184,8 +180,10 @@
     ENDIF
     !
-    CALL sp_aop_profile                                       ( &
-         klev     ,klon ,zlambda ,oro    ,xlon     ,xlat      , &
-         decimal_year  ,z    ,dz      ,dNovrN ,aod_prof ,ssa_prof  , &
-         asy_prof )
+  CALL sp_aop_profile                                    ( &
+       klev     ,klon ,  zlambda         , &
+       aod550   ,aod_prof ,ssa_prof  , &
+       asy_prof )
+
+
     !
     !--adding up the quantities tau, piz*tau and cg*piz*tau
@@ -200,3 +198,3 @@
   piz_allaer(:,:,2,:)=piz_allaer(:,:,2,:)/tau_allaer(:,:,2,:)
   !
-END SUBROUTINE MACv2SP
+END SUBROUTINE macv2sp 
