Index: trunk/libIGCM/AA_metrics_NEMO
===================================================================
--- trunk/libIGCM/AA_metrics_NEMO	(revision 1224)
+++ trunk/libIGCM/AA_metrics_NEMO	(revision 1225)
@@ -142,10 +142,10 @@
 # Rename variables
 #==================================
-ncrename -v votemper,t -v thetao,to -v vosaline,so -v somxl010,mldpt -v mldr10_1,mldpt -v sosstsst,tos -v sossheig,zos -v sosaline,sos -v sowaflup,wfo ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc
+IGCM_sys_ncrename -v votemper,t -v thetao,to -v vosaline,so -v somxl010,mldpt -v mldr10_1,mldpt -v sosstsst,tos -v sossheig,zos -v sosaline,sos -v sowaflup,wfo ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc
 
 #==================================
 # Interpolate vertical levels
 #==================================
-cdo intlevel,50,100,250,500,1000 -selvar,to,so ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc
+IGCM_sys_cdo intlevel,50,100,250,500,1000 -selvar,to,so ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc
 
 #==================================
@@ -153,18 +153,18 @@
 #==================================
 if [ ${RESOL_ORCA} = 'eORCA1' ] ; then
-  orca_grid_file='/ccc/scratch/cont003/dsm/p86mart/ORCA1_BLD/DOMSK/eORCA1.0/IPSL.eORCA1.0_gridCF.nc'
+  orca_grid='/ccc/scratch/cont003/dsm/p86mart/ORCA1_BLD/DOMSK/eORCA1.0/IPSL.eORCA1.0_gridCF.nc'
 elif [ ${RESOL_ORCA} = 'ORCA1' ] ; then
-  orca_grid_file='/ccc/work/cont003/dsm/p86ipsl/database/grids/NEMO1_grid.nc'
+  orca_grid='/ccc/work/cont003/dsm/p86ipsl/database/grids/NEMO1_grid.nc'
 elif [ ${RESOL_ORCA} = 'ORCA2' ] ; then
-  orca_grid_file='/ccc/work/cont003/dsm/p86ipsl/database/grids/ORCA2_lon_lat_bounds_for_metrics.nc'
+  orca_grid='/ccc/work/cont003/dsm/p86ipsl/database/grids/ORCA2_lon_lat_bounds_for_metrics.nc'
 fi
 
-ncks --append -v bounds_lat,bounds_lon ${orca_grid_file} ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc
-ncatted -O -a bounds,nav_lat,o,c,bounds_lat ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc
-ncatted -O -a bounds,nav_lon,o,c,bounds_lon ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc
-
-ncks --append -v bounds_lat,bounds_lon ${orca_grid_file} ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc
-ncatted -O -a bounds,nav_lat,o,c,bounds_lat ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc
-ncatted -O -a bounds,nav_lon,o,c,bounds_lon ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc
+IGCM_sys_ncks --append -v bounds_lat,bounds_lon ${orca_grid} ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc
+IGCM_sys_ncatted -O -a bounds,nav_lat,o,c,bounds_lat ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc
+IGCM_sys_ncatted -O -a bounds,nav_lon,o,c,bounds_lon ${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc
+
+IGCM_sys_ncks --append -v bounds_lat,bounds_lon ${orca_grid} ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc
+IGCM_sys_ncatted -O -a bounds,nav_lat,o,c,bounds_lat ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc
+IGCM_sys_ncatted -O -a bounds,nav_lon,o,c,bounds_lon ${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc
 
 #==================================
@@ -176,6 +176,5 @@
 # Group of metrics we will compute
 #==================================
-#GroupsOfMetrics='NEMO_PCMDI NEMO_LatBandsAndRegions NEMO_VertLevels'
-GroupsOfMetrics='NEMO_PCMDI NEMO_LatBandsAndRegions'
+GroupsOfMetrics='NEMO_PCMDI NEMO_LatBandsAndRegions NEMO_VertLevels'
 MP_Version=v2.12
 
@@ -190,6 +189,12 @@
   # Configure template for grid_T.nc
   #==================================
-  IGCM_comp_modifyFile template.py path_and_filename \'./${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc\'
-  IGCM_comp_modifyFile template.py filename \'${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc\'
+
+  if [ ${metricsGroupName} != "NEMO_VertLevels" ] ; then
+    IGCM_comp_modifyFile template.py path_and_filename \'./${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc\'
+    IGCM_comp_modifyFile template.py filename \'${config_UserChoices_JobName}_SE_${YEARS}_1M_grid_T.nc\'
+  else
+    IGCM_comp_modifyFile template.py path_and_filename \'./${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc\'
+    IGCM_comp_modifyFile template.py filename \'${config_UserChoices_JobName}_SE_${YEARS}_1MVertLevels_grid_T.nc\'
+  fi
   IGCM_comp_modifyFile template.py attributes_provided \'IPSL_Extended\'
   IGCM_comp_modifyFile template.py Login  \'${LOGIN}\'
