Index: TOOLS/CMIP6_FORCING/AER_STRAT/README
===================================================================
--- TOOLS/CMIP6_FORCING/AER_STRAT/README	(revision 4473)
+++ TOOLS/CMIP6_FORCING/AER_STRAT/README	(revision 4605)
@@ -25,11 +25,13 @@
 zalt_zonmean_LR_l79_rev.nc = same as above but ferret'ized so that can be read in idl
 
-In September 2017 the processing idl routine was to v4 changed to rely on climatological LMDz altitudes
+In September 2017 the processing idl routine was changed to rely on climatological LMDz altitudes
 that vary monthly and with latitude (based on GEOP variable Z=GEOP/RG/1000 [in km]). 
-Start from a file geop.nc with monthly GEOP variable
+Start from a file geop.nc with monthly GEOP variable (ideally from a 10-yr run)
+cdo ymonmean geop.nc geop_LR.nc
 cdo divc,9810. geop_LR.nc zalt_LR_l79.nc
 cdo zonmean zalt_LR_l79.nc zalt_zonmean_LR_l79.nc
 ferret'ize file to make it readable by ferret : zalt_zonmean_LR_l79_rev.nc 
-We have files for LR, MR, HR model versions.
+for this an example is provided in example_convert.jnl
+We have files for VLR, LR, MR, HR model versions.
 The variable is called GEOP but is now the altitude in km as required by the interpolation scheme.
 
@@ -52,4 +54,7 @@
 No additional interpolation between months is done. 
 
+v3 : original CMIP6 files 
+v4 : corrected CMIP6 files (Pinatubo) and extended in time beyond 2014
+
 Olivier Boucher 
 27/07/2016
@@ -60,2 +65,3 @@
 Revised 11/12/2018
 Revised 06/2019 by Th. Lurton to add support for VLR-L39.
+Revised 03/07/2019
Index: TOOLS/CMIP6_FORCING/AER_STRAT/volc.sh
===================================================================
--- TOOLS/CMIP6_FORCING/AER_STRAT/volc.sh	(revision 4473)
+++ TOOLS/CMIP6_FORCING/AER_STRAT/volc.sh	(revision 4605)
@@ -1,15 +1,18 @@
 dirpwd=`pwd`
 
+#original CMIP6 files
+vv='v3'
+#corrected CMIP6 files + extended in time
 vv='v4'
 
 #--choose the resolution
 #--only LR and zoom works fully for now !
-#lmdz='VVLR'
-#lmdz='VLR_L79'
-#lmdz='VLR'
-lmdz='LR'
-#lmdz='MR'
+#lmdz='VVLR_l19'
+lmdz='VLR_l39'
+#lmdz='VLR_l79'
+#lmdz='LR_l79'
+#lmdz='MR_l79'
 #--added for Frederique Cheruy
-#lmdz='zoom_128x89'
+#lmdz='zoom_128x89_l79'
 
 dirout='/data/'${USER}'/CMIP6/VOLC/'${lmdz}'_'${vv}'/'
@@ -26,9 +29,9 @@
 lmdz='${lmdz}'
 ;
-if (lmdz eq 'VVLR') then begin
+if (lmdz eq 'VVLR_l19') then begin
 dimlonlmdz=48
 dimlatlmdz=37
 dimz=19
-output='/data/${USER}/CMIP6/VOLC/VVLR_${vv}/'
+output='/data/${USER}/CMIP6/VOLC/${lmdz}_${vv}/'
 latfirst=90.
 latinc=-180./float(dimlatlmdz-1)
@@ -36,9 +39,9 @@
 endif
 
-if (lmdz eq 'VLR') then begin
+if (lmdz eq 'VLR_l39') then begin
 dimlonlmdz=96
 dimlatlmdz=96
 dimz=39
-output='/data/${USER}/CMIP6/VOLC/VLR_${vv}/'
+output='/data/${USER}/CMIP6/VOLC/${lmdz}_${vv}/'
 latfirst=90.
 latinc=-180./float(dimlatlmdz-1)
@@ -46,9 +49,9 @@
 endif
 
-if (lmdz eq 'VLR_L79') then begin
+if (lmdz eq 'VLR_l79') then begin
 dimlonlmdz=96
 dimlatlmdz=96
 dimz=79
-output='/data/${USER}/CMIP6/VOLC/VLR_L79_${vv}/'
+output='/data/${USER}/CMIP6/VOLC/${lmdz}_${vv}/'
 latfirst=90.
 latinc=-180./float(dimlatlmdz-1)
@@ -56,9 +59,9 @@
 endif
 
-if (lmdz eq 'LR') then begin
+if (lmdz eq 'LR_l79') then begin
 dimlonlmdz=144
 dimlatlmdz=143
 dimz=79
-output='/data/${USER}/CMIP6/VOLC/LR_${vv}/'
+output='/data/${USER}/CMIP6/VOLC/${lmdz}_${vv}/'
 latfirst=90.
 latinc=-180./float(dimlatlmdz-1)
@@ -66,9 +69,9 @@
 endif
 
-if (lmdz eq 'MR') then begin
+if (lmdz eq 'MR_l79') then begin
 dimlonlmdz=256
 dimlatlmdz=257
 dimz=79
-output='/data/${USER}/CMIP6/VOLC/MR_${vv}/'
+output='/data/${USER}/CMIP6/VOLC/${lmdz}_${vv}/'
 latfirst=90.
 latinc=-180./float(dimlatlmdz-1)
@@ -76,5 +79,5 @@
 endif
 
-if (lmdz eq 'zoom_128x89') then begin
+if (lmdz eq 'zoom_128x89_l79') then begin
 dimlonlmdz=128
 dimlatlmdz=89
@@ -152,56 +155,20 @@
 zz=fltarr(dimz)
 ;
-;---approximate altitudes of LMDZ - L19 and L39
-;---NOT RECOMMENDED
-;
-if (dimz eq 19) then begin
-zz=[ 0.07125416, 0.2402302, 0.4865242, 0.8627044, 1.426484, 2.244528,    $
-    3.394085, 4.952366, 6.950302, 9.26943, 11.59338, 13.71214, 15.83651, $
-    18.27338, 21.16397, 24.63156, 28.9039, 34.57184, 44.51565] ;
-endif
-;
-if (dimz eq 39) then begin
-zz=[0.0338988, 0.1106602, 0.2139233, 0.3609663, 0.5685416, 0.8534464,     $
-    1.233232, 1.726868, 2.355076, 3.139813, 4.101937, 5.25541, 6.596076,  $
-    8.085103, 9.636482, 11.13441, 12.50023, 13.75765, 15.00424, 16.32207, $
-    17.74403, 19.27899, 20.93219, 22.70941, 24.61736, 26.66389, 28.85831, $
-    31.21178, 33.73778, 36.45278, 39.37709, 42.53607, 45.96209, 49.69786, $
-    53.80379, 58.37727, 63.61497, 70.07092, 80.52708]
-endif
-;
 ;---exact altitudes of LMDZ -- L79
-;--only exists for LR, MR and zoom_128x89 at the moment
-if (dimz eq 79) then begin
-  filename='./zalt_zonmean_${lmdz}_l79_rev.nc'
-  NETCDFREAD,filename,'GEOP',zz,dimzz
-  NETCDFREAD,filename,'LAT',zzlat,dimzzlat
-  NETCDFREAD,filename,'TIME_COUNTER',zztime,dimzztime
-  dimzzilat=dimzzlat[0]
-  dimzzitime=dimzztime[0]
-  ;--becareful zz comes with four dimensions
-  ;--lon lat k time 
-  print, 'GEOP size=', size(zz)
-  ;--becareful zzlat comes with South Pole first
-  print, 'LAT from zalt field=', zzlat
-  if (dimzzilat ne dimlatlmdz) then begin
-    print , 'PB dimension latitude'
-  endif
-endif
-;
-if (dimz eq 39) then begin
-  filename='./zalt_zonmean_${lmdz}_l39_rev.nc'
-  NETCDFREAD,filename,'GEOP',zz,dimzz
-  NETCDFREAD,filename,'LAT',zzlat,dimzzlat
-  NETCDFREAD,filename,'TIME_COUNTER',zztime,dimzztime
-  dimzzilat=dimzzlat[0]
-  dimzzitime=dimzztime[0]
-  ;--becareful zz comes with four dimensions
-  ;--lon lat k time
-  print, 'GEOP size=', size(zz)
-  ;--becareful zzlat comes with South Pole first
-  print, 'LAT from zalt field=', zzlat
-  if (dimzzilat ne dimlatlmdz) then begin
-    print , 'PB dimension latitude'
-  endif
+;--only exists for VLR, LR, MR and zoom_128x89 at the moment
+;
+filename='/bdd/input4MIPs/ZALT/zalt_zonmean_${lmdz}_rev.nc'
+NETCDFREAD,filename,'GEOP',zz,dimzz
+NETCDFREAD,filename,'LAT',zzlat,dimzzlat
+NETCDFREAD,filename,'TIME_COUNTER',zztime,dimzztime
+dimzzilat=dimzzlat[0]
+dimzzitime=dimzztime[0]
+;--becareful zz comes with four dimensions
+;--lon lat k time 
+print, 'GEOP size=', size(zz)
+;--becareful zzlat comes with South Pole first
+print, 'LAT from zalt field=', zzlat
+if (dimzzilat ne dimlatlmdz) then begin
+  print , 'PB dimension latitude'
 endif
 ;
@@ -578,6 +545,4 @@
 cd $dirpwd
 
-module load idl
-
 idl << eof
 .r netcdf 
