Index: /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_main_1Y.sh
===================================================================
--- /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_main_1Y.sh	(revision 4184)
+++ /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_main_1Y.sh	(revision 4184)
@@ -0,0 +1,239 @@
+#!/bin/sh 
+#+
+#
+# .. program:: std_main.sh
+#
+# ================
+# std_main.sh
+# ================
+#
+# -------------------------------------
+# launch idl scripts to produce graphics diagnostics in Postscript, PDF or HTML document
+# -------------------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ``std_main.sh -ts`` or ``std_main.sh -plot`` 
+# 
+# DESCRIPTION
+# ===========
+#
+# .. option:: -ts    to produce time series 
+# .. option:: -plot  to produce maps and sections
+# .. option:: -html  to produce html document
+# .. option:: -pdf   to produce pdf document
+# .. option:: -noidl to skip the call to IDL and the production of Postscript
+# .. option:: -vm    to use IDL virtual machine (free) instead of IDL
+# .. option:: -help  to get help!
+#
+# variables have to be defined in std_plot_vardef.sh (or std_ts_vardef.sh)
+# before calling std_main.sh -plot (or std_main.sh -ts)
+#
+# EXAMPLES
+# ========
+# $ ./std_main.sh -ts html
+# $ ./std_main.sh -ts pdf -noidl
+# 
+# $ ./std_main.sh -plot -pdf -vm
+#
+# AUTHOR - date
+# ===========
+# Françoise Pinsard - 01/2010 - LOCEAN
+# Simona Flavoni    - 01/2010 - LOCEAN
+# Sebastien Masson  - 04/2011 - LOCEAN
+#
+#-----------------------------------------------------------
+# Usage...
+#-----------------------------------------------------------
+#
+#-
+system=$(uname)
+case "${system}" in
+   AIX|IRIX64)
+      echo " www : no specific posix checking"
+   ;;
+   *)
+      set -o posix
+   ;;
+esac
+#
+usage="Usage: std_main.sh [OPTION]
+Options
+ -ts    to produce time series 
+ -plot  to produce maps and sections
+ -html  to produce html document
+ -pdf   to produce pdf document
+ -noidl to skip the call to IDL and the production of Postscript
+ -vm    to use IDL virtual machine (free) instead of IDL
+ -help  to get this help
+"
+#
+vm=0
+noidl=0
+format=ps
+while [ ! -z "${1}" ]
+do
+    case ${1} in
+	-plot|--plot) PLOTTYPE=plot ;;
+	-ts|--ts) PLOTTYPE=ts ;;
+	-f|-format|--format) format=${2}	  shift	 ;;
+	-html|--html) format=html ;;
+	-pdf|--pdf) format=pdf ;;
+	-h|-help|--help)	
+	    echo "${usage}"
+	    exit 0	
+	    ;;
+	-ni|--ni|-noidl|--noidl) noidl=1 ;;
+	-vm|--vm|-virtual_machine|--virtual_machine) vm=1 ;;
+	*) # other choice
+	    echo "${usage}"
+	    exit 1
+	    ;;
+    esac
+    shift # next flag
+done
+#
+PLOTTYPE=${PLOTTYPE:-NG}
+if [[ ( "$PLOTTYPE" != "plot" ) && ( "$PLOTTYPE" != "ts" ) ]]
+then
+    echo 'the type of plot must be defined with the option -plot or -ts'
+	exit 1
+fi
+export PLOTTYPE
+#
+set -u
+#
+#
+tstexe () {
+    type ${1}
+    status_type=${?}
+    if [ ${status_type} -ne 0 ]
+    then
+	echo "eee : ${2}"
+	exit 1
+    fi
+}
+#
+#-----------------------------------------------------------
+# define output directory for POSTCRIPT files
+#-----------------------------------------------------------
+#
+. ./std_${PLOTTYPE}_vardef.sh
+[ ! -d ${PS_DIR} ] && mkdir -p ${PS_DIR}
+#
+#-----------------------------------------------------------
+# run IDL
+#-----------------------------------------------------------
+#
+if [ $noidl -eq 0 ]
+then 
+    tstexe ${idl_command} "idl not found"
+#
+    if [ $vm -eq 1 ]
+    then
+	${idl_command} -vm=std_main.sav
+    else 
+	${idl_command} -IDL_STARTUP 'initenv' << EOF
+std_${PLOTTYPE}_all, /postscript
+EOF
+    fi
+    status_idl=${?}
+    if [ ${status_idl} -ne 0 ]
+    then
+	echo "eee : error in the execution of IDL"
+	exit 1
+    fi
+fi
+#
+#-----------------------------------------------------------
+# produce the final document
+#-----------------------------------------------------------
+#
+# build the list of ps that has been created by IDL
+pslist=$( grep "img width" ${PS_DIR}/std_${PLOTTYPE}_html_body.txt | sed -e "s/.*src=\(.*\)png.*/\1/" )
+#
+case ${format} in
+#__________________________________________________________
+# PDF
+    pdf)
+# check if ps2pdf available
+	ps2pdf_command=$( which ps2pdf )
+	tstexe ${ps2pdf_command} "ps2pdf not found"
+# check if texexec available
+	texexec_command=$( which texexec )
+	tstexe ${texexec_command} "texexec not found"
+#
+	filepdf=all_${PLOTTYPE}.pdf
+	[ ! -d ${PDF_DIR} ] && mkdir -p ${PDF_DIR}
+	pdflist=''
+	for file in ${pslist} ; do
+	    ps2pdf -sPAPERSIZE=a4 ${PS_DIR}/${file}ps ${PDF_DIR}/${file}pdf
+	    echo "ps2pdf ${file}ps done"
+	    pdflist=${pdflist}' '${PDF_DIR}/${file}pdf
+	done
+#pdfjam needed to use pdfjoin
+	pdfjoin ${pdflist} --outfile $PDF_DIR/${filepdf}
+	texexec --pdfarrange --result=$PDF_DIR/$filepdf $pdflist
+	rm -f $PDF_DIR/$( basename $filepdf .pdf ).aux $PDF_DIR/$( basename $filepdf .pdf ).log
+	if [ ! -e ${PDF_DIR}/$filepdf ]
+	then
+	        echo "\n ATTENTION !!!!! \n"
+                echo "${PDF_DIR}/$filepdf do not exist \n"
+        else
+                 echo "${PDF_DIR}/$filepdf done"
+       fi
+#commented because convert gives images of bad quality
+#	convert ${PS_DIR}/*.ps /tmp/all_${PLOTTYPE}.pdf
+#       convert -resize 800x600 ${PS_DIR}/${exp1}_${exp2}/ps/*.ps /tmp/all_${PLOTTYPE}.pdf
+	;;
+#__________________________________________________________
+# HTML
+    html)
+	filehtml=all_${PLOTTYPE}.html
+	[ ! -d ${HTML_DIR} ] && mkdir -p ${HTML_DIR}
+# check if convert available
+	convert_command=$( which convert )
+	tstexe ${convert_command} "convert not found"
+# convert each ps to png	
+	for file in ${pslist} ; do
+	    ${convert_command} -antialias ${PS_DIR}/${file}ps ${HTML_DIR}/${file}png
+	done
+# creation of the HTML file
+	cat << EOF > ${HTML_DIR}/$filehtml
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+EOF
+	cat ${PS_DIR}/std_${PLOTTYPE}_html_body.txt >>  ${HTML_DIR}/$filehtml
+	cat << EOF >> ${HTML_DIR}/$filehtml
+<hr>
+</body>
+</html>
+EOF
+	echo ${HTML_DIR}/$filehtml done
+	;;
+    ps)	;; # nothing to do...
+    *)	
+	echo " format ${format} not implemented"
+	exit 1
+	;;
+esac
+
+    #
+#=====================
+# prepare to put images on dods
+# +++ to finish it
+#LOGIN=xxxx
+#Tag_Name=ORCA2_LIM2
+#rsh ${LOGIN}@gaya.idris.fr exec /bin/ksh <<EOF
+#       cd ${homegaya}/IGCM_OUT/${Tag_Name}/CORE2/INTERAN/${PLOTTYPE}_pdf/${exp1}
+#       /usr/local/bin/dods_rm DODS/pub/${LOGIN}/${Tag_Name}/CORE2/INTERAN/${PLOTTYPE}_pdf/${exp1} > /dev/null 2>&1
+#       /usr/local/bin/dods_cp ${exp1} DODS/pub/${LOGIN}/${Tag_Name}/CORE2/INTERAN/${PLOTTYPE}_pdf/${exp1} > /dev/null 2>&1
+#EOF
+#=====================
+# end
+exit 0
Index: /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_main_5D.sh
===================================================================
--- /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_main_5D.sh	(revision 4184)
+++ /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_main_5D.sh	(revision 4184)
@@ -0,0 +1,238 @@
+#!/bin/sh 
+#+
+#
+# .. program:: std_main_5D.sh
+#
+# ================
+# std_main.sh
+# ================
+#
+# -------------------------------------
+# launch idl scripts to produce graphics diagnostics in Postscript, PDF or HTML document
+# for output of 5days for 1 year run
+# nota: it is like std_main.sh but it calls routins for 5days
+# -------------------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ``std_main_5D.sh -ts`` or ``std_main_5D.sh -plot`` 
+# 
+# DESCRIPTION
+# ===========
+#
+# .. option:: -ts    to produce time series 
+# .. option:: -plot  to produce maps and sections
+# .. option:: -html  to produce html document
+# .. option:: -pdf   to produce pdf document
+# .. option:: -noidl to skip the call to IDL and the production of Postscript
+# .. option:: -vm    to use IDL virtual machine (free) instead of IDL
+# .. option:: -help  to get help!
+#
+# variables have to be defined in std_plot_vardef.sh (or std_ts_vardef.sh)
+# before calling std_main_5D.sh -plot 
+#
+# EXAMPLES
+# ========
+# $ ./std_main_5D.sh -plot -pdf 
+#
+# AUTHOR - date
+# ===========
+# Françoise Pinsard - 01/2010 - LOCEAN
+# Simona Flavoni    - 01/2010 - LOCEAN
+# Sebastien Masson  - 04/2011 - LOCEAN
+#
+#-----------------------------------------------------------
+# Usage...
+#-----------------------------------------------------------
+#
+#-
+system=$(uname)
+case "${system}" in
+   AIX|IRIX64)
+      echo " www : no specific posix checking"
+   ;;
+   *)
+      set -o posix
+   ;;
+esac
+#
+usage="Usage: std_main_5D.sh [OPTION]
+Options
+ -ts    to produce time series 
+ -plot  to produce maps and sections
+ -html  to produce html document
+ -pdf   to produce pdf document
+ -noidl to skip the call to IDL and the production of Postscript
+ -vm    to use IDL virtual machine (free) instead of IDL
+ -help  to get this help
+"
+#
+vm=0
+noidl=0
+format=ps
+while [ ! -z "${1}" ]
+do
+    case ${1} in
+	-plot|--plot) PLOTTYPE=plot ;;
+	-ts|--ts) PLOTTYPE=ts ;;
+	-f|-format|--format) format=${2}	  shift	 ;;
+	-html|--html) format=html ;;
+	-pdf|--pdf) format=pdf ;;
+	-h|-help|--help)	
+	    echo "${usage}"
+	    exit 0	
+	    ;;
+	-ni|--ni|-noidl|--noidl) noidl=1 ;;
+	-vm|--vm|-virtual_machine|--virtual_machine) vm=1 ;;
+	*) # other choice
+	    echo "${usage}"
+	    exit 1
+	    ;;
+    esac
+    shift # next flag
+done
+#
+PLOTTYPE=${PLOTTYPE:-NG}
+if [[ ( "$PLOTTYPE" != "plot" ) && ( "$PLOTTYPE" != "ts" ) ]]
+then
+    echo 'the type of plot must be defined with the option -plot or -ts'
+	exit 1
+fi
+export PLOTTYPE
+#
+set -u
+#
+#
+tstexe () {
+    type ${1}
+    status_type=${?}
+    if [ ${status_type} -ne 0 ]
+    then
+	echo "eee : ${2}"
+	exit 1
+    fi
+}
+#
+#-----------------------------------------------------------
+# define output directory for POSTCRIPT files
+#-----------------------------------------------------------
+#
+. ./std_${PLOTTYPE}_vardef.sh
+[ ! -d ${PS_DIR} ] && mkdir -p ${PS_DIR}
+#
+#-----------------------------------------------------------
+# run IDL
+#-----------------------------------------------------------
+#
+if [ $noidl -eq 0 ]
+then 
+    tstexe ${idl_command} "idl not found"
+#
+    if [ $vm -eq 1 ]
+    then
+	${idl_command} -vm=std_main.sav
+    else 
+	${idl_command} -IDL_STARTUP 'initenv' << EOF
+std_${PLOTTYPE}_all_last_year_5D, /postscript
+EOF
+    fi
+    status_idl=${?}
+    if [ ${status_idl} -ne 0 ]
+    then
+	echo "eee : error in the execution of IDL"
+	exit 1
+    fi
+fi
+#
+#-----------------------------------------------------------
+# produce the final document
+#-----------------------------------------------------------
+#
+# build the list of ps that has been created by IDL
+pslist=$( grep "img width" ${PS_DIR}/std_${PLOTTYPE}_html_body.txt | sed -e "s/.*src=\(.*\)png.*/\1/" )
+#
+case ${format} in
+#__________________________________________________________
+# PDF
+    pdf)
+# check if ps2pdf available
+	ps2pdf_command=$( which ps2pdf )
+	tstexe ${ps2pdf_command} "ps2pdf not found"
+# check if texexec available
+	texexec_command=$( which texexec )
+	tstexe ${texexec_command} "texexec not found"
+#
+	filepdf=all_${PLOTTYPE}.pdf
+	[ ! -d ${PDF_DIR} ] && mkdir -p ${PDF_DIR}
+	pdflist=''
+	for file in ${pslist} ; do
+	    ps2pdf -sPAPERSIZE=a4 ${PS_DIR}/${file}ps ${PDF_DIR}/${file}pdf
+	    echo "ps2pdf ${file}ps done"
+	    pdflist=${pdflist}' '${PDF_DIR}/${file}pdf
+	done
+#pdfjam needed to use pdfjoin
+	pdfjoin ${pdflist} --outfile $PDF_DIR/${filepdf}
+	texexec --pdfarrange --result=$PDF_DIR/$filepdf $pdflist
+	rm -f $PDF_DIR/$( basename $filepdf .pdf ).aux $PDF_DIR/$( basename $filepdf .pdf ).log
+	if [ ! -e ${PDF_DIR}/$filepdf ]
+	then
+	        echo "\n ATTENTION !!!!! \n"
+                echo "${PDF_DIR}/$filepdf do not exist \n"
+        else
+                 echo "${PDF_DIR}/$filepdf done"
+       fi
+#commented because convert gives images of bad quality
+#	convert ${PS_DIR}/*.ps /tmp/all_${PLOTTYPE}.pdf
+#       convert -resize 800x600 ${PS_DIR}/${exp1}_${exp2}/ps/*.ps /tmp/all_${PLOTTYPE}.pdf
+	;;
+#__________________________________________________________
+# HTML
+    html)
+	filehtml=all_${PLOTTYPE}.html
+	[ ! -d ${HTML_DIR} ] && mkdir -p ${HTML_DIR}
+# check if convert available
+	convert_command=$( which convert )
+	tstexe ${convert_command} "convert not found"
+# convert each ps to png	
+	for file in ${pslist} ; do
+	    ${convert_command} -antialias ${PS_DIR}/${file}ps ${HTML_DIR}/${file}png
+	done
+# creation of the HTML file
+	cat << EOF > ${HTML_DIR}/$filehtml
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+</head>
+<body>
+EOF
+	cat ${PS_DIR}/std_${PLOTTYPE}_html_body.txt >>  ${HTML_DIR}/$filehtml
+	cat << EOF >> ${HTML_DIR}/$filehtml
+<hr>
+</body>
+</html>
+EOF
+	echo ${HTML_DIR}/$filehtml done
+	;;
+    ps)	;; # nothing to do...
+    *)	
+	echo " format ${format} not implemented"
+	exit 1
+	;;
+esac
+
+    #
+#=====================
+# prepare to put images on dods
+# +++ to finish it
+#LOGIN=xxxx
+#Tag_Name=ORCA2_LIM2
+#rsh ${LOGIN}@gaya.idris.fr exec /bin/ksh <<EOF
+#       cd ${homegaya}/IGCM_OUT/${Tag_Name}/CORE2/INTERAN/${PLOTTYPE}_pdf/${exp1}
+#       /usr/local/bin/dods_rm DODS/pub/${LOGIN}/${Tag_Name}/CORE2/INTERAN/${PLOTTYPE}_pdf/${exp1} > /dev/null 2>&1
+#       /usr/local/bin/dods_cp ${exp1} DODS/pub/${LOGIN}/${Tag_Name}/CORE2/INTERAN/${PLOTTYPE}_pdf/${exp1} > /dev/null 2>&1
+#EOF
+#=====================
+# end
+exit 0
Index: /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_main_last_year_5D.pro
===================================================================
--- /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_main_last_year_5D.pro	(revision 4184)
+++ /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_main_last_year_5D.pro	(revision 4184)
@@ -0,0 +1,12 @@
+PRO std_main_last_year_5D
+@initenv
+;
+  type = getenv('PLOTTYPE')
+  CASE type OF
+    '':print, 'The environment variable PLOTTYPE is not defined. We stop'
+    'ts':std_ts_all, /postscript
+    'plot':std_plot_all_last_year_5D, /postscript
+    ELSE:print, 'Wrong definition of the environment variable PLOTTYPE. We stop'
+  ENDCASE
+;
+END
Index: /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_IceThick.pro
===================================================================
--- /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_IceThick.pro	(revision 4183)
+++ /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_IceThick.pro	(revision 4184)
@@ -16,6 +16,6 @@
 
   filename = cdti3 + '_'+var+'_'+std_file1_I
-  if std_file1_I NE std_file2_I then filename = filename + '_'+std_file2_I
-  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+  IF std_file1_I NE std_file2_I then filename = filename + '_'+std_file2_I
+  IF KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
   
   IF keyword_set(arc) THEN BEGIN 
Index: /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_all_1Y.pro
===================================================================
--- /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_all_1Y.pro	(revision 4184)
+++ /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_all_1Y.pro	(revision 4184)
@@ -0,0 +1,415 @@
+pro std_plot_all, doplot = doplot, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common
+@std_common
+                                ; scripts for nemo v3_2 and v3_3
+
+  PRINT, ''
+  PRINT, ' 	############################################'
+  PRINT, ''
+  PRINT, '                    LAUNCH of std_plots'
+  PRINT, ''
+  PRINT, ' 	############################################'
+  PRINT, ''
+;
+  std_iodir_data    = isadirectory(getenv('DIR_DATA'),     title = 'path of data in NetCdf format')
+  std_iodir_climato = isadirectory(getenv('DIR_CLIMATO'),  title = 'path of climatological data')
+  std_iodir_mask    = isadirectory(getenv('DIR_MASK'),     title = 'path of mask files (ex: subbasins)')
+; meshmask
+  std_file_mesh = isafile(getenv('FILE_MESH_MASK'),        title = 'mesh_mask', iodir = std_iodir_mask)
+  std_file_msksub = isafile(getenv('FILE_MASK_SUBDOMAIN'), title = 'sub-bassin masks', iodir = std_iodir_mask)
+
+; climatologies
+  std_file_Levitus_T =  isafile(getenv('FILE_TEMP_3D'),    title = 'Levitus_T', iodir = std_iodir_climato)
+  std_file_Levitus_S =  isafile(getenv('FILE_SAL_3D'),     title = 'Levitus_S', iodir = std_iodir_climato)
+  std_file_reynolds  =  isafile(getenv('FILE_SST'),        title = 'Reynolds', iodir = std_iodir_climato)
+  std_file_oaflux    =  isafile(getenv('FILE_FLUX'),       title = 'oaflux', iodir = std_iodir_climato)
+  std_file_mld       =  isafile(getenv('FILE_MLD'),        title = 'Mixed layer depth', iodir = std_iodir_climato)
+  std_file_ice       =  isafile(getenv('FILE_ICE'),        title = 'ICE', iodir = std_iodir_climato)
+  std_file_snow_arc  =  isafile(getenv('FILE_SNOW_ARC'),   title = 'SNOW_ARC', iodir = std_iodir_climato)
+  std_file_snow_ant  =  isafile(getenv('FILE_SNOW_ANT'),   title = 'SNOW_ANT', iodir = std_iodir_climato)
+
+  IF strlowcase(getenv('FILE_GEOHEAT')) EQ 'no' THEN std_file_geoheat = 'no' $
+  ELSE std_file_geoheat =  isafile(getenv('FILE_GEOHEAT'), title = 'Geothermal heating', iodir = std_iodir_climato)
+;
+  allrec =  1 - keyword_set(long(getenv('READ_ONLY_FIRST_RECORD')))
+; Output run experience1
+  std_file1_T     = isafile(getenv('FILE1_T'), title = 'exp1 grid T input file', iodir = std_iodir_data)
+  std_file1_U     = isafile(getenv('FILE1_U'), title = 'exp1 grid U input file', iodir = std_iodir_data)
+  std_file1_V     = isafile(getenv('FILE1_V'), title = 'exp1 grid V input file', iodir = std_iodir_data)
+  std_file1_I     = isafile(getenv('FILE1_I'), title = 'exp1 ice    input file', iodir = std_iodir_data)
+  
+; Output run experience2
+  std_file2_T     = isafile(getenv('FILE2_T'), title = 'exp2 grid T input file', iodir = std_iodir_data)
+  std_file2_U     = isafile(getenv('FILE2_U'), title = 'exp2 grid U input file', iodir = std_iodir_data)
+  std_file2_V     = isafile(getenv('FILE2_V'), title = 'exp2 grid V input file', iodir = std_iodir_data)
+  std_file2_I     = isafile(getenv('FILE2_I'), title = 'exp2 ice    input file', iodir = std_iodir_data)
+
+  PRINT, ''
+  PRINT, '	std_iodir_data : ' + std_iodir_data 
+  PRINT, '	std_file1T : ' + std_file1_T
+  PRINT, '	std_file1U : ' + std_file1_U
+  PRINT, '	std_file1V : ' + std_file1_V
+;  PRINT, '	std_file1W : ' + std_file1_W
+  PRINT, '	std_file2I : ' + std_file1_I
+  PRINT, '	std_file2T : ' + std_file2_T
+  PRINT, '	std_file2U : ' + std_file2_U
+  PRINT, '	std_file2V : ' + std_file2_V
+;  PRINT, '	std_file2W : ' + std_file2_W
+  PRINT, '	std_file2I : ' + std_file2_I
+  PRINT, ''
+
+;#########################################################################
+;##########################  Load Grids   ################################
+;#########################################################################
+; load the grid
+  load_orca, std_file_mesh  
+; reading variables
+  masknp = read_ncdf('tmaskutil', file = std_file_mesh, /nostruct, /cont_nofill)
+;#########################################################################
+;############################  Read Data  ################################
+;#########################################################################
+;
+  allrec =  1; - keyword_set(long(getenv('READ_ONLY_FIRST_RECORD')))
+;
+;;; 3D ;;;
+; temperature
+  T1 = read_ncdf(getenv('VAR1_T'), allrecords = allrec, direc = 't', filename = std_file1_T ) 
+  IF std_file2_T NE std_file1_T THEN BEGIN
+    T2 = read_ncdf(getenv('VAR2_T'), allrecords = allrec, direc = 't', filename = std_file2_T ) 
+  ENDIF ELSE T2 = {arr:-1}
+  TLev = read_ncdf(getenv('VAR_TEMP_3D'), filename = std_file_Levitus_T ) 
+  TRey = read_ncdf(getenv('VAR_SST'), filename = std_file_reynolds ) 
+
+; salinity
+  S1 = read_ncdf(getenv('VAR1_S'), allrecords = allrec, direc = 't', filename = std_file1_T ) 
+  IF std_file2_T NE std_file1_T THEN BEGIN
+    S2 = read_ncdf(getenv('VAR2_S'), allrecords = allrec, direc = 't', filename = std_file2_T ) 
+  ENDIF ELSE S2 = {arr:-1}
+  SLev = read_ncdf(getenv('VAR_SAL_3D'), filename = std_file_Levitus_S ) 
+
+;;; 2D ;;;
+; Net Downward heat flux
+  Q1 = read_ncdf(getenv('VAR1_QNET'), allrecords = allrec, direc = 't', filename = std_file1_T ) 
+  IF std_file2_T NE std_file1_T THEN BEGIN
+    Q2 = read_ncdf(getenv('VAR2_QNET'), allrecords = allrec, direc = 't', filename = std_file2_T )
+  ENDIF ELSE Q2 = {arr:-1}
+; Geothermal heating
+  IF std_file_geoheat EQ 'no' THEN geo = {arr:float(getenv('VAR_GEOHEAT'))} $
+  ELSE geo = read_ncdf(getenv('VAR_GEOHEAT'), filename =  std_file_geoheat )
+  geo = geo.arr*1.e-3          ; convert into W/m2
+;climatology 
+  QNET = read_ncdf(getenv('VAR_FLUX'), filename = std_file_oaflux )
+
+; erp (evaporation damping)
+  ERP1 = read_ncdf(getenv('VAR1_ERP'), allrecords = allrec, direc = 't', filename = std_file1_T )
+  ERP1 = {arr:ERP1.arr * 86400., unit:'mm/day', grid:'T'}
+  IF std_file2_T NE std_file1_T THEN BEGIN
+    ERP2 = read_ncdf(getenv('VAR2_ERP'), allrecords = allrec, direc = 't', filename = std_file2_T )
+    ERP2 = {arr:ERP2.arr * 86400., unit:'mm/day', grid:'T'}
+  ENDIF ELSE ERP2 = {arr:-1}
+
+; emp (evaporation minus precipitation)
+  EMP1 = read_ncdf(getenv('VAR1_EMP'), allrecords = allrec, direc = 't', filename = std_file1_T )
+  EMP1 = {arr:EMP1.arr * 86400., unit:'mm/day', grid:'T'}
+  IF std_file2_T NE std_file1_T THEN BEGIN
+    EMP2 = read_ncdf(getenv('VAR2_EMP'), allrecords = allrec, direc = 't', filename = std_file2_T )
+    EMP2 = {arr:EMP2.arr * 86400., unit:'mm/day', grid:'T'}
+  ENDIF ELSE EMP2 = {arr:-1}
+  
+;mixed layer depth
+  MLD1 = read_ncdf(getenv('VAR1_MLD'), allrecords = allrec, direc = 't', filename = std_file1_T ) ; 10 m
+  IF std_file2_T NE std_file1_T THEN BEGIN
+    MLD2 = read_ncdf(getenv('VAR2_MLD'), allrecords = allrec, direc = 't', filename = std_file2_T ) ; 10 m
+  ENDIF ELSE MLD2 = {arr:-1}
+;climatology 
+  MLD = read_ncdf(getenv('VAR_MLD'), filename = std_file_mld )
+
+; velocities
+  U1 = read_ncdf(getenv('VAR1_U'), allrecords = allrec, direc = 't', filename = std_file1_U )
+  IF strlowcase(getenv('VAR1_U')) EQ 'uocetr_eff' THEN BEGIN
+    U1.arr = U1.arr / e3u_3d(/e2) * umask()
+    U1.unit = 'm/s'
+  ENDIF 
+  IF std_file2_U NE std_file1_U THEN BEGIN
+    U2 = read_ncdf(getenv('VAR2_U'), allrecords = allrec, direc = 't', filename = std_file2_U )
+    IF strlowcase(getenv('VAR2_U')) EQ 'uocetr_eff' THEN BEGIN
+      U2.arr = U2.arr / e3u_3d(/e2) * umask()
+      U2.unit = 'm/s'
+    ENDIF 
+  ENDIF ELSE U2 = {arr:-1}
+;
+  V1 = read_ncdf(getenv('VAR1_V'), allrecords = allrec, direc = 't', filename = std_file1_V )
+  IF strlowcase(getenv('VAR1_V')) EQ 'vocetr_eff' THEN BEGIN
+    V1.arr = V1.arr / e3v_3d(/e1) * vmask()
+    V1.unit = 'm/s'
+  ENDIF 
+  IF std_file2_V NE std_file1_V THEN BEGIN
+    V2 = read_ncdf(getenv('VAR2_V'), allrecords = allrec, direc = 't', filename = std_file2_V )
+    IF strlowcase(getenv('VAR2_V')) EQ 'vocetr_eff' THEN BEGIN
+      V2.arr = V2.arr / e3v_3d(/e1) * vmask()
+      V2.unit = 'm/s'
+    ENDIF 
+  ENDIF ELSE V2 = {arr:-1}
+
+; ice
+  Ithi_1 = read_ncdf(getenv('VAR1_Ithick'), allrecords = allrec, filename = std_file1_I ) 
+  caldat, time, mm
+  april = where(mm EQ 4, cnt)
+  Ithi_april_1 = {arr:1./float(cnt) * total(reform(Ithi_1.arr[*, *, temporary(april)],nxt,nyt,cnt), 3), unit:Ithi_1.unit}
+  sept = where(mm EQ 9, cnt)
+  Ithi_sept_1 = {arr:1./float(cnt) * total(reform(Ithi_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Ithi_1.unit} 
+  undefine, Ithi_1
+;
+  IF std_file2_I NE std_file1_I THEN BEGIN
+     Ithi_2 = read_ncdf(getenv('VAR2_Ithick'), allrecords = allrec, filename = std_file2_I ) 
+     caldat, time, mm
+     april = where(mm EQ 4, cnt)
+     Ithi_april_2 = {arr:1./float(cnt) * total(reform(Ithi_2.arr[*, *, temporary(april)],nxt,nyt,cnt), 3), unit:Ithi_2.unit} 
+     sept = where(mm EQ 9, cnt)
+     Ithi_sept_2 = {arr:1./float(cnt) * total(reform(Ithi_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Ithi_2.unit} 
+     undefine, Ithi_2
+  ENDIF ELSE BEGIN 
+     Ithi_april_2 = {arr:-1}
+     Ithi_sept_2 = {arr:-1}
+  ENDELSE
+;
+  Ifra_1 = read_ncdf(getenv('VAR1_Ifrac'), allrecords = allrec, filename = std_file1_I ) 
+  help, Ifra_1.arr, jpi,jpj
+  caldat, time, mm
+  march = where(mm EQ 3, cnt)
+  Ifra_march_1 = {arr:1./float(cnt) * total(reform(Ifra_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Ifra_1.unit} 
+  sept = where(mm EQ 9, cnt)
+  Ifra_sept_1 = {arr:1./float(cnt) * total(reform(Ifra_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Ifra_1.unit}
+  undefine, Ifra_1
+;
+  IF std_file2_I NE std_file1_I THEN BEGIN
+    Ifra_2 = read_ncdf(getenv('VAR2_Ifrac'), allrecords = allrec, filename = std_file2_I ) 
+    caldat, time, mm
+    march = where(mm EQ 3, cnt)
+    Ifra_march_2 = {arr:1./float(cnt) * total(reform(Ifra_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Ifra_2.unit}
+    sept = where(mm EQ 9, cnt)
+    Ifra_sept_2 = {arr:1./float(cnt) * total(reform(Ifra_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Ifra_2.unit}
+    undefine, Ifra_2
+  ENDIF ELSE BEGIN 
+    Ifra_march_2 = {arr:-1}
+    Ifra_sept_2 = {arr:-1}
+  ENDELSE
+;
+;; Sf commentato perché non funziona snow
+;; Sf   Isnow_1 = read_ncdf(getenv('VAR1_Isnow'), allrecords = allrec, filename = std_file1_I ) 
+;; Sf   help, Isnow_1.arr, jpi,jpj
+;; Sf   caldat, time, mm
+;; Sf   april = where(mm EQ 4, cnt)
+;; Sf   Isnow_april_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(april)],nxt,nyt,cnt), 3), unit:Isnow_1.unit} 
+;; Sf   sept = where(mm EQ 9, cnt)
+;; Sf   Isnow_sept_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isnow_1.unit}
+;; Sf   ;undefine, Isnow_1
+;; Sf ;
+;; Sf   IF std_file2_I NE std_file1_I THEN BEGIN
+;; Sf     Isnow_2 = read_ncdf(getenv('VAR2_Isnow'), allrecords = allrec, filename = std_file2_I ) 
+;; Sf     caldat, time, mm
+;; Sf     april = where(mm EQ 4, cnt)
+;; Sf     Isnow_april_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(april)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+;; Sf     sept = where(mm EQ 9, cnt)
+;; Sf     Isnow_sept_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+;; Sf   ;  undefine, Isnow_2
+;; Sf   ENDIF ELSE BEGIN 
+;; Sf     Isnow_april_2 = {arr:-1}
+;; Sf     Isnow_sept_2 = {arr:-1}
+;; Sf   ENDELSE
+;
+  jpt = 1
+;
+; shorter file names for legends...
+;
+  std_file1_T = file_basename(std_file1_T,'.nc')
+  std_file1_T = (strsplit(std_file1_T,'_grid_T',/extract,/regex))[0]
+  std_file2_T = file_basename(std_file2_T,'.nc')
+  std_file2_T = (strsplit(std_file2_T,'_grid_T',/extract,/regex))[0]
+  std_file1_U = file_basename(std_file1_U,'.nc')
+  std_file1_U = (strsplit(std_file1_U,'_grid_U',/extract,/regex))[0]
+  std_file2_U = file_basename(std_file2_U,'.nc')
+  std_file2_U = (strsplit(std_file2_U,'_grid_U',/extract,/regex))[0]
+  std_file1_V = file_basename(std_file1_V,'.nc')
+  std_file1_V = (strsplit(std_file1_V,'_grid_V',/extract,/regex))[0]
+  std_file2_V = file_basename(std_file2_V,'.nc')
+  std_file2_V = (strsplit(std_file2_V,'_grid_V',/extract,/regex))[0]
+  std_file1_I = file_basename(std_file1_I,'.nc')
+  std_file1_I = (strsplit(std_file1_I,'_icemod',/extract,/regex))[0]
+  std_file2_I = file_basename(std_file2_I,'.nc')
+  std_file2_I = (strsplit(std_file2_I,'_icemod',/extract,/regex))[0]
+
+;#########################################################################
+;######################  STANDARD PLOTS   ################################
+;#########################################################################
+
+  IF keyword_set(doplot) EQ 0 THEN doplot = 0
+
+; fixed color tabled
+  lct, 64
+  cnt = 0
+  htmltxt = ''
+;
+  cnt = cnt+1   &   blabla = 'Erp salinity damping term'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_erp, ERP1, ERP2, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Evaporation - Precipitation - Runoff term'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_emp, EMP1, EMP2, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Net heat flux'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_qnet, Q1, Q2, QNET, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Meridionnal Heat Transport'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_mht, Q1.arr+geo, Q2.arr+geo, masknp, std_file_msksub, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Global Barotropic stream Function'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_bsf, U1, U2, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'mean Temperature diff with New Reynolds'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_sst, T1, T2, TRey, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'mean Salinity diff with Levitus'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_sss, S1, S2, SLev, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Arctic mean Salinity diff with Levitus'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ArcSal, S1, SLev, _extra = ex       
+
+  cnt = cnt+1   &   blabla = 'Arctic mean Salinity diff with Levitus and exp2'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ArcSal, S1, S2, SLev, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Arctic mean Salinity diff with Levitus at z=100 meters'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ArcSal, S1, SLev, /z100, _extra = ex       
+ 
+  cnt = cnt+1   &   blabla = 'Arctic mean Salinity diff with Levitus and exp2 at z=100 meters'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ArcSal, S1, S2, SLev, /z100, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'mean Temperature diff with Levitus at z=100 meters'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_T100m, T1, T2, Tlev, _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'mean Salinity diff with Levitus at z=100 meters'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_S100m, S1, S2, SLev, _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'Mixed layer depth'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_mld, MLD1, MLD, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Mixed layer depth differences'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_mld, MLD1, MLD2, MLD, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Zonal mean Mixed layer depth'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ZonMld, MLD1, MLD2, MLD, _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'Zonal mean Temperature diff with Levitus: Global'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_T, T1, T2, TLev, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Zonal mean Temperature diff with Levitus: Atlantic'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_T, T1, T2, TLev, SUBBASIN = 'Atl', _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'Zonal mean Temperature diff with Levitus: Indian'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_T, T1, T2, TLev, SUBBASIN = 'Ind', _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'Zonal mean Temperature diff with Levitus: Pacific'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_T, T1, T2, TLev, SUBBASIN = 'Pac', _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Zonal mean Salinity diff with Levitus: Global'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_S, S1, S2, SLev, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Zonal mean Salinity diff with Levitus: Atlantic'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_S, S1, S2, SLev, SUBBASIN = 'Atl', _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Zonal mean Salinity diff with Levitus: Indian'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_S, S1, S2, SLev, SUBBASIN = 'Ind', _extra = ex 
+
+  cnt = cnt+1   &   blabla = 'Zonal mean Salinity diff with Levitus: Pacific'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_S, S1, S2, SLev, SUBBASIN = 'Pac', _extra = ex 
+  
+;  cnt = cnt+1   &   blabla = 'Arctic Ice Thickness: MARCH'
+;  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_march_1, Ithi_march_2, /ARC, /MARCH, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Arctic Ice Thickness: APRIL'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_april_1, Ithi_april_2, /ARC, /APRIL, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Arctic Ice Thickness: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_sept_1, Ithi_sept_2, /ARC, /SEPT, _extra = ex
+  
+;  cnt = cnt+1   &   blabla = 'Antarctic Ice Thickness: MARCH'
+;  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_march_1, Ithi_march_2, /ANT, /MARCH, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Thickness: APRIL'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_april_1, Ithi_april_2, /ANT, /APRIL, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Thickness: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_sept_1, Ithi_sept_2, /ANT, /SEPT, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Arctic Ice Fraction: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceFrac, Ifra_march_1, Ifra_march_2, /ARC, /MARCH, _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'Arctic Ice Fraction: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceFrac, Ifra_sept_1, Ifra_sept_2, /ARC, /SEPT, _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Fraction: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceFrac, Ifra_march_1, Ifra_march_2, /ANT, /MARCH, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Fraction: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceFrac, Ifra_sept_1, Ifra_sept_2, /ANT, /SEPT, _extra = ex
+;; SF non funziona, dice che deve essere una struttura e non e!!!!
+;;SF  cnt = cnt+1   &   blabla = 'Arctic SNOW Thickness: APRIL'
+;;SF  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_april_1, Isnow_april_2, /ARC, /APRIL, _extra = ex
+;; SF 
+;; SF   cnt = cnt+1   &   blabla = 'Arctic SNOW Thickness: SEPT'
+;; SF   IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_sept_1, Isnow_sept_2, /ARC, /SEPT, _extra = ex
+;; SF  
+;; SF   cnt = cnt+1   &   blabla = 'Antarctic SNOW Thickness: APRIL'
+;; SF   IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_april_1, Isnow_april_2, /ANT, /APRIL, _extra = ex
+;; SF  
+;; SF   cnt = cnt+1   &   blabla = 'Antarctic SNOW Thickness: SEPT'
+;; SF   IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_sept_1, Isnow_sept_2, /ANT, /SEPT, _extra = ex
+; 
+;  cnt = cnt+1   &   blabla = 'Arctic Ice Extend: '
+;  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceExt, Ifra_1, Ifra_2, masknp, /ARC,  _extra = ex
+  
+;  cnt = cnt+1   &   blabla = 'Antarctic Ice Extend: '
+;  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceExt, Ifra_1, Ifra_2, masknp, /ANT,  _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Meridional stream Function: Global (no Med)'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_msf, V1, V2, SUBBASIN = 'GloNoMed', _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Meridional stream Function: Atlantic'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_msf, V1, V2, SUBBASIN = 'Atl', _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Meridional stream Function: Indian'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_msf, V1, V2, SUBBASIN = 'Ind', _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Meridional stream Function: Indo-Pacific'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_msf, V1, V2, SUBBASIN = 'IndoPac', _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Equatorial Temperature'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_EqT, T1, T2, Tlev, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Equatorial Salinity'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_EqS, S1, S2, SLev, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Equatorial zonal velocity'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_EqU, U1, U2, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Mediterranean salt tongue at depth=700'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_Med_Sspread, S1, S2, SLev, 700, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Mediterranean salt tongue at depth=1000'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_Med_Sspread, S1, S2, SLev, 1000, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Mediterranean water at lat=40°N'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_Med_Sdepth, S1, S2, SLev, 40, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Mediterranean water at lat=38°N'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_Med_Sdepth, S1, S2, SLev, 38, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Vertical Global mean T & S'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_GlobMeanTS, T1, T2, TLev, S1, S2, SLev, _extra = ex
+
+  IF n_elements(htmltxt) GT 1 THEN putfile, psdir+'std_plot_html_body.txt', htmltxt[1:*]
+  
+  return
+END
Index: /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_all_last_year_5D.pro
===================================================================
--- /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_all_last_year_5D.pro	(revision 4184)
+++ /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_all_last_year_5D.pro	(revision 4184)
@@ -0,0 +1,451 @@
+pro std_plot_all_last_year_5D, doplot = doplot, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common
+@std_common
+                                ; scripts for nemo v3_2 and v3_3
+
+;; script for max MLD, output 5 days
+
+  PRINT, ''
+  PRINT, ' 	############################################'
+  PRINT, ''
+  PRINT, '                    LAUNCH of std_plots_last_year_5D'
+  PRINT, ''
+  PRINT, ' 	############################################'
+  PRINT, ''
+;
+  std_iodir_data    = isadirectory(getenv('DIR_DATA'),     title = 'path of data in NetCdf format')
+  std_iodir_climato = isadirectory(getenv('DIR_CLIMATO'),  title = 'path of climatological data')
+  std_iodir_mask    = isadirectory(getenv('DIR_MASK'),     title = 'path of mask files (ex: subbasins)')
+; meshmask
+  std_file_mesh = isafile(getenv('FILE_MESH_MASK'),        title = 'mesh_mask', iodir = std_iodir_mask)
+  std_file_msksub = isafile(getenv('FILE_MASK_SUBDOMAIN'), title = 'sub-bassin masks', iodir = std_iodir_mask)
+
+; climatologies
+  std_file_Levitus_T =  isafile(getenv('FILE_TEMP_3D'),    title = 'Levitus_T', iodir = std_iodir_climato)
+  std_file_Levitus_S =  isafile(getenv('FILE_SAL_3D'),     title = 'Levitus_S', iodir = std_iodir_climato)
+  std_file_reynolds  =  isafile(getenv('FILE_SST'),        title = 'Reynolds', iodir = std_iodir_climato)
+  std_file_oaflux    =  isafile(getenv('FILE_FLUX'),       title = 'oaflux', iodir = std_iodir_climato)
+  std_file_mld       =  isafile(getenv('FILE_MLD'),        title = 'Mixed layer depth', iodir = std_iodir_climato)
+  std_file_ice       =  isafile(getenv('FILE_ICE'),        title = 'ICE', iodir = std_iodir_climato)
+  std_file_snow_arc  =  isafile(getenv('FILE_SNOW_ARC'),   title = 'SNOW_ARC', iodir = std_iodir_climato)
+  std_file_snow_ant  =  isafile(getenv('FILE_SNOW_ANT'),   title = 'SNOW_ANT', iodir = std_iodir_climato)
+
+  IF strlowcase(getenv('FILE_GEOHEAT')) EQ 'no' THEN std_file_geoheat = 'no' $
+  ELSE std_file_geoheat =  isafile(getenv('FILE_GEOHEAT'), title = 'Geothermal heating', iodir = std_iodir_climato)
+;
+  allrec =  1 - keyword_set(long(getenv('READ_ONLY_FIRST_RECORD')))
+; Output run experience1
+  std_file1_T     = isafile(getenv('FILE1_T'), title = 'exp1 grid T input file', iodir = std_iodir_data)
+  std_file1_U     = isafile(getenv('FILE1_U'), title = 'exp1 grid U input file', iodir = std_iodir_data)
+  std_file1_V     = isafile(getenv('FILE1_V'), title = 'exp1 grid V input file', iodir = std_iodir_data)
+  std_file1_I     = isafile(getenv('FILE1_I'), title = 'exp1 ice    input file', iodir = std_iodir_data)
+  
+; Output run experience2
+  std_file2_T     = isafile(getenv('FILE2_T'), title = 'exp2 grid T input file', iodir = std_iodir_data)
+  std_file2_U     = isafile(getenv('FILE2_U'), title = 'exp2 grid U input file', iodir = std_iodir_data)
+  std_file2_V     = isafile(getenv('FILE2_V'), title = 'exp2 grid V input file', iodir = std_iodir_data)
+  std_file2_I     = isafile(getenv('FILE2_I'), title = 'exp2 ice    input file', iodir = std_iodir_data)
+
+  PRINT, ''
+  PRINT, '	std_iodir_data : ' + std_iodir_data 
+  PRINT, '	std_file1T : ' + std_file1_T
+  PRINT, '	std_file1U : ' + std_file1_U
+  PRINT, '	std_file1V : ' + std_file1_V
+;  PRINT, '	std_file1W : ' + std_file1_W
+  PRINT, '	std_file2I : ' + std_file1_I
+  PRINT, '	std_file2T : ' + std_file2_T
+  PRINT, '	std_file2U : ' + std_file2_U
+  PRINT, '	std_file2V : ' + std_file2_V
+;  PRINT, '	std_file2W : ' + std_file2_W
+  PRINT, '	std_file2I : ' + std_file2_I
+  PRINT, ''
+
+;#########################################################################
+;##########################  Load Grids   ################################
+;#########################################################################
+; load the grid
+  load_orca, std_file_mesh  
+; reading variables
+  masknp = read_ncdf('tmaskutil', file = std_file_mesh, /nostruct, /cont_nofill)
+;#########################################################################
+;############################  Read Data  ################################
+;#########################################################################
+;
+  allrec =  1; - keyword_set(long(getenv('READ_ONLY_FIRST_RECORD')))
+;
+;;; 3D ;;;
+; temperature
+  T1 = read_ncdf(getenv('VAR1_T'), allrecords = allrec, direc = 't', filename = std_file1_T ) 
+  IF std_file2_T NE std_file1_T THEN BEGIN
+    T2 = read_ncdf(getenv('VAR2_T'), allrecords = allrec, direc = 't', filename = std_file2_T ) 
+  ENDIF ELSE T2 = {arr:-1}
+  TLev = read_ncdf(getenv('VAR_TEMP_3D'), filename = std_file_Levitus_T ) 
+  TRey = read_ncdf(getenv('VAR_SST'), filename = std_file_reynolds ) 
+
+; salinity
+  S1 = read_ncdf(getenv('VAR1_S'), allrecords = allrec, direc = 't', filename = std_file1_T ) 
+  IF std_file2_T NE std_file1_T THEN BEGIN
+    S2 = read_ncdf(getenv('VAR2_S'), allrecords = allrec, direc = 't', filename = std_file2_T ) 
+  ENDIF ELSE S2 = {arr:-1}
+  SLev = read_ncdf(getenv('VAR_SAL_3D'), filename = std_file_Levitus_S ) 
+
+;;; 2D ;;;
+; Net Downward heat flux
+  Q1 = read_ncdf(getenv('VAR1_QNET'), allrecords = allrec, direc = 't', filename = std_file1_T ) 
+  IF std_file2_T NE std_file1_T THEN BEGIN
+    Q2 = read_ncdf(getenv('VAR2_QNET'), allrecords = allrec, direc = 't', filename = std_file2_T )
+  ENDIF ELSE Q2 = {arr:-1}
+; Geothermal heating
+  IF std_file_geoheat EQ 'no' THEN geo = {arr:float(getenv('VAR_GEOHEAT'))} $
+  ELSE geo = read_ncdf(getenv('VAR_GEOHEAT'), filename =  std_file_geoheat )
+  geo = geo.arr*1.e-3          ; convert into W/m2
+;climatology 
+  QNET = read_ncdf(getenv('VAR_FLUX'), filename = std_file_oaflux )
+
+; erp (evaporation damping)
+  ERP1 = read_ncdf(getenv('VAR1_ERP'), allrecords = allrec, direc = 't', filename = std_file1_T )
+  ERP1 = {arr:ERP1.arr * 86400., unit:'mm/day', grid:'T'}
+  IF std_file2_T NE std_file1_T THEN BEGIN
+    ERP2 = read_ncdf(getenv('VAR2_ERP'), allrecords = allrec, direc = 't', filename = std_file2_T )
+    ERP2 = {arr:ERP2.arr * 86400., unit:'mm/day', grid:'T'}
+  ENDIF ELSE ERP2 = {arr:-1}
+
+; emp (evaporation minus precipitation)
+  EMP1 = read_ncdf(getenv('VAR1_EMP'), allrecords = allrec, direc = 't', filename = std_file1_T )
+  EMP1 = {arr:EMP1.arr * 86400., unit:'mm/day', grid:'T'}
+  IF std_file2_T NE std_file1_T THEN BEGIN
+    EMP2 = read_ncdf(getenv('VAR2_EMP'), allrecords = allrec, direc = 't', filename = std_file2_T )
+    EMP2 = {arr:EMP2.arr * 86400., unit:'mm/day', grid:'T'}
+  ENDIF ELSE EMP2 = {arr:-1}
+  
+  ;mixed layer depth
+  ;; nyear=jpt/73
+  MLD_1 = read_ncdf(getenv('VAR1_MLD'), allrecords = allrec, filename = std_file1_T ) 
+  caldat, time, mm
+  march = where(mm EQ 3, cnt)
+  MLD_march_1 = max(MLD_1.arr[*,*,march], dim=3)
+  MLD_march_1 = {arr: MLD_march_1, unit: MLD_1.unit}
+  sept = where(mm EQ 9, cnt)
+  MLD_sept_1 = max(MLD_1.arr[*,*,sept], dim=3) 
+  MLD_sept_1 = {arr: MLD_sept_1, unit: MLD_1.unit}
+  MLD_1 = {arr: max(MLD_1.arr[*,*,*], dim=3), unit: MLD_1.unit}
+  IF std_file2_T NE std_file1_T THEN BEGIN
+    MLD_2 = read_ncdf(getenv('VAR2_MLD'), allrecords = allrec, filename = std_file2_T ) ; 10 m
+    caldat, time, mm
+    march = where(mm EQ 3, cnt)
+    MLD_march_2 = max(MLD_2.arr[*,*,march], dim=3)
+    MLD_march_2 = {arr: MLD_march_2, unit: MLD_2.unit}
+    sept = where(mm EQ 9, cnt)
+    MLD_sept_2 = max(MLD_2.arr[*,*,sept], dim=3) 
+    MLD_sept_2 = {arr:MLD_sept_2, unit: MLD_2.unit}
+    MLD_2 = {arr: max(MLD_2.arr[*,*,*], dim=3), unit: MLD_2.unit}
+  ENDIF ELSE BEGIN
+    MLD_2 = {arr:-1}
+    MLD_march_2 = {arr:-1}
+    MLD_sept_2 = {arr:-1}
+  ENDELSE
+  
+  ;climatology 
+  MLD = read_ncdf(getenv('VAR_MLD'), filename = std_file_mld )
+; if monthly climatology
+;  MLD = {arr: max(MLD.arr[*,*,*], dim=3), unit: MLD.unit} 
+
+; velocities
+  U1 = read_ncdf(getenv('VAR1_U'), allrecords = allrec, direc = 't', filename = std_file1_U )
+  IF strlowcase(getenv('VAR1_U')) EQ 'uocetr_eff' THEN BEGIN
+    U1.arr = U1.arr / e3u_3d(/e2) * umask()
+    U1.unit = 'm/s'
+  ENDIF 
+  IF std_file2_U NE std_file1_U THEN BEGIN
+    U2 = read_ncdf(getenv('VAR2_U'), allrecords = allrec, direc = 't', filename = std_file2_U )
+    IF strlowcase(getenv('VAR2_U')) EQ 'uocetr_eff' THEN BEGIN
+      U2.arr = U2.arr / e3u_3d(/e2) * umask()
+      U2.unit = 'm/s'
+    ENDIF 
+  ENDIF ELSE U2 = {arr:-1}
+;
+  V1 = read_ncdf(getenv('VAR1_V'), allrecords = allrec, direc = 't', filename = std_file1_V )
+  IF strlowcase(getenv('VAR1_V')) EQ 'vocetr_eff' THEN BEGIN
+    V1.arr = V1.arr / e3v_3d(/e1) * vmask()
+    V1.unit = 'm/s'
+  ENDIF 
+  IF std_file2_V NE std_file1_V THEN BEGIN
+    V2 = read_ncdf(getenv('VAR2_V'), allrecords = allrec, direc = 't', filename = std_file2_V )
+    IF strlowcase(getenv('VAR2_V')) EQ 'vocetr_eff' THEN BEGIN
+      V2.arr = V2.arr / e3v_3d(/e1) * vmask()
+      V2.unit = 'm/s'
+    ENDIF 
+  ENDIF ELSE V2 = {arr:-1}
+
+; ice
+  Ithi_1 = read_ncdf(getenv('VAR1_Ithick'), allrecords = allrec, filename = std_file1_I ) 
+  caldat, time, mm
+  april = where(mm EQ 4, cnt)
+  Ithi_april_1 = {arr:1./float(cnt) * total(reform(Ithi_1.arr[*, *, temporary(april)],nxt,nyt,cnt), 3), unit:Ithi_1.unit}
+  sept = where(mm EQ 9, cnt)
+  Ithi_sept_1 = {arr:1./float(cnt) * total(reform(Ithi_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Ithi_1.unit} 
+  undefine, Ithi_1
+;
+  IF std_file2_I NE std_file1_I THEN BEGIN
+     Ithi_2 = read_ncdf(getenv('VAR2_Ithick'), allrecords = allrec, filename = std_file2_I ) 
+     caldat, time, mm
+     april = where(mm EQ 4, cnt)
+     Ithi_april_2 = {arr:1./float(cnt) * total(reform(Ithi_2.arr[*, *, temporary(april)],nxt,nyt,cnt), 3), unit:Ithi_2.unit} 
+     sept = where(mm EQ 9, cnt)
+     Ithi_sept_2 = {arr:1./float(cnt) * total(reform(Ithi_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Ithi_2.unit} 
+     undefine, Ithi_2
+  ENDIF ELSE BEGIN 
+     Ithi_april_2 = {arr:-1}
+     Ithi_sept_2 = {arr:-1}
+  ENDELSE
+;
+  Ifra_1 = read_ncdf(getenv('VAR1_Ifrac'), allrecords = allrec, filename = std_file1_I ) 
+  ;; help, Ifra_1.arr, jpi,jpj
+  caldat, time, mm
+  march = where(mm EQ 3, cnt)
+  Ifra_march_1 = {arr:1./float(cnt) * total(reform(Ifra_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Ifra_1.unit} 
+  sept = where(mm EQ 9, cnt)
+  Ifra_sept_1 = {arr:1./float(cnt) * total(reform(Ifra_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Ifra_1.unit}
+  undefine, Ifra_1
+;
+  IF std_file2_I NE std_file1_I THEN BEGIN
+    Ifra_2 = read_ncdf(getenv('VAR2_Ifrac'), allrecords = allrec, filename = std_file2_I ) 
+    caldat, time, mm
+    march = where(mm EQ 3, cnt)
+    Ifra_march_2 = {arr:1./float(cnt) * total(reform(Ifra_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Ifra_2.unit}
+    sept = where(mm EQ 9, cnt)
+    Ifra_sept_2 = {arr:1./float(cnt) * total(reform(Ifra_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Ifra_2.unit}
+    undefine, Ifra_2
+  ENDIF ELSE BEGIN 
+    Ifra_march_2 = {arr:-1}
+    Ifra_sept_2 = {arr:-1}
+  ENDELSE
+;
+;; SF commentato perché non funziona snow
+;; SF   Isnow_1 = read_ncdf(getenv('VAR1_Isnow'), allrecords = allrec, filename = std_file1_I ) 
+;; SF   help, Isnow_1.arr, jpi,jpj
+;; SF   caldat, time, mm
+;; SF   april = where(mm EQ 4, cnt)
+;; SF   Isnow_april_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(april)],nxt,nyt,cnt), 3), unit:Isnow_1.unit} 
+;; SF   sept = where(mm EQ 9, cnt)
+;; SF   Isnow_sept_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isnow_1.unit}
+;; SF   ;undefine, Isnow_1
+;; SF ;
+;; SF   IF std_file2_I NE std_file1_I THEN BEGIN
+;; SF     Isnow_2 = read_ncdf(getenv('VAR2_Isnow'), allrecords = allrec, filename = std_file2_I ) 
+;; SF     caldat, time, mm
+;; SF     april = where(mm EQ 4, cnt)
+;; SF     Isnow_april_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(april)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+;; SF     sept = where(mm EQ 9, cnt)
+;; SF     Isnow_sept_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+;; SF   ;  undefine, Isnow_2
+;; SF   ENDIF ELSE BEGIN 
+;; SF     Isnow_april_2 = {arr:-1}
+;; SF     Isnow_sept_2 = {arr:-1}
+;; SF   ENDELSE
+;
+  jpt = 1
+;
+; shorter file names for legends...
+;
+  std_file1_T = file_basename(std_file1_T,'.nc')
+  std_file1_T = (strsplit(std_file1_T,'_grid_T',/extract,/regex))[0]
+  std_file2_T = file_basename(std_file2_T,'.nc')
+  std_file2_T = (strsplit(std_file2_T,'_grid_T',/extract,/regex))[0]
+  std_file1_U = file_basename(std_file1_U,'.nc')
+  std_file1_U = (strsplit(std_file1_U,'_grid_U',/extract,/regex))[0]
+  std_file2_U = file_basename(std_file2_U,'.nc')
+  std_file2_U = (strsplit(std_file2_U,'_grid_U',/extract,/regex))[0]
+  std_file1_V = file_basename(std_file1_V,'.nc')
+  std_file1_V = (strsplit(std_file1_V,'_grid_V',/extract,/regex))[0]
+  std_file2_V = file_basename(std_file2_V,'.nc')
+  std_file2_V = (strsplit(std_file2_V,'_grid_V',/extract,/regex))[0]
+  std_file1_I = file_basename(std_file1_I,'.nc')
+  std_file1_I = (strsplit(std_file1_I,'_icemod',/extract,/regex))[0]
+  std_file2_I = file_basename(std_file2_I,'.nc')
+  std_file2_I = (strsplit(std_file2_I,'_icemod',/extract,/regex))[0]
+
+;#########################################################################
+;######################  STANDARD PLOTS   ################################
+;#########################################################################
+
+  IF keyword_set(doplot) EQ 0 THEN doplot = 0
+
+; fixed color tabled
+  lct, 64
+  cnt = 0
+  htmltxt = ''
+;
+  cnt = cnt+1   &   blabla = 'Erp salinity damping term'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_erp, ERP1, ERP2, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Evaporation - Precipitation - Runoff term'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_emp, EMP1, EMP2, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Net heat flux'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_qnet, Q1, Q2, QNET, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Meridionnal Heat Transport'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_mht, Q1.arr+geo, Q2.arr+geo, masknp, std_file_msksub, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Global Barotropic stream Function'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_bsf, U1, U2, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'mean Temperature diff with New Reynolds'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_sst, T1, T2, TRey, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'mean Salinity diff with Levitus'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_sss, S1, S2, SLev, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Arctic mean Salinity diff with Levitus'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ArcSal, S1, SLev, _extra = ex       
+
+  cnt = cnt+1   &   blabla = 'Arctic mean Salinity diff with Levitus and exp2'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ArcSal, S1, S2, SLev, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Arctic mean Salinity diff with Levitus at z=100 meters'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ArcSal, S1, SLev, /z100, _extra = ex       
+ 
+  cnt = cnt+1   &   blabla = 'Arctic mean Salinity diff with Levitus and exp2 at z=100 meters'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ArcSal, S1, S2, SLev, /z100, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'mean Temperature diff with Levitus at z=100 meters'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_T100m, T1, T2, Tlev, _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'mean Salinity diff with Levitus at z=100 meters'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_S100m, S1, S2, SLev, _extra = ex
+ 
+;;SF need monthly climatology to plot difference of MAX of MLD  
+  cnt = cnt+1   &   blabla = 'Mixed layer depth & difference with DeBoyer'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_mld, MLD_1, MLD, _extra = ex
+   
+  cnt = cnt+1   &   blabla = 'Mixed layer depth differences'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_mld, MLD_1, MLD_2, MLD, _extra = ex
+
+  ;SF: add 2 cases for max of Mixed Layer depth on march & septembre
+  cnt = cnt+1   &   blabla = 'Mixed layer depth on March'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_max_mld, MLD_march_1, MLD_march_2, /MARCH, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Mixed layer depth on September'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_max_mld, MLD_sept_1, MLD_sept_2, /SEPT, _extra = ex
+
+;; SF: commented because not ok for max MLD, output 5 days
+;; cnt = cnt+1   &   blabla = 'Zonal mean Mixed layer depth'
+;; IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_ZonMld, MLD_1, MLD_2, MLD, _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'Zonal mean Temperature diff with Levitus: Global'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_T, T1, T2, TLev, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Zonal mean Temperature diff with Levitus: Atlantic'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_T, T1, T2, TLev, SUBBASIN = 'Atl', _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'Zonal mean Temperature diff with Levitus: Indian'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_T, T1, T2, TLev, SUBBASIN = 'Ind', _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'Zonal mean Temperature diff with Levitus: Pacific'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_T, T1, T2, TLev, SUBBASIN = 'Pac', _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Zonal mean Salinity diff with Levitus: Global'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_S, S1, S2, SLev, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Zonal mean Salinity diff with Levitus: Atlantic'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_S, S1, S2, SLev, SUBBASIN = 'Atl', _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Zonal mean Salinity diff with Levitus: Indian'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_S, S1, S2, SLev, SUBBASIN = 'Ind', _extra = ex 
+
+  cnt = cnt+1   &   blabla = 'Zonal mean Salinity diff with Levitus: Pacific'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_zonal_S, S1, S2, SLev, SUBBASIN = 'Pac', _extra = ex 
+  
+;  cnt = cnt+1   &   blabla = 'Arctic Ice Thickness: MARCH'
+;  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_march_1, Ithi_march_2, /ARC, /MARCH, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Arctic Ice Thickness: APRIL'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_april_1, Ithi_april_2, /ARC, /APRIL, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Arctic Ice Thickness: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_sept_1, Ithi_sept_2, /ARC, /SEPT, _extra = ex
+  
+;  cnt = cnt+1   &   blabla = 'Antarctic Ice Thickness: MARCH'
+;  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_march_1, Ithi_march_2, /ANT, /MARCH, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Thickness: APRIL'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_april_1, Ithi_april_2, /ANT, /APRIL, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Thickness: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_sept_1, Ithi_sept_2, /ANT, /SEPT, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Arctic Ice Fraction: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceFrac, Ifra_march_1, Ifra_march_2, /ARC, /MARCH, _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'Arctic Ice Fraction: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceFrac, Ifra_sept_1, Ifra_sept_2, /ARC, /SEPT, _extra = ex
+  
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Fraction: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceFrac, Ifra_march_1, Ifra_march_2, /ANT, /MARCH, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Fraction: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceFrac, Ifra_sept_1, Ifra_sept_2, /ANT, /SEPT, _extra = ex
+
+;; SF non funziona, dice che deve essere una struttura e non e!!!!
+;;SF  cnt = cnt+1   &   blabla = 'Arctic SNOW Thickness: APRIL'
+;;SF  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_april_1, Isnow_april_2, /ARC, /APRIL, _extra = ex
+;; SF 
+;; SF   cnt = cnt+1   &   blabla = 'Arctic SNOW Thickness: SEPT'
+;; SF   IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_sept_1, Isnow_sept_2, /ARC, /SEPT, _extra = ex
+;; SF  
+;; SF   cnt = cnt+1   &   blabla = 'Antarctic SNOW Thickness: APRIL'
+;; SF   IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_april_1, Isnow_april_2, /ANT, /APRIL, _extra = ex
+;; SF  
+;; SF   cnt = cnt+1   &   blabla = 'Antarctic SNOW Thickness: SEPT'
+;; SF   IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_sept_1, Isnow_sept_2, /ANT, /SEPT, _extra = ex
+; 
+;  cnt = cnt+1   &   blabla = 'Arctic Ice Extend: '
+;  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceExt, Ifra_1, Ifra_2, masknp, /ARC,  _extra = ex
+  
+;  cnt = cnt+1   &   blabla = 'Antarctic Ice Extend: '
+;  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceExt, Ifra_1, Ifra_2, masknp, /ANT,  _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Meridional stream Function: Global (no Med)'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_msf, V1, V2, SUBBASIN = 'GloNoMed', _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Meridional stream Function: Atlantic'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_msf, V1, V2, SUBBASIN = 'Atl', _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Meridional stream Function: Indian'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_msf, V1, V2, SUBBASIN = 'Ind', _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Meridional stream Function: Indo-Pacific'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_msf, V1, V2, SUBBASIN = 'IndoPac', _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Equatorial Temperature'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_EqT, T1, T2, Tlev, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Equatorial Salinity'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_EqS, S1, S2, SLev, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Equatorial zonal velocity'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_EqU, U1, U2, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Mediterranean salt tongue at depth=700'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_Med_Sspread, S1, S2, SLev, 700, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Mediterranean salt tongue at depth=1000'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_Med_Sspread, S1, S2, SLev, 1000, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Mediterranean water at lat=40°N'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_Med_Sdepth, S1, S2, SLev, 40, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Mediterranean water at lat=38°N'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_Med_Sdepth, S1, S2, SLev, 38, _extra = ex
+
+  cnt = cnt+1   &   blabla = 'Vertical Global mean T & S'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_GlobMeanTS, T1, T2, TLev, S1, S2, SLev, _extra = ex
+
+  IF n_elements(htmltxt) GT 1 THEN putfile, psdir+'std_plot_html_body.txt', htmltxt[1:*]
+  
+  return
+END
Index: /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_max_mld.pro
===================================================================
--- /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_max_mld.pro	(revision 4184)
+++ /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_max_mld.pro	(revision 4184)
@@ -0,0 +1,70 @@
+pro std_plot_max_mld, MLD1, MLD2, MARCH = march, SEPT = sept, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+;
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  
+  var = 'max_MLD'
+  IF keyword_set(march) THEN var = var+'_March'
+  IF keyword_set(sept) THEN var = var+'_Sept'
+  
+  filename = cdti3 + '_'+var+'_'+std_file1_T
+  IF std_file1_T NE std_file2_T then filename = filename + '_'+std_file2_T
+  IF KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+;
+  varunit = MLD1.unit
+  titleorg =  var+'!C'
+;
+;;   IF MLD2.arr[0] NE -1  THEN BEGIN
+;;     title = titleorg+std_file1_T+ ' - '+std_file2_T
+;;     plt, MLD1.arr - MLD2.arr, MIN = -80., MAX = 80., INTER = 10., FORMAT = '(I3)'  $
+;;          , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, /NOCONTOUR, /PORTRAIT, _extra = ex
+;;   ENDIF ELSE BEGIN 
+;;     title = titleorg+std_file1_T
+;;     plt, MLD1,label=4, cb_label=[0, 15, 25, 50, 75, 100, 125, 150, 250, 400, 600, 850],/NOCONTOUR,FORMAT = '(I3)' $
+;;        , small = [1, 2, 1],COAST_THICK = 2, TITLE = title, /PORTRAIT, _extra = ex
+;;  ;
+;;  ;ORI SF    plt, MLD1, MIN = 0., MAX = 500., INTER = 25., /NOCONTOUR, FORMAT = '(I3)' $
+;;  ;ORI SF         , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, /PORTRAIT, _extra = ex
+;;  ;
+;;    ENDELSE 
+;
+
+   IF MLD2.arr[0] NE -1  THEN BEGIN
+     title = titleorg+ std_file2_T
+     ; plt, MLD2.arr, MIN = 0., MAX = 800., INTER = 50., FORMAT = '(I3)'  $
+     plt, MLD2.arr, label=4, cb_label=[0, 15, 25, 50, 75, 100, 125, 150, 250, 400, 600, 850],FORMAT = '(I3)' $
+          , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, /NOCONTOUR, /PORTRAIT, _extra = ex   
+     ;
+     title = titleorg+std_file1_T+ ' - '+std_file2_T
+     plt, MLD1.arr - MLD2.arr, MIN = -80., MAX = 80., INTER = 10., FORMAT = '(I3)'  $
+          , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, /NOCONTOUR, /PORTRAIT, _extra = ex
+   ENDIF ELSE BEGIN 
+     title = titleorg+std_file1_T
+     plt, MLD1,label=4, cb_label=[0, 15, 25, 50, 75, 100, 125, 150, 250, 400, 600, 850],/NOCONTOUR,FORMAT = '(I3)' $
+        , small = [1, 2, 1],COAST_THICK = 2, TITLE = title, /PORTRAIT, _extra = ex
+   ENDELSE
+
+
+  
+;;  IF MLD2.arr[0] NE -1  THEN BEGIN
+;;    title = titleorg+std_file2_T+ ' - DeBoyer'
+;;    tmp = MLD2.arr - MLD.arr
+;;  ENDIF ELSE BEGIN 
+;;    title = titleorg+std_file1_T+ ' - DeBoyer'
+;;    tmp = MLD1.arr - MLD.arr
+;;  ENDELSE
+;;  plt, temporary(tmp), MIN = -80., MAX = 80., INTER = 10., FORMAT = '(I3)'  $
+;;       , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, /NOCONTOUR, /NOERASE, _extra = ex
+;  
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+;
+  return
+end
+
Index: /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_vardef.sh
===================================================================
--- /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_vardef.sh	(revision 4183)
+++ /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_vardef.sh	(revision 4184)
@@ -21,6 +21,6 @@
 #idl_command=idl71
 #
-PS_DIR=$( pwd )/qsriceok_ps_plot
-PDF_DIR=$( pwd )/qsriceok_pdf_plot
+PS_DIR=$( pwd )/l3fwb178_plot_lastyear_ps
+PDF_DIR=$( pwd )/l3fwb178_plot_lastyear_pdf
 HTML_DIR=$( pwd )/html_plot
 SAXO_DIR=/Users/sflod/SAXO_DIR
@@ -55,12 +55,12 @@
 #===================== EXP1 =====================
 #
-#FILE1_T=qsriceok_20010101_21001231_1Y_grid_T.nc   # exp1 grid T input file
-#FILE1_U=qsriceok_20010101_21001231_1Y_grid_U.nc   # exp1 grid U input file
-#FILE1_V=qsriceok_20010101_21001231_1Y_grid_V.nc   # exp1 grid V input file
-#FILE1_I=qsriceok_20010101_21001231_1M_icemod.nc   # exp1 ice    input file
-FILE1_T=qsriceok_24910101_25001231_1Y_grid_T.nc   # exp1 grid T input file
-FILE1_U=qsriceok_24910101_25001231_1Y_grid_U.nc   # exp1 grid U input file
-FILE1_V=qsriceok_24910101_25001231_1Y_grid_V.nc   # exp1 grid V input file
-FILE1_I=qsriceok_24910101_25001231_1M_icemod.nc   # exp1 ice    input file
+#FILE1_T=l3fwb178_24910101_25001231_1Y_grid_T.nc   # exp1 grid T input file
+#FILE1_U=l3fwb178_24910101_25001231_1Y_grid_U.nc   # exp1 grid U input file
+#FILE1_V=l3fwb178_24910101_25001231_1Y_grid_V.nc   # exp1 grid V input file
+#FILE1_I=l3fwb178_24910101_25001231_1M_icemod.nc   # exp1 ice    input file
+FILE1_T=l3fwb178_25010101_25011231_5D_grid_T.nc   # exp1 grid T input file
+FILE1_U=l3fwb178_25010101_25011231_5D_grid_U.nc   # exp1 grid U input file
+FILE1_V=l3fwb178_25010101_25011231_5D_grid_V.nc   # exp1 grid V input file
+FILE1_I=l3fwb178_25010101_25011231_5D_icemod.nc   # exp1 ice    input file
 VAR1_T=votemper         
 VAR1_S=vosaline         
@@ -68,8 +68,11 @@
 VAR1_ERP=sowafldp      
 VAR1_EMP=sowaflup       
-VAR1_MLD=somxl010
+#VAR1_MLD=somxl010
+VAR1_MLD=max5dmld
+#VAR1_U=uocetr_eff
 #VAR1_U=uoce
 #VAR1_U=vozocrtx
 VAR1_U=vozoeftr
+#VAR1_V=vocetr_eff
 #VAR1_V=voce
 VAR1_V=vomeeftr
@@ -81,12 +84,16 @@
 #===================== EXP2 =====================
 #
-#FILE2_T=qsriceok_20010101_21001231_1Y_grid_T.nc   # exp1 grid T input file
-#FILE2_U=qsriceok_20010101_21001231_1Y_grid_U.nc   # exp1 grid U input file
-#FILE2_V=qsriceok_20010101_21001231_1Y_grid_V.nc   # exp1 grid V input file
-#FILE2_I=qsriceok_20010101_21001231_1M_icemod.nc   # exp1 ice    input file
-FILE2_T=qsriceok_24910101_25001231_1Y_grid_T.nc   # exp1 grid T input file
-FILE2_U=qsriceok_24910101_25001231_1Y_grid_U.nc   # exp1 grid U input file
-FILE2_V=qsriceok_24910101_25001231_1Y_grid_V.nc   # exp1 grid V input file
-FILE2_I=qsriceok_24910101_25001231_1M_icemod.nc   # exp1 ice    input file
+#FILE2_T=l3fwb178_24910101_25001231_1Y_grid_T.nc   # exp1 grid T input file
+#FILE2_U=l3fwb178_24910101_25001231_1Y_grid_U.nc   # exp1 grid U input file
+#FILE2_V=l3fwb178_24910101_25001231_1Y_grid_V.nc   # exp1 grid V input file
+#FILE2_I=l3fwb178_24910101_25001231_1M_icemod.nc   # exp1 ice    input file
+FILE2_T=l3fwb178_25010101_25011231_5D_grid_T.nc   # exp1 grid T input file
+FILE2_U=l3fwb178_25010101_25011231_5D_grid_U.nc   # exp1 grid U input file
+FILE2_V=l3fwb178_25010101_25011231_5D_grid_V.nc   # exp1 grid V input file
+FILE2_I=l3fwb178_25010101_25011231_5D_icemod.nc   # exp1 ice    input file
+#FILE2_T=l378sal6_25010101_25011231_5D_grid_T.nc   # exp1 grid T input file
+#FILE2_U=l378sal6_25010101_25011231_5D_grid_U.nc   # exp1 grid U input file
+#FILE2_V=l378sal6_25010101_25011231_5D_grid_V.nc   # exp1 grid V input file
+#FILE2_I=l378sal6_25010101_25011231_5D_icemod.nc   # exp1 ice    input file
 VAR2_T=votemper
 VAR2_S=vosaline
@@ -94,7 +101,10 @@
 VAR2_ERP=sowafldp
 VAR2_EMP=sowaflup
-VAR2_MLD=somxl010
+#VAR2_MLD=somxl010
+VAR2_MLD=max5dmld
+#VAR2_U=uoce_eff
 #VAR2_U=uoce
 VAR2_U=vozoeftr
+#VAR2_V=vocetr_eff
 #VAR2_V=voce
 VAR2_V=vomeeftr
Index: /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_vardef.sh.last_year_5D
===================================================================
--- /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_vardef.sh.last_year_5D	(revision 4184)
+++ /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_plot_vardef.sh.last_year_5D	(revision 4184)
@@ -0,0 +1,143 @@
+#!/bin/sh 
+#
+# AUTHOR - date
+# ===========
+# Sebastien Masson - 04/2011 - LOCEAN
+#
+# DESCRIPTION
+# ===========
+# define all varibles needed by std_plot.sh and std_plot.pro
+#
+# EXAMPLES
+# ========
+# $ . ./std_plot_vardef.sh
+#
+#
+#===================== User PATHS =====================
+#
+#idl_command=/Applications/itt/idl64/bin/idl
+idl_command=/Applications/itt/idl71/bin/idl
+#idl_command=/usr/local_linux/idl/idl_6.4/idl64/bin/idl
+#idl_command=idl71
+#
+PS_DIR=$( pwd )/l3fwb178-plot_lastyear_ps
+PDF_DIR=$( pwd )/l3fwb178_plot_lastyear_pdf
+HTML_DIR=$( pwd )/html_plot
+SAXO_DIR=/Users/sflod/SAXO_DIR
+#
+DIR_DATA=/Users/sflod/idl_PLOTS/DATA_STORE/RUN_CLIMATO/lim3_ada     # path of data in NetCDF format
+DIR_CLIMATO=/Users/sflod/idl_PLOTS/CLIMATOLOGIES    # path of climatological data
+DIR_MASK=/Users/sflod/idl_PLOTS/MASK  # path of mask files (ex: subbasins)
+#
+#===================== Model GRID =====================
+#
+FILE_MESH_MASK=/Users/sflod/idl_PLOTS/MASK/ORL2PISV35_mesh_mask.nc # meshmask
+FILE_MASK_SUBDOMAIN=subbasins_orca21_nored.nc              # sub-bassin masks
+#
+#===================== DATA =====================
+#
+VAR_TEMP_3D=votemper     ;   FILE_TEMP_3D=potT_annual_mean.nc                         # PHC3
+VAR_SAL_3D=vosaline      ;   FILE_SAL_3D=Salt_1y_corr_PHC3WOA09.nc                    # PHC3
+VAR_SST=sst              ;   FILE_SST=NewREY_ORCA2_1991_2000_1y.nc                   # Reynolds
+VAR_FLUX=qnet            ;   FILE_FLUX=OAFlux_1my_01_12_1984_2004_orca2_qnet.nc      # flux
+VAR_MLD=mld              ;   FILE_MLD=mld_DR003_c1m_ORCA2_1y.nc                      # Mixed layer depth
+VAR_ICE_EXT_NH=extt_NH   ;   FILE_ICE=sea_ice_index_2000.nc                               # Ice Extent North Emisphere
+VAR_ICE_EXT_SH=extt_SH   ;   FILE_ICE=sea_ice_index_2000.nc                               # Ice Extent South Emisphere
+VAR_ICE_area_NH=area_NH  ;   FILE_ICE=sea_ice_index_2000.nc                               # Ice Area North Emisphere
+VAR_ICE_area_SH=area_SH  ;   FILE_ICE=sea_ice_index_2000.nc                               # Ice Area South Emisphere
+VAR_SNOW_NH=SnowDepth    ;   FILE_SNOW_ARC=Warren99_1954_1991_arctic_snowdepth.nc    # Snow arctic 
+VAR_SNOW_SH=sno_dept_mm  ;   FILE_SNOW_ANT=SMMR_SSMI_antarc_sno_dep_mm1979_2004.nc   # Snow antartic
+#
+# Geothermal heating -> define FILE_GEOHEAT to 'NO' if there is not such forcing
+#                    -> define VAR_GEOHEAT to a constant if geothermal heating is constant over the domain
+VAR_GEOHEAT=heatflow   ;   FILE_GEOHEAT=geothermal_heating.nc 
+#
+#===================== EXP1 =====================
+#
+#FILE1_T=l3fwb178_24910101_25001231_1Y_grid_T.nc   # exp1 grid T input file
+#FILE1_U=l3fwb178_24910101_25001231_1Y_grid_U.nc   # exp1 grid U input file
+#FILE1_V=l3fwb178_24910101_25001231_1Y_grid_V.nc   # exp1 grid V input file
+#FILE1_I=l3fwb178_24910101_25001231_1M_icemod.nc   # exp1 ice    input file
+FILE1_T=l3fwb178_25010101_25011231_5D_grid_T.nc   # exp1 grid T input file
+FILE1_U=l3fwb178_25010101_25011231_5D_grid_U.nc   # exp1 grid U input file
+FILE1_V=l3fwb178_25010101_25011231_5D_grid_V.nc   # exp1 grid V input file
+FILE1_I=l3fwb178_25010101_25011231_5D_icemod.nc   # exp1 ice    input file
+VAR1_T=votemper         
+VAR1_S=vosaline         
+VAR1_QNET=sohflxdo
+VAR1_ERP=sowafldp      
+VAR1_EMP=sowaflup       
+#VAR1_MLD=somxl010
+VAR1_MLD=max5dmld
+#VAR1_U=uocetr_eff
+#VAR1_U=uoce
+#VAR1_U=vozocrtx
+VAR1_U=vozoeftr
+#VAR1_V=vocetr_eff
+#VAR1_V=voce
+VAR1_V=vomeeftr
+#VAR1_V=vomecrty
+VAR1_Ithick=iicethic    
+VAR1_Ifrac=iiceconc
+VAR1_SNOW=isnowthi
+#
+#===================== EXP2 =====================
+#
+#FILE2_T=l3fwb178_24910101_25001231_1Y_grid_T.nc   # exp1 grid T input file
+#FILE2_U=l3fwb178_24910101_25001231_1Y_grid_U.nc   # exp1 grid U input file
+#FILE2_V=l3fwb178_24910101_25001231_1Y_grid_V.nc   # exp1 grid V input file
+#FILE2_I=l3fwb178_24910101_25001231_1M_icemod.nc   # exp1 ice    input file
+FILE2_T=l3fwb178_25010101_25011231_5D_grid_T.nc   # exp1 grid T input file
+FILE2_U=l3fwb178_25010101_25011231_5D_grid_U.nc   # exp1 grid U input file
+FILE2_V=l3fwb178_25010101_25011231_5D_grid_V.nc   # exp1 grid V input file
+FILE2_I=l3fwb178_25010101_25011231_5D_icemod.nc   # exp1 ice    input file
+#FILE2_T=l378sal6_25010101_25011231_5D_grid_T.nc   # exp1 grid T input file
+#FILE2_U=l378sal6_25010101_25011231_5D_grid_U.nc   # exp1 grid U input file
+#FILE2_V=l378sal6_25010101_25011231_5D_grid_V.nc   # exp1 grid V input file
+#FILE2_I=l378sal6_25010101_25011231_5D_icemod.nc   # exp1 ice    input file
+VAR2_T=votemper
+VAR2_S=vosaline
+VAR2_QNET=sohflxdo
+VAR2_ERP=sowafldp
+VAR2_EMP=sowaflup
+#VAR2_MLD=somxl010
+VAR2_MLD=max5dmld
+#VAR2_U=uoce_eff
+#VAR2_U=uoce
+VAR2_U=vozoeftr
+#VAR2_V=vocetr_eff
+#VAR2_V=voce
+VAR2_V=vomeeftr
+VAR2_Ithick=iicethic
+VAR2_Ifrac=iiceconc
+VAR2_SNOW=isnowthi
+#
+######################### Export Variables ###############################
+#
+#===================== User PATHS =====================
+export PS_DIR PDF_DIR HTML_DIR SAXO_DIR
+export DIR_DATA DIR_CLIMATO DIR_MASK
+#===================== Model GRID =====================
+export FILE_MESH_MASK FILE_MASK_SUBDOMAIN
+#===================== DATA =====================
+export FILE_TEMP_3D   VAR_TEMP_3D
+export FILE_SAL_3D    VAR_SAL_3D
+export FILE_SST       VAR_SST
+export FILE_GEOHEAT   VAR_GEOHEAT
+export FILE_FLUX      VAR_FLUX
+export FILE_MLD       VAR_MLD
+export FILE_ICE       VAR_ICE_EXT_NH  VAR_ICE_EXT_SH VAR_ICE_area_NH VAR_ICE_area_SH
+export FILE_SNOW_ARC  VAR_SNOW_NH
+export FILE_SNOW_ANT  VAR_SNOW_SH
+#===================== EXP1 =====================
+export READ_ONLY_FIRST_RECORD
+export FILE1_T     FILE1_U  FILE1_V   FILE1_I
+export VAR1_T      VAR1_S   VAR1_QNET VAR1_ERP VAR1_EMP VAR1_MLD 
+export VAR1_U      VAR1_V
+export VAR1_Ithick VAR1_Ifrac VAR1_Isnow
+#===================== EXP2 =====================
+export FILE2_T     FILE2_U    FILE2_V   FILE2_I
+export VAR2_T      VAR2_S     VAR2_QNET VAR2_ERP VAR2_EMP VAR2_MLD 
+export VAR2_U      VAR2_V
+export VAR2_Ithick VAR2_Ifrac VAR2_Isnow
+#
Index: /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_Drake.pro
===================================================================
--- /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_Drake.pro	(revision 4183)
+++ /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_Drake.pro	(revision 4184)
@@ -32,6 +32,6 @@
   u1 = rseries_ncdf(vU1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, /nostruct)
   drk1 = fltarr(jpt)
-  ;SF trans = strlowcase(getenv('VAR1_U')) EQ 'uocetr_eff'
-  trans = strlowcase(getenv('VAR1_U')) EQ 'vozoeftr'
+   ;SF trans = strlowcase(getenv('VAR1_U')) EQ 'uocetr_eff'
+   trans = strlowcase(getenv('VAR1_U')) EQ 'vozoeftr'
   FOR t = 0, jpt-1 DO BEGIN
     tmp = bsf(u1[*, *, *, t], TRANSPORT = trans, /nostruct)
Index: /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh
===================================================================
--- /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh	(revision 4183)
+++ /branches/2013/dev_r3918_CNRS_idl_plots/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/std_ts_vardef.sh	(revision 4184)
@@ -18,6 +18,6 @@
 idl_command=/Applications/itt/idl64/bin/idl
 #
-PS_DIR=$( pwd )/ts_l378sal6_ps
-PDF_DIR=$( pwd )/ts_l378sal6_pdf
+PS_DIR=$( pwd )/ts_500yfwb2_ps
+PDF_DIR=$( pwd )/ts_500yfwb2_pdf
 HTML_DIR=$( pwd )/html
 SAXO_DIR=/Users/sflod/SAXO_DIR
@@ -55,14 +55,14 @@
 #DATE1=00010101  		;   DATE2=00101231
 #
-VAR1_T=votemper         ;   V1T_PREF=l378sal6      ;   V1T_SUFF=_1Y_grid_T.nc
-VAR1_S=vosaline         ;   V1S_PREF=l378sal6      ;   V1S_SUFF=_1Y_grid_T.nc
-VAR1_SSH=sossheig       ;   V1SSH_PREF=l378sal6    ;   V1SSH_SUFF=_1Y_grid_T.nc
-VAR1_Q=sohflxdo         ;   V1Q_PREF=l378sal6      ;   V1Q_SUFF=_1Y_grid_T.nc
-VAR1_EMP=sowaflup       ;   V1EMP_PREF=l378sal6    ;   V1EMP_SUFF=_1Y_grid_T.nc
-VAR1_U=vozoeftr         ;   V1U_PREF=l378sal6      ;   V1U_SUFF=_1Y_grid_U.nc
-VAR1_V=vomeeftr         ;   V1V_PREF=l378sal6      ;   V1V_SUFF=_1Y_grid_V.nc
-VAR1_ICE=iiceconc       ;   V1ICE_PREF=l378sal6    ;   V1ICE_SUFF=_1M_icemod.nc
-VAR1_Ithick=iicethic    ;   V1It_PREF=l378sal6     ;   V1It_SUFF=_1M_icemod.nc
-VAR1_SNOW=isnowthi      ;   V1SNOW_PREF=l378sal6   ;   V1SNOW_SUFF=_1M_icemod.nc
+VAR1_T=votemper         ;   V1T_PREF=500yfwb2      ;   V1T_SUFF=_1Y_grid_T.nc
+VAR1_S=vosaline         ;   V1S_PREF=500yfwb2      ;   V1S_SUFF=_1Y_grid_T.nc
+VAR1_SSH=sossheig       ;   V1SSH_PREF=500yfwb2    ;   V1SSH_SUFF=_1Y_grid_T.nc
+VAR1_Q=sohflxdo         ;   V1Q_PREF=500yfwb2      ;   V1Q_SUFF=_1Y_grid_T.nc
+VAR1_EMP=sowaflup       ;   V1EMP_PREF=500yfwb2    ;   V1EMP_SUFF=_1Y_grid_T.nc
+VAR1_U=vozoeftr         ;   V1U_PREF=500yfwb2      ;   V1U_SUFF=_1Y_grid_U.nc
+VAR1_V=vomeeftr         ;   V1V_PREF=500yfwb2      ;   V1V_SUFF=_1Y_grid_V.nc
+VAR1_ICE=iiceconc       ;   V1ICE_PREF=500yfwb2    ;   V1ICE_SUFF=_1M_icemod.nc
+VAR1_Ithick=iicethic    ;   V1It_PREF=500yfwb2     ;   V1It_SUFF=_1M_icemod.nc
+VAR1_SNOW=isnowthi      ;   V1SNOW_PREF=500yfwb2   ;   V1SNOW_SUFF=_1M_icemod.nc
 #
 #===================== EXP2 =====================
@@ -71,14 +71,14 @@
 DATE1_2=20010101   ;   DATE2_2=25001231
 #
-VAR2_T=votemper         ;   V2T_PREF=l378sal6      ;   V2T_SUFF=_1Y_grid_T.nc
-VAR2_S=vosaline         ;   V2S_PREF=l378sal6      ;   V2S_SUFF=_1Y_grid_T.nc
-VAR2_SSH=sossheig       ;   V2SSH_PREF=l378sal6    ;   V2SSH_SUFF=_1Y_grid_T.nc
-VAR2_Q=sohflxdo         ;   V2Q_PREF=l378sal6      ;   V2Q_SUFF=_1Y_grid_T.nc
-VAR2_EMP=sowaflup       ;   V2EMP_PREF=l378sal6    ;   V2EMP_SUFF=_1Y_grid_T.nc
-VAR2_U=vozoeftr         ;   V2U_PREF=l378sal6      ;   V2U_SUFF=_1Y_grid_U.nc
-VAR2_V=vomeeftr         ;   V2V_PREF=l378sal6      ;   V2V_SUFF=_1Y_grid_V.nc
-VAR2_ICE=iiceconc       ;   V2ICE_PREF=l378sal6    ;   V2ICE_SUFF=_1M_icemod.nc
-VAR2_Ithick=iicethic    ;   V2It_PREF=l378sal6     ;   V2It_SUFF=_1M_icemod.nc
-VAR2_SNOW=isnowthi      ;   V2SNOW_PREF=l378sal6   ;   V2SNOW_SUFF=_1M_icemod.nc
+VAR2_T=votemper         ;   V2T_PREF=500yfwb2      ;   V2T_SUFF=_1Y_grid_T.nc
+VAR2_S=vosaline         ;   V2S_PREF=500yfwb2      ;   V2S_SUFF=_1Y_grid_T.nc
+VAR2_SSH=sossheig       ;   V2SSH_PREF=500yfwb2    ;   V2SSH_SUFF=_1Y_grid_T.nc
+VAR2_Q=sohflxdo         ;   V2Q_PREF=500yfwb2      ;   V2Q_SUFF=_1Y_grid_T.nc
+VAR2_EMP=sowaflup       ;   V2EMP_PREF=500yfwb2    ;   V2EMP_SUFF=_1Y_grid_T.nc
+VAR2_U=vozoeftr         ;   V2U_PREF=500yfwb2      ;   V2U_SUFF=_1Y_grid_U.nc
+VAR2_V=vomeeftr         ;   V2V_PREF=500yfwb2      ;   V2V_SUFF=_1Y_grid_V.nc
+VAR2_ICE=iiceconc       ;   V2ICE_PREF=500yfwb2    ;   V2ICE_SUFF=_1M_icemod.nc
+VAR2_Ithick=iicethic    ;   V2It_PREF=500yfwb2     ;   V2It_SUFF=_1M_icemod.nc
+VAR2_SNOW=isnowthi      ;   V2SNOW_PREF=500yfwb2   ;   V2SNOW_SUFF=_1M_icemod.nc
 #
 ######################### Export Variables ###############################
