Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/ARCH/arch-PW7_METO.fcm
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/ARCH/arch-PW7_METO.fcm	(revision 4750)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/ARCH/arch-PW7_METO.fcm	(revision 4751)
@@ -23,5 +23,5 @@
 %FC                  mpxlf90_r
 %FCFLAGS             -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -g -O2 -qstrict -qinitauto=7FBFFFFF
-%FFLAGS              -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -g -O2 -qstrict -qinitauto=7FBFFFFF
+%FFLAGS              -qrealsize=8 -qextname -qarch=pwr7 -qtune=pwr7 -g -O2 -qstrict -qinitauto=7FBFFFFF -qfixed
 %LD                  mpCC_r
 %LDFLAGS             -lxlf90 -L/projects/um1/lib -lsig -O2 -L MASS
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 4750)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 4751)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi
+bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi key_diaobs key_asminc
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm	(revision 4750)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm	(revision 4751)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys key_trabbl key_lim3 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi
+ bld::tool::fppkeys key_trabbl key_lim3 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi key_diaobs key_asminc
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/1_namelist_cfg
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/1_namelist_cfg	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/1_namelist_cfg	(revision 4751)
@@ -0,0 +1,192 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  :  Configuration namelist used to overwrite SHARED/1_namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   cn_exp      = "Agulhas" !  experience name 
+   nn_itend    =     480   !  last  time step
+   nn_stock    =   10950   !  frequency of creation of a restart file (modulo referenced to 1)
+   nn_write    =   10950   !  frequency of write in the output file   (modulo referenced to nn_it000)
+   ln_clobber  = .true.    !  clobber (overwrite) an existing file
+/
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "default"             !  name of the configuration
+   jp_cfg      =      -1               !  resolution of the configuration
+   jpidta      =     182               !  1st lateral dimension ( >= jpi )
+   jpjdta      =     149               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      31               !  number of levels      ( >= jpk )
+   jpiglo      =     182               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     149               !  2nd    -                  -    --> j  =jpjdta
+   jpizoom     =       1               !  left bottom (i,j) indices of the zoom
+   jpjzoom     =       1               !  in data domain indices
+   jperio      =       0               !  lateral cond. type (between 0 and 6)
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------  
+   jphgr_msh   =       0               !  type of horizontal mesh
+   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =  999999.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =  999999.0             !  meridional grid-spacing (degrees)
+   ppe1_m      =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =  999999.0             !  meridional grid-spacing (degrees)
+   ppsur       =   -4762.96143546300   !  ORCA r4, r2 and r05 coefficients
+   ppa0        =     255.58049070440   ! (default coefficients)
+   ppa1        =     245.58132232490   !
+   ppkth       =      21.43336197938   !
+   ppacr       =       3.0             !
+   ppdzmin     =  999999.              !  Minimum vertical spacing
+   pphmax      =  999999.              !  Maximum depth
+   ldbletanh   =  .FALSE.              !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =  999999.              !  Double tanh function parameters
+   ppkth2      =  999999.              !
+   ppacr2      =  999999.              !
+   rn_rdt      = 2880.     !  time step for the dynamics (and tracer if nn_acc=0)
+   rn_rdtmin   = 14400.          !  minimum time step on tracers (used if nn_acc=1)
+   rn_rdtmax   = 14400.          !  maximum time step on tracers (used if nn_acc=1)
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_ice      = 0         !  =0 no ice boundary condition   ,
+                           !  =1 use observed ice-cover      ,
+                           !  =2 ice-model used                         ("key_lim3" or "key_lim2)
+   ln_rnf      = .false.   !  runoffs                                   (T => fill namsbc_rnf)
+   ln_ssr      = .false.   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
+   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked 
+                           !     =1 global mean of e-p-r set to zero at each time step 
+                           !     =2 annual global mean of e-p-r set to zero
+                           !     =3 global emp set to zero and spread out over erp area
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulea
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namagrif      !  AGRIF zoom                                            ("key_agrif")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers 
+!-----------------------------------------------------------------------
+
+   rn_aht_0         =  1000.    !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_aeiv_0        =     0.    !  eddy induced velocity coefficient [m2/s]    (require "key_traldf_eiv")
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+/  
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   !                       !  Type of the operator : 
+   ln_dynldf_lap    =  .false.  !  laplacian operator         
+   ln_dynldf_bilap  =  .true.   !  bilaplacian operator    
+   rn_ahm_0_blp     = -8.5e+11  !  horizontal bilaplacian eddy viscosity [m4/s] 
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+   ln_tmx_itf  = .false.   !  ITF specific parameterisation
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nammpp_dyndist !   Massively Parallel Distribution for AGRIF zoom      ("key_agrif" && "key_mpp_dyndist")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namobs       !  observation usage                                      ('key_diaobs')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+/
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/1_namelist_ice_cfg
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/1_namelist_ice_cfg	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/1_namelist_ice_cfg	(revision 4751)
@@ -0,0 +1,35 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM2 : Configuration namelist used to overwrite 1_namelist_ice_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+   creepl      =   2.0e-08 !  creep limit
+   nevp        =   360     !  number of EVP subcycling iterations
+   telast      =   3600    !  timescale for EVP elastic waves
+/
+!-----------------------------------------------------------------------
+&namicetrp     !   ice transport
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedia     !   ice diagnostics
+!-----------------------------------------------------------------------
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&namiceout     !   parameters for outputs
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/      
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/1_namelist_ref
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/1_namelist_ref	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/1_namelist_ref	(revision 4751)
@@ -0,0 +1,1 @@
+link ../../SHARED/1_namelist_ref
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/AA_job
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/AA_job	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/AA_job	(revision 4751)
@@ -0,0 +1,171 @@
+#-Q- sxnec ##################
+#-Q- sxnec ## SXNEC IDRIS
+#-Q- sxnec ##################
+#-Q- sxnec #@$-r :XXX:XXX:XXX:           # job name
+#-Q- sxnec #@$-o output_XXXXXXX.1        # outputfile name
+#-Q- sxnec #@$-me                        # sends a mail at the end of execution
+#-Q- sxnec #@$-eo                        # merge standard error and output
+#-Q- sxnec #@$-jo                        # print a short performance analysis
+#-Q- sxnec #@$-lT 1:00:00                # Max total CPU time
+#-Q- sxnec #@$-lt 0:59:00                # Max CPU time per process
+#-Q- sxnec #@$-lM 2Gb                    # Max memory
+#-Q- sxnec ##@$-c 4                     # Max number of simultaneous procs used (here=4)
+#-Q- sxnec ##@$-q multi                 # Use more than 1 proc
+#-Q- aix ##################
+#-Q- aix ## IBM   IDRIS  ##
+#-Q- aix ##################
+#-Q- aix #@job_name= :XXX:XXX:XXX:          
+#-Q- aix #@output= output_XXXXXXX.1          
+#-Q- aix #@error= error_XXXXXXX.1          
+#-Q- aix #@cpu_limit= 5000
+#-Q- aix #@stack_limit= 200Mb        
+#-Q- aix #@data_limit= 1.8Gb         
+#-Q- aix #@notification= complete
+#-Q- aix #@total_tasks= 1 
+#-Q- aix #@job_type= parallel
+#-Q- aix #@queue
+#-Q- sx8brodie ##################
+#-Q- sx8brodie ## SX8NEC IDRIS ##
+#-Q- sx8brodie ##################
+#-Q- sx8brodie #PBS -N :XXX:XXX:XXX:        # job name
+#-Q- sx8brodie #PBS -o output_XXXXXXX.1     # outputfile name
+#-Q- sx8brodie #PBS -j o                    # merge standard error and output
+#-Q- sx8brodie #PBS -S /usr/bin/ksh         # user shell
+#-Q- sx8brodie #PBS -l memsz_job=3.6gb      # Max memory
+#-Q- sx8brodie #PBS -l cputim_prc=1:01:00   # Max CPU time/prc
+#-Q- sx8brodie #PBS -l cputim_job=1:01:00   # Max CPU time/job
+#-Q- sx8brodie ##PBS -l cpunum_job=4
+#-Q- sx8brodie ##PBS -q multi
+#-Q- sx8mercure ##################
+#-Q- sx8mercure ## SX8NEC   CEA ##
+#-Q- sx8mercure ##################
+#-Q- sx8mercure #PBS -N :XXX:XXX:XXX:        # job name
+#-Q- sx8mercure #PBS -o output_XXXXXXX.1     # outputfile name
+#-Q- sx8mercure #PBS -j o                    # merge standard error and output
+#-Q- sx8mercure #PBS -S /usr/bin/ksh         # user shell
+#-Q- sx8mercure #PBS -l memsz_job=3.6gb      # Max memory
+#-Q- sx8mercure #PBS -l cputim_job=0:40:00   # Max CPU time
+#-Q- sx8mercure ##PBS -l cpunum_job=4
+########################################################################
+##
+##      Script to run a short experiment when installing the
+##      ORCA2_LIM configuration 
+##
+##            Rachid Benshila, OPA System Team
+##
+##
+#########################################################################
+##-- print echo of commands before and after shell interpretation
+date
+set -vx
+
+#################################
+# Beginning of user modification
+#################################
+
+##-- define some directories : 
+#- Input file storing 
+#-Q- sxnec R_FORCING="gaya:/u/rech/eee/reee512/NEMO"
+#-Q- sx8brodie R_FORCING="gaya:/u/rech/eee/reee512/NEMO"
+#-Q- aix R_FORCING="gaya:/u/rech/eee/reee512/NEMO"
+#-Q- sx8mercure R_FORCING="/dmnfs10/cont003/p48ethe/FORCINGS/ORCA_R2/NEMO"
+#- Launching run repository
+#-Q- sxnec R_EXPER=${QSUB_WORKDIR:-${PWD}}
+#-Q- sx8brodie R_EXPER=${PBS_O_WORKDIR}
+#-Q- aix R_EXPER=${QSUB_WORKDIR:-${PWD}}
+#-Q- sx8mercure R_EXPER=${PWD}
+#- modipsl repository
+R_EXEDIR=MMMMMMM     
+#- output files storing 
+R_SORTIE_OCE=AAAAAAA/ORCA2_LIM
+#- execution repository
+R_TMP=$TMPDIR         
+
+##-- define processus number : to change when running in mpp
+NB_PROC=1
+
+#################################
+# End of user modification
+#################################
+
+#--  define a fonction to get the input tarfile
+#-Q- sxnec Rapatrie () { [ -f $1/$2 ] || ( rcp ${R_FORCING}/$2 $1 ; cd $1; tar xvf $2 ;) }
+#-Q- sx8brodie Rapatrie () { [ -f $1/$2 ] || ( rcp ${R_FORCING}/$2 $1 ; cd $1; tar xvf $2 ;) }
+#-Q- aix Rapatrie () { [ -f $1/$2 ] || ( rcp ${R_FORCING}/$2 $1 ; cd $1; tar xvf $2 ;) }
+#-Q- sx8mercure Rapatrie () { [ -f $1/$2 ] || ( cp ${R_FORCING}/$2 $1 ; cd $1; tar xvf $2 ;) }
+
+[ -d ${R_TMP} ] || mkdir ${R_TMP}
+cd ${R_TMP}
+
+#--  get the executable
+#-Q- sxnec rcp ${LOGNAME}@rhodes:${R_EXEDIR}/bin/opa opa.xx
+#-Q- sx8brodie rcp ${LOGNAME}@brodie:${R_EXEDIR}/bin/opa opa.xx
+#-Q- aix cp ${R_EXEDIR}/bin/opa opa.xx
+#-Q- sx8mercure cp ${R_EXEDIR}/bin/opa opa.xx
+chmod 777 opa.xx
+
+## --  Copy ancillary files
+#
+#- Namelist for ocean and ice
+cp ${R_EXPER}/namelist_ice_lim2 namelist_ice 
+cp ${R_EXPER}/namelist namelist
+
+#- Namelist for ocean and ice (agrif fine grid)
+cp ${R_EXPER}/1_namelist_ice_lim2 1_namelist_ice 
+cp ${R_EXPER}/1_namelist 1_namelist
+cp ${R_EXPER}/AGRIF_FixedGrids.in AGRIF_FixedGrids.in
+
+#- Files for the configuration and ocean dynamics
+Rapatrie ${R_TMP} ORCA2_LIM_nemo_v3.2.tar
+
+ls -alF
+
+#-Q- sxnec export F_PROGINF=yes
+#-Q- sxnec export F_ERRCNT=5
+#-Q- sx8brodie export F_PROGINF=yes
+#-Q- sx8brodie export F_ERRCNT=5
+#-Q- sx8mercure export F_PROGINF=yes
+#-Q- sx8mercure export F_ERRCNT=5
+
+#-Q- sxnec #- To be use for a mpp run
+#-Q- sxnec #mpirun -np ${NB_PROC} ./opa.xx
+#-Q- sx8brodie #- To be use for a mpp run
+#-Q- sx8brodie #mpirun -np ${NB_PROC} ./opa.xx
+#-Q- sx8mercure #- To be use for a mpp run
+#-Q- sx8mercure #mpirun -np ${NB_PROC} ./opa.xx
+
+./opa.xx
+
+## -- Save output files
+ls -alF
+#- to copy on a storage machine
+#-Q- sxnec DPUT=mfput
+#-Q- sx8brodie DPUT=mfput
+#-Q- aix DPUT=mfput
+#-Q- sx8mercure DPUT=cp 
+#-Q- sx8mercure [ -d ${R_SORTIE_OCE} ] || mkdir -p ${R_SORTIE_OCE}
+
+#- Save ocean output files
+$DPUT *ocean.output ${R_SORTIE_OCE}/.
+$DPUT *solver.stat ${R_SORTIE_OCE}/.
+[ -f *mpp.output* ] && $DPUT *mpp.output* ${R_SORTIE_OCE}/.
+for file_netcdf in *_grid_*.nc
+do
+$DPUT ${file_netcdf} ${R_SORTIE_OCE}/${file_netcdf}
+done
+#
+#- Save ice output files
+for file_netcdf in *icemod*
+do
+$DPUT ${file_netcdf} ${R_SORTIE_OCE}/${file_netcdf} 
+done
+$DPUT ice.evolu ${R_SORTIE_OCE}/ice.evolu 
+#
+#- Save restart files
+for restart in *restart*
+do
+$DPUT ${restart} ${R_SORTIE_OCE}/${restart} 
+done
+#
+#- Save ftrace file
+[ -f ftrace.out* ] && $DPUT ftrace.out* ${R_SORTIE_OCE}/.
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/AGRIF_FixedGrids.in
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/AGRIF_FixedGrids.in	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/AGRIF_FixedGrids.in	(revision 4751)
@@ -0,0 +1,3 @@
+1
+125 170 36 63 4 4 2
+0
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/EMPave_old.dat
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/EMPave_old.dat	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/EMPave_old.dat	(revision 4751)
@@ -0,0 +1,1 @@
+                               0  0.0000000000000000E+00  0.0000000000000000E+00
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/domain_def.xml
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/domain_def.xml	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/domain_def.xml	(revision 4751)
@@ -0,0 +1,1 @@
+link ../../SHARED/domain_def.xml
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/field_def.xml
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/field_def.xml	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/field_def.xml	(revision 4751)
@@ -0,0 +1,1 @@
+link ../../SHARED/field_def.xml
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef.xml
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef.xml	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef.xml	(revision 4751)
@@ -0,0 +1,170 @@
+<?xml version="1.0"?>
+<simulation> 
+
+ <context id="nemo" time_origin="1950-01-01 00:00:00" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+    
+    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files -->
+      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
+
+      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE." >  <!-- 5d files -->  
+ 
+	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+	  <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               />
+	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            />
+	  <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
+	  <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"      />
+	  <field field_ref="mldkz5"       />
+	  <field field_ref="mldr10_1"     />
+	  <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
+	  <field field_ref="qsr"          name="rsntds"   long_name="surface_net_downward_shortwave_flux"           />
+	  <field field_ref="qt"           name="tohfls"   long_name="surface_net_downward_total_heat_flux"          />
+	  <field field_ref="saltflx"      name="sosflxdo"  />
+	  <field field_ref="taum"         name="taum" />
+	  <field field_ref="wspd"         name="sowindsp"  />
+          <field field_ref="precip"       name="soprecip" />
+	</file>
+
+	<file id="file3" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
+	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
+          <!-- variables available with MLE
+          <field field_ref="psiu_mle"     name="psiu_mle"  long_name="MLE_streamfunction_along_i-axis" />
+	  -->
+	</file>
+	
+	<file id="file4" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
+	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
+          <!-- variables available with MLE
+          <field field_ref="psiv_mle"     name="psiv_mle"  long_name="MLE_streamfunction_along_j-axis" />
+	  -->
+	</file>
+	
+	<file id="file5" name_suffix="_grid_W" description="ocean W grid variables" >
+	  <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity"         />
+	  <field field_ref="avt"          name="difvho"  long_name="ocean_vertical_heat_diffusivity" />
+	</file>
+
+	<file id="file6" name_suffix="_icemod" description="ice variables" >
+	  <field field_ref="ice_pres"                     />
+	  <field field_ref="snowthic_cea" name="snd"     long_name="surface_snow_thickness"   />
+	  <field field_ref="icethic_cea"  name="sit"     long_name="sea_ice_thickness"        />
+	  <field field_ref="iceprod_cea"  name="sip"     long_name="sea_ice_thickness"        />
+	  <field field_ref="ist_ipa"      />
+	  <field field_ref="ioceflxb"     />
+	  <field field_ref="uice_ipa"     />
+	  <field field_ref="vice_ipa"     />
+	  <field field_ref="utau_ice"     />
+	  <field field_ref="vtau_ice"     />
+	  <field field_ref="qsr_io_cea"   />
+	  <field field_ref="qns_io_cea"   />
+	  <field field_ref="snowpre"      />
+	</file>
+
+	<!--
+	<file id="file8" name_suffix="_Tides" description="tidal harmonics" >
+	  <field field_ref="M2x"          name="M2x"      long_name="M2 Elevation harmonic real part"                       />
+	  <field field_ref="M2y"          name="M2y"      long_name="M2 Elevation harmonic imaginary part"                  />
+	  <field field_ref="M2x_u"        name="M2x_u"    long_name="M2 current barotrope along i-axis harmonic real part "       />
+	  <field field_ref="M2y_u"        name="M2y_u"    long_name="M2 current barotrope along i-axis harmonic imaginary part "  />
+	  <field field_ref="M2x_v"        name="M2x_v"    long_name="M2 current barotrope along j-axis harmonic real part "       />
+	  <field field_ref="M2y_v"        name="M2y_v"    long_name="M2 current barotrope along j-axis harmonic imaginary part "  />
+	</file>
+	-->
+      </file_group>
+
+
+      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
+
+
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+   <axis_definition>  
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+      <axis id="nfloat" long_name="Float number"      unit="-"  />
+      <axis id="icbcla" long_name="Iceberg class"     unit="-"  />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>   
+  </context>
+  
+
+  <context id="xios">
+
+      <variable_definition>
+	
+     <!-- 
+        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
+-->
+	  <variable id="buffer_size"               type="integer">5000000</variable>
+	  <variable id="buffer_server_factor_size" type="integer">2</variable>
+	  <variable id="info_level"                type="integer">0</variable>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+  
+</simulation>
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_ar5.xml
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_ar5.xml	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_ar5.xml	(revision 4751)
@@ -0,0 +1,288 @@
+<?xml version="1.0"?>
+<simulation> 
+  
+  <context id="nemo" time_origin="1900-01-01 00:00:00" >
+
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.xml"/>    
+    <!-- 
+============================================================================================================
+=                                                                                                          =
+=                                           output files definition                                        =
+=                                                                                                          =
+=                  http://www2-pcmdi.llnl.gov/svn/repository/cmor/trunk/Tables/CMIP5_Oclim                 =
+=                  http://www2-pcmdi.llnl.gov/svn/repository/cmor/trunk/Tables/CMIP5_Omon                  =
+=                  http://www2-pcmdi.llnl.gov/svn/repository/cmor/trunk/Tables/CMIP5_Oimon                 =              
+=          http://www.clivar.org/organization/wgomd/references/WGOMD_CMIP5_ocean_fields.June2009.pdf       =
+=                                                                                                          =
+============================================================================================================
+    -->
+    
+    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" output_level="10" sync_freq="2mo" min_digits="4">
+      <!--
++++++++++++++++++++++++++++++++++++++++++++++++   daily   ++++++++++++++++++++++++++++++++++++++++++++++++++
+        -->
+      <file_group id="1d" output_freq="1d"  enabled=".TRUE.">                      <!-- 1d files -->
+	<file id="file1" name_suffix="_grid_T_table2.2" >         <!-- grid T  -->
+	  <field field_ref="sst"          name='tos'      long_name="sea_surface_temperature"                              level="2"                      />
+	  <field field_ref="sst2"         name='tossq'    long_name="square_of_sea_surface_temperature"                    level="2"                      />
+	  <field field_ref="mldkz5"       name='omldamax' long_name="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="maximum" />
+	</file>   
+      </file_group>
+	<!--
+++++++++++++++++++++++++++++++++++++++++++++++   monthly   +++++++++++++++++++++++++++++++++++++++++++++++++
+	  -->
+      <file_group id="1m" output_freq="1mo"     enabled=".TRUE.">                      <!-- real monthly files -->
+	<!--
+..............................................    grid T   .................................................
+	  -->	  
+	<file id="file2" name_suffix="_grid_T_table2.2" >
+	  <field field_ref="botpres"      name="pbo"      long_name="sea_water_pressure_at_sea_floor"                               />
+	  <!-- pso : sea_water_pressure_at_sea_water_surface = 0 -->
+	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                                 />
+	  <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"             level="2" />
+	  <!-- masscello : sea_water_mass_per_unit_area = cellthc*rau0                                          no time changes -->
+	  <field field_ref="cellthc"      name="thkcello" long_name="cell_thickness"                                                 /> <!-- no time changes -->
+	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"                                />
+	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                              level="1" />
+	  <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"                    level="2" />
+	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                                             />
+	  <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                                 level="1" />
+	  <field field_ref="rhop"         name="rhopoto"  long_name="sea_water_potential_density"                          level="2" />
+	  <!-- no agessc : sea_water_age_since_surface_contact -->
+	  <!-- no cfc11  : moles_per_unit_mass_of_cfc11_in_sea_water -->
+	  <!-- msftbarot : ocean_barotropic_mass_streamfunction : offline -->
+	  <!-- mlotst    :           ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline -->
+	  <!-- mlotstsq  : square_of_ocean_mixed_layer_thickness_defined_by_sigma_t : must be done offline -->
+	  <field field_ref="mldkz5"       name='omlmax'   long_name="ocean_mixed_layer_thickness_defined_by_mixing_scheme" level="2" operation="maximum" />
+	</file>   
+	
+	<file id="file3" name_suffix="_grid_T_table2.5" >
+	  <field field_ref="rain"         name="pr"       long_name="rainfall_flux"                                           level="1" />
+	  <field field_ref="snow_ao_cea"  name="prsn"     long_name="snowfall_flux"                                           level="1" />
+	  <field field_ref="evap_ao_cea"  name="evs"      long_name="water_evaporation_flux"                                  level="1" />
+	  <field field_ref="runoffs"      name="friver"   long_name="water_flux_into_sea_water_from_rivers"                   level="1" />
+	  <field field_ref="calving"      name="ficeberg" long_name="water_flux_into_sea_water_from_icebergs"                 level="1" />
+	  <field field_ref="isnwmlt_cea"  name="fsitherm" long_name="water_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" />
+	  <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                               level="1" />
+	  <!-- wfonocorr : water_flux_into_sea_water_without_flux_correction : emp - erp -->  
+	  <field field_ref="erp"          name="wfcorr"   long_name="water_flux_correction"                                   level="1" /> <!-- usually = 0 -->
+	</file>   
+	
+	<file id="file4" name_suffix="_grid_T_table2.6" >
+	  <!-- vsfpr    : virtual_salt_flux_into_sea_water_due_to_rainfall    = 0 --> 
+	  <!-- vsfevap  : virtual_salt_flux_into_sea_water_due_to_evaporation = 0 --> 
+	  <!-- vsfriver : virtual_salt_flux_into_sea_water_from_rivers        = 0 --> 	  
+	  <field field_ref="fsal_virt_cea" name="vsfsit" long_name="virtual_salt_flux_into_sea_water_due_to_sea_ice_thermodynamics" level="1" />
+	  <!-- vsf      : virtual_salt_flux_into_sea_water = fsal_virtual + fsal_real -->
+	  <!-- wfcorr   : virtual_salt_flux_correction                        = 0 --> 
+	  <field field_ref="fsal_virt_cea" name="sfdsi"  long_name="downward_sea_ice_basal_salt_flux"                               level="1" />
+	  <!-- sfriver  : salt_flux_into_sea_water_from_rivers                = 0 --> 
+	</file>   
+	
+	<file id="file5" name_suffix="_grid_T_table2.7" >
+	  <!-- hfgeou : upward_geothermal_heat_flux_at_sea_floor : cte, see nambbc and trabbc.F90 -->
+	  <field field_ref="hflx_rain_cea" name="hfrainds"    long_name="temperature_flux_due_to_rainfall_expressed_as_heat_flux_into_sea_water"      level="1" />
+	  <field field_ref="hflx_evap_cea" name="hfevapds"    long_name="temperature_flux_due_to_evaporation_expressed_as_heat_flux_out_of_sea_water" level="1" />
+	  <field field_ref="hflx_rnf_cea"  name="hfrunoffds"  long_name="temperature_flux_due_to_runoff_expressed_as_heat_flux_into_sea_water"        level="1" />
+	  <field field_ref="hflx_snow_cea" name="hfsnthermds" long_name="heat_flux_into_sea_water_due_to_snow_thermodynamics"                         level="1" />
+	  <field field_ref="hflx_ice_cea"  name="hfsithermds" long_name="heat_flux_into_sea_water_due_to_sea_ice_thermodynamics"                      level="1" />
+	  <field field_ref="hflx_cal_cea"  name="hfibthermds" long_name="heat_flux_into_sea_water_due_to_iceberg_thermodynamics"                      level="1" />
+	  <!-- rlds   : surface_net_downward_longwave_flux : not available -->
+	  <!-- hfls   : surface_downward_latent_heat_flux  : not available -->
+	  <!-- hfss   : surface_downward_sensible_heat_flux: not available -->
+	  <field field_ref="qns"           name="nshfls"      long_name="surface_net_downward_non_solar_flux"                                         level="1" />
+	  <field field_ref="qsr"           name="rsntds"      long_name="surface_net_downward_shortwave_flux"                                         level="1" />
+	  <field field_ref="qsr3d"         name="rsds"        long_name="downwelling_shortwave_flux_in_sea_water"                                     level="1" />
+	  <field field_ref="qrp"           name="hfcorr"      long_name="heat_flux_correction"                                                        level="1" />
+	</file>   
+	<!--
+..............................................    grid U   .................................................
+	-->
+	<file id="file6" name_suffix="_grid_U_table2.3" >
+	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"                                       />
+	  <field field_ref="u_masstr"     name="umo"     long_name="ocean_mass_x_transport"                           level="1" />
+	  <field field_ref="u_heattr"     name="hfx"     long_name="ocean_heat_x_transport"                           level="1" />
+	  <field field_ref="ueiv_heattr"  name="hfxba"   long_name="ocean_heat_x_transport_due_to_bolus_advection"    level="2" />
+	  <field field_ref="udiff_heattr" name="hfxdiff" long_name="ocean_heat_x_transport_due_to_diffusion"          level="2" />
+	</file>   
+	
+	<file id="file7" name_suffix="_grid_U_table2.8" >
+	  <field field_ref="utau"         name="tauuo" long_name="surface_downward_x_stress"                          level="1" />
+	  <!-- tauucorr : surface_downward_x_stress_correction = 0 -->
+	</file>   
+	<!--
+..............................................    grid V   .................................................
+	-->
+	<file id="file8" name_suffix="_grid_V_table2.3" >
+	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"                                       />
+	  <field field_ref="v_masstr"     name="vmo"     long_name="ocean_mass_y_transport"                           level="1" />
+	  <field field_ref="v_heattr"     name="hfy"     long_name="ocean_heat_y_transport"                           level="1" />
+	  <field field_ref="veiv_heattr"  name="hfyba"   long_name="ocean_heat_y_transport_due_to_bolus_advection"    level="2" />
+	  <field field_ref="vdiff_heattr" name="hfydiff" long_name="ocean_heat_y_transport_due_to_diffusion"          level="2" />
+	</file>   
+	
+	<file id="file9" name_suffix="_grid_V_table2.8" >
+	  <field field_ref="vtau"         name="tauvo" long_name="surface_downward_y_stress"                          level="1" />
+	  <!-- tauvcorr : surface_downward_y_stress_correction = 0 -->
+	</file>   
+	<!--
+..............................................    grid W   .................................................
+	-->
+	<file id="file10" name_suffix="_grid_W_table2.3" >
+	  <field field_ref="w_masstr"   name="wmo"   long_name="upward_ocean_mass_transport"                                    />
+	  <field field_ref="w_masstr2"  name="wmosq" long_name="square_pf_upward_ocean_mass_transport"                          />
+	</file>   
+	
+	<file id="file11" name_suffix="_grid_W_table2.9" >
+	  <field field_ref="avt"     name="difvho"   long_name="ocean_vertical_heat_diffusivity"                  level="2" />
+	  <field field_ref="avs"     name="difvso"   long_name="ocean_vertical_salt_diffusivity"                  level="2" />
+	  <!-- difvtrbo : ocean_vertical_tracer_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb and  nn_havtb -->
+	  <field field_ref="av_tide" name="difvtrto" long_name="ocean_vertical_tracer_diffusivity_due_to_tides"   level="2" />
+	  <!-- tnpeo     : tendency_of_ocean_potential_energy_content                   : not available -->
+	  <!-- tnpeot    : tendency_of_ocean_potential_energy_content_due_to_tides      : not available -->
+	  <!-- tnpeotb   : tendency_of_ocean_potential_energy_content_due_to_background : not available -->
+	  <field field_ref="avm"     name="difvmo"   long_name="ocean_vertical_momentum_diffusivity"              level="2" />
+	  <!-- difvmbo : ocean_vertical_momentum_diffusivity_due_to_background : cte with time, see namelist parameters nn_avb -->
+	  <field field_ref="av_tide" name="difvmto"  long_name="ocean_vertical_momentum_diffusivity_due_to_tides" level="2" /> <!-- same as tracer -->
+	  <!-- difvmfdo : ocean_vertical_momentum_diffusivity_due_to_form_drag : ??? -->
+	  <!-- dispkevfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_vertical_friction : not available -->
+	</file>
+	
+	<file id="file12" name_suffix="_grid_W_table2.10" >
+	  <!-- if ln_traldf_lap    =  .true. -->
+	  <field field_ref="aht2d_eiv" name="diftrblo" long_name="ocean_tracer_bolus_laplacian_diffusivity"                     level="2" />
+	  <!-- diftrelo : ocean_tracer_epineutral_laplacian_diffusivity : cte with time, see ln_traldf_iso -->
+	  <!-- diftrxylo : ocean_tracer_xy_laplacian_diffusivity : cte with time -->
+	  <!-- if ln_traldf_bilap  =  .true. -->
+	  <!-- field field_ref="diftrbbo" name="aht2d_eiv" long_name="ocean_tracer_bolus_biharmonic_diffusivity"                    level="2" /-->
+	  <!-- diftrebo : ocean_tracer_epineutral_biharmonic_diffusivity : cte with time, see ln_traldf_iso -->
+	  <!-- diftrxybo : ocean_tracer_xy_biharmonic_diffusivity : cte with time -->
+	  <!-- tnkebto : tendency_of_ocean_eddy_kinetic_energy_content_due_to_bolus_transport : not available -->
+	  <!-- difmxylo : ocean_momentum_xy_laplacian_diffusivity : cte with time, see ln_dynldf_lap -->
+	  <!-- difmxybo : ocean_momentum_xy_biharmonic_diffusivity : cte with time, see ln_dynldf_bilap -->
+	  <!-- dispkexyfo : ocean_kinetic_energy_dissipation_per_unit_area_due_to_xy_friction : not available -->
+	</file>   
+	<!--
+..............................................    scalar   .................................................
+	-->
+	<file id="file13" name_suffix="_scalar_table2.2" >         <!-- scalar -->
+	  <field field_ref="masstot"    name="masso"    long_name="sea_water_mass"                                />
+	  <field field_ref="voltot"     name="volo"     long_name="sea_water_volume"                              />
+	  <field field_ref="sshtot"     name="zosga"    long_name="global_average_sea_level_change"               />
+	  <field field_ref="sshsteric"  name="zossga"   long_name="global_average_steric_sea_level_change"        />
+	  <field field_ref="sshthster"  name="zostoga"  long_name="global_average_thermosteric_sea_level_change"  />
+	  <field field_ref="temptot"    name="thetaoga" long_name="sea_water_potential_temperature"               />
+	  <field field_ref="saltot"     name="soga"     long_name="sea_water_salinity"                            />
+	</file>   
+	<!--
+..............................................    icemod   .................................................
+	-->
+	<file id="file14" name_suffix="_icemod_table2.2" >         <!-- scalar -->
+	  <field field_ref="ice_pres"                     />
+	  <field field_ref="ice_cover"    name="sic"        long_name="sea_ice_area_fraction"                            />
+	  <field field_ref="icethic_cea"  name="sit"        long_name="sea_ice_thickness"                                />
+	  <field field_ref="subl_ai_cea"  name="evap"       long_name="water_evaporation_flux"                           />
+	  <field field_ref="snowthic_cea" name="snd"        long_name="surface_snow_thickness"                           />
+	  <!-- snc : surface_snow_area_fraction : same as sic -->
+	  <field field_ref="icealb_cea"   name="ialb"       long_name="Bare Sea Ice Albedo"                              />
+	  <!-- ssi : Sea Ice Salinity : cte = sice = 6, expect in baltic sea = 2 -->
+	  <field field_ref="ist_cea"      name="tsice"      long_name="Surface Temperature of Sea Ice"                   />
+	  <!-- tsnint : Temperature at Interface Between Sea Ice and Snow : not available -->
+	  <!-- pr : Surface Rainfall Rate into the Sea Ice Portion of the Grid Cell = 0 -->
+	  <field field_ref="snow_ai_cea"  name="prsn"       long_name="Surface Snowfall Rate into the Sea Ice Portion of the Grid Cell" />
+	  <!-- ageice   : Age of Sea Ice : not available ??? -->
+	  <!-- grFrazil : Frazil Sea Ice Growth (Leads) Rate ??? -->
+	  <!-- grCongel : Congelation Sea Ice Growth Rate ??? -->
+	  <field field_ref="licepro_cea"  name="grLateral"  long_name="Lateral Sea Ice Growth Rate"                      />
+	  <field field_ref="sntoice_cea"  name="snoToIce"   long_name="Snow-Ice Formation Rate"                          />
+	  <field field_ref="snowmel_cea"  name="snomelt"    long_name="Snow Melt Rate"                                   />
+	  <field field_ref="ticemel_cea"  name="tmelt"      long_name="Rate of Melt at Upper Surface of Sea Ice"         />
+	  <field field_ref="bicemel_cea"  name="bmelt"      long_name="Rate of Melt at Sea Ice Base"                     />
+	  <!-- hcice  : Sea Ice Total Heat Content ??? -->
+	  <field field_ref="qsr_ai_cea"   name="rsdssi"     long_name="surface_downwelling_shortwave_flux_in_air"        />
+	  <!-- rsussi : surface_upwelling_shortwave_flux_in_air ??? -->
+	  <!-- rldssi : surface_downwelling_longwave_flux_in_air ??? -->
+	  <!-- rlussi : surface_upwelling_longwave_flux_in_air ??? -->
+	  <!-- hfssi  : surface_upward_sensible_heat_flux ??? -->
+	  <!-- hflssi : surface_upward_latent_heat_flux ??? -->
+	  <field field_ref="subl_ai_cea"  name="sblsi"      long_name="surface_snow_and_ice_sublimation_flux"             />
+	  <field field_ref="u_imasstr"    name="transix"    long_name="Eastward Sea Ice Transport"                        />
+	  <field field_ref="v_imasstr"    name="transiy"    long_name="Northward Sea Ice Transport"                       />
+	  <field field_ref="fram_trans"   name="transifs"   long_name="Sea Ice Mass Transport Through Fram Strait"        />
+	  <field field_ref="utau_ice"     name="strairx"    long_name="Eastward Atmospheric Stress On Sea Ice"            />
+	  <field field_ref="vtau_ice"     name="strairy"    long_name="Northward Atmospheric Stress On Sea Ice"           />
+	  <!-- strocnx : Eastward Ocean Stress On Sea Ice ??? -->
+	  <!-- strocny : Northward Ocean Stress On Sea Ice ??? -->
+	  <!-- streng  : Compressive Sea Ice Strength ??? -->
+	  <!-- divice  : Strain Rate Divergence of Sea Ice ??? -->
+	  <!-- shrice  : Strain Rate Shear of Sea Ice ??? -->
+	  <!-- ridgice : Sea Ice Ridging Rate ??? -->
+	</file>   
+      </file_group>
+
+      <!-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+        -->
+    </file_definition>
+    
+    <!-- 
+============================================================================================================
+=                                           grid definition                                                =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    
+
+   <axis_definition>  
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+      <axis id="nfloat" long_name="Float number"      unit="-"  />
+      <axis id="icbcla" long_name="Iceberg class"     unit="-"  />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>    
+
+  </context>
+  
+
+  <context id="xios">
+
+      <variable_definition>
+	
+     <!-- 
+        We must have buffer_size > jpi*jpj*jpk*8*3 (with jpi and jpj the subdomain size)
+-->
+	  <variable id="buffer_size"               type="integer">25000000</variable>
+	  <variable id="buffer_server_factor_size" type="integer">2</variable>
+	  <variable id="info_level"                type="integer">0</variable>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+  
+</simulation>
+  
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_crs.xml
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_crs.xml	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_crs.xml	(revision 4751)
@@ -0,0 +1,276 @@
+<?xml version="1.0"?>
+<simulation> 
+
+ <context id="nemo" time_origin="1950-01-01 00:00:00" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+    
+    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->
+     
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."> <!-- 1d files -->
+
+	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+	  <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+	</file>
+
+	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+	</file>
+	
+	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+	</file>
+	
+      </file_group>
+
+      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
+
+      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
+
+	<file id="file4" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               />
+	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            />
+	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+	  <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
+	  <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+	  <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"      />
+	  <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
+	  <field field_ref="qsr"          name="rsntds"   long_name="surface_net_downward_shortwave_flux"           />
+	  <field field_ref="qt"           name="tohfls"   long_name="surface_net_downward_total_heat_flux"          />
+	  <field field_ref="taum"         />
+	  <field field_ref="mldkz5"       />
+	  <field field_ref="mldr10_1"     />
+	</file>
+	
+	<file id="file5" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
+	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
+	</file>
+	
+	<file id="file6" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
+	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
+	</file>
+	
+	<file id="file7" name_suffix="_grid_W" description="ocean W grid variables" >
+	  <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity"         />
+	  <field field_ref="avt"          name="difvho"  long_name="ocean_vertical_heat_diffusivity" />
+	</file>
+	
+	<file id="file8" name_suffix="_icemod" description="ice variables" >
+	  <field field_ref="ice_pres"                     />
+	  <field field_ref="snowthic_cea" name="snd"     long_name="surface_snow_thickness"   />
+	  <field field_ref="icethic_cea"  name="sit"     long_name="sea_ice_thickness"        />
+	  <field field_ref="iceprod_cea"  name="sip"     long_name="sea_ice_thickness"        />
+	  <field field_ref="ist_ipa"      />
+	  <field field_ref="ioceflxb"     />
+	  <field field_ref="uice_ipa"     />
+	  <field field_ref="vice_ipa"     />
+	  <field field_ref="utau_ice"     />
+	  <field field_ref="vtau_ice"     />
+	  <field field_ref="qsr_io_cea"   />
+	  <field field_ref="qns_io_cea"   />
+	  <field field_ref="snowpre"      />
+	</file>
+	
+      </file_group>
+
+      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+   <axis_definition>  
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+      <axis id="nfloat" long_name="Float number"      unit="-"  />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>   
+  </context>
+  
+ <context id="nemo_crs" time_origin="1950-01-01 00:00:00" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+ 
+    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
+   
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".FALSE."> <!-- 1d files -->
+
+	<file id="file1" name_suffix="_gcrs_T" description="ocean T grid variables" >
+	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+	  <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+	</file>
+
+	<file id="file2" name_suffix="_gcrs_U" description="ocean U grid variables" >
+	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
+	</file>
+	
+	<file id="file3" name_suffix="_gcrs_V" description="ocean V grid variables" >
+	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
+	</file>
+	
+      </file_group>
+
+      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
+
+	<file id="file4" name_suffix="_gcrs_T" description="ocean T grid variables" >
+	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               />
+	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            />
+	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+	  <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+          <field field_ref="eken"         name="eke"      long_name="Kinetic energy"/>
+	</file>
+	
+	<file id="file5" name_suffix="_gcrs_U" description="ocean U grid variables" >
+	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
+	  <field field_ref="uocet"         />
+	  <field field_ref="uoces"         />
+	</file>
+	
+	<file id="file6" name_suffix="_gcrs_V" description="ocean V grid variables" >
+	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
+	  <field field_ref="vocet"         />
+	  <field field_ref="voces"         />
+	</file>
+	
+	<file id="file7" name_suffix="_gcrs_W" description="ocean W grid variables" >
+	  <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity"         />
+	</file>
+
+      </file_group>
+
+      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+   <axis_definition>  
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+ 
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>    
+
+  </context>
+
+
+  <context id="xios">
+
+      <variable_definition>
+	
+     <!-- 
+        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
+-->
+	  <variable id="buffer_size"               type="integer">25000000</variable>
+	  <variable id="buffer_server_factor_size" type="integer">2</variable>
+	  <variable id="info_level"                type="integer">0</variable>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+  
+</simulation>
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_default.xml
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_default.xml	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_default.xml	(revision 4751)
@@ -0,0 +1,170 @@
+<?xml version="1.0"?>
+<simulation> 
+
+ <context id="nemo" time_origin="1950-01-01 00:00:00" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+    
+    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->     
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files -->
+      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
+
+      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE." >  <!-- 5d files -->  
+ 
+	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="sst"          name="tos"      long_name="sea_surface_temperature"                       />
+	  <field field_ref="sss"          name="sos"      long_name="sea_surface_salinity"                          />
+	  <field field_ref="ssh"          name="zos"      long_name="sea_surface_height_above_geoid"                />
+	  <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"               />
+	  <field field_ref="soce"         name="so"       long_name="sea_water_salinity"                            />
+	  <field field_ref="sst2"         name="tossq"    long_name="square_of_sea_surface_temperature"             />
+	  <field field_ref="ssh2"         name="zossq"    long_name="square_of_sea_surface_height_above_geoid"      />
+	  <field field_ref="mldkz5"       />
+	  <field field_ref="mldr10_1"     />
+	  <field field_ref="empmr"        name="wfo"      long_name="water_flux_into_sea_water"                     />
+	  <field field_ref="qsr"          name="rsntds"   long_name="surface_net_downward_shortwave_flux"           />
+	  <field field_ref="qt"           name="tohfls"   long_name="surface_net_downward_total_heat_flux"          />
+	  <field field_ref="saltflx"      name="sosflxdo"  />
+	  <field field_ref="taum"         name="taum" />
+	  <field field_ref="wspd"         name="sowindsp"  />
+          <field field_ref="precip"       name="soprecip" />
+	</file>
+
+	<file id="file3" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
+	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
+	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
+          <!-- variables available with MLE
+          <field field_ref="psiu_mle"     name="psiu_mle"  long_name="MLE_streamfunction_along_i-axis" />
+	  -->
+	</file>
+	
+	<file id="file4" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
+	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
+	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
+          <!-- variables available with MLE
+          <field field_ref="psiv_mle"     name="psiv_mle"  long_name="MLE_streamfunction_along_j-axis" />
+	  -->
+	</file>
+	
+	<file id="file5" name_suffix="_grid_W" description="ocean W grid variables" >
+	  <field field_ref="woce"         name="wo"      long_name="ocean vertical velocity"         />
+	  <field field_ref="avt"          name="difvho"  long_name="ocean_vertical_heat_diffusivity" />
+	</file>
+
+	<file id="file6" name_suffix="_icemod" description="ice variables" >
+	  <field field_ref="ice_pres"                     />
+	  <field field_ref="snowthic_cea" name="snd"     long_name="surface_snow_thickness"   />
+	  <field field_ref="icethic_cea"  name="sit"     long_name="sea_ice_thickness"        />
+	  <field field_ref="iceprod_cea"  name="sip"     long_name="sea_ice_thickness"        />
+	  <field field_ref="ist_ipa"      />
+	  <field field_ref="ioceflxb"     />
+	  <field field_ref="uice_ipa"     />
+	  <field field_ref="vice_ipa"     />
+	  <field field_ref="utau_ice"     />
+	  <field field_ref="vtau_ice"     />
+	  <field field_ref="qsr_io_cea"   />
+	  <field field_ref="qns_io_cea"   />
+	  <field field_ref="snowpre"      />
+	</file>
+
+	<!--
+	<file id="file8" name_suffix="_Tides" description="tidal harmonics" >
+	  <field field_ref="M2x"          name="M2x"      long_name="M2 Elevation harmonic real part"                       />
+	  <field field_ref="M2y"          name="M2y"      long_name="M2 Elevation harmonic imaginary part"                  />
+	  <field field_ref="M2x_u"        name="M2x_u"    long_name="M2 current barotrope along i-axis harmonic real part "       />
+	  <field field_ref="M2y_u"        name="M2y_u"    long_name="M2 current barotrope along i-axis harmonic imaginary part "  />
+	  <field field_ref="M2x_v"        name="M2x_v"    long_name="M2 current barotrope along j-axis harmonic real part "       />
+	  <field field_ref="M2y_v"        name="M2y_v"    long_name="M2 current barotrope along j-axis harmonic imaginary part "  />
+	</file>
+	-->
+      </file_group>
+
+
+      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
+
+
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+   <axis_definition>  
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+      <axis id="nfloat" long_name="Float number"      unit="-"  />
+      <axis id="icbcla" long_name="Iceberg class"     unit="-"  />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>   
+  </context>
+  
+
+  <context id="xios">
+
+      <variable_definition>
+	
+     <!-- 
+        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
+-->
+	  <variable id="buffer_size"               type="integer">5000000</variable>
+	  <variable id="buffer_server_factor_size" type="integer">2</variable>
+	  <variable id="info_level"                type="integer">0</variable>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+  
+</simulation>
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_demo.xml
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_demo.xml	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_demo.xml	(revision 4751)
@@ -0,0 +1,125 @@
+<?xml version="1.0"?>
+<simulation> 
+
+  <context id="nemo" time_origin="1900-01-01 00:00:00" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+    
+    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1d" min_digits="4">
+    
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."> <!-- 1h files -->
+	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="sst"  />
+	  <field field_ref="qsr"  />
+	</file>
+      </file_group>
+
+     
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."> <!-- 1d files -->
+	
+	<!-- example of "hand made" zoom  -->
+	<file id="file2" name_suffix="_grid_T_myzoom" >
+	  <!-- group of variables sharing the same zoom. see zoom definition in domain_def.xml -->
+	  <field_group id="blabla" domain_ref="myzoom" >    
+	    <field field_ref="toce" />
+	    <field field_ref="soce" />
+	  </field_group>
+	</file>
+	
+	<!-- mooring: automatic definition of the file name suffix based on id="0n180wT"  -->
+	<!-- include a group of variables. see field_def.xml for mooring variables definition  -->
+	<file id="0n180wT">
+	  <field_group group_ref="mooring" domain_ref="0n180wT" />  
+	</file>
+	
+	<!-- Equatorial section: automatic definition of the file name suffix based on id="EqT" -->
+	<!-- Zoom over vertical axis. def of axis_ref in the axis_definition bellow -->
+	<file id="EqT" >
+	  <field_group id="EqT" domain_ref="EqT" >
+	    <field field_ref="toce" name="votemper" axis_ref="deptht_myzoom"  />
+	    <field field_ref="sss" />
+	  </field_group>
+	</file>
+	
+	<!-- global file with different operations on data   -->
+	<file id="file3" >
+	  <field field_ref="toce"   default_value="-10" />    <!-- redefine the missing value -->
+	  <field field_ref="sst"    name="sstmooring1" domain_ref="0n180wT"  />   <!-- include a mooring -->
+	  <field field_ref="sst"    name="sst_1d_ave"  />                         <!-- mean -->
+	  <field field_ref="sst"    name="sst_1d_inst" operation="instant" />     <!-- instant value -->
+	  <field field_ref="sst"    name="sst_1d_max"  operation="maximum" />     <!-- max -->
+	  <field field_ref="suoce"  />   <!-- include a U-grid variable in the list -->
+	</file>
+	
+      </file_group>
+      
+    </file_definition>
+    
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+   <axis_definition>  
+     <axis_group id="deptht" long_name="Vertical T levels" unit="m" positive="down" >
+       <axis id="deptht" />
+       <axis id="deptht_myzoom" zoom_begin="1" zoom_end="10" />
+     </axis_group>
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+      <axis id="nfloat" long_name="Float number"      unit="-"  />
+      <axis id="icbcla" long_name="Iceberg class"     unit="-"  />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>    
+
+  </context>
+  
+
+  <context id="xios">
+
+      <variable_definition>
+	
+     <!-- 
+        We must have buffer_size > jpi*jpj*jpk*8*3 (with jpi and jpj the subdomain size)
+-->
+	  <variable id="buffer_size"               type="integer">25000000</variable>
+	  <variable id="buffer_server_factor_size" type="integer">2</variable>
+	  <variable id="info_level"                type="integer">0</variable>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+  
+</simulation>
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_oldstyle.xml
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_oldstyle.xml	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/iodef_oldstyle.xml	(revision 4751)
@@ -0,0 +1,153 @@
+<?xml version="1.0"?>
+<simulation> 
+
+ <context id="nemo" time_origin="1900-01-01 00:00:00" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+    
+    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="1mo" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->
+     
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."/> <!-- 1d files -->
+      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
+      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
+
+	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="toce"         name="votemper"  />
+	  <field field_ref="soce"         name="vosaline"  />
+	  <field field_ref="sst"          name="sosstsst"  />
+	  <field field_ref="sss"          name="sosaline"  />
+	  <field field_ref="ssh"          name="sossheig"  />
+	  <field field_ref="empmr"        name="sowaflup"  />
+	  <field field_ref="qsr"          name="soshfldo"  />
+          <field field_ref="saltflx"      name="sosfldow"  />
+	  <field field_ref="qt"           name="sohefldo"  />
+	  <field field_ref="mldr10_1"     name="somxl010"  />
+	  <field field_ref="mldkz5"       name="somixhgt"  />
+	  <field field_ref="ice_cover"    name="soicecov"  />
+	  <field field_ref="wspd"         name="sowindsp"  />
+	  <field field_ref="erp"          name="sowafldp"  />
+	  <field field_ref="ist_ipa"      name="soicetem"  />
+	  <field field_ref="icealb_cea"   name="soicealb"  />   
+	</file>
+	
+	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="uoce"         name="vozocrtx"  />
+	  <field field_ref="uoce_eiv"     name="vozoeivu"  />
+	  <field field_ref="utau"         name="sozotaux"  />
+	</file>
+	
+	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="voce"         name="vomecrty"  />
+	  <field field_ref="voce_eiv"     name="vomeeivv"  />
+	  <field field_ref="vtau"         name="sometauy"  />
+	</file>
+	
+	<file id="file4" name_suffix="_grid_W" description="ocean V grid variables" >
+	  <field field_ref="woce"         name="vovecrtz" />
+	  <field field_ref="avt"          name="votkeavt" />
+	  <field field_ref="avs"          name="voddmavs" />
+	  <field field_ref="aht2d_eiv"    name="soleaeiw" />
+	</file>
+	
+	<file id="file5" name_suffix="_icemod" description="ocean V grid variables" >
+	  <field field_ref="ice_pres"                     />
+	  <field field_ref="snowthic_cea" name="isnowthi" />
+	  <field field_ref="icethic_cea"  name="iicethic" />
+	  <field field_ref="iceprod_cea"  name="iiceprod" />
+	  <field field_ref="ist_ipa"      name="iicetemp" />
+	  <field field_ref="ioceflxb"     name="ioceflxb" />
+	  <field field_ref="uice_ipa"     name="iicevelu" />
+	  <field field_ref="vice_ipa"     name="iicevelv" />
+	  <field field_ref="utau_ice"     name="iicestru" />
+	  <field field_ref="vtau_ice"     name="iicestrv" />
+	  <field field_ref="qsr_io_cea"   name="iicesflx" />
+	  <field field_ref="qns_io_cea"   name="iicenflx" />
+	  <field field_ref="snowpre"      name="isnowpre" />
+	</file>
+	
+      </file_group>
+
+      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+   <axis_definition>  
+      <axis id="deptht" long_name="Vertical T levels" unit="m" positive="down" />
+      <axis id="depthu" long_name="Vertical U levels" unit="m" positive="down" />
+      <axis id="depthv" long_name="Vertical V levels" unit="m" positive="down" />
+      <axis id="depthw" long_name="Vertical W levels" unit="m" positive="down" />
+      <axis id="nfloat" long_name="Float number"      unit="-"  />
+      <axis id="icbcla" long_name="Iceberg class"     unit="-"  />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>   
+  </context>
+
+  <context id="xios">
+
+      <variable_definition>
+	
+     <!-- 
+        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
+-->
+	  <variable id="buffer_size"               type="integer">25000000</variable>
+	  <variable id="buffer_server_factor_size" type="integer">2</variable>
+	  <variable id="info_level"                type="integer">0</variable>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+  
+</simulation>
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/namelist_cfg
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/namelist_cfg	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/namelist_cfg	(revision 4751)
@@ -0,0 +1,197 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "orca"               !  name of the configuration
+   jp_cfg      =       2               !  resolution of the configuration
+   jpidta      =     182               !  1st lateral dimension ( >= jpi )
+   jpjdta      =     149               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      31               !  number of levels      ( >= jpk )
+   jpiglo      =     182               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     149               !  2nd    -                  -    --> j  =jpjdta
+   jpizoom     =       1               !  left bottom (i,j) indices of the zoom
+   jpjzoom     =       1               !  in data domain indices
+   jperio      =       4               !  lateral cond. type (between 0 and 6)
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   jphgr_msh   =       0               !  type of horizontal mesh
+   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =  999999.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =  999999.0             !  meridional grid-spacing (degrees)
+   ppe1_m      =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =  999999.0             !  meridional grid-spacing (degrees)
+   ppsur       =   -4762.96143546300   !  ORCA r4, r2 and r05 coefficients
+   ppa0        =     255.58049070440   ! (default coefficients)
+   ppa1        =     245.58132232490   !
+   ppkth       =      21.43336197938   !
+   ppacr       =       3.0             !
+   ppdzmin     =  999999.              !  Minimum vertical spacing
+   pphmax      =  999999.              !  Maximum depth
+   ldbletanh   =  .FALSE.              !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =  999999.              !  Double tanh function parameters
+   ppkth2      =  999999.              !
+   ppacr2      =  999999.              !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_rnf    !   runoffs namelist surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namobs       !  observation usage                                      ('key_diaobs')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+/
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/namelist_ice_cfg
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/namelist_ice_cfg	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/namelist_ice_cfg	(revision 4751)
@@ -0,0 +1,24 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM-2 : Ice configuration namelist. Overwrites SHARED/namelist_ice_lim2_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicetrp     !   ice transport
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+/
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/namelist_ice_ref
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/namelist_ice_ref	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/namelist_ice_ref	(revision 4751)
@@ -0,0 +1,1 @@
+link ../../SHARED/namelist_ice_lim2_ref
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/namelist_ref
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/namelist_ref	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/EXP00/namelist_ref	(revision 4751)
@@ -0,0 +1,1 @@
+link ../../SHARED/namelist_ref
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/README
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/README	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/README	(revision 4751)
@@ -0,0 +1,40 @@
+#----------------------------------------------------------------------
+# prerequired
+#----------------------------------------------------------------------
+To use these idl tools, you need to download some climatogies and mask files;
+that you can find here: http://dodsp.idris.fr/reee512/NEMO_OUT/ORCA2_LIM/
+
+There is the wget command to get all those files (thanks to F. Pinsard)
+wget --recursive -l2 --no-directories --no-parent -A.nc -erobots=off http://dodsp.idris.fr/reee512/NEMO_OUT/ORCA2_LIM/
+
+You will aslo need the meshmask file (set nn_msh = 1 or nn_msh = 7 in your namelist and run the model for at least 1 time step).
+
+#----------------------------------------------------------------------
+# define your std_plot_vardef.sh or std_ts_vardef.sh file
+#----------------------------------------------------------------------
+Use the examples provided in :
+ - std_ts_vardef.sh_example1 or std_ts_vardef.sh_example2
+ - std_plot_vardef.sh_example1 or std_plot_vardef.sh_example2
+to build your own std_plot_vardef.sh or std_ts_vardef.sh file.
+
+This file is needed to define you PATH, the experiments and variables names
+
+you can copy std_ts_vardef.sh_example1 con std_ts_vardef.sh
+and std_plot_vardef.sh_example1 std_plot_vardef.sh
+
+
+
+
+
+
+#----------------------------------------------------------------------
+# short note on: How to build IDL virtual Machine:
+#
+. ./std_plot_vardef.sh # or . ./std_ts_vardef.sh 
+idl -IDL_STARTUP initenv
+IDL> .r std_main
+IDL> resolve_all
+IDL> save, /routines, filename='std_main.sav'
+IDL> exit
+#
+#----------------------------------------------------------------------
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/initenv.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/initenv.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/initenv.pro	(revision 4751)
@@ -0,0 +1,56 @@
+;
+; This is the initialisation file.
+; it defines the !path and the defaut values of some of the common variables
+;
+; this is supposed to speed-up IDL...
+;
+; a = fltarr(1000,1000,100)
+; a = 0
+;
+; path definition
+;
+!path = expand_path('+' + getenv('SAXO_DIR') ) + ':' + expand_path('+' + !dir)
+;
+; compatibility with the old version
+;
+keep_compatibility, 0
+;
+; define all the commons
+;
+@all_cm
+;
+; define default directories
+;
+homedir = './'
+iodir = './'
+psdir = isadirectory(getenv('PS_DIR'), title = 'Select the default postscripts directory')
+imagedir = './'
+animdir = './'
+;
+; define printer parameters
+;
+printer_human_names = ''
+printer_machine_names = ''
+print_command = ''
+;
+; colors ...
+;
+device, decomposed = 0
+device, retain = 2
+lct, 65
+;
+; postscript parameters ...
+;
+key_portrait = 0
+page_size = [20.9903, 29.7039]
+windowsize_scale = 1.0000
+archive_ps = 0
+;
+;========================================================
+; end of the part that should be modified by the users...
+;========================================================
+;
+; if needed, keep compatibility with the old version
+;
+@updateold
+;
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_common.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_common.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_common.pro	(revision 4751)
@@ -0,0 +1,9 @@
+COMMON std, cnt $
+   , std_iodir_climato, std_iodir_data $
+   , std_file1_T, std_file2_T $
+   , std_file1_U, std_file2_U $
+   , std_file1_V, std_file2_V $
+   , std_file1_I, std_file2_I $
+   , std_file_msksub $
+   , date1, date2, date1_2, date2_2 $
+   , allrec, blabla, htmltxt
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main.pro	(revision 4751)
@@ -0,0 +1,12 @@
+PRO std_main
+@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, /postscript
+    ELSE:print, 'Wrong definition of the environment variable PLOTTYPE. We stop'
+  ENDCASE
+;
+END
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main.sh
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main.sh	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main.sh	(revision 4751)
@@ -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/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main_1Y.sh
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main_1Y.sh	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main_1Y.sh	(revision 4751)
@@ -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/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main_5D.sh
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main_5D.sh	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main_5D.sh	(revision 4751)
@@ -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/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main_last_year_5D.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main_last_year_5D.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_main_last_year_5D.pro	(revision 4751)
@@ -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/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_ArcSal.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_ArcSal.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_ArcSal.pro	(revision 4751)
@@ -0,0 +1,62 @@
+pro std_plot_ArcSal, S1, S2in, SLevin, Z100 = z100, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  CASE n_params() OF
+    2:BEGIN
+      Slev = S2in
+    END
+    3:BEGIN
+      IF S2in.arr[0] EQ -1 THEN return
+      S2 = S2in
+      Slev = Slevin
+    END
+  ENDCASE
+;
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+;
+  IF keyword_set(z100) THEN tmp = min(abs(100 - gdept), ind) ELSE ind = 0
+  sdepref = strtrim(round(gdept[ind]), 1)+'m'
+  filename = cdti3 + '_Arctic_Sal'+sdepref+'_'+std_file1_T
+  IF keyword_set(S2) THEN filename = filename + '_' + std_file2_T
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+; 
+  domdef, 20, 380, 50, 90
+;
+  varunit = S1.unit
+  titleorg = 'Salinity ('+sdepref+')!C'
+;
+  IF keyword_set(S2) THEN BEGIN
+    title = titleorg+std_file1_T+ ' - '+std_file2_T
+    plt, S1.arr - S2.arr, MIN = -4., MAX = 4., INTER = 0.2, CELL_FILL = 2,  STYLE = 'so0so', format = '(f4.1)'  $     
+         , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, CHARSIZE = -0.55, GLINETHICK = 2. $      
+         , /ORTHO, MAP = [90, 0, 0], LATDEL = 5, boxzoom = [ind, ind], /zindex, /portrait, _extra = ex
+  ENDIF ELSE BEGIN 
+    title = titleorg+std_file1_T
+    plt, S1, MIN = 30.0, MAX = 36., INTER = 0.2, CELL_FILL = 2, format = '(f4.1)' $
+         , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, CHARSIZE = -0.55, GLINETHICK = 2. $
+         , /ORTHO, MAP = [90, 0, 0], LATDEL = 5, boxzoom = [ind, ind], /zindex, /PORTRAIT, _extra = ex
+  ENDELSE 
+; 
+  IF keyword_set(S2) THEN BEGIN
+    title = titleorg+std_file2_T+ ' - Levitus'
+    tmp = S2.arr - SLev.arr
+  ENDIF ELSE BEGIN 
+    title = titleorg+std_file1_T+ ' - Levitus'
+    tmp = S1.arr - SLev.arr
+  ENDELSE
+  plt, temporary(tmp), MIN = -4., MAX = 4., INTER = 0.2, CELL_FILL = 2,  STYLE = 'so0so', format = '(f4.1)'  $     
+       , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, CHARSIZE = -0.55, GLINETHICK = 2. $      
+       , /ORTHO, MAP = [90, 0, 0], LATDEL = 5, boxzoom = [ind, ind], /zindex, /NOERASE, _extra = ex
+;
+  domdef
+;
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+  
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_EqS.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_EqS.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_EqS.pro	(revision 4751)
@@ -0,0 +1,34 @@
+pro std_plot_EqS, S1, S2, SLev, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_EqS_'+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
+  
+  title = 'Equatorial Salinity!C'+std_file1_T
+  pltz, S1, MININ = 33., MAXIN = 37., INTER = .2, typein = 'xz', FORMAT = '(f4.1)'  $
+        , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, boxzoom = [20., 380., -1., 1., 0., 500.], /PORTRAIT, _extra = ex
+  
+  if std_file1_T EQ std_file2_T then begin
+    S = S1.arr - Slev.arr
+    title = title+' - Levitus'
+  ENDIF ELSE BEGIN 
+    S = S1.arr - S2.arr
+    title = title+' - '+std_file2_T
+  ENDELSE
+  
+  pltz, S, MININ = -1., MAXIN = 1., INTER = 0.1, typein = 'xz', STYLE = 'so0so', FORMAT = '(f4.1)' $
+        , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = [20., 380., -1., 1., 0., 500.], /noerase, _extra = ex
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_EqT.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_EqT.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_EqT.pro	(revision 4751)
@@ -0,0 +1,42 @@
+pro std_plot_EqT, T1, T2, TLev, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_EqT_'+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
+  
+  title = 'Equatorial Temperature!C'+std_file1_T
+  pltz, T1, MININ = 2., MAXIN = 30., INTER = 1., typein = 'xz', FORMAT = '(I2)'  $
+        , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, boxzoom = [20., 380., -1., 1., 0., 500.], /PORTRAIT, _extra = ex
+  
+  if std_file1_T EQ std_file2_T then begin
+    T = T1.arr - TLev.arr
+    title = title+' - Levitus'
+    min = -4.
+    max = -min
+    inter = .5
+    fmt = '(I2)'
+  ENDIF ELSE BEGIN 
+    T = T1.arr - T2.arr
+    title = title+' - '+std_file2_T
+    min =  -2.
+    max = -min
+    inter = .25
+    fmt = '(f4.1)'
+  ENDELSE 
+  
+  pltz, T, MININ = min, MAXIN = max, INTER = inter, typein = 'xz', STYLE = 'so0so', FORMAT = fmt $
+        , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = [20., 380., -1., 1., 0., 500.], /NOERASE, _extra = ex
+                                ; 
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_EqU.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_EqU.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_EqU.pro	(revision 4751)
@@ -0,0 +1,28 @@
+pro std_plot_EqU, U1, U2, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_EqU_'+std_file1_U
+  if std_file1_U NE std_file2_U then filename = filename + '_'+std_file2_U
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+  
+  title = 'Equatorial Zonal Current!C'+std_file1_U
+  pltz, U1, MININ = -1., MAXIN = 1., INTER = .1, typein = 'xz', STYLE = 'so0so', FORMAT = '(f4.1)' $
+        , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, boxzoom = [20., 380., -1., 1., 0., 500.], ZOOM = 500, /PORTRAIT, _extra = ex
+
+  if std_file1_U NE std_file2_U then begin
+    title = title+' - '+std_file2_U
+    pltz, U1.arr-U2.arr, MININ = -.5, MAXIN = .5, INTER = .1, typein = 'xz', STYLE = 'so0so', FORMAT = '(f4.1)' $
+          , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = [20., 380., -1., 1., 0., 500.], ZOOM = 500, /PORTRAIT, _extra = ex
+  endif
+  
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_GlobMeanTS.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_GlobMeanTS.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_GlobMeanTS.pro	(revision 4751)
@@ -0,0 +1,39 @@
+pro std_plot_GlobMeanTS, T1, T2, TLev, S1, S2, SLev, sEXP1, sEXP2, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_GlobMeanTS_'+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 = T1.unit
+  title = 'Temperature Global mean!C'+std_file1_T+' - Levitus (Black)'
+  if std_file1_T NE std_file2_T THEN title = title+'!C'+std_file2_T+' - Levitus (Red)'
+  plt1d, T1.arr - TLev.arr, typein = 'z', ticklen = 1, MIN = -2., MAX = 2., boxzoom = [4., 5300.], /KEEPBOTTOM $
+         , small = [1, 2, 1], XGRIDSTYLE = 2, YGRIDSTYLE = 2, TITLE = title, /PORTRAIT,  _extra = ex
+  if std_file1_T NE std_file2_T then begin
+    plt1d, T2.arr - TLev.arr, typein = 'z',  ticklen = 1, MIN = -2., MAX = 2., boxzoom = [4., 5300.], /KEEPBOTTOM  $
+           , /ov1d, COLOR = 250, TITLE = title, _extra = ex 
+  endif
+;
+  varunit = S1.unit
+  title = 'Salinity Global mean!C'+std_file1_T+' - Levitus (Black)'
+  if std_file1_T NE std_file2_T THEN title = title+'!C'+std_file2_T+' - Levitus (Red)'
+  plt1d, S1.arr - SLev.arr, typein = 'z', ticklen = 1, MIN = -.2, MAX = .4, boxzoom = [4., 5300.], /KEEPBOTTOM $
+         , small = [1, 2, 2], XGRIDSTYLE = 2, YGRIDSTYLE = 2, TITLE = title, /NOERASE, _extra = ex
+  if std_file1_T NE std_file2_T then begin
+    plt1d, S2.arr - SLev.arr, typein = 'z',  ticklen = 1, MIN = -2., MAX = 4., boxzoom = [4., 5300.], /KEEPBOTTOM $
+           ,  /ov1d, COLOR = 250, TITLE = title, _extra = ex 
+  endif
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceAge.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceAge.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceAge.pro	(revision 4751)
@@ -0,0 +1,75 @@
+pro std_plot_IceAge, Iage1, Iage2, Ifra1, Ifra2, ARC = arc, ANT = ant, FEBR = febr, 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 = 'IceAge'
+  IF keyword_set(arc) THEN var = var+'_Arc_'
+  IF keyword_set(ant) THEN var = var+'_Ant_'
+  IF keyword_set(febr) THEN var = var+'Febr'
+  IF keyword_set(march) THEN var = var+'March'
+  IF keyword_set(sept) THEN var = var+'Sept'
+
+  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 keyword_set(arc) THEN BEGIN 
+    domdef, 20, 380, 50, 90
+    vmin = 0.
+    vmax = 7.
+    vint = 0.5 
+    fmtd = '(f4.1)'
+    vmind = -3.
+    vmaxd = 3.
+    vintd = 0.5
+    fmtd = '(f4.1)'
+    div = 7
+    map = [90, 0, 0]
+  ENDIF
+  IF keyword_set(ant) THEN BEGIN 
+    domdef, 20, 380, -90, -50
+    vmin = 0.
+    vmax = 2.
+    vint = 0.2
+    fmt = '(f4.1)'
+    vmind = -1.
+    vmaxd = 1.
+    vintd = 0.2
+    fmtd = '(f4.1)'
+    div = 5
+    map = [-90, 0, 0]
+  ENDIF
+;
+  varunit = Iage1.unit
+;
+  title = var+'!C'+std_file1_I
+  
+  Iage1.arr = Iage1.arr * ( Ifra1.arr gt 0.15 )
+ 
+  plt, Iage1.arr - 1.E-04, MIN = vmin, MAX = vmax, INTER = vint, /STRICTFILL, CELL_FILL = 2, format = fmt $
+       , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, divisions = div  $
+       , CHARSIZE = 1.05, GLINETHICK = 2., /ORTHO, MAP = map, /PORTRAIT, _extra = ex
+;                                ;
+  if std_file1_I NE std_file2_I then begin            
+    title = title + std_file2_I
+ 
+    Iage2.arr = Iage2.arr * ( Ifra2.arr gt 0.15 )
+  
+    plt, Iage1.arr - Iage2.arr, MIN = vmind, MAX = vmaxd, INTER = vintd, STYLE = 'so0so', format = fmtd $
+         , small = [1, 2, 2], COAST_THICK = 2, CELL_FILL = 2, TITLE = title  $
+         , CHARSIZE = 1.05, GLINETHICK = 2., /ORTHO, MAP = map, /NOERASE, _extra = ex
+  endif                        
+  
+  domdef
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceFrac.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceFrac.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceFrac.pro	(revision 4751)
@@ -0,0 +1,60 @@
+pro std_plot_IceFrac, Ifra1, Ifra2, ARC = arc, ANT = ant, FEBR = febr, 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 = 'IceFra'
+  IF keyword_set(arc) THEN var = var+'_Arc_'
+  IF keyword_set(ant) THEN var = var+'_Ant_'
+  IF keyword_set(febr) THEN var = var+'Febr'
+  IF keyword_set(march) THEN var = var+'March'
+  IF keyword_set(sept) THEN var = var+'Sept'
+
+  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 keyword_set(arc) THEN BEGIN 
+    domdef, 20, 380, 50, 90
+    map = [90, 0, 0]
+  ENDIF
+  IF keyword_set(ant) THEN BEGIN 
+    domdef, 20, 380, -90, -50
+    map = [-90, 0, 0]
+  ENDIF
+;
+  varunit = Ifra1.unit
+;
+  title = var+'!C'+std_file1_I
+  Ifra1.arr = Ifra1.arr * ( Ifra1.arr gt 0.15 )
+  plt, Ifra1.arr - 1.E-04, MIN = 0., MAX = 1., INTER = .1, /STRICTFILL, CELL_FILL = 2, format = '(f4.1)' $
+       , small = [1, 2, 1], COAST_THICK = 2, TITLE = title $
+       , CHARSIZE = 1.05, GLINETHICK = 2., /ORTHO, MAP = map, /PORTRAIT, _extra = ex
+;                                ;
+  if std_file1_I NE std_file2_I then begin            
+    title = title + std_file2_I
+    Ifra2.arr = Ifra2.arr * ( Ifra2.arr gt 0.15 )
+    plt, Ifra1.arr - Ifra2.arr, MIN = -1, MAX = 1, INTER = .1, STYLE = 'so0so', format = '(f4.1)' $
+         , small = [1, 2, 2], COAST_THICK = 2, CELL_FILL = 2, TITLE = title $
+         , CHARSIZE = 1.05, GLINETHICK = 2., /ORTHO, MAP = map, /NOERASE, _extra = ex
+;;SF  finire, aggiungere lettura obs
+;;SF  endif else begin
+;;SF    title = title+ ' - Observations'
+;;SF    plt, Ifra1.arr - Ifra_obs.arr, MIN = -1., MAX = 1., INTER = 0.1, STYLE = 'so0so', format = '(f4.1)' $
+;;SF         , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, CELL_FILL = 2, TITLE = title $
+;;SF         , CHARSIZE = 1.05, GLINETHICK = 2., /ORTHO, MAP = map, /NOERASE, _extra = ex
+;;SF  endelse  
+endif
+
+  domdef
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceSal.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceSal.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceSal.pro	(revision 4751)
@@ -0,0 +1,57 @@
+pro std_plot_IceSal, Isal1, Isal2, Ifra1, Ifra2, ARC = arc, ANT = ant, FEBR = febr, 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 = 'IceSal'
+  IF keyword_set(arc) THEN var = var+'_Arc_'
+  IF keyword_set(ant) THEN var = var+'_Ant_'
+  IF keyword_set(febr) THEN var = var+'Febr'
+  IF keyword_set(march) THEN var = var+'March'
+  IF keyword_set(sept) THEN var = var+'Sept'
+
+  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 keyword_set(arc) THEN BEGIN
+     domdef, 20, 380, 50, 90
+     map = [90, 0, 0]
+  ENDIF
+  IF keyword_set(ant) THEN BEGIN
+     domdef, 20, 380, -90, -50
+     map = [-90, 0, 0]
+  ENDIF
+  ;
+  varunit = Isal1.unit
+  ;
+   title = var+'!C'+std_file1_I
+
+   Isal1.arr = Isal1.arr * ( Ifra1.arr gt 0.15 )
+   plt, Isal1.arr - 1.E-04, MIN = 0., MAX = 10., INTER = 1., /STRICTFILL, CELL_FILL = 2, format = '(f4.1)' $
+        , small = [1, 2, 1], COAST_THICK = 2, TITLE = title $
+        , CHARSIZE = 1.05, GLINETHICK = 2., /ORTHO, MAP = map, /PORTRAIT, _extra = ex
+ ;                                ;
+   if std_file1_I NE std_file2_I then begin
+     title = title + std_file2_I
+     
+     Isal2.arr = Isal2.arr * ( Ifra2.arr gt 0.15 )
+     
+     plt, Isal1.arr - Isal2.arr, MIN = -2., MAX = 2., INTER = 1., STYLE = 'so0so', format = '(f4.1)' $
+          , small = [1, 2, 2], COAST_THICK = 2, CELL_FILL = 2, TITLE = title $
+          , CHARSIZE = 1.05, GLINETHICK = 2., /ORTHO, MAP = map, /NOERASE, _extra = ex
+ endif
+ 
+   domdef
+ 
+   htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+   if KEYWORD_SET(postscript) then closeps
+ 
+   return
+ end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceThick.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceThick.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceThick.pro	(revision 4751)
@@ -0,0 +1,75 @@
+pro std_plot_IceThick, Ithi1, Ithi2, Ifra1, Ifra2, ARC = arc, ANT = ant, APRIL = april, JAN = jan, SEPT = sept, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+
+  var = 'IceThi'
+  IF keyword_set(arc) THEN var = var+'_Arc_'
+  IF keyword_set(ant) THEN var = var+'_Ant_'
+  IF keyword_set(april) THEN var = var+'April'
+  IF keyword_set(jan) THEN var = var+'Jan'
+  IF keyword_set(sept) THEN var = var+'Sept'
+
+  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 keyword_set(arc) THEN BEGIN 
+    domdef, 20, 380, 50, 90
+    vmin = 0.
+    vmax = 6.
+    vint = 0.5
+    fmtd = '(f4.1)'
+    vmind = -3.
+    vmaxd = 3.
+    vintd = 0.5
+    fmtd = '(f4.1)'
+    div = 6
+    map = [90, 0, 0]
+  ENDIF
+  IF keyword_set(ant) THEN BEGIN 
+    domdef, 20, 380, -90, -50
+    vmin = 0.
+    vmax = 3.
+    vint = 0.2
+    fmt = '(f4.1)'
+    vmind = -1.
+    vmaxd = 1.
+    vintd = 0.2
+    fmtd = '(f4.1)'
+    div = 5
+    map = [-90, 0, 0]
+  ENDIF
+;
+  varunit = Ithi1.unit
+;
+  title = var+'!C'+std_file1_I
+
+  Ithi1.arr = Ithi1.arr * ( Ifra1.arr gt 0.15 )
+ 
+  plt, (Ithi1.arr < 10. ) - 1.E-04, MIN = vmin, MAX = vmax, INTER = vint, /STRICTFILL, CELL_FILL = 2, format = fmt $
+       , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, divisions = div  $
+       , CHARSIZE = 1.05, GLINETHICK = 2., /ORTHO, MAP = map, /PORTRAIT, _extra = ex
+;                                ;
+  if std_file1_I NE std_file2_I then begin            
+    title = title + std_file2_I
+
+    Ithi2.arr = Ithi2.arr * ( Ifra2.arr gt 0.15 )
+
+    plt, Ithi1.arr - Ithi2.arr, MIN = vmind, MAX = vmaxd, INTER = vintd, STYLE = 'so0so', format = fmtd $
+         , small = [1, 2, 2], COAST_THICK = 2, CELL_FILL = 2, TITLE = title  $
+         , CHARSIZE = 1.05, GLINETHICK = 2., /ORTHO, MAP = map, /NOERASE, _extra = ex
+  endif                        
+  
+  domdef
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceVel.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceVel.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_IceVel.pro	(revision 4751)
@@ -0,0 +1,60 @@
+pro std_plot_IceVel, IvelU1, IvelU2, IvelV1, IvelV2, Ivelo1, Ivelo2, ARC = arc, ANT = ant, FEBR = febr, MARCH = march, SEPT = sept, POSTSCRIPT = postscript, _extra = ex
+
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+
+  var = 'IceVel'
+  IF keyword_set(arc) THEN var = var+'_Arc_'
+  IF keyword_set(ant) THEN var = var+'_Ant_'
+  IF keyword_set(febr) THEN var = var+'Febr'
+  IF keyword_set(march) THEN var = var+'March'
+  IF keyword_set(sept) THEN var = var+'Sept'
+
+  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 keyword_set(arc) THEN BEGIN
+     domdef, 20, 380, 50, 90
+     map = [90, 0, 0]
+  ENDIF
+  IF keyword_set(ant) THEN BEGIN
+     domdef, 20, 380, -90, -50
+     map = [-90, 0, 0]
+  ENDIF
+  ;
+  title = var+'!C'+std_file1_I
+   
+  Ivelo1 = {arr: Ivelo1.arr - 1.E-04, g: 'T'}
+  ; Ivelo1 = {arr: Ivelo1.arr, g: 'T'}
+  
+  plt, Ivelo1, vecteur={u:IvelU1, v:IvelV1}, unvectsur=[3,3], normeref = 0.5, cmref = 1.  $
+        , small = [1, 2, 1], TITLE = title $
+        , /ORTHO, MAP = map, /PORTRAIT, _extra = ex
+ ;                                
+ 
+  if std_file1_I NE std_file2_I then begin
+     title = title + std_file2_I  
+  ;   
+     Ivelo = {arr: Ivelo1.arr - Ivelo2.arr, g: 'T'}
+     ; Ivelo1 = {arr: Ivelo1.arr, g: 'T'}
+     ; Ivelo2 = {arr: Ivelo2.arr - 1.E-04, g: 'T'}
+     Ivelo2 = {arr: Ivelo2.arr , g: 'T'}
+    
+     plt, Ivelo, vecteur={u: IvelU2, v: IvelV2}, unvectsur=[3,3], normeref = 0.5, cmref = 1.  $
+          , small = [1, 2, 2], TITLE = title $
+          , /ORTHO, MAP = map, /NOERASE, _extra = ex
+ endif
+ 
+   domdef
+ 
+   htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+   if KEYWORD_SET(postscript) then closeps
+ 
+   return
+ end
+ 
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_Med_Sdepth.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_Med_Sdepth.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_Med_Sdepth.pro	(revision 4751)
@@ -0,0 +1,36 @@
+pro std_plot_Med_Sdepth, S1, S2, SLev, lat, POSTSCRIPT = postscript,  _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  slat = strtrim(lat, 1)+'N'
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_Med_Sdepth_'+slat+'_'+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
+;
+  title = 'Salinity ('+slat+')!C'+std_file1_T
+  pltz, S1, MININ = 35., MAXIN = 37., INTER = 0.1, FORMAT = '(f4.1)' $
+        , small = [1, 2, 1], COAST_THICK = 2, endpoints = [300., lat, 357., lat], TITLE = title $
+        , boxzoom = [2000.], ZOOM = 2000., /PORTRAIT, _extra = ex 
+;
+  if std_file1_T NE std_file2_T then begin
+    title = title+ ' - '+std_file2_T
+    pltz, S1.arr - S2.arr + valmask*(1.-tmask), MININ = -.4, MAXIN = .4, INTER = .05, STYLE = 'so0so', FORMAT = '(f4.1)' $ 
+          , small = [1, 2, 2], COAST_THICK = 2, endpoints = [300., lat, 357., lat], TITLE = title $
+          , boxzoom = [2000.], ZOOM = 2000., /noerase, _extra = ex 
+  endif else begin
+    title = title+ ' - Levitus'
+    pltz, S1.arr - SLev.arr + valmask*(1.-tmask), MININ = -1., MAXIN = 1., INTER = 0.1, STYLE = 'so0so', FORMAT = '(f4.1)' $ 
+          , small = [1, 2, 2], COAST_THICK = 2, endpoints = [300., lat, 357., lat], TITLE = title $
+          , boxzoom = [2000.], ZOOM = 2000., /noerase, _extra = ex 
+  endelse
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_Med_Sspread.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_Med_Sspread.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_Med_Sspread.pro	(revision 4751)
@@ -0,0 +1,34 @@
+pro std_plot_Med_Sspread, S1, S2, SLev, depth, POSTSCRIPT = postscript,  _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  tmp = min(abs(depth - gdept), ind)
+  sdepref = strtrim(round(gdept[ind]), 1)+'m'
+  filename = cdti3 + '_Med_Sspread_'+sdepref+'_'+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
+;  
+  title = 'Salinity ('+sdepref+')!C'+std_file1_T
+  plt, S1, MININ = 35., MAXIN = 37., INTER = 0.1, FORMAT = '(f4.1)' $
+       , small = [1, 2, 1], boxzoom = [270, 365, 5, 70, ind, ind], /zindex, COAST_THICK = 2, TITLE = title, /PORTRAIT, _extra = ex
+;
+  if std_file1_T NE std_file2_T then begin
+    title = title+ ' - '+std_file2_T
+    plt, S1.arr - S2.arr, MININ = -.4, MAXIN = .4, INTER = .05, STYLE = 'so0so', FORMAT = '(f4.1)'  $
+         , small = [1, 2, 2], boxzoom = [270, 365, 5, 70, ind, ind], /zindex, COAST_THICK = 2, TITLE = title, /noerase, _extra = ex
+  endif else begin
+    title = title+ ' - Levitus'
+    plt, S1.arr - SLev.arr, MININ = -1., MAXIN = 1., INTER = 0.1, STYLE = 'so0so', FORMAT = '(f4.1)'  $
+         , small = [1, 2, 2], boxzoom = [270, 365, 5, 70, ind, ind], /zindex, COAST_THICK = 2, TITLE = title, /noerase, _extra = ex
+  ENDELSE
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_S100m.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_S100m.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_S100m.pro	(revision 4751)
@@ -0,0 +1,34 @@
+pro std_plot_S100m, S1, S2, SLev, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  tmp = min(abs(100 - gdept), ind)
+  sdepref = strtrim(round(gdept[ind]), 1)+'m'
+  filename = cdti3 + '_S'+sdepref+'_'+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
+;
+  title = 'Salinity ('+sdepref+')!C'+std_file1_T
+  plt, S1, MIN = 33., MAX = 38.2, INTER = .2, format = '(f4.1)' $
+       , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, boxzoom = [floor(gdept[ind]), ceil(gdept[ind])], /PORTRAIT, _extra = ex
+;
+  if std_file1_T NE std_file2_T then begin
+    title = title+ ' - '+std_file2_T
+    plt, S1.arr[*, *, 0] - S2.arr[*, *, 0], MIN = -1., MAX = 1., INTER = .1, STYLE = 'so0so', format = '(f4.1)' $
+         , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = [floor(gdept[ind]), ceil(gdept[ind])], /noerase, _extra = ex   
+  endif else begin
+    title = title+ ' - Levitus'
+    plt, S1.arr-SLev.arr, MIN = -1., MAX = 1., INTER = 0.1, STYLE = 'so0so', format = '(f4.1)' $
+         , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = [floor(gdept[ind]), ceil(gdept[ind])], /noerase, _extra = ex
+  endelse
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_SnowThick.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_SnowThick.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_SnowThick.pro	(revision 4751)
@@ -0,0 +1,75 @@
+pro std_plot_SnowThick, Isnow1, Isnow2, Ifra1, Ifra2, ARC = arc, ANT = ant, FEBR = febr, 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 = 'SnowThi'
+  IF keyword_set(arc) THEN var = var+'_Arc_'
+  IF keyword_set(ant) THEN var = var+'_Ant_'
+  IF keyword_set(febr) THEN var = var+'Febr'
+  IF keyword_set(march) THEN var = var+'March'
+  IF keyword_set(sept) THEN var = var+'Sept'
+
+  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 keyword_set(arc) THEN BEGIN 
+    domdef, 20, 380, 50, 90
+    vmin = 0.
+    vmax = .6
+    vint = 0.1
+    ;fmt = '(i2)'
+    fmt = '(f4.1)'
+    vmind = -1.
+    vmaxd = 1.
+    vintd = 0.1
+    ;fmtd = '(i2)'
+    fmtd = '(f4.1)'
+    map = [90, 0, 0]
+  ENDIF
+  IF keyword_set(ant) THEN BEGIN 
+    domdef, 20, 380, -90, -50
+    vmin = 0.
+    vmax = 1.
+    vint = 0.1
+    fmt = '(f4.1)'
+    vmind = -1.
+    vmaxd = 1.
+    vintd = 0.1
+    fmtd = '(f4.1)'
+    map = [-90, 0, 0]
+  ENDIF
+;
+  varunit = Isnow1.unit
+;
+  title = var+'!C'+std_file1_I
+  
+  Isnow1.arr = Isnow1.arr * ( Ifra1.arr gt 0.15 )
+  
+  plt, (Isnow1.arr < 10. ) - 1.E-04, MIN = vmin, MAX = vmax, INTER = vint, /STRICTFILL, CELL_FILL = 2, format = fmt $
+       , small = [1, 2, 1], COAST_THICK = 2, TITLE = title $
+       , CHARSIZE = 1.05, GLINETHICK = 2., /ORTHO, MAP = map, /PORTRAIT, _extra = ex
+;                                ;
+  if std_file1_I NE std_file2_I then begin            
+    title = title + std_file2_I
+   
+    Isnow2.arr = Isnow2.arr * ( Ifra2.arr gt 0.15 )
+     
+    plt, Isnow1.arr - Isnow2.arr, MIN = vmind, MAX = vmaxd, INTER = vintd, STYLE = 'so0so', format = fmtd $
+         , small = [1, 2, 2], COAST_THICK = 2, CELL_FILL = 2, TITLE = title $
+         , CHARSIZE = 1.05, GLINETHICK = 2., /ORTHO, MAP = map, /NOERASE, _extra = ex
+  endif                        
+  
+  domdef
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_T100m.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_T100m.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_T100m.pro	(revision 4751)
@@ -0,0 +1,34 @@
+pro std_plot_T100m, T1, T2, TLev, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  tmp = min(abs(100 - gdept), ind)
+  sdepref = strtrim(round(gdept[ind]), 1)+'m'
+  filename = cdti3 + '_T'+sdepref+'_'+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
+;                              
+  title = 'Temperature ('+sdepref+')!C'+std_file1_T
+  plt, T1, MIN = -2., MAX = 32., INTER = 1., FORMAT = '(I2)'  $
+       , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, boxzoom = [floor(gdept[ind]), ceil(gdept[ind])], /portrait, _extra = ex
+;
+  IF std_file1_T NE std_file2_T THEN BEGIN
+    title = title+ ' - '+std_file2_T
+    plt, T1.arr - T2.arr, MIN = -2., MAX = 2., INTER = .2, STYLE = 'so0so', FORMAT = '(f4.1)' $
+         , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = [floor(gdept[ind]), ceil(gdept[ind])], /noerase,  _extra = ex
+  ENDIF ELSE BEGIN
+    title = title+ ' - Levitus'
+    plt, T1.arr - TLev.arr, MIN = -5., MAX = 5., INTER = .5, STYLE = 'so0so', FORMAT = '(I2)'  $
+         , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = [floor(gdept[ind]), ceil(gdept[ind])], /noerase, _extra = ex   
+  ENDELSE
+;
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_ZonMld.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_ZonMld.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_ZonMld.pro	(revision 4751)
@@ -0,0 +1,32 @@
+pro std_plot_ZonMld, MLD1, MLD2, MLD, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_ZonMld_'+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
+                                ;
+  title = std_file1_T+' (Black)!C'
+  if std_file1_T NE std_file2_T THEN title = title + std_file2_T+' (Red)!C'
+  title = title + 'DeBoyer (Blue)!C'
+
+  plt1d, -MLD1.arr, MIN = -300., MAX = 0., INTER = 10., typein = 'y' $
+         , small = [1, 1, 1], boxzoom = 5500, ZOOM = 500, CHARSIZE = .8, TITLE = title, /PORTRAIT, _extra = ex 
+                                ;
+  IF std_file1_T NE std_file2_T THEN $
+     plt1d, -MLD2.arr, MIN = -300., MAX = 0., INTER = 10., typein = 'y' $
+            , /ov1d, COLOR = 250, TITLE = title, /NOERASE, _extra = ex ; color 250 = red
+                                ;
+  plt1d, -MLD.arr, MIN = -300., MAX = 0., INTER = 10., typein = 'y' $
+         ,  /ov1d, COLOR = 100, THICK = 3, TITLE = title, /NOERASE, _extra = ex ; color 100 = blue
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_all.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_all.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_all.pro	(revision 4751)
@@ -0,0 +1,583 @@
+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 )
+   ; old formulation: we tested variable name
+   ; IF strlowcase(getenv('VAR1_U')) EQ 'uocetr_eff' OR strlowcase(getenv('VAR1_U')) EQ 'vozoeftr' THEN BEGIN
+   IF strlowcase(U1.unit) EQ 'm3/s' THEN BEGIN
+     ;IF it is a transport it is transofrmed in velocity
+     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 )
+     ; old formulation: we tested variable name
+     ; IF strlowcase(getenv('VAR2_U')) EQ 'uocetr_eff' OR strlowcase(getenv('VAR2_U')) EQ 'vozoeftr' THEN BEGIN
+     IF strlowcase(U2.unit) EQ 'm3/s' 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 )
+   ; old formulation: we tested variable name
+   ; IF strlowcase(getenv('VAR1_V')) EQ 'vocetr_eff' OR strlowcase(getenv('VAR1_V')) EQ 'vomeeftr' THEN BEGIN
+   IF strlowcase(V1.unit) EQ 'm3/s' THEN BEGIN ; test on unit to understand if it is a transport or velocity
+     ;IF it is a transport it is transofrmed in velocity
+     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 )
+     ; old formulation
+     ; IF strlowcase(getenv('VAR2_V')) EQ 'vocetr_eff' OR strlowcase(getenv('VAR2_V')) EQ 'vozoeftr' THEN BEGIN
+     IF strlowcase(V2.unit) EQ 'm3/s' 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}
+  jan = where(mm EQ 1, cnt)
+  sept = where(mm EQ 9, cnt)
+  Ithi_jan_1 = {arr:1./float(cnt) * total(reform(Ithi_1.arr[*, *, temporary(jan)],nxt,nyt,cnt), 3), unit:Ithi_1.unit} 
+  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} 
+     jan = where(mm EQ 1, cnt)
+     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} 
+     Ithi_jan_2 = {arr:1./float(cnt) * total(reform(Ithi_2.arr[*, *, temporary(jan)],nxt,nyt,cnt), 3), unit:Ithi_2.unit} 
+     undefine, Ithi_2
+  ENDIF ELSE BEGIN 
+     Ithi_april_2 = {arr:-1}
+     Ithi_sept_2 = {arr:-1}
+     Ithi_jan_2 = {arr:-1}
+  ENDELSE
+;
+  Ifra_1 = read_ncdf(getenv('VAR1_Ifrac'), allrecords = allrec, filename = std_file1_I ) 
+  caldat, time, mm
+  jan = where(mm EQ 1, cnt)
+  Ifra_jan_1 = {arr:1./float(cnt) * total(reform(Ifra_1.arr[*, *, temporary(jan)],nxt,nyt,cnt), 3), unit:Ifra_1.unit} 
+  febr = where(mm EQ 2, cnt)
+  Ifra_febr_1 = {arr:1./float(cnt) * total(reform(Ifra_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Ifra_1.unit} 
+  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} 
+  april = where(mm EQ 4, cnt)
+  Ifra_april_1 = {arr:1./float(cnt) * total(reform(Ifra_1.arr[*, *, temporary(april)],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
+    jan = where(mm EQ 1, cnt)
+    Ifra_jan_2 = {arr:1./float(cnt) * total(reform(Ifra_2.arr[*, *, temporary(jan)],nxt,nyt,cnt), 3), unit:Ifra_2.unit}
+    febr = where(mm EQ 2, cnt)
+    Ifra_febr_2 = {arr:1./float(cnt) * total(reform(Ifra_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Ifra_2.unit}
+    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}
+    april = where(mm EQ 4, cnt)
+    Ifra_april_2 = {arr:1./float(cnt) * total(reform(Ifra_2.arr[*, *, temporary(april)],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_jan_2 = {arr:-1} 
+    Ifra_febr_2 = {arr:-1}
+    Ifra_march_2 = {arr:-1}
+    Ifra_april_2 = {arr:-1}
+    Ifra_sept_2 = {arr:-1}
+  ENDELSE
+;
+   Isnow_1 = read_ncdf(getenv('VAR1_Isnow'), allrecords = allrec, filename = std_file1_I ) 
+   caldat, time, mm
+   febr = where(mm EQ 2, cnt)
+   Isnow_febr_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isnow_1.unit} 
+   march = where(mm EQ 3, cnt)
+   Isnow_march_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isnow_1.unit} 
+   sept = where(mm EQ 9, cnt)
+   Isnow_sept_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isnow_1.unit}
+   ;undefine, Isnow_1
+ ;
+   IF std_file2_I NE std_file1_I THEN BEGIN
+     Isnow_2 = read_ncdf(getenv('VAR2_Isnow'), allrecords = allrec, filename = std_file2_I ) 
+     caldat, time, mm
+     febr = where(mm EQ 2, cnt)
+     Isnow_febr_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+     march = where(mm EQ 3, cnt)
+     Isnow_march_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+     sept = where(mm EQ 9, cnt)
+     Isnow_sept_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+   ;  undefine, Isnow_2
+   ENDIF ELSE BEGIN 
+     Isnow_febr_2 = {arr:-1}
+     Isnow_march_2 = {arr:-1}
+     Isnow_sept_2 = {arr:-1}
+   ENDELSE
+;
+   Isal_1 = read_ncdf(getenv('VAR1_Isal'), allrecords = allrec, filename = std_file1_I ) 
+;SF  ready for mask : remove 0.15% for observations
+;SF
+;SF   Ifra_1 = read_ncdf(getenv('VAR1_Ifrac'), allrecords = allrec, filename = std_file1_I )
+;SF   msk = Ifra_1.arr gt 0.15 ; remove 0.15% for observations 
+   caldat, time, mm
+   march = where(mm EQ 3, cnt)
+   febr = where(mm EQ 2, cnt)
+   Isal_march_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isal_1.unit} 
+;SF
+;SF   Isal_1.arr = Isal_1.arr * msk
+;SF 
+;SF   Isal_march_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isal_1.unit} 
+   Isal_febr_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isal_1.unit} 
+   sept = where(mm EQ 9, cnt)
+   Isal_sept_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isal_1.unit}
+   ;undefine, Isal_1
+ ;
+   Isal_2 = read_ncdf(getenv('VAR2_Isal'), allrecords = allrec, filename = std_file2_I ) 
+   IF std_file2_I NE std_file1_I THEN BEGIN
+     caldat, time, mm
+     march = where(mm EQ 3, cnt)
+     febr = where(mm EQ 2, cnt)
+     Isal_march_2 = {arr:1./float(cnt) * total(reform(Isal_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isal_2.unit}
+     Isal_febr_2 = {arr:1./float(cnt) * total(reform(Isal_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isal_2.unit}
+     sept = where(mm EQ 9, cnt)
+     Isal_sept_2 = {arr:1./float(cnt) * total(reform(Isal_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isal_2.unit}
+   ;  undefine, Isal_2
+   ENDIF ELSE BEGIN 
+     Isal_febr_2 = {arr:-1}
+     Isal_march_2 = {arr:-1}
+     Isal_sept_2 = {arr:-1}
+   ENDELSE
+;
+  IvelU_1 = read_ncdf(getenv('VAR1_IvelU'), allrecords = allrec, filename = std_file1_I ) 
+  IvelV_1 = read_ncdf(getenv('VAR1_IvelV'), allrecords = allrec, filename = std_file1_I ) 
+  Ivelo_1 = read_ncdf(getenv('VAR1_Ivelo'), allrecords = allrec, filename = std_file1_I ) 
+  caldat, time, mm
+  febr = where(mm EQ 2, cnt)
+  IvelU_febr_1 = {arr:1./float(cnt) * total(reform(IvelU_1.arr[*, *, febr],nxt,nyt,cnt), 3), unit:IvelU_1.unit, g: 'T'}
+  IvelV_febr_1 = {arr:1./float(cnt) * total(reform(IvelV_1.arr[*, *, febr],nxt,nyt,cnt), 3), unit:IvelV_1.unit, g: 'T'}
+  Ivelo_febr_1 = {arr:1./float(cnt) * total(reform(Ivelo_1.arr[*, *, febr],nxt,nyt,cnt), 3), unit:Ivelo_1.unit, g: 'T'} 
+  march = where(mm EQ 3, cnt)
+  IvelU_march_1 = {arr:1./float(cnt) * total(reform(IvelU_1.arr[*, *, march],nxt,nyt,cnt), 3), unit:IvelU_1.unit, g: 'T'}
+  IvelV_march_1 = {arr:1./float(cnt) * total(reform(IvelV_1.arr[*, *, march],nxt,nyt,cnt), 3), unit:IvelV_1.unit, g: 'T'}
+  Ivelo_march_1 = {arr:1./float(cnt) * total(reform(Ivelo_1.arr[*, *, march],nxt,nyt,cnt), 3), unit:Ivelo_1.unit, g: 'T'} 
+  sept = where(mm EQ 9, cnt)
+  IvelU_sept_1 = {arr:1./float(cnt) * total(reform(IvelU_1.arr[*, *, sept],nxt,nyt,cnt), 3), unit:IvelU_1.unit, g: 'T'}
+  IvelV_sept_1 = {arr:1./float(cnt) * total(reform(IvelV_1.arr[*, *, sept],nxt,nyt,cnt), 3), unit:IvelV_1.unit, g: 'T'}
+  Ivelo_sept_1 = {arr:1./float(cnt) * total(reform(Ivelo_1.arr[*, *, sept],nxt,nyt,cnt), 3), unit:Ivelo_1.unit, g: 'T'}
+;
+  IF std_file2_I NE std_file1_I THEN BEGIN
+    IvelU_2 = read_ncdf(getenv('VAR2_IvelU'), allrecords = allrec, filename = std_file2_I ) 
+    IvelV_2 = read_ncdf(getenv('VAR2_IvelV'), allrecords = allrec, filename = std_file2_I ) 
+    Ivelo_2 = read_ncdf(getenv('VAR2_Ivelo'), allrecords = allrec, filename = std_file2_I ) 
+    caldat, time, mm
+    febr = where(mm EQ 2, cnt)
+    IvelU_febr_2 = {arr:1./float(cnt) * total(reform(IvelU_2.arr[*, *, febr],nxt,nyt,cnt), 3), unit:IvelU_2.unit}
+    IvelV_febr_2 = {arr:1./float(cnt) * total(reform(IvelV_2.arr[*, *, febr],nxt,nyt,cnt), 3), unit:IvelV_2.unit}
+    Ivelo_febr_2 = {arr:1./float(cnt) * total(reform(Ivelo_2.arr[*, *, febr],nxt,nyt,cnt), 3), unit:Ivelo_2.unit}
+    march = where(mm EQ 3, cnt)
+    IvelU_march_2 = {arr:1./float(cnt) * total(reform(IvelU_2.arr[*, *, march],nxt,nyt,cnt), 3), unit:IvelU_2.unit}
+    IvelV_march_2 = {arr:1./float(cnt) * total(reform(IvelV_2.arr[*, *, march],nxt,nyt,cnt), 3), unit:IvelV_2.unit}
+    Ivelo_march_2 = {arr:1./float(cnt) * total(reform(Ivelo_2.arr[*, *, march],nxt,nyt,cnt), 3), unit:Ivelo_2.unit}
+    sept = where(mm EQ 9, cnt)
+    IvelU_sept_2 = {arr:1./float(cnt) * total(reform(IvelU_2.arr[*, *, sept],nxt,nyt,cnt), 3), unit:IvelU_2.unit}
+    IvelV_sept_2 = {arr:1./float(cnt) * total(reform(IvelV_2.arr[*, *, sept],nxt,nyt,cnt), 3), unit:IvelV_2.unit}   
+    Ivelo_sept_2 = {arr:1./float(cnt) * total(reform(Ivelo_2.arr[*, *, sept],nxt,nyt,cnt), 3), unit:Ivelo_2.unit}
+    undefine, Ifra_2
+  ENDIF ELSE BEGIN 
+    IvelU_febr_2 = {arr:-1}
+    IvelV_febr_2 = {arr:-1}
+    Ivelo_febr_2 = {arr:-1}
+    IvelU_march_2 = {arr:-1}
+    IvelV_march_2 = {arr:-1}
+    Ivelo_march_2 = {arr:-1}
+    IvelU_sept_2 = {arr:-1}
+    IvelV_sept_2 = {arr:-1}
+    Ivelo_sept_2 = {arr:-1}
+  ENDELSE
+;
+  Iage_1 = read_ncdf(getenv('VAR1_Iage'), allrecords = allrec, filename = std_file1_I ) 
+  caldat, time, mm
+  febr = where(mm EQ 2, cnt)
+  Iage_febr_1 = {arr:1./float(cnt) * total(reform(Iage_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Iage_1.unit}
+  march = where(mm EQ 3, cnt)
+  Iage_march_1 = {arr:1./float(cnt) * total(reform(Iage_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Iage_1.unit}
+  sept = where(mm EQ 9, cnt)
+  Iage_sept_1 = {arr:1./float(cnt) * total(reform(Iage_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Iage_1.unit} 
+  undefine, Iage_1
+;
+  IF std_file2_I NE std_file1_I THEN BEGIN
+     Iage_2 = read_ncdf(getenv('VAR2_Iage'), allrecords = allrec, filename = std_file2_I ) 
+     caldat, time, mm
+     febr = where(mm EQ 2, cnt)
+     Iage_febr_2 = {arr:1./float(cnt) * total(reform(Iage_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Iage_2.unit} 
+     march = where(mm EQ 3, cnt)
+     Iage_march_2 = {arr:1./float(cnt) * total(reform(Iage_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Iage_2.unit} 
+     sept = where(mm EQ 9, cnt)
+     Iage_sept_2 = {arr:1./float(cnt) * total(reform(Iage_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Iage_2.unit} 
+     undefine, Iage_2
+  ENDIF ELSE BEGIN 
+     Iage_febr_2 = {arr:-1}
+     Iage_march_2 = {arr:-1}
+     Iage_sept_2 = {arr:-1}
+  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 = '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
+;
+  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 = '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
+;
+;;
+; all plot are done for ice fraction > 0.15%
+;;
+  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_febr_1, Ifra_febr_2, /ANT, /FEBR, _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
+;
+  cnt = cnt+1   &   blabla = 'Arctic Ice Thickness: JAN'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_jan_1, Ithi_jan_2, Ifra_jan_1, Ifra_jan_2, /ARC, /JAN, _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, Ifra_april_1, Ifra_april_2, /ARC, /APRIL, _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, Ifra_april_1, Ifra_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, Ifra_sept_1, Ifra_sept_2, /ANT, /SEPT, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Arctic SNOW Thickness: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_march_1, Isnow_march_2, Ifra_march_1, Ifra_march_2, /ARC, /MARCH, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Arctic SNOW Thickness: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_sept_1, Isnow_sept_2, Ifra_sept_1, Ifra_sept_2, /ARC, /SEPT, _extra = ex
+;  
+  cnt = cnt+1   &   blabla = 'Antarctic SNOW Thickness: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_febr_1, Isnow_febr_2, Ifra_febr_1, Ifra_febr_2, /ANT, /FEBR, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Antarctic SNOW Thickness: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_sept_1, Isnow_sept_2, Ifra_sept_1, Ifra_sept_2, /ANT, /SEPT, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Arctic Ice Salinity: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_march_1, Isal_march_2, Ifra_march_1, Ifra_march_2, /ARC, /MARCH, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Arctic Ice Salinity: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_sept_1, Isal_sept_2, Ifra_sept_1, Ifra_sept_2, /ARC, /SEPT, _extra = ex
+;  
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Salinity: FEBRUARY'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_febr_1, Isal_febr_2, Ifra_febr_1, Ifra_febr_2, /ANT, /FEBR, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Salinity: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_sept_1, Isal_sept_2, Ifra_sept_1, Ifra_sept_2, /ANT, /SEPT, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Arctic Ice Velocity: FEBRUARY'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceVel, IvelU_febr_1, IvelU_febr_2, IvelV_febr_1, IvelV_febr_2, Ivelo_febr_1, Ivelo_febr_2, /ARC, /FEBR, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Arctic Ice Velocity: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceVel, IvelU_sept_1, IvelU_sept_2, IvelV_sept_1, IvelV_sept_2, Ivelo_sept_1, Ivelo_sept_2, /ARC,  /SEPT, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Antartic Ice Velocity: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceVel, IvelU_march_1, IvelU_march_2, IvelV_march_1, IvelV_march_2, Ivelo_march_1, Ivelo_march_2, /ANT,  /MARCH, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Antartic Ice Velocity: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceVel, IvelU_sept_1, IvelU_sept_2, IvelV_sept_1, IvelV_sept_2, Ivelo_sept_1, Ivelo_sept_2, /ANT,  /SEPT, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Arctic Ice Age: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_march_1, Iage_march_2, Ifra_march_1, Ifra_march_2, /ARC, /MARCH, _extra = ex
+;  
+  cnt = cnt+1   &   blabla = 'Arctic Ice Age: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_sept_1, Iage_sept_2,  Ifra_sept_1, Ifra_sept_2, /ARC, /SEPT, _extra = ex
+;  
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Age: FEBR'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_febr_1, Iage_febr_2, Ifra_febr_1, Ifra_febr_2, /ANT, /FEBR, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Age: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_sept_1, Iage_sept_2,  Ifra_sept_1, Ifra_sept_2, /ANT, /SEPT, _extra = ex
+;
+ 
+  IF n_elements(htmltxt) GT 1 THEN putfile, psdir+'std_plot_html_body.txt', htmltxt[1:*]
+  
+  return
+END
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_all_1Y.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_all_1Y.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_all_1Y.pro	(revision 4751)
@@ -0,0 +1,510 @@
+pro std_plot_all_1Y, 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 )
+   ; old formulation: we tested variable name
+   ; IF strlowcase(getenv('VAR1_U')) EQ 'uocetr_eff' OR strlowcase(getenv('VAR1_U')) EQ 'vozoeftr' THEN BEGIN
+   IF strlowcase(U1.unit) EQ 'm3/s' THEN BEGIN
+     ;IF it is a transport it is transofrmed in velocity
+     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 )
+     ; old formulation: we tested variable name
+     ; IF strlowcase(getenv('VAR2_U')) EQ 'uocetr_eff' OR strlowcase(getenv('VAR2_U')) EQ 'vozoeftr' THEN BEGIN
+     IF strlowcase(U2.unit) EQ 'm3/s' 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 )
+   ; old formulation: we tested variable name
+   ; IF strlowcase(getenv('VAR1_V')) EQ 'vocetr_eff' OR strlowcase(getenv('VAR1_V')) EQ 'vomeeftr' THEN BEGIN
+   IF strlowcase(V1.unit) EQ 'm3/s' THEN BEGIN ; test on unit to understand if it is a transport or velocity
+     ;IF it is a transport it is transofrmed in velocity
+     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 )
+     ; old formulation
+     ; IF strlowcase(getenv('VAR2_V')) EQ 'vocetr_eff' OR strlowcase(getenv('VAR2_V')) EQ 'vozoeftr' THEN BEGIN
+     IF strlowcase(V2.unit) EQ 'm3/s' 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}
+  jan = where(mm EQ 1, cnt)
+  sept = where(mm EQ 9, cnt)
+  Ithi_jan_1 = {arr:1./float(cnt) * total(reform(Ithi_1.arr[*, *, temporary(jan)],nxt,nyt,cnt), 3), unit:Ithi_1.unit} 
+  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} 
+     jan = where(mm EQ 1, cnt)
+     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} 
+     Ithi_jan_2 = {arr:1./float(cnt) * total(reform(Ithi_2.arr[*, *, temporary(jan)],nxt,nyt,cnt), 3), unit:Ithi_2.unit} 
+     undefine, Ithi_2
+  ENDIF ELSE BEGIN 
+     Ithi_april_2 = {arr:-1}
+     Ithi_sept_2 = {arr:-1}
+     Ithi_jan_2 = {arr:-1}
+  ENDELSE
+;
+  Iage_1 = read_ncdf(getenv('VAR1_Iage'), allrecords = allrec, filename = std_file1_I ) 
+  caldat, time, mm
+  febr = where(mm EQ 2, cnt)
+  Iage_febr_1 = {arr:1./float(cnt) * total(reform(Iage_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Iage_1.unit}
+  march = where(mm EQ 3, cnt)
+  Iage_march_1 = {arr:1./float(cnt) * total(reform(Iage_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Iage_1.unit}
+  sept = where(mm EQ 9, cnt)
+  Iage_sept_1 = {arr:1./float(cnt) * total(reform(Iage_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Iage_1.unit} 
+  undefine, Iage_1
+;
+  IF std_file2_I NE std_file1_I THEN BEGIN
+     Iage_2 = read_ncdf(getenv('VAR2_Iage'), allrecords = allrec, filename = std_file2_I ) 
+     caldat, time, mm
+     febr = where(mm EQ 2, cnt)
+     Iage_febr_2 = {arr:1./float(cnt) * total(reform(Iage_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Iage_2.unit} 
+     march = where(mm EQ 3, cnt)
+     Iage_march_2 = {arr:1./float(cnt) * total(reform(Iage_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Iage_2.unit} 
+     sept = where(mm EQ 9, cnt)
+     Iage_sept_2 = {arr:1./float(cnt) * total(reform(Iage_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Iage_2.unit} 
+     undefine, Iage_2
+  ENDIF ELSE BEGIN 
+     Iage_febr_2 = {arr:-1}
+     Iage_march_2 = {arr:-1}
+     Iage_sept_2 = {arr:-1}
+  ENDELSE
+;
+  Ifra_1 = read_ncdf(getenv('VAR1_Ifrac'), allrecords = allrec, filename = std_file1_I ) 
+  caldat, time, mm
+  febr = where(mm EQ 2, cnt)
+  Ifra_febr_1 = {arr:1./float(cnt) * total(reform(Ifra_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Ifra_1.unit} 
+  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
+    febr = where(mm EQ 2, cnt)
+    Ifra_febr_2 = {arr:1./float(cnt) * total(reform(Ifra_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Ifra_2.unit}
+    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_febr_2 = {arr:-1}
+    Ifra_march_2 = {arr:-1}
+    Ifra_sept_2 = {arr:-1}
+  ENDELSE
+;
+   Isnow_1 = read_ncdf(getenv('VAR1_Isnow'), allrecords = allrec, filename = std_file1_I ) 
+   caldat, time, mm
+   febr = where(mm EQ 2, cnt)
+   Isnow_febr_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isnow_1.unit} 
+   march = where(mm EQ 3, cnt)
+   Isnow_march_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isnow_1.unit} 
+   sept = where(mm EQ 9, cnt)
+   Isnow_sept_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isnow_1.unit}
+   ;undefine, Isnow_1
+ ;
+   IF std_file2_I NE std_file1_I THEN BEGIN
+     Isnow_2 = read_ncdf(getenv('VAR2_Isnow'), allrecords = allrec, filename = std_file2_I ) 
+     caldat, time, mm
+     febr = where(mm EQ 2, cnt)
+     Isnow_febr_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+     march = where(mm EQ 3, cnt)
+     Isnow_march_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+     sept = where(mm EQ 9, cnt)
+     Isnow_sept_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+   ;  undefine, Isnow_2
+   ENDIF ELSE BEGIN 
+     Isnow_febr_2 = {arr:-1}
+     Isnow_march_2 = {arr:-1}
+     Isnow_sept_2 = {arr:-1}
+   ENDELSE
+;
+   Isal_1 = read_ncdf(getenv('VAR1_Isal'), allrecords = allrec, filename = std_file1_I ) 
+   Ifra_1 = read_ncdf(getenv('VAR1_Ifrac'), allrecords = allrec, filename = std_file1_I )
+   msk = Ifra_1.arr gt 0.15 ; remove 0.15% for observations 
+   caldat, time, mm
+   march = where(mm EQ 3, cnt)
+   febr = where(mm EQ 2, cnt)
+   ;SF  Isal_march_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isal_1.unit} 
+   Isal_1.arr = Isal_1.arr * msk
+   Isal_march_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isal_1.unit} 
+   Isal_febr_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isal_1.unit} 
+   sept = where(mm EQ 9, cnt)
+   Isal_sept_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isal_1.unit}
+   ;undefine, Isal_1
+ ;
+   Isal_2 = read_ncdf(getenv('VAR2_Isal'), allrecords = allrec, filename = std_file2_I ) 
+   Ifra_2 = read_ncdf(getenv('VAR2_Ifrac'), allrecords = allrec, filename = std_file2_I )
+   msk = Ifra_2.arr gt 0.15 ; remove 0.15% for observations 
+   IF std_file2_I NE std_file1_I THEN BEGIN
+     Isal_2 = read_ncdf(getenv('VAR2_Isal'), allrecords = allrec, filename = std_file2_I ) 
+     Isal_2.arr = Isal_2.arr * msk
+     caldat, time, mm
+     march = where(mm EQ 3, cnt)
+     febr = where(mm EQ 2, cnt)
+     Isal_march_2 = {arr:1./float(cnt) * total(reform(Isal_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isal_2.unit}
+     Isal_febr_2 = {arr:1./float(cnt) * total(reform(Isal_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isal_2.unit}
+     sept = where(mm EQ 9, cnt)
+     Isal_sept_2 = {arr:1./float(cnt) * total(reform(Isal_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isal_2.unit}
+   ;  undefine, Isal_2
+   ENDIF ELSE BEGIN 
+     Isal_febr_2 = {arr:-1}
+     Isal_march_2 = {arr:-1}
+     Isal_sept_2 = {arr:-1}
+   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 = '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
+;
+  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 = '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 = 'Arctic Ice Thickness: JAN'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_jan_1, Ithi_jan_2, /ARC, /JAN, _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 = '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 Age: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_march_1, Iage_march_2, /ARC, /MARCH, _extra = ex
+;  
+  cnt = cnt+1   &   blabla = 'Arctic Ice Age: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_sept_1, Iage_sept_2, /ARC, /SEPT, _extra = ex
+;  
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Age: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_febr_1, Iage_febr_2, /ANT, /FEBR, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Age: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_sept_1, Iage_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_febr_1, Ifra_febr_2, /ANT, /FEBR, _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
+;
+  cnt = cnt+1   &   blabla = 'Arctic SNOW Thickness: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_march_1, Isnow_march_2, /ARC, /MARCH, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Arctic SNOW Thickness: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_sept_1, Isnow_sept_2, /ARC, /SEPT, _extra = ex
+;  
+  cnt = cnt+1   &   blabla = 'Antarctic SNOW Thickness: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_febr_1, Isnow_febr_2, /ANT, /FEBR, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Antarctic SNOW Thickness: SEPT'
+  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 Salinity: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_march_1, Isal_march_2, /ARC, /MARCH, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Arctic Ice Salinity: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_sept_1, Isal_sept_2, /ARC, /SEPT, _extra = ex
+;  
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Salinity: FEBRUARY'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_febr_1, Isal_febr_2, /ANT, /FEBR, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Salinity: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_sept_1, Isal_sept_2, /ANT, /SEPT, _extra = ex
+; 
+ 
+  IF n_elements(htmltxt) GT 1 THEN putfile, psdir+'std_plot_html_body.txt', htmltxt[1:*]
+  
+  return
+END
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_all_last_year_5D.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_all_last_year_5D.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_all_last_year_5D.pro	(revision 4751)
@@ -0,0 +1,531 @@
+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}
+  jan = where(mm EQ 1, cnt)
+  sept = where(mm EQ 9, cnt)
+  Ithi_jan_1 = {arr:1./float(cnt) * total(reform(Ithi_1.arr[*, *, temporary(jan)],nxt,nyt,cnt), 3), unit:Ithi_1.unit} 
+  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} 
+     jan = where(mm EQ 1, cnt)
+     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} 
+     Ithi_jan_2 = {arr:1./float(cnt) * total(reform(Ithi_2.arr[*, *, temporary(jan)],nxt,nyt,cnt), 3), unit:Ithi_2.unit} 
+     undefine, Ithi_2
+  ENDIF ELSE BEGIN 
+     Ithi_april_2 = {arr:-1}
+     Ithi_sept_2 = {arr:-1}
+     Ithi_jan_2 = {arr:-1}
+  ENDELSE
+;
+  Iage_1 = read_ncdf(getenv('VAR1_Iage'), allrecords = allrec, filename = std_file1_I ) 
+  caldat, time, mm
+  febr = where(mm EQ 2, cnt)
+  Iage_febr_1 = {arr:1./float(cnt) * total(reform(Iage_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Iage_1.unit}
+  march = where(mm EQ 3, cnt)
+  Iage_march_1 = {arr:1./float(cnt) * total(reform(Iage_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Iage_1.unit}
+  sept = where(mm EQ 9, cnt)
+  Iage_sept_1 = {arr:1./float(cnt) * total(reform(Iage_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Iage_1.unit} 
+  undefine, Iage_1
+;
+  IF std_file2_I NE std_file1_I THEN BEGIN
+     Iage_2 = read_ncdf(getenv('VAR2_Iage'), allrecords = allrec, filename = std_file2_I ) 
+     caldat, time, mm
+     febr = where(mm EQ 2, cnt)
+     Iage_febr_2 = {arr:1./float(cnt) * total(reform(Iage_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Iage_2.unit} 
+     march = where(mm EQ 3, cnt)
+     Iage_march_2 = {arr:1./float(cnt) * total(reform(Iage_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Iage_2.unit} 
+     sept = where(mm EQ 9, cnt)
+     Iage_sept_2 = {arr:1./float(cnt) * total(reform(Iage_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Iage_2.unit} 
+     undefine, Iage_2
+  ENDIF ELSE BEGIN 
+     Iage_febr_2 = {arr:-1}
+     Iage_march_2 = {arr:-1}
+     Iage_sept_2 = {arr:-1}
+  ENDELSE
+;
+  Ifra_1 = read_ncdf(getenv('VAR1_Ifrac'), allrecords = allrec, filename = std_file1_I ) 
+  caldat, time, mm
+  febr = where(mm EQ 2, cnt)
+  Ifra_febr_1 = {arr:1./float(cnt) * total(reform(Ifra_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Ifra_1.unit} 
+  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
+    febr = where(mm EQ 2, cnt)
+    Ifra_febr_2 = {arr:1./float(cnt) * total(reform(Ifra_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Ifra_2.unit}
+    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_febr_2 = {arr:-1}
+    Ifra_march_2 = {arr:-1}
+    Ifra_sept_2 = {arr:-1}
+  ENDELSE
+;
+   Isnow_1 = read_ncdf(getenv('VAR1_Isnow'), allrecords = allrec, filename = std_file1_I ) 
+   caldat, time, mm
+   febr = where(mm EQ 2, cnt)
+   Isnow_febr_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isnow_1.unit} 
+   march = where(mm EQ 3, cnt)
+   Isnow_march_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isnow_1.unit} 
+   sept = where(mm EQ 9, cnt)
+   Isnow_sept_1 = {arr:1./float(cnt) * total(reform(Isnow_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isnow_1.unit}
+   ;undefine, Isnow_1
+ ;
+   IF std_file2_I NE std_file1_I THEN BEGIN
+     Isnow_2 = read_ncdf(getenv('VAR2_Isnow'), allrecords = allrec, filename = std_file2_I ) 
+     caldat, time, mm
+     febr = where(mm EQ 2, cnt)
+     Isnow_febr_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+     march = where(mm EQ 3, cnt)
+     Isnow_march_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+     sept = where(mm EQ 9, cnt)
+     Isnow_sept_2 = {arr:1./float(cnt) * total(reform(Isnow_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isnow_2.unit}
+   ;  undefine, Isnow_2
+   ENDIF ELSE BEGIN 
+     Isnow_febr_2 = {arr:-1}
+     Isnow_march_2 = {arr:-1}
+     Isnow_sept_2 = {arr:-1}
+   ENDELSE
+;
+   Isal_1 = read_ncdf(getenv('VAR1_Isal'), allrecords = allrec, filename = std_file1_I ) 
+   Ifra_1 = read_ncdf(getenv('VAR1_Ifrac'), allrecords = allrec, filename = std_file1_I )
+   msk = Ifra_1.arr gt 0.15 ; remove 0.15% for observations 
+   caldat, time, mm
+   march = where(mm EQ 3, cnt)
+   febr = where(mm EQ 2, cnt)
+   ;SF  Isal_march_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isal_1.unit} 
+   Isal_1.arr = Isal_1.arr * msk
+   Isal_march_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isal_1.unit} 
+   Isal_febr_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isal_1.unit} 
+   sept = where(mm EQ 9, cnt)
+   Isal_sept_1 = {arr:1./float(cnt) * total(reform(Isal_1.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isal_1.unit}
+   ;undefine, Isal_1
+ ;
+   Isal_2 = read_ncdf(getenv('VAR2_Isal'), allrecords = allrec, filename = std_file2_I ) 
+   Ifra_2 = read_ncdf(getenv('VAR2_Ifrac'), allrecords = allrec, filename = std_file2_I )
+   msk = Ifra_2.arr gt 0.15 ; remove 0.15% for observations 
+   IF std_file2_I NE std_file1_I THEN BEGIN
+     Isal_2 = read_ncdf(getenv('VAR2_Isal'), allrecords = allrec, filename = std_file2_I ) 
+     Isal_2.arr = Isal_2.arr * msk
+     caldat, time, mm
+     march = where(mm EQ 3, cnt)
+     febr = where(mm EQ 2, cnt)
+     Isal_march_2 = {arr:1./float(cnt) * total(reform(Isal_2.arr[*, *, temporary(march)],nxt,nyt,cnt), 3), unit:Isal_2.unit}
+     Isal_febr_2 = {arr:1./float(cnt) * total(reform(Isal_2.arr[*, *, temporary(febr)],nxt,nyt,cnt), 3), unit:Isal_2.unit}
+     sept = where(mm EQ 9, cnt)
+     Isal_sept_2 = {arr:1./float(cnt) * total(reform(Isal_2.arr[*, *, temporary(sept)],nxt,nyt,cnt), 3), unit:Isal_2.unit}
+   ;  undefine, Isal_2
+   ENDIF ELSE BEGIN 
+     Isal_febr_2 = {arr:-1}
+     Isal_march_2 = {arr:-1}
+     Isal_sept_2 = {arr:-1}
+   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, 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 = '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 = 'Arctic Ice Thickness: JAN'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceThick, Ithi_jan_1, Ithi_jan_2, /ARC, /JAN, _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 = '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 Age: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_march_1, Iage_march_2, /ARC, /MARCH, _extra = ex
+;  
+  cnt = cnt+1   &   blabla = 'Arctic Ice Age: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_sept_1, Iage_sept_2, /ARC, /SEPT, _extra = ex
+;  
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Age: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_febr_1, Iage_febr_2, /ANT, /FEBR, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Age: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceAge, Iage_sept_1, Iage_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_febr_1, Ifra_febr_2, /ANT, /FEBR, _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
+;
+  cnt = cnt+1   &   blabla = 'Arctic SNOW Thickness: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_march_1, Isnow_march_2, /ARC, /MARCH, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Arctic SNOW Thickness: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_sept_1, Isnow_sept_2, /ARC, /SEPT, _extra = ex
+;  
+  cnt = cnt+1   &   blabla = 'Antarctic SNOW Thickness: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_SnowThick, Isnow_febr_1, Isnow_febr_2, /ANT, /FEBR, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Antarctic SNOW Thickness: SEPT'
+  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 Salinity: MARCH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_march_1, Isal_march_2, /ARC, /MARCH, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Arctic Ice Salinity: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_sept_1, Isal_sept_2, /ARC, /SEPT, _extra = ex
+;  
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Salinity: FEBRUARY'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_febr_1, Isal_febr_2, /ANT, /FEBR, _extra = ex
+; 
+  cnt = cnt+1   &   blabla = 'Antarctic Ice Salinity: SEPT'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_plot_IceSal, Isal_sept_1, Isal_sept_2, /ANT, /SEPT, _extra = ex
+; 
+ 
+  IF n_elements(htmltxt) GT 1 THEN putfile, psdir+'std_plot_html_body.txt', htmltxt[1:*]
+  
+  return
+END
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_bsf.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_bsf.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_bsf.pro	(revision 4751)
@@ -0,0 +1,40 @@
+pro std_plot_bsf, U1, U2, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_BSF_'+std_file1_U
+  if std_file1_U NE std_file2_U then filename = filename + '_'+std_file2_U
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+  
+  domdef, 0, 6000
+
+  ;formulation for variable: TRANSPORT
+  ;bb1 = bsf(U1.arr, refvalue = 0., refpoint = [25, 0], /transport )
+  ;
+  ;formulation for variable: VELOCITY
+  bb1 = bsf(U1.arr, refvalue = 0., refpoint = [25, 0])
+  title = 'Barotropic Stream Function!C'+std_file1_U
+  plt, bb1, min = -200., max = 200., int = 10., /portrait, FORMAT = '(I4)', STYLE = 'so0so' $
+       , small = [1, 2, 1], COAST_THICK = 2, TITLE = title,  _extra = ex
+
+  if std_file1_U NE std_file2_U then BEGIN
+    ;formulation for variable: TRANSPORT
+    ;bb2 = bsf(U2.arr, refvalue = 0., refpoint = [25, 0], /transport )
+    ;formulation for variable: VELOCITY
+    bb2 = bsf(U2.arr, refvalue = 0., refpoint = [25, 0] )
+    title = 'Barotropic Stream Function!C'+std_file1_U+' - '+std_file2_U
+    plt, bb1.arr - bb2.arr, min = -20., max = 20., int = 2.,  FORMAT = '(I2)', STYLE = 'so0so' $
+         , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, /NOERASE, _extra = ex
+  endif
+  
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_emp.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_emp.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_emp.pro	(revision 4751)
@@ -0,0 +1,29 @@
+pro std_plot_emp, EMP1, EMP2, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_Emp_'+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
+  
+  title = 'Emp!C'+std_file1_T
+  plt, EMP1,  MIN = -10., MAX = 10., INTER = 1., style = 'so0so' $
+       , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, format = '(i3)', /PORTRAIT, _extra = ex
+  
+  if std_file1_T NE std_file2_T then begin
+    title = title+' - '+std_file2_T
+    plt, EMP1.arr - EMP2.arr, MIN = -5., MAX = 5., INTER = 1., style = 'so0so' $
+         , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, format = '(i3)', /NOERASE, _extra = ex
+  endif
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_erp.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_erp.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_erp.pro	(revision 4751)
@@ -0,0 +1,29 @@
+pro std_plot_erp, ERP1, ERP2, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_Erp_'+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
+  
+  title = 'Erp!C'+std_file1_T
+  plt, ERP1,  MIN = -5., MAX = 5., INTER = .5, style = 'so0so' $
+       , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, /PORTRAIT, format = '(i2)', _extra = ex
+  
+  if std_file1_T NE std_file2_T then begin
+    title = title+' - '+std_file2_T
+    plt, ERP1.arr - ERP2.arr, MIN = -2., MAX = 2., INTER = .25, style = 'so0so' $
+         , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, format = '(f4.1)', /NOERASE, _extra = ex
+  endif
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_max_mld.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_max_mld.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_max_mld.pro	(revision 4751)
@@ -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/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_mht.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_mht.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_mht.pro	(revision 4751)
@@ -0,0 +1,89 @@
+PRO std_plot_domht, Q, masknp, mask_filename, ibce, htr, htr_atl
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+
+  Qave = moyenne(Q, 'xy', mask2d = masknp) ; mean value
+  Qnet = Q - Qave
+  ibce = STRTRIM(Qave, 1)
+; 
+  msk = read_ncdf('atlmsk_nomed', filename = mask_filename, /nostruct)
+  msk = msk[*]#replicate(1., nzt) ; from 2D array to 3D array 
+                                
+; *1.E-15 to have PetaWatt
+  Qx     = moyenne(Qnet*e2t    , 'x', mask2d = masknp, /integration)*1.E-15
+  Qx_atl = moyenne(Qnet*e2t*msk, 'x', mask2d = masknp, /integration)*1.E-15
+; northward heat flux transport from antartic  
+  htr     = total(Qx, /cumulative)
+  htr_atl = total(reverse(Qx_atl), /cumulative) ; ! from north to south
+  htr_atl = -reverse(htr_atl)
+; we take from values north till 30° South
+  htr_atl[where(gphit[0, *] lt -30.)] = !Values.F_NaN 
+
+return
+END
+
+pro std_plot_mht, Q1, Q2, masknp, mask_filename, POSTSCRIPT = postscript,  _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_MHT_'+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
+  
+; find the x index with the highest latitude (for the plot)
+  index = where(gphit eq max(gphit))
+  nx = index[0] mod jpi
+  gphi_save = gphit
+  gphit[0, *] = gphit[nx, *]
+; compute meridional heat transport
+  std_plot_domht, Q1, masknp, mask_filename, ibce1, htr1, htr1_atl
+  
+; update data informations
+  varname = 'MHT'
+  varunit = 'Pw'
+  vargrid = 'T' 
+
+  title = 'MHT (Black) & Atlantic MHT (Blue)!C'+std_file1_T
+  subtitle = '(Qnet='+ibce1+' W/m2)'
+  plt1d, htr1, 'y', min = -2., max = 2.5, TITLE = title, SUBTITLE = subtitle, /portrait $ 
+         , SMALL = [2-(std_file1_T EQ std_file2_T), 2, 1], YTITLE = 'PW',  XGRIDSTYLE = 2, TICKLEN = 1, YGRIDSTYLE = 2, _extra = ex
+  plt1d, htr1_atl, 'y', COLOR = 50, /ov1d,  _extra = ex
+
+  if std_file1_T NE std_file2_T then begin
+; compute meridional heat transport
+    std_plot_domht, Q2, masknp, mask_filename, ibce2, htr2, htr2_atl
+
+    title = 'MHT (Black) & Atlantic MHT (Blue)!C'+std_file2_T
+    subtitle = '(Qnet='+ibce2+' W/m2)'
+    plt1d, htr2, 'y', min = -2., max = 2.5, TITLE = title, SUBTITLE = subtitle, /noerase $ 
+           , SMALL = [2, 2, 2], YTITLE = 'PW',  XGRIDSTYLE = 2, TICKLEN = 1, YGRIDSTYLE = 2, _extra = ex
+    plt1d, htr2_atl, 'y', COLOR = 50, /ov1d,  _extra = ex
+
+    title = 'MHT (Black) & Atlantic MHT (Blue) '+std_file1_T+' !C (Red) '+std_file2_T
+    plt1d, htr1, 'y', min = -2., max = 2., TITLE = title $
+           , SMALL = [2, 2, 3], TICKLEN = 1, XGRIDSTYLE = 2 $
+           , YTITLE = 'PW', YGRIDSTYLE = 2, /NOERASE, _extra = ex
+    plt1d, htr2, 'y', COLOR = 250, /ov1d,  _extra = ex
+    plt1d, htr1_atl, 'y', COLOR = 50, /ov1d,  _extra = ex
+    plt1d, htr2_atl, 'y', COLOR = 250, /ov1d,  _extra = ex
+    ;plt1d, (htr1-htr2)*1.e3, 'y', min = -250., max = 250., TITLE = title $
+    ;       , SMALL = [2, 2, 3], TICKLEN = 1, XGRIDSTYLE = 2 $
+    ;       , YTITLE = 'TW', YGRIDSTYLE = 2, /NOERASE, _extra = ex
+    ;plt1d, (htr1_atl - htr2_atl)*1.e3, 'y', COLOR = 50, /ov1d,  _extra = ex
+    
+  endif 
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+  
+  gphit = gphi_save
+  
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_mld.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_mld.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_mld.pro	(revision 4751)
@@ -0,0 +1,55 @@
+pro std_plot_mld, MLD1, MLD2in, MLDin, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  CASE n_params() OF
+    2:BEGIN
+      MLD = MLD2in
+    END
+    3:BEGIN
+      IF MLD2in.arr[0] EQ -1 THEN return
+      MLD2 = MLD2in
+      MLD = MLDin
+    END
+  ENDCASE
+;
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_MLD_'+std_file1_T
+  IF keyword_set(MLD2) THEN filename = filename + '_' + std_file2_T
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+;
+  varunit = MLD1.unit
+  titleorg = 'MLD!C'
+;
+  IF keyword_set(MLD2) 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 keyword_set(MLD2) 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/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_msf.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_msf.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_msf.pro	(revision 4751)
@@ -0,0 +1,60 @@
+pro std_plot_msf, V1, V2, SUBBASIN = subbasin, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  if KEYWORD_SET(SUBBASIN) then subname = subbasin else subname = "Glo"
+  filename = cdti3 + '_MSF_'+subname+'_'+std_file1_V
+  if std_file1_V NE std_file2_V then filename = filename + '_'+std_file2_V
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+;
+  if KEYWORD_SET(SUBBASIN) then begin
+    CASE subname of 
+      'Atl' : var = 'atlmsk_nomed'
+      'Ind' : var = 'indmsk'
+      'IndoPac' : var = 'indpacmsk'
+      'GloNoMed' : var = 'glomsk_nomed'
+    ENDCASE
+    msk = read_ncdf( var, filename = std_file_msksub, /nostruct, _extra = ex )
+  endif else msk = tmask[*, *, 0]
+;
+  CASE subname OF
+    'GloNoMed':lat_ext = [-80, 90]
+    'Glo':lat_ext = [-80, 90]
+    'Atl':lat_ext = [-30, 90]
+    'Ind':lat_ext = [-30, 30]
+    'IndoPac':lat_ext = [-30, 70]
+  ENDCASE
+  
+  domdef, 0, 6000
+
+  ;formulation for variable: TRANSPORT
+  ;mm1 = msf(V1.arr, msk, indexboxzoom = ind, maskout = ma, /transport )
+  ;
+  ;formulation for variable: VELOCITY
+  mm1 = msf(V1.arr, msk, indexboxzoom = ind, maskout = ma )
+  title = 'Meridional Stream Function, '+subname+'!C'+std_file1_V
+  pltz, mm1, 'yz', -20., 20., int = 1., boxzoom = [ind[0:1], lat_ext, 0, 5500], /xindex, FORMAT = '(I3)', /portrait $
+        , small = [1, 2, 1], COAST_THICK = 2, zoom = 5500, maskdta = ma, /no_partial, TITLE = title, style = 'so0so'
+
+  if std_file1_V NE std_file2_V then begin
+    ;formulation for variable: TRANSPORT
+    ;mm2 = msf(V2.arr, msk, indexboxzoom = ind, maskout = ma, /transport )
+    ;
+    ;formulation for variable: VELOCITY
+    mm2 = msf(V2.arr, msk, indexboxzoom = ind, maskout = ma)
+    title = title+' - '+std_file2_V
+    pltz, mm1.arr-mm2.arr, 'yz', -10., 10., int = 1., boxzoom = [ind[0:1], lat_ext, 0, 5500], /xindex,  FORMAT = '(I3)'  $
+          , small = [1, 2, 2], COAST_THICK = 2, zoom = 5500, maskdta = ma, /no_partial, TITLE = title, /NOERASE, style = 'so0so'
+  endif
+  
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_qnet.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_qnet.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_qnet.pro	(revision 4751)
@@ -0,0 +1,34 @@
+pro std_plot_qnet,  Q1, Q2, QNET, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_Qnet_'+std_file1_T
+  if std_file1_T EQ std_file2_T then filename = filename + '_OAFlux' $
+  ELSE filename = filename + '_'+std_file2_T
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+  
+  title = 'Qnet!C'+std_file1_T
+  plt,  Q1,  MIN = -200., MAX = 200., INTER = 20., STYLE = 'so0so' $
+        , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, FORMAT = '(I4)', /PORTRAIT, _extra = ex
+
+  if std_file1_T EQ std_file2_T then begin
+    title = 'Qnet!C'+std_file1_T+' - OAFlux'
+    Q = Q1.arr - QNET.arr
+  ENDIF ELSE BEGIN 
+    title = 'Qnet!C'+std_file1_T+' - '+std_file2_T
+    Q = Q1.arr - Q2.arr
+  ENDELSE 
+  plt, Q, MIN = -100, MAX = 100, INTER = 10, STYLE = 'so0so'  $
+       , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, FORMAT = '(I4)', /NOERASE, _extra = ex
+                                ;
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_sss.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_sss.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_sss.pro	(revision 4751)
@@ -0,0 +1,34 @@
+pro std_plot_sss, S1, S2, SLev, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_SSS_'+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 = S1.unit  
+  
+  title = 'SSS!C'+std_file1_T
+  plt, S1.arr[*, *, 0], MIN = 33., MAX = 41., INTER = .25, format = '(f4.1)' $
+       , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, /PORTRAIT, _extra = ex 
+                                ;
+  if std_file1_T NE std_file2_T then begin
+    title = 'SSS!C'+std_file1_T+' - '+std_file2_T
+    plt, S1.arr[*, *, 0] - S2.arr[*, *, 0], MIN = -2., MAX = 2., INTER = 0.2, STYLE = 'so0so' $
+         , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, /noerase, format = '(f4.1)', _extra = ex
+  endif else begin
+    title = 'SSS!C'+std_file1_T+' - Levitus'
+    plt, S1.arr[*, *, 0] - SLev.arr[*, *, 0], MIN = -3., MAX = 3., INTER = 0.2, STYLE = 'so0so' $
+         , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, /noerase, format = '(f4.1)', _extra = ex
+  endelse
+                                ;
+   htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_sst.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_sst.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_sst.pro	(revision 4751)
@@ -0,0 +1,43 @@
+pro std_plot_sst, T1, T2, TRey, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_SST_'+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
+
+  if std_file1_T EQ std_file2_T then begin
+    T = T1.arr[*, *, 0]
+    min = -2.
+    max = 32.
+    inter = 1. 
+    STYLE = 0
+    title = 'SST!C'+std_file1_T
+  ENDIF ELSE BEGIN 
+    T = T1.arr[*, *, 0] - T2.arr[*, *, 0]
+    min =  -1.
+    max = -min
+    inter = 0.1
+    STYLE = 'so0so'
+    title = 'SST!C'+std_file1_T+' - '+std_file2_T
+  ENDELSE 
+;
+  varunit = T1.unit
+; 
+  plt, T, MIN = min, MAX = max, INTER = inter, STYLE = STYLE $
+       , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, FORMAT = '(I2)', /PORTRAIT, _extra = ex
+; 
+  title = 'SST!C'+std_file1_T+' - NewReynolds'
+  plt, T1.arr[*, *, 0] - TRey.arr, MIN = -8., MAX = 8., INTER = 0.5, STYLE = 'so0so', FORMAT = '(I2)' $
+       , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, /NOERASE, _extra = ex
+  
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh	(revision 4751)
@@ -0,0 +1,129 @@
+#!/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 )/OR2LPv36_ps_plot
+PDF_DIR=$( pwd )/OR2LPv36_pdf_plot
+HTML_DIR=$( pwd )/html_plot
+SAXO_DIR=/Users/sflod/SAXO_DIR
+#
+DIR_DATA=/Users/sflod/idl_PLOTS/DATA_STORE/RUN_CLIMATO/500y_pisces     # 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 =====================
+# 23610101_23701231
+FILE1_T=OR2LPv36_23610101_23701231_1Y_grid_T.nc   # exp1 grid T input file
+FILE1_U=OR2LPv36_23610101_23701231_1Y_grid_U.nc   # exp1 grid U input file
+FILE1_V=OR2LPv36_23610101_23701231_1Y_grid_V.nc   # exp1 grid V input file
+FILE1_I=OR2LPv36_23610101_23701231_1M_icemod.nc   # exp1 ice    input file
+VAR1_T=thetao
+VAR1_S=so        
+VAR1_QNET=tohfls
+VAR1_ERP=sowafldp      
+VAR1_EMP=wfo
+VAR1_MLD=mldr10_1
+VAR1_U=uocetr_eff
+VAR1_V=vocetr_eff
+VAR1_Ithick=iicethic
+VAR1_Ifrac=soicecov
+VAR1_Isnow=isnowthi
+#VAR1_Isal=sisali
+#VAR1_Iage=siages
+VAR1_IvelU=iicevelu
+VAR1_IvelV=iicevelv
+#VAR1_Ivelo=sivelo
+#
+#===================== EXP2 =====================
+#
+FILE2_T=OR2LPv36_23610101_23701231_1Y_grid_T.nc   # exp1 grid T input file
+FILE2_U=OR2LPv36_23610101_23701231_1Y_grid_U.nc   # exp1 grid U input file
+FILE2_V=OR2LPv36_23610101_23701231_1Y_grid_V.nc   # exp1 grid V input file
+FILE2_I=OR2LPv36_23610101_23701231_1M_icemod.nc   # exp1 ice    input file
+VAR2_T=thetao
+VAR2_S=so
+VAR2_QNET=tohfls
+VAR2_ERP=sowafldp
+VAR2_EMP=wfo
+VAR2_MLD=mldr10_1
+VAR2_U=uocetr_eff
+VAR2_V=vocetr_eff
+VAR2_Ithick=iicethic
+VAR2_Ifrac=soicecov
+VAR2_Isnow=isnowthi
+#VAR2_Isal=sisali
+#VAR2_Iage=siages
+VAR2_IvelU=iicevelu
+VAR2_IvelV=iicevelv
+#VAR2_Ivelo=sivelo
+#
+######################### 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 VAR1_Isal VAR1_Iage VAR1_IvelU VAR1_IvelV VAR1_Ivelo
+#===================== 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 VAR2_Isal VAR2_Iage VAR2_IvelU VAR2_IvelV VAR2_Ivelo
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh.last_year_5D
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh.last_year_5D	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh.last_year_5D	(revision 4751)
@@ -0,0 +1,129 @@
+#!/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=~/idl_PLOTS/DATA_STORE/RUN_CLIMATO/lim3_ada     # path of data in NetCDF format
+DIR_CLIMATO=~/idl_PLOTS/CLIMATOLOGIES    # path of climatological data
+DIR_MASK=~//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_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=max5dmld
+VAR1_U=vozoeftr
+VAR1_V=vomeeftr
+VAR1_Ithick=iicethic
+VAR1_Ifrac=iiceconc
+VAR1_Isnow=isnowvol
+VAR1_Isal=iicesali
+VAR1_Iage=iiceages
+VAR1_IvelU=iicevelu
+VAR1_IvelV=iicevelv
+VAR1_Ivelo=iicevelo
+#
+#===================== EXP2 =====================
+#
+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
+VAR2_T=votemper
+VAR2_S=vosaline
+VAR2_QNET=sohflxdo
+VAR2_ERP=sowafldp
+VAR2_EMP=sowaflup
+VAR2_MLD=max5dmld
+VAR2_U=vozoeftr
+VAR2_V=vomeeftr
+VAR2_Ithick=iicethic
+VAR2_Ifrac=iiceconc
+VAR2_Isnow=isnowthi
+VAR2_Isal=iicesali
+VAR2_Iage=iiceages
+VAR2_IvelU=iicevelu
+VAR2_IvelV=iicevelv
+VAR2_Ivelo=iicevelo
+#
+######################### 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 VAR1_Isal VAR1_Iage VAR1_IvelU VAR1_IvelV VAR1_Ivelo
+#===================== 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 VAR2_Isal VAR2_Iage VAR2_IvelU VAR2_IvelV VAR2_Ivelo
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh.new_names
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh.new_names	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh.new_names	(revision 4751)
@@ -0,0 +1,129 @@
+#!/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 )/sbcmodMV_ps_plot
+PDF_DIR=$( pwd )/sbcmodMV_pdf_plot
+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=sbcmodMV_20410101_20501231_1Y_grid_T.nc   # exp1 grid T input file
+FILE1_U=sbcmodMV_20410101_20501231_1Y_grid_U.nc   # exp1 grid U input file
+FILE1_V=sbcmodMV_20410101_20501231_1Y_grid_V.nc   # exp1 grid V input file
+FILE1_I=sbcmodMV_20410101_20501231_1M_icemod.nc   # exp1 ice    input file
+VAR1_T=thetao
+VAR1_S=so        
+VAR1_QNET=tohfls
+VAR1_ERP=sowafldp      
+VAR1_EMP=wfo
+VAR1_MLD=mldr10_1
+VAR1_U=uocetr_eff
+VAR1_V=vocetr_eff
+VAR1_Ithick=sithic
+VAR1_Ifrac=siconc
+VAR1_Isnow=snvolu
+VAR1_Isal=sisali
+VAR1_Iage=siages
+VAR1_IvelU=sivelu
+VAR1_IvelV=sivelv
+VAR1_Ivelo=sivelo
+#
+#===================== EXP2 =====================
+#
+FILE2_T=sbcmodMV_20410101_20501231_1Y_grid_T.nc   # exp1 grid T input file
+FILE2_U=sbcmodMV_20410101_20501231_1Y_grid_U.nc   # exp1 grid U input file
+FILE2_V=sbcmodMV_20410101_20501231_1Y_grid_V.nc   # exp1 grid V input file
+FILE2_I=sbcmodMV_20410101_20501231_1M_icemod.nc   # exp1 ice    input file
+VAR2_T=thetao
+VAR2_S=so
+VAR2_QNET=tohfls
+VAR2_ERP=sowafldp
+VAR2_EMP=wfo
+VAR2_MLD=mldr10_1
+VAR2_U=uocetr_eff
+VAR2_V=vocetr_eff
+VAR2_Ithick=sithic
+VAR2_Ifrac=siconc
+VAR2_Isnow=snvolu
+VAR2_Isal=sisali
+VAR2_Iage=siages
+VAR2_IvelU=sivelu
+VAR2_IvelV=sivelv
+VAR2_Ivelo=sivelo
+#
+######################### 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 VAR1_Isal VAR1_Iage VAR1_IvelU VAR1_IvelV VAR1_Ivelo
+#===================== 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 VAR2_Isal VAR2_Iage VAR2_IvelU VAR2_IvelV VAR2_Ivelo
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh.old_names
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh.old_names	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh.old_names	(revision 4751)
@@ -0,0 +1,131 @@
+#!/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 )/500yfwb0_ps_plot_500y
+PDF_DIR=$( pwd )/500yfwb0_pdf_plot_500y
+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=500yfwb0_24910101_25001231_1Y_grid_T.nc   # exp1 grid T input file
+FILE1_U=500yfwb0_24910101_25001231_1Y_grid_U.nc   # exp1 grid U input file
+FILE1_V=500yfwb0_24910101_25001231_1Y_grid_V.nc   # exp1 grid V input file
+FILE1_I=500yfwb0_24910101_25001231_1M_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_U=vozoeftr
+VAR1_V=vomeeftr
+VAR1_Ithick=iicethic
+VAR1_Ifrac=iiceconc
+VAR1_Isnow=isnowvol
+VAR1_Isal=iicesali
+VAR1_Iage=iiceages
+VAR1_IvelU=iicevelu
+VAR1_IvelV=iicevelv
+VAR1_Ivelo=iicevelo
+#
+#===================== EXP2 =====================
+#
+FILE2_T=500yfwb0_24910101_25001231_1Y_grid_T.nc   # exp1 grid T input file
+FILE2_U=500yfwb0_24910101_25001231_1Y_grid_U.nc   # exp1 grid U input file
+FILE2_V=500yfwb0_24910101_25001231_1Y_grid_V.nc   # exp1 grid V input file
+FILE2_I=500yfwb0_24910101_25001231_1M_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_U=uoce
+VAR2_U=vozoeftr
+#VAR2_V=voce
+VAR2_V=vomeeftr
+VAR2_Ithick=iicethic
+VAR2_Ifrac=iiceconc
+VAR2_Isnow=isnowthi
+VAR2_Isal=iicesali
+VAR2_Iage=iiceages
+VAR2_IvelU=iicevelu
+VAR2_IvelV=iicevelv
+VAR2_Ivelo=iicevelo
+#
+######################### 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 VAR1_Isal VAR1_Iage VAR1_IvelU VAR1_IvelV VAR1_Ivelo
+#===================== 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 VAR2_Isal VAR2_Iage VAR2_IvelU VAR2_IvelV VAR2_Ivelo
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh_example1
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh_example1	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh_example1	(revision 4751)
@@ -0,0 +1,129 @@
+#!/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 )/ps_plot
+PDF_DIR=$( pwd )/pdf_plot
+HTML_DIR=$( pwd )/html_plot
+SAXO_DIR=/Users/sflod/SAXO_DIR
+#
+DIR_DATA=~/idl_PLOTS/DATA_STORE/RUN_CLIMATO/lim3_ada     # path of data in NetCDF format
+DIR_CLIMATO=~/idl_PLOTS/CLIMATOLOGIES    # path of climatological data
+DIR_MASK=~//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=500yfwb0_24910101_25001231_1Y_grid_T.nc   # exp1 grid T input file
+FILE1_U=500yfwb0_24910101_25001231_1Y_grid_U.nc   # exp1 grid U input file
+FILE1_V=500yfwb0_24910101_25001231_1Y_grid_V.nc   # exp1 grid V input file
+FILE1_I=500yfwb0_24910101_25001231_1M_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_U=vozoeftr
+VAR1_V=vomeeftr
+VAR1_Ithick=iicethic
+VAR1_Ifrac=iiceconc
+VAR1_Isnow=isnowvol
+VAR1_Isal=iicesali
+VAR1_Iage=iiceages
+VAR1_IvelU=iicevelu
+VAR1_IvelV=iicevelv
+VAR1_Ivelo=iicevelo
+#
+#===================== EXP2 =====================
+#
+FILE2_T=tr33beta_00910101_01001231_1Y_grid_T.nc   # exp1 grid T input file
+FILE2_U=tr33beta_00910101_01001231_1Y_grid_U.nc   # exp1 grid U input file
+FILE2_V=tr33beta_00910101_01001231_1Y_grid_V.nc   # exp1 grid V input file
+FILE2_I=tr33beta_00910101_01001231_1M_icemod.nc   # exp1 ice    input file
+VAR2_T=thetao
+VAR2_S=so
+VAR2_QNET=qt
+VAR2_ERP=wfcorr
+VAR2_EMP=wfo
+VAR2_MLD=mldr10_1
+VAR2_U=uocetr_eff
+VAR2_V=vocetr_eff
+VAR2_Ithick=sit
+VAR2_Ifrac=sic
+VAR2_Isnow=isnowthi
+VAR2_Isal=iicesali
+VAR2_Iage=iiceages
+VAR2_IvelU=iicevelu
+VAR2_IvelV=iicevelv
+VAR2_Ivelo=iicevelo
+#
+######################### 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 VAR1_Isal VAR1_Iage VAR1_IvelU VAR1_IvelV VAR1_Ivelo
+#===================== 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 VAR2_Isal VAR2_Iage VAR2_IvelU VAR2_IvelV VAR2_Ivelo
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh_example2
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh_example2	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_vardef.sh_example2	(revision 4751)
@@ -0,0 +1,129 @@
+#!/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 )/ps_plot
+PDF_DIR=$( pwd )/pdf_plot
+HTML_DIR=$( pwd )/html_plot
+SAXO_DIR=/Users/sflod/SAXO_DIR
+#
+DIR_DATA=~/idl_PLOTS/DATA_STORE/RUN_CLIMATO/lim3_ada     # path of data in NetCDF format
+DIR_CLIMATO=~/idl_PLOTS/CLIMATOLOGIES    # path of climatological data
+DIR_MASK=~//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=500yfwb0_24910101_25001231_1Y_grid_T.nc   # exp1 grid T input file
+FILE1_U=500yfwb0_24910101_25001231_1Y_grid_U.nc   # exp1 grid U input file
+FILE1_V=500yfwb0_24910101_25001231_1Y_grid_V.nc   # exp1 grid V input file
+FILE1_I=500yfwb0_24910101_25001231_1M_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_U=vozoeftr
+VAR1_V=vomeeftr
+VAR1_Ithick=iicethic
+VAR1_Ifrac=iiceconc
+VAR1_Isnow=isnowvol
+VAR1_Isal=iicesali
+VAR1_Iage=iiceages
+VAR1_IvelU=iicevelu
+VAR1_IvelV=iicevelv
+VAR1_Ivelo=iicevelo
+#
+#===================== EXP2 =====================
+#
+FILE1_T=500yfwb0_24910101_25001231_1Y_grid_T.nc   # exp1 grid T input file
+FILE1_U=500yfwb0_24910101_25001231_1Y_grid_U.nc   # exp1 grid U input file
+FILE1_V=500yfwb0_24910101_25001231_1Y_grid_V.nc   # exp1 grid V input file
+FILE1_I=500yfwb0_24910101_25001231_1M_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_U=vozoeftr
+VAR1_V=vomeeftr
+VAR1_Ithick=iicethic
+VAR1_Ifrac=iiceconc
+VAR1_Isnow=isnowvol
+VAR1_Isal=iicesali
+VAR1_Iage=iiceages
+VAR2_IvelU=iicevelu
+VAR2_IvelV=iicevelv
+VAR2_Ivelo=iicevelo
+#
+######################### 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 VAR1_Isal VAR1_Iage VAR1_IvelU VAR1_IvelV VAR1_Ivelo
+#===================== 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 VAR2_Isal VAR2_Iage VAR2_IvelU VAR2_IvelV VAR2_Ivelo
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_zonal_S.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_zonal_S.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_zonal_S.pro	(revision 4751)
@@ -0,0 +1,55 @@
+pro std_plot_zonal_S, S1, S2, SLev, SUBBASIN = subbasin, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  if KEYWORD_SET(SUBBASIN) then subname = subbasin else subname = "Glo"
+  filename = cdti3 + '_ZonalS_'+subname+'_'+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
+
+; looking for longitudinal index corresponding to the highest latitude (closest to the North Pole)
+  index = where(gphit eq max(gphit))
+  nx = index[0] mod jpi
+  gphi_save = gphit
+  gphit[0, *] = gphit[nx, *]
+
+  if KEYWORD_SET(SUBBASIN) then begin
+    tmasksv = tmask
+    CASE 1 of 
+      subbasin eq 'Atl' : var = 'atlmsk_nomed'
+      subbasin eq 'Ind' : var = 'indmsk_nored'
+      subbasin eq 'Pac' : var = 'pacmsk'
+    ENDCASE
+    msk = read_ncdf( var, filename = std_file_msksub, _extra = ex)
+; from 2D array to 3D array
+    msk = msk.arr[*]#replicate(1., nzt)
+    tmask[firstxt:lastxt, firstyt:lastyt, firstzt:lastzt] = tmask[firstxt:lastxt, firstyt:lastyt, firstzt:lastzt] * msk
+  endif
+;
+  title = 'Salinity, '+subname+'!C'+std_file1_T
+  pltz, S1, MININ = 31., MAXIN = 36.8, INTER = .2, typein = 'yz', FORMAT = '(f4.1)' $ 
+        , small = [1, 2, 1], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /PORTRAIT,  _extra = ex 
+; 
+  if std_file1_T NE std_file2_T then begin
+    title = title+' - '+std_file2_T
+    pltz, S1.arr-S2.arr, MIN = -1., MAX = 1., INTER = .1, typein = 'yz', FORMAT = '(f4.1)', style = 'so0so' $
+          , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE,  _extra = ex    
+  endif else begin
+    title = title+' - Levitus'
+    pltz, S1.arr-SLev.arr, MININ = -1, MAXIN = 1., INTER = .1, typein = 'yz', FORMAT = '(f4.1)', style = 'so0so'  $
+          , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE, _extra = ex
+  endelse
+;
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+;
+  if KEYWORD_SET(SUBBASIN) then tmask = tmasksv
+  gphit = gphi_save
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_zonal_T.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_zonal_T.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_plot_zonal_T.pro	(revision 4751)
@@ -0,0 +1,55 @@
+pro std_plot_zonal_T, T1, T2, TLev, SUBBASIN = subbasin, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+
+@common  
+@std_common
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  if KEYWORD_SET(SUBBASIN) then subname = subbasin else subname = "Glo"
+  filename = cdti3 + '_ZonalT_'+subname+'_'+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
+;  
+; looking for longitudinal index corresponding to the highest latitude (closest to the North Pole)
+  index = where(gphit eq max(gphit))
+  nx = index[0] mod jpi
+  gphi_save = gphit
+  gphit[0, *] = gphit[nx, *]
+;
+  if KEYWORD_SET(SUBBASIN) then begin
+    tmasksv = tmask
+    CASE 1 of 
+      subbasin eq 'Atl' : var = 'atlmsk_nomed'
+      subbasin eq 'Ind' : var = 'indmsk_nored'
+      subbasin eq 'Pac' : var = 'pacmsk'
+    ENDCASE
+    msk = read_ncdf( var, filename = std_file_msksub, _extra = ex)
+; from 2D array to 3D array
+    msk = msk.arr[*]#replicate(1., nzt)
+    tmask[firstxt:lastxt, firstyt:lastyt, firstzt:lastzt] = tmask[firstxt:lastxt, firstyt:lastyt, firstzt:lastzt] * msk
+  endif
+;
+  title = 'Temperature, '+subname+'!C'+std_file1_T
+  pltz, T1, MININ = -2., MAXIN = 30., INTER = 1., typein = 'yz', FORMAT = '(I2)' $ 
+        , small = [ 1, 2, 1], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /PORTRAIT, _extra = ex 
+; 
+  if std_file1_T NE std_file2_T then begin
+    title = title+' - '+std_file2_T
+    pltz, T1.arr-T2.arr, MIN = -2., MAX = 2., INTER = .2, typein = 'yz', FORMAT = '(f4.1)', style = 'so0so' $
+          , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE, _extra = ex
+  endif else begin
+    title = title+' - Levitus'
+    pltz, T1.arr-TLev.arr, MININ = -4., MAXIN = 4., INTER = .5, typein = 'yz', FORMAT = '(I2)', style = 'so0so' $
+          , small = [1, 2, 2], COAST_THICK = 2, TITLE = title, boxzoom = 5500, ZOOM = 1000, /NOERASE, _extra = ex
+  endelse
+;
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+;
+  if KEYWORD_SET(SUBBASIN) then tmask = tmasksv  
+  gphit = gphi_save
+;
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_AMOC.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_AMOC.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_AMOC.pro	(revision 4751)
@@ -0,0 +1,143 @@
+PRO std_ts_read_AMOC, var_name, dt1, dt2, prefix, suffix, t45, t70, t50
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+
+  list = rseries_ncdf(var_name, dt1, dt2, prefix, suffix, /fileslist)
+  nfiles = n_elements(list)
+
+  t45 = 0.
+  t70 = 0.
+  t50 = 0.
+  ts_Time = 0.
+
+  trans = strlowcase(var_name) EQ 'vocetr_eff' OR strlowcase(var_name) EQ 'vomeeftr'
+  ;trans = strlowcase(var_name) EQ 'vomeeftr'
+
+  ; ADD definition of mask_atl_nomed to compute AMOC (with no Mediterranean Sea)
+  msk_atl_nomed = read_ncdf( 'atlmsk_nomed', filename = std_file_msksub, /nostruct, _extra = ex )
+  FOR i = 0, nfiles-1 DO BEGIN
+    var = read_ncdf(var_name, allrecords = allrec, filename = list[i], /nostruct)
+    ts_Time = [ ts_Time, Time]
+;
+    FOR t = 0, jpt-1 DO BEGIN
+      msfatl = msf(var[*, *, *, t], msk_atl_nomed, TRANSPORT = trans, /nostruct, indexboxzoom = ind)
+      msftot = msf(var[*, *, *, t], TRANSPORT = trans, /nostruct, indexboxzoom = ind)
+      yaxis = gphit[ind[0], ind[2]:ind[3]]
+
+; computation of max Atlatic Meridional Overturninc Circulation at 40°N and 50°N
+      indy = where(yaxis gt 40 and yaxis le 50)
+      domdef, 0, 3500
+      ;SF commented because we've to compute msftot starting from msf atlantic; i.e. without mediterranean sea.
+      ;SF t45 = [t45, max(msftot[indy, firstzw:lastzw], /NaN)]
+      t45 = [t45, max(msfatl[indy, firstzw:lastzw], /NaN)]
+      
+; computation of max atlantic Antarctic Bottom Water between 80°S and 65°S
+      indy = where(yaxis gt -80 and yaxis le -65)
+      domdef, 300, 3500
+      t70 = [t70, min(msftot[indy, firstzw:lastzw], /NaN)]
+
+;  computation of max Antarctic Abyssal Bottom Cell between 65°S and 30°N , 
+      indy = where(yaxis gt -65 and yaxis le 30)
+      domdef, 2500, 5000
+      t50 = [t50, min(msftot[indy, firstzw:lastzw], /NaN)]
+      
+      domdef, 0, jpk-1, /zindex
+    ENDFOR
+
+  ENDFOR
+
+  time = ts_Time[1:*]           ; remove first record of 0
+  jpt = n_elements(time)
+  
+  t45 = t45[1:*]                ; remove first record of 0 
+  t70 = t70[1:*]                ; remove first record of 0 
+  t50 = t50[1:*]                ; remove first record of 0 
+
+  return
+end
+
+pro std_ts_AMOC, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+
+; get exp1 info
+  vV1 = getenv('VAR1_V')   &   prefix = getenv('V1V_PREF')    &   suffix = getenv('V1V_SUFF')
+; get exp2 info
+  vV2 = getenv('VAR2_V')   &   prefix2 = getenv('V2V_PREF')   &   suffix2 = getenv('V2V_SUFF')
+;
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_ts_AMOC_'+prefix
+  if prefix NE prefix2 then filename = filename + '_'+prefix2
+  if KEYWORD_SET(postscript) then openps, filename+'_1.ps', portrait = 1
+;
+  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
+  d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
+;
+  iodir = std_iodir_data
+
+; compute the MSF
+;  
+  std_ts_read_AMOC, vV1, date1, date2, prefix, suffix, t45, t70, t50
+  if prefix NE prefix2 then begin
+    tsave = time
+    std_ts_read_AMOC, vV2, date1_2, date2_2, prefix2, suffix2, t45_2, t70_2, t50_2
+    time = tsave   &   IF n_elements(time) NE jpt THEN stop
+  ENDIF
+
+; plots...  
+
+  title = prefix+' '+d1_d2+'!C'+'Max Atlantic MOC between 40N and 50N'
+  pltt, t45, 't', MIN = 0., MAX = 30., date1, date2, /REMPLI, /PORTRAIT, XGRIDSTYLE = 1 $
+        ,  small = [1, 2, 1],  TITLE = title, YTITLE = varunit, _extra = ex
+  IF prefix NE prefix2 then begin
+    title = prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+'Max Atlantic MOC between 40N and 50N'
+    pltt, t45, 't', MIN = 0., MAX = 30., date1, date2, /REMPLI , /NOERASE, XGRIDSTYLE = 1 $
+          ,  small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; BLACK
+    pltt, t45_2, 't', date1, date2, /REMPLI, /NOERASE $
+          ,  /ov1d, COLOR = 250, small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; RED
+  endif
+  
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_1.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+  if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1
+
+  title = prefix+' '+d1_d2+'!C'+'Max AntArctic Bottom Water between 80S and 65S '+d1_d2
+  pltt, -t70, 't', MIN = 0., MAX = 20., date1, date2, /REMPLI, /PORTRAIT, XGRIDSTYLE = 1, window = 2  $
+        , small = [1, 2, 1],  TITLE = title, YTITLE = varunit, _extra = ex
+  if prefix NE prefix2 then begin 
+    title = prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+'Max AntArctic Bottom Water between 80S and 65S'
+    pltt, -t70, 't', MIN = 0.,MAX =  20., date1, date2, /REMPLI, /NOERASE, XGRIDSTYLE = 1 $
+          ,  small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; BLACK
+    pltt, -t70_2, 't', date1, date2, /REMPLI, /NOERASE $
+          , /ov1d, COLOR = 250, small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; RED
+  endif
+  
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_2.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+  if KEYWORD_SET(postscript) then openps, filename+'_3.ps', portrait = 1
+
+  title = prefix+' '+d1_d2+'!C '+'Max AntArctic Bottom Cell between 65S and 30N '+d1_d2
+  pltt, -t50, 't', MIN = 5., MAX = 30., date1, date2, /REMPLI, /PORTRAIT, XGRIDSTYLE = 1, window = 3  $
+        ,  small = [1, 2, 1],  TITLE = title, YTITLE = varunit, _extra = ex
+  if prefix NE prefix2 then begin
+    title = prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+'Max AntArctic Bottom Cell between 65S and 30N'
+    pltt, -t50 , 't', MIN = 5., MAX = 30., date1, date2, /REMPLI, /NOERASE, XGRIDSTYLE = 1 $
+          ,  small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; BLACK
+    pltt, -t50_2, 't', date1, date2, /REMPLI, /NOERASE  $
+          , /ov1d, COLOR = 250, small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; RED
+  endif
+  
+  domdef, 0, jpk-1, /zindex
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_3.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+    
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_Drake.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_Drake.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_Drake.pro	(revision 4751)
@@ -0,0 +1,75 @@
+pro std_ts_Drake, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+
+; get exp1 info
+  vU1 = getenv('VAR1_U')   &   prefix = getenv('V1U_PREF')    &   suffix = getenv('V1U_SUFF')
+; get exp2 info
+  vU2 = getenv('VAR2_U')   &   prefix2 = getenv('V2U_PREF')   &   suffix2 = getenv('V2U_SUFF')
+;
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_ts_Drake_'+prefix
+  if prefix NE prefix2 then filename = filename + '_'+prefix2
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+;
+  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
+;
+  iodir = std_iodir_data
+ 
+; find a point in south America (around 60E-30S)
+  if max(glamt) gt 300 then testlam = abs(glamt - 300) else testlam = abs(glamt + 60)
+  testlat = abs(gphit + 30)
+  index = where(abs(testlam - min(testlam)) lt 1 and abs(testlat - min(testlat)) lt 1 )
+  xindex = index[0] mod jpi
+  yindex = index[0]/jpi
+; define a domain limited to a thin band going from Antactica to this point in south America
+  domdef, xindex, xindex+1, 0, yindex, 0, jpk-1, /index ; keep 2 points for x to avoid degenerated dimension...
+;
+  u1 = rseries_ncdf(vU1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, /nostruct)
+  drk1 = fltarr(jpt)
+  ; old formulation: we tested variable name
+  trans = strlowcase(getenv('VAR1_U')) EQ 'uocetr_eff' OR strlowcase(getenv('VAR1_U')) EQ 'vozoeftr'
+  ;SF trans = strlowcase(getenv('VAR1_U')) EQ 'vozoeftr'
+  FOR t = 0, jpt-1 DO BEGIN
+    tmp = bsf(u1[*, *, *, t], TRANSPORT = trans, /nostruct)
+    drk1[t] = tmp[0, nyt-1]-tmp[0, 0]
+  ENDFOR
+;
+  title = prefix+' '+d1_d2+'!C'+blabla
+  pltt, drk1, 't', 0., 200., date1, date2, /REMPLI, XGRIDSTYLE = 1 $
+        , small = [1, 2, 1],  TITLE = title, YTITLE = varunit, /PORTRAIT, _extra = ex
+  
+  if prefix NE prefix2 then begin
+;
+    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
+    tsave = time
+    u2 = rseries_ncdf(vU2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, /nostruct)
+    drk2 = fltarr(jpt)
+    ; old formulation: we tested variable name
+    trans = strlowcase(getenv('VAR2_U')) EQ 'uocetr_eff' OR strlowcase(getenv('VAR2_U')) EQ 'vozoeftr'
+    ;SF trans = strlowcase(getenv('VAR1_U')) EQ 'vozoeftr'
+    FOR t = 0, jpt-1 DO BEGIN
+      tmp = bsf(u2[*, *, *, t], TRANSPORT = trans, /nostruct)
+      drk2[t] = tmp[0, nyt-1]-tmp[0, 0]
+    ENDFOR
+    time = tsave   &   IF n_elements(time) NE jpt THEN stop
+
+    title = prefix+' (BLACK) - '+prefix2+' (RED)  '+d1_d2_2+'!C'+blabla
+    pltt, drk1 , 't', 0., 200., date1, date2, /REMPLI, /NOERASE, XGRIDSTYLE = 1 $
+          , COLOR = 000, small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; BLACK
+    pltt, drk2, 't', 0., 200., date1, date2, /REMPLI, /NOERASE $
+          , /ov1d, COLOR = 250, small = [1, 2, 2],  TITLE = title, YTITLE = varunit, _extra = ex ; RED
+    
+  endif
+
+  domdef
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+  
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_EMP.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_EMP.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_EMP.pro	(revision 4751)
@@ -0,0 +1,51 @@
+pro std_ts_EMP, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+
+; get exp1 info
+  vemp = getenv('VAR1_EMP')    &   prefix = getenv('V1EMP_PREF')    &   suffix = getenv('V1EMP_SUFF')
+; get exp2 info
+  vemp2 = getenv('VAR2_EMP')   &   prefix2 = getenv('V2EMP_PREF')   &   suffix2 = getenv('V2EMP_SUFF')
+;
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_ts_EMP_'+prefix
+  if prefix NE prefix2 then filename = filename + '_'+prefix2
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+
+  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
+;
+  iodir = std_iodir_data
+;
+  surf_oce = e1t * e2t * tmask[*,*,0] * masknp
+  surf_oce = total(surf_oce)
+;
+  ts_EMP = rseries_ncdf(vemp, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, direc = 'xy', mask2d = masknp)
+  ts_EMP.arr = ts_EMP.arr * ( 1.E-09 * surf_oce )   &   ts_EMP.unit = 'Sv'
+  title = prefix+' '+d1_d2+'!C'+blabla
+  pltt, ts_EMP, 't', MIN = -2.,MAX = 2., date1, date2, /REMPLI, XGRIDSTYLE = 1 $
+        , small = [1, 2, 1], YTITLE = 'Sv', TITLE = title, /PORTRAIT, _extra = ex
+  
+  IF prefix NE prefix2 THEN BEGIN
+
+    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
+    tsave = time
+    ts_EMP2 = rseries_ncdf(vemp2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, direc = 'xy', mask2d = masknp)
+    ts_EMP2.arr = ts_EMP2.arr * ( 1.E-09 * surf_oce )   &   ts_EMP2.unit = 'Sv'
+    time = tsave   &   IF n_elements(time) NE jpt THEN stop
+
+    title = prefix+' (BLACK) - ' +prefix2+' (RED) '+d1_d2_2+'!C'+blabla
+    pltt, ts_EMP.arr - ts_EMP2.arr, 't', MIN = -2., MAX = 2., date1, date2, /REMPLI, XGRIDSTYLE = 1 $
+          , color = 250, small = [1, 2, 2], YTITLE = 'Sv', TITLE = title, /noerase, _extra = ex
+
+  ENDIF 
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+  
+  return
+end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_ICE.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_ICE.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_ICE.pro	(revision 4751)
@@ -0,0 +1,202 @@
+function read_arr2d, filename, varname, t1, t2
+;; function that read input file and return 2d array with monthly timecounter 
+nyear = (t2-t1+1)/12
+arr2d = ncdf_lec(filename, VAR=varname)
+arr2d = arr2d[t1:t2]
+arr2d = reform(arr2d,12,nyear) ; put in 2D array
+arr2d = total(arr2d,2)/nyear ; total over 2th dimension (i.e.years)
+
+return, arr2d
+end 
+
+;; here start procedure that use function read_arr2d  
+pro std_ts_ICE, masknp, s_iodir_data,  POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+
+; get exp1 info
+  vICE1 = getenv('VAR1_ICE')   &   prefix = getenv('V1ICE_PREF')    &   suffix = getenv('V1ICE_SUFF')
+; get exp2 info
+  vICE2 = getenv('VAR2_ICE')   &   prefix2 = getenv('V2ICE_PREF')   &   suffix2 = getenv('V2ICE_SUFF')
+; get ice climatology info
+  std_file_ice =  isafile(getenv('FILE_ICE'), title = 'ICE Extent Climatology', iodir = std_iodir_climato)
+;
+  time_ice = ncdf_lec( std_file_ice, VAR='time' )
+  time_ice = (time_ice - FLOOR(time_ice) ) * 12
+  time_ice = (round(time_ice) + 11) mod 12; round to nearest integer
+  t1 = where(time_ice eq 0)
+  t1 = t1[0] ;  january
+  t2 = where(time_ice eq 11, count)
+  t2 = t2[count-1] ; last day of december
+
+  vICE_ext_NH = read_arr2d(std_file_ice, getenv('VAR_ICE_EXT_NH'), t1, t2 )
+  vICE_ext_SH = read_arr2d(std_file_ice, getenv('VAR_ICE_EXT_SH'), t1, t2 )
+;
+  vICE_area_NH = read_arr2d(std_file_ice, getenv('VAR_ICE_area_NH'), t1, t2 )
+  vICE_area_SH = read_arr2d(std_file_ice, getenv('VAR_ICE_area_SH'), t1, t2 )
+;  
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_ts_ICE_'+prefix
+  if prefix NE prefix2 then filename = filename + '_'+prefix2
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+;
+  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
+;
+  iodir = std_iodir_data
+  ; ICE Area in NORTH Hemisphere
+  domdef, 0, jpi-1, 30, 90, /xindex
+  ICE_N = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec)
+  ICE_N = grossemoyenne(ICE_N.arr, 'xy', /integration, mask2d = masknp)
+
+  if jpt mod 12 ne 0 then stop
+  nyr=jpt/12.
+  ICE_N = reform(ice_n, 12,nyr)
+  ICE_n = total(ice_n,2)/nyr
+  ICE_N = {arr:ICE_N * 1.e-12, unit : '10^12 m^2'}
+
+  ; ICE EXTENT (Area minus 15%) in NORTH Hemisphere
+  ICE_N_15 = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec)
+  msk = ICE_N_15.arr gt 0.15 ; remove 0.15% for observations
+  ICE_N_15 = grossemoyenne( msk, 'xy', /integration, mask2d = masknp)
+  if jpt mod 12 ne 0 then stop
+  nyr=jpt/12.
+  ICE_N_15 = reform(ice_n_15, 12,nyr)
+  ICE_n_15 = total(ice_n_15,2)/nyr
+  ICE_N_15 = {arr:ICE_N_15 * 1.e-12, unit : '10^12 m^2'}
+  ;
+  ;ICE Area in SOUTH Hemisphere
+  domdef, 0, jpi-1, -90, -30, /xindex 
+  ICE_S = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec)
+  ICE_S = grossemoyenne(ICE_S.arr, 'xy', /integration, mask2d = masknp)
+  if jpt mod 12 ne 0 then stop
+  nyr=jpt/12.
+  ICE_S = reform(ice_S, 12,nyr)
+  ICE_S = total(ice_S,2)/nyr
+  ICE_S = {arr:ICE_S * 1.e-12, unit : '10^12 m^2'}
+  ; ICE EXTENT (Area minus 15%) in SOUTH Hemisphere
+  ICE_S_15 = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec)
+  msk = ICE_S_15.arr gt 0.15 ; remove 0.15% for observations
+  ICE_S_15 = grossemoyenne(msk, 'xy', /integration, mask2d = masknp)
+  if jpt mod 12 ne 0 then stop
+  nyr=jpt/12.
+  ICE_S_15 = reform(ice_S_15, 12,nyr)
+  ICE_S_15 = total(ice_S_15,2)/nyr
+  ICE_S_15 = {arr:ICE_S_15 * 1.e-12, unit : '10^12 m^2'}
+  ;
+  title = 'Northern Hemisphere'+'!C'+prefix+' (BLACK) '+d1_d2+'!C'+'OBSERVATION (light blue) '+'!C'+' Global Annual Mean Ice Area (CONTINUOUS) '+'!C'+ 'and Extend minus 15% (DASHED)'
+  jpt=12
+  time=julday(1,15,1900)+30*lindgen(12)
+  pltt, ICE_N, 't', MIN = 4., MAX = 16., /REMPLI, /PORTRAIT, XGRIDSTYLE = 1, DATE_FORMAT = '%M' $
+       , COLOR = 000 , small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+  pltt, ICE_N_15, 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $       ;;; dashed lines is LINESTYLE=2  $
+        , /ov1d, COLOR = 000, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
+  pltt, vICE_area_NH, 't',  /REMPLI, /PORTRAIT  $ 
+        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+  pltt, vICE_ext_NH, 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $   ;;; dashed lines is LINESTYLE=2  $
+        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+;
+  title = 'Southern Hemisphere'+'!C'+prefix+' (BLACK) '+d1_d2+'!C'+'OBSERVATION (light blue) '+'!C'+' Global Annual Mean Ice Area (CONTINUOUS) '+'!C'+ 'and Extend minus 15% (DASHED)'
+  pltt, ICE_S, 't', MIN = 0., MAX = 20., /REMPLI, /NOERASE , XGRIDSTYLE = 1 , DATE_FORMAT = '%M' $
+        ,COLOR = 000, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+  pltt, ICE_S_15, 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $ 
+        , /ov1d, COLOR = 000, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
+  pltt,  vICE_area_SH, 't', /REMPLI, /PORTRAIT  $ 
+         , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+  pltt,  vICE_ext_SH, 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $ 
+        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+;
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  if prefix NE prefix2 then BEGIN
+
+    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
+    tsave = time
+    domdef, 0, jpi-1, 30, 90, /xindex
+    ;ICE Extent in NORTH Hemisphere
+    ICE_N2 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec)
+    ICE_N2 = grossemoyenne(ICE_N2.arr, 'xy', /integration, mask2d = masknp)
+    if jpt mod 12 ne 0 then stop
+    nyr=jpt/12.
+    ICE_N2 = reform(ICE_N2, 12,nyr)
+    ICE_N2 = total(ICE_N2,2)/nyr
+    ICE_N2 = {arr:ICE_N2 * 1.e-12, unit : '10^12 m^2'}
+    ;ICE Extent minus 15% in NORTH Hemisphere
+    ICE_N2_15 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec)
+    msk = ICE_N2_15.arr gt 0.15  ; remove 0.15% for observations
+    ICE_N2_15 = grossemoyenne( msk, 'xy', /integration, mask2d = masknp)
+    if jpt mod 12 ne 0 then stop
+    nyr=jpt/12.
+    ICE_N2_15 = reform(ICE_N2_15, 12,nyr)
+    ICE_N2_15 = total(ICE_N2_15,2)/nyr
+    ICE_N2_15 = {arr:ICE_N2_15 * 1.e-12, unit : '10^12 m^2'}
+    ;ICE Extent in SOUTH Hemisphere
+    domdef, 0, jpi-1, -90, -30, /xindex 
+    ICE_S2 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec)
+    ICE_S2 = grossemoyenne(ICE_S2.arr, 'xy', /integration, mask2d = masknp)
+    if jpt mod 12 ne 0 then stop
+    nyr=jpt/12.
+    ICE_S2 = reform(ICE_S2, 12,nyr)
+    ICE_S2 = total(ICE_S2,2)/nyr
+    ICE_S2 = {arr:ICE_S2 * 1.e-12, unit : '10^12 m^2'}
+    ;ICE Extent minus 15% in SOUTH Hemisphere
+    ICE_S2_15 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec)
+    msk = ICE_S2_15.arr gt 0.15  ; remove 0.15% for observations
+    ICE_S2_15 = grossemoyenne(msk, 'xy', /integration, mask2d = masknp)
+    if jpt mod 12 ne 0 then stop
+    nyr=jpt/12.
+    ICE_S2_15 = reform(ICE_S2_15, 12,nyr)
+    ICE_S2_15 = total(ICE_S2_15,2)/nyr
+    ICE_S2_15 = {arr:ICE_S2_15 * 1.e-12, unit : '10^12 m^2'}
+  ;
+ ;   time = tsave   &   IF n_elements(time) NE jpt THEN stop
+
+    if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1
+
+
+  title = 'Northern Hemisphere'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+'OBSERVATION (light blue) '+'!C'+' Global Annual Mean Ice Area (CONTINUOUS) '+'!C'+ 'and Extend minus 15% (DASHED)'
+  jpt=12
+  time=julday(1,15,1900)+30*lindgen(12)
+  pltt, ICE_N, 't', MIN = 4, MAX = 16,  /REMPLI, /PORTRAIT, XGRIDSTYLE = 1, window = 2, DATE_FORMAT = '%M' $
+        , COLOR = 000, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex ; BLACK
+  pltt, ICE_N2, 't', /REMPLI, /PORTRAIT  $
+        , /ov1d, COLOR = 250, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex  ; RED
+  pltt, ICE_N_15, 't', /REMPLI, /PORTRAIT, LINESTYLE=2  $ ; linee tratteggiate LINESTYLE=2  $
+        , /ov1d, COLOR = 000, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex 
+  pltt, ICE_N2_15, 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $ ; linee tratteggiate LINESTYLE=2  $
+        , /ov1d, COLOR = 250, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+  pltt, vICE_area_NH, 't', /REMPLI, /PORTRAIT  $ 
+        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex  ; light blue
+  pltt, vICE_ext_NH, 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $ 
+        , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex  ; blu scuro
+;
+  title ='Southern Hemisphere'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+'OBSERVATION (light blue) '+'!C'+'Global Annual Mean Ice Area (CONTINUS)'+'!C'+ 'and Extend minus 15% (DASHED)'
+;  title ='Southern Hemisphere'+'!C'
+  pltt, ICE_S, 't', MIN = 0., MAX = 20.,  /REMPLI, /NOERASE, XGRIDSTYLE = 1, DATE_FORMAT = '%M' $
+         , COLOR = 000, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+  pltt, ICE_S2, 't', /REMPLI, /NOERASE $
+        , /ov1d, COLOR = 250, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+  pltt, ICE_S_15 , 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $ ; linee tratteggiate LINESTYLE=2  $
+        , /ov1d, COLOR = 000, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+  pltt, ICE_S2_15, 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $ ; linee tratteggiate LINESTYLE=2  $
+        , /ov1d, COLOR = 250, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+  pltt,  vICE_area_SH, 't', /REMPLI, /PORTRAIT $ 
+          , /ov1d, COLOR = 100, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+  pltt,  vICE_ext_SH, 't', /REMPLI, /PORTRAIT, LINESTYLE=2 $ 
+        , /ov1d, COLOR = 100, small = [1, 2, 2], YTITLE = '10^12 m^2 ', TITLE = title, _extra = ex
+;
+
+    htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_2.png  />  ' ]
+    if KEYWORD_SET(postscript) then closeps
+
+  endif
+
+  domdef
+  
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_ICE_FRAM.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_ICE_FRAM.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_ICE_FRAM.pro	(revision 4751)
@@ -0,0 +1,200 @@
+function read_arr2d, filename, varname, t1, t2
+;; function that read input file and return 2d array with monthly timecounter 
+nyear = (t2-t1+1)/12
+arr2d = ncdf_lec(filename, VAR=varname)
+arr2d = arr2d[t1:t2]
+arr2d = reform(arr2d,12,nyear) ; put in 2D array
+arr2d = total(arr2d,2)/nyear ; total over 2th dimension (i.e.years)
+
+return, arr2d
+end 
+
+;; here start procedure that use function read_arr2d
+pro std_ts_ICE_FRAM, masknp, s_iodir_data,  POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+
+; get exp1 info
+  vICE1     = getenv('VAR1_ICE')     &   prefix = getenv('V1ICE_PREF')  &   suffix = getenv('V1ICE_SUFF')
+  v1_Ithick = getenv('VAR1_Ithick')  &   prefix = getenv('V1It_PREF')   &   suffix = getenv('V1It_SUFF')
+  v1_IV     = getenv('VAR1_IvelV')   &   prefix = getenv('V1IvV_PREF')  &   suffix = getenv('V1IvV_SUFF')
+; get exp2 info
+  vICE2     = getenv('VAR2_ICE')     &   prefix2 = getenv('V2ICE_PREF')   &   suffix2 = getenv('V2ICE_SUFF')
+  v2_Ithick = getenv('VAR2_Ithick')  &   prefix2 = getenv('V2It_PREF')    &   suffix2 = getenv('V2It_SUFF')
+  v2_IV     = getenv('VAR2_IvelV')   &   prefix2 = getenv('V2IvV_PREF')   &   suffix2 = getenv('V2IvV_SUFF')
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_ts_ICE_FRAM_'+prefix
+  if prefix NE prefix2 then filename = filename + '_'+prefix2
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+;
+  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
+;
+  iodir = std_iodir_data
+  ; ICE Area(=Surface) in FRAM Strait
+  ;; FRAM Strait points, computed with ncview meshmask for ORCA2 grid (133-1434-135-136, 137)
+  indx0 = 133 
+  indx0_last = 136
+  indy0 = 137
+  indy0_last = 137
+  ;; ORI domdef, 133, 137, 136, 136, /xindex, /yindex,/memeindices
+  indx1= (indx0 - ixminmesh + key_shift)mod(jpi)
+  indx2= (indx0_last - ixminmesh + key_shift)mod(jpi)
+  indy1= indy0 - iyminmesh
+  indy2= indy1 
+ ;
+ ;OBSERVATIONS : mean seasonal cycle/month
+ ; vol_obs = [0.261625, 0.230750, 0.325375, 0.252000, 0.172500, 0.0805000, 0.0805000, 0.0805000, 0.0805000, 0.176500, 0.148500, 0.235000]
+  vol_obs = [261.625, 230.750, 325.375, 252.000, 172.500, 80.5000, 80.5000, 80.5000, 80.5000, 176.500, 148.500, 235.000]
+  area_obs = [0.103292, 0.0997500, 0.107625, 0.0944167, 0.0612083, 0.0262500, 0.0262500, 0.0262500, 0.0262500, 0.0843750, 0.0914583, 0.104083]
+ ;
+  domdef, indx1, indx2, indy1, indy2, /xindex, /yindex,/memeindices
+  ICE = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, /nostruct)
+  ICE_thick = rseries_ncdf(v1_Ithick, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, /nostruct)
+ ; domdef for V-Point in j-1
+ ; REALLY NOT NECESSARY, BECAUSE FLUX CAN BE COMPUTED IN J POINT, is the same
+  domdef, indx1, indx2, indy1-1, indy2-1, /xindex, /yindex,/memeindices
+  VN = rseries_ncdf(v1_IV, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec,/nostruct) ;!! warning positive northward
+
+  ;; Area export
+  ICE_area_export = (-1) * ICE * VN * ((e1v[firstxv:lastxv, firstyv:lastyv])[*]#replicate(1., jpt))
+  ICE_area_export = total(reform(ICE_area_export),1) ; in m2/s -> need to change the unit?
+
+  ;; Volume export
+  ICE_vol_export = (-1) * ICE * ICE_thick * VN * ((e1v[firstxv:lastxv, firstyv:lastyv])[*]#replicate(1., jpt))
+  ICE_vol_export = total(reform(ICE_vol_export),1) ;! in m3/s -> need to change the unit?
+
+  ;   needed for seasonal cycle :
+  if jpt mod 12 ne 0 then stop
+  nyr=jpt/12.
+  ;; AREA
+  ICE_area_export = reform(ICE_area_export, 12, nyr)
+  ICE_area_export = total(ICE_area_export,2)/nyr
+  ; ICE_area_export = {arr:ICE_area_export * 1.e-12 * 86400 * 365 , unit : '10^6 Km^2/year'}  ; annual mean
+  ICE_area_export = {arr:ICE_area_export * 1.e-12 * 86400 * 30 , unit : '10^6 Km^2/month'}    ; monthly mean
+  
+  ;
+  ICE_vol_export = reform(ICE_vol_export, 12, nyr)
+  ICE_vol_export = total(ICE_vol_export,2)/nyr
+  ; ICE_vol_export = {arr:ICE_vol_export * 1.e-9 * 86400 * 365 , unit : '10^3 Km^3/year'}      ; annual mean
+  ICE_vol_export = {arr:ICE_vol_export * 1.e-9 * 86400 * 30 , unit : '10^3 Km^3/month'}      ; monthly mean
+
+  ;
+  title = 'Fram Strait Areal Export'+'!C'+prefix+' '+d1_d2
+  jpt=12
+  time=julday(1,15,1900)+30*lindgen(12)
+  pltt, ICE_area_export, 't', /REMPLI, /PORTRAIT, MIN = 0., MAX = .5 , XGRIDSTYLE = 1 $
+        , small = [1, 2, 1],YTITLE = '10^6 Km^2/month',  TITLE = title, DATE_FORMAT = '%M', _extra = ex    
+  pltt, area_obs, 't', /REMPLI, /NOERASE, psym = 4, THICK = 4  $    ; light blue
+         , /ov1d, COLOR = 100, small = [1, 2, 2], YTITLE = '10^6 Km^2/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex
+  ;
+  tot_area_expo = total(ICE_area_export.arr)
+  ;
+  xyouts, julday(5,15,1900), 0.49, 'Tot. Annual Export OBS = 0.851 million Km2', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+  xyouts, julday(5,15,1900), 0.46, 'Tot. Annual Export Model = '+strtrim(tot_area_expo, 1)+' million Km2', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+  xyouts, julday(7,15,1900), 0.41, 'Data from Kwok et al.(2004), 1979-2002 ', ALIGN = 0, CHARTHICK = 2, CHARSIZE=0.8, COLOR=2
+  ;
+  title = 'Fram Strait Volume Export'+'!C'+prefix+' '+d1_d2
+  pltt, ICE_vol_export, 't',  /REMPLI, MIN = 60., MAX = 500. , /NOERASE, XGRIDSTYLE = 1 $
+       , small = [1, 2, 2], YTITLE = '10^3 Km^3/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex
+  pltt, vol_obs, 't', /REMPLI, /NOERASE, psym = 4, THICK = 4  $    ; light blue
+         , /ov1d, COLOR = 100, small = [1, 2, 2], YTITLE = '10^6 Km^2/month',DATE_FORMAT = '%M', TITLE = title, _extra = ex
+  ;
+  tot_vol_expo = total(ICE_vol_export.arr)
+  tot_vol_expo_Sv = tot_vol_expo * 1.e06 * 1/86400 * 1/365 ; annual mean in Sverdrup
+  xyouts, julday(5,15,1900), 490, 'Tot. Annual Export OBS = 2124 10^3 Km3/year', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+  xyouts, julday(5,15,1900), 460, 'Tot. Annual Export Model = '+strtrim(tot_vol_expo, 1)+' 10^3 Km3/year', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+  xyouts, julday(9,15,1900), 440, 'in Sv = '+strtrim(tot_vol_expo_Sv, 1)+' Sv', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+  xyouts, julday(7,15,1900), 360, 'Data from Kwok et al.(2004), 1992-1998 ', ALIGN = 0, CHARTHICK = 2, CHARSIZE=0.8, COLOR=2
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  if prefix NE prefix2 then BEGIN
+
+    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
+    tsave = time
+    domdef, indx1, indx2, indy1, indy2, /xindex, /yindex,/memeindices
+    ICE_2= rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, /nostruct)
+    ICE_thick_2 = rseries_ncdf(v2_Ithick, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, /nostruct)
+    ; domdef for V-Point in j-1
+    ; REALLY NOT NECESSARY, BECAUSE FLUX CAN BE COMPUTED IN J POINT, is the same
+    domdef, indx1, indx2, indy1-1, indy2-1, /xindex, /yindex,/memeindices
+    VN_2 = rseries_ncdf(v2_IV, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec,/nostruct) ;!! warning positive northward
+
+    ;; Area export
+    ICE_area_export_2 = (-1) * ICE_2 * VN_2 * ((e1v[firstxv:lastxv, firstyv:lastyv])[*]#replicate(1., jpt))
+    ICE_area_export_2 = total(reform(ICE_area_export_2),1) ; in m2/s -> need to change the unit?
+
+    ;; Volume export
+    ICE_vol_export_2 = (-1) * ICE_2 * ICE_thick_2 * VN_2 * ((e1v[firstxv:lastxv, firstyv:lastyv])[*]#replicate(1., jpt))
+    ICE_vol_export_2 = total(reform(ICE_vol_export_2),1) ;! in m3/s -> need to change the unit?
+
+    ;   needed for seasonal cycle :
+    if jpt mod 12 ne 0 then stop
+    nyr=jpt/12.
+    ;; AREA
+    ICE_area_export_2 = reform(ICE_area_export_2, 12, nyr)
+    ICE_area_export_2 = total(ICE_area_export_2,2)/nyr
+    ; ICE_area_export_2 = {arr:ICE_area_export_2 * 1.e-12 * 86400 * 365 , unit : '10^6 Km^2/year'}   ; annual mean
+    ICE_area_export_2 = {arr:ICE_area_export_2 * 1.e-12 * 86400 * 30 , unit : '10^6 Km^2/month'}     ; monthly mean
+    ;
+    ICE_vol_export_2 = reform(ICE_vol_export_2, 12, nyr)
+    ICE_vol_export_2 = total(ICE_vol_export_2,2)/nyr
+    ; ICE_vol_export_2 = {arr:ICE_vol_export_2 * 1.e-12 * 86400 * 365 , unit : '10^3 Km^3/year'}     ; annual mean
+    ICE_vol_export_2 = {arr:ICE_vol_export_2 * 1.e-9 * 86400 * 30 , unit : '10^3 Km^3/month'}       ; monthly mean
+    ;
+    ;
+    if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1
+
+    title = 'Fram Strait Areal Export'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2
+    jpt=12
+    time=julday(1,15,1900)+30*lindgen(12)
+    pltt, ICE_area_export, 't', /REMPLI, /PORTRAIT, MIN = 0., MAX = .5, XGRIDSTYLE = 1, window = 2 $
+        , small = [1, 2, 1], YTITLE = '10^6 Km^2/month',  TITLE = title, DATE_FORMAT = '%M', _extra = ex    
+    pltt, ICE_area_export_2 ,'t', /REMPLI, /PORTRAIT, /NOERASE $
+        , /ov1d, COLOR = 250, small = [1, 2, 1],YTITLE = '10^6 Km^2/month',  TITLE = title, DATE_FORMAT = '%M', _extra = ex
+    pltt, area_obs, 't', /REMPLI, /NOERASE, psym = 4, THICK = 4  $    ; light blue
+         , /ov1d, COLOR = 100, small = [1, 2, 1], YTITLE = '10^6 Km^2/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex
+    ;
+    tot_area_expo = total(ICE_area_export.arr)
+    tot_area_expo_2 = total(ICE_area_export_2.arr)
+    ;
+    xyouts, julday(5,15,1900), 0.49, 'Tot. Annual Export OBS = 0.851 million Km2', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+    xyouts, julday(5,15,1900), 0.46, 'Tot. Annual Export Model 1= '+strtrim(tot_area_expo, 1)+' million Km2', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+    xyouts, julday(5,15,1900), 0.43, 'Tot. Annual Export Model 2= '+strtrim(tot_area_expo_2, 1)+' million Km2', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+    xyouts, julday(7,15,1900), 0.41, 'Data from Kwok et al.(2004), 1979-2002 ', ALIGN = 0, CHARTHICK = 2, CHARSIZE=0.8, COLOR=2
+    ;
+    title = 'Fram Strait Volume Export'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2
+    pltt, ICE_vol_export, 't', /REMPLI,  MIN = 60., MAX = 500., /NOERASE, XGRIDSTYLE = 1 $
+        , small = [1, 2, 2], YTITLE = '10^3 Km^3/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex
+    pltt, ICE_vol_export_2, 't', /REMPLI, /NOERASE  $
+        , /ov1d, COLOR = 250, small = [1, 2, 2], YTITLE = '10^3 Km^3/month', TITLE = title, DATE_FORMAT = '%M',  _extra = ex
+    pltt, vol_obs, 't', /REMPLI, /NOERASE, psym = 4, THICK = 4  $    ; light blue
+         , /ov1d, COLOR = 100, small = [1, 2, 2], YTITLE = '10^6 Km^2/month', TITLE = title, DATE_FORMAT = '%M', _extra = ex
+    ;
+    tot_vol_expo = total(ICE_vol_export.arr)
+    tot_vol_expo_2 = total(ICE_vol_export_2.arr)
+    tot_vol_expo_Sv = tot_vol_expo * 1.e06 * 1/86400 * 1/365 ; annual mean in Sverdrup
+    tot_vol_expo_2_Sv = tot_vol_expo_2 * 1.e06 * 1/86400 * 1/365 ; annual mean in Sverdrup
+    xyouts, julday(5,15,1900), 490, 'Tot. Annual Export OBS = 2124 10^3 Km3/year', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+    xyouts, julday(5,15,1900), 460, 'Tot. Annual Export Model 1 = '+strtrim(tot_vol_expo, 1)+' 10^3 Km3/year', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+    xyouts, julday(9,15,1900), 440, 'in Sv = '+strtrim(tot_vol_expo_Sv, 1)+' Sv', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+    xyouts, julday(5,15,1900), 410, 'Tot. Annual Export Model 2 = '+strtrim(tot_vol_expo_2, 1)+' 10^3 Km3/year', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+    xyouts, julday(9,15,1900), 390, 'in Sv = '+strtrim(tot_vol_expo_2_Sv, 1)+' Sv', ALIGN = 0, CHARTHICK = 2, CHARSIZE=1, COLOR=2
+    xyouts, julday(7,15,1900), 360, 'Data from Kwok et al.(2004), 1992-1998 ', ALIGN = 0, CHARTHICK = 2, CHARSIZE=0.8, COLOR=2
+
+    htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_2.png  />  ' ]
+    if KEYWORD_SET(postscript) then closeps
+
+  endif
+
+  domdef
+  
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_ICE_Vel.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_ICE_Vel.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_ICE_Vel.pro	(revision 4751)
@@ -0,0 +1,132 @@
+function read_arr2d, filename, varname, t1, t2
+;; function that read input file and return 2d array with monthly timecounter 
+nyear = (t2-t1+1)/12
+arr2d = ncdf_lec(filename, VAR=varname)
+arr2d = arr2d[t1:t2]
+arr2d = reform(arr2d,12,nyear) ; put in 2D array
+arr2d = total(arr2d,2)/nyear ; total over 2th dimension (i.e.years)
+
+return, arr2d
+end 
+
+;; here start procedure that use function read_arr2d
+pro std_ts_ICE_Vel, masknp, s_iodir_data,  POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+; get exp1 info
+  vICE1 = getenv('VAR1_ICE')   &   prefix = getenv('V1ICE_PREF')    &   suffix = getenv('V1ICE_SUFF')
+; get exp2 info
+  vICE2 = getenv('VAR2_ICE')   &   prefix2 = getenv('V2ICE_PREF')   &   suffix2 = getenv('V2ICE_SUFF')
+; get exp1 info
+  vICE_vel_1 = getenv('VAR1_Ivel')   &   prefix = getenv('V1Iv_PREF')  &   suffix = getenv('V1Iv_SUFF')
+; get exp2 info
+  vICE_vel_2 = getenv('VAR2_Ivel')   &   prefix2 = getenv('V2Iv_PREF')  &  suffix2 = getenv('V2Iv_SUFF')
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_ts_ICE_Vel_'+prefix
+  if prefix NE prefix2 then filename = filename + '_'+prefix2
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+;
+  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
+;
+  iodir = std_iodir_data
+  ; ICE Velocity in NORTH Hemisphere
+  domdef, 0, jpi-1, 30, 90, /xindex
+  Velo_N = rseries_ncdf(vICE_vel_1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, /nostruct) ;!! warning positive northward
+  ICE_N_15 = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec,  /nostruct) 
+  print, 'N15', max(ICE_N_15)
+  
+  
+  ICE_N_15[where(ICE_N_15 lt 0.15)] = 0.
+  
+  ICE_velo_N = grossemoyenne( (Velo_N < 1.e10) * (ICE_N_15 < 1.e10), 'xy',/integration, mask2d = masknp)
+  ICE_N_15 = grossemoyenne(ICE_N_15, 'xy',/integration, mask2d = masknp)
+  
+  ICE_velo_N = ICE_velo_N / ICE_N_15
+  
+  if jpt mod 12 ne 0 then stop
+  nyr=jpt/12.
+  ICE_velo_N = reform(ICE_velo_N, 12, nyr)
+  ICE_velo_N = total(ICE_velo_N,2)/nyr
+  ICE_velo_N = {arr:ICE_velo_N , unit : 'm/s'}  
+   
+ 
+  ;ICE Velocity in SOUTH Hemisphere
+  domdef, 0, jpi-1, -90, -30, /xindex
+  Velo_S = rseries_ncdf(vICE_vel_1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec,/nostruct) ;!! warning positive northward
+
+   
+    
+  title = 'Northern Hemisphere'+'!C'+prefix+' '+d1_d2+'!C'+'Ice Velocity (Black SOLID simulation)'
+  jpt=12
+  time=julday(1,15,1900)+30*lindgen(12)
+
+
+  pltt, ICE_velo_N, 't', /REMPLI, /PORTRAIT, XGRIDSTYLE = 1 $
+        , small = [1, 2, 1], YTITLE = varunit, TITLE = title, _extra = ex    
+  ;
+  title ='Southern Hemisphere' +'!C'+prefix+' '+d1_d2+' - '+'!C'+'Ice Velocity (Black SOLID simulation)'
+  pltt, Velo_S, 't',  /REMPLI, /NOERASE, XGRIDSTYLE = 1 $
+       , small = [1, 2, 2], YTITLE = varunit, TITLE = title, _extra = ex
+  ;
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  if prefix NE prefix2 then BEGIN
+
+    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
+    tsave = time
+    ; ICE Velocity in NORTH Hemisphere
+    domdef, 0, jpi-1, 30, 90, /xindex
+    Velo_N_2 = rseries_ncdf(vICE_vel_2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec,/nostruct)
+    
+    ;;;;;; if grossempoyenne is not present dimension of array is not ok: 54   Array[180, 54, 120] 
+    ;;;;;; with the domain dimensions [jpi/nx, jpj/ny, jpk/nz, jpt] = [180/180, 149/50, 31/31, 12]
+  
+    ICE_velo_N_2 = grossemoyenne(Velo_N_2, 'xy', /integration, mask2d = masknp)
+    print, 'max ice velo', max(ICE_velo_N_2)
+  
+    if jpt mod 12 ne 0 then stop
+    nyr=jpt/12.
+    ICE_velo_N_2 = reform(ICE_velo_N_2, 12, nyr)
+    ICE_velo_N_2 = total(ICE_velo_N_2,2)/nyr
+    ICE_velo_N_2 = {arr:ICE_velo_N_2 * 86400 * 365, unit : 'm/year'}  
+    print, 'max ice velo', max(ICE_velo_N_2.arr)
+    
+  
+    ;ICE Velocity in SOUTH Hemisphere
+    domdef, 0, jpi-1, -90, -30, /xindex
+    Velo_S_2 = rseries_ncdf(vICE_vel_2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec,/nostruct)
+      
+    if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1
+
+    jpt=12
+    time=julday(1,15,1900)+30*lindgen(12)
+
+    title = 'Northern Hemisphere'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2 +'!C'+'Ice Velocity (BLACK) '
+    pltt, ICE_velo_N , 't', /REMPLI, XGRIDSTYLE = 1, window = 2  $
+          , small = [1, 2, 1], YTITLE = varunit, TITLE = title, /noerase, _extra = ex
+    pltt, ICE_velo_N_2, 't', /REMPLI $
+          , /ov1d, color = 250, small = [1, 2, 1], YTITLE = varunit, TITLE = title, /noerase, _extra = ex
+ 
+    title = 'Southern Hemisphere'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2 +'!C'+'Ice Velocity (BLACK) '
+    pltt, Velo_S , 't', /REMPLI, XGRIDSTYLE = 1 $
+          , small = [1, 2, 2], YTITLE = varunit, TITLE = title, /noerase, _extra = ex
+    pltt, Velo_S_2, 't', /REMPLI $
+         , /ov1d, color = 250, small = [1, 2, 2], YTITLE = varunit, TITLE = title, /noerase, _extra = ex
+
+    htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_2.png  />  ' ]
+    if KEYWORD_SET(postscript) then closeps
+
+  endif
+
+  domdef
+  
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_ICE_Vol.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_ICE_Vol.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_ICE_Vol.pro	(revision 4751)
@@ -0,0 +1,135 @@
+function read_arr2d, filename, varname, t1, t2
+;; function that read input file and return 2d array with monthly timecounter 
+nyear = (t2-t1+1)/12
+arr2d = ncdf_lec(filename, VAR=varname)
+arr2d = arr2d[t1:t2]
+arr2d = reform(arr2d,12,nyear) ; put in 2D array
+arr2d = total(arr2d,2)/nyear ; total over 2th dimension (i.e.years)
+
+return, arr2d
+end 
+
+;
+;
+pro std_ts_ICE_Vol, masknp, s_iodir_data,  POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+
+; get exp1 info
+  vICE1     = getenv('VAR1_ICE')     &   prefix = getenv('V1ICE_PREF')  &   suffix = getenv('V1ICE_SUFF')
+  v1_Ithick = getenv('VAR1_Ithick')  &   prefix = getenv('V1It_PREF')   &   suffix = getenv('V1It_SUFF')
+; get exp2 info
+  vICE2     = getenv('VAR2_ICE')     &   prefix2 = getenv('V2ICE_PREF')   &   suffix2 = getenv('V2ICE_SUFF')
+  v2_Ithick = getenv('VAR2_Ithick')  &   prefix2 = getenv('V2It_PREF')    &   suffix2 = getenv('V2It_SUFF')
+
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_ts_ICE_Vol_'+prefix
+  if prefix NE prefix2 then filename = filename + '_'+prefix2
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+;
+  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
+;
+  iodir = std_iodir_data
+  ; ICE Area(=Surface) in NORTH Hemisphere
+  domdef, 0, jpi-1, 30, 90, /xindex
+  ICE_N = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec)
+  ICE_thick = rseries_ncdf(v1_Ithick, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec)
+  ; Volume = Area(=Surface) * Thickness
+  ICE_vol_N = (ICE_N.arr < 1.e10 ) * ( ICE_thick.arr < 1.e10)  ; limited mask value of 1.e20, because 1.e20 * 1.e20 = inf for idl
+  ICE_vol_N = grossemoyenne(ICE_vol_N, 'xy', /integration, mask2d = masknp)
+
+  ;
+  if jpt mod 12 ne 0 then stop
+  nyr=jpt/12.
+  ICE_vol_N = reform(ICE_vol_N, 12, nyr)
+  ICE_vol_N = total(ICE_vol_N,2)/nyr
+  ICE_vol_N = {arr:ICE_vol_N * 1.e-9, unit : '10^9 Km^3'}
+  ;
+  ;ICE Area(=Surface) in SOUTH Hemisphere
+  domdef, 0, jpi-1, -90, -30, /xindex 
+  ICE_S = rseries_ncdf(vICE1, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec)
+  ICE_thick = rseries_ncdf(v1_Ithick, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec)
+  ; Volume = Area(=Surface) * Thickness
+  ICE_vol_S = (ICE_S.arr < 1.e10 ) * ( ICE_thick.arr < 1.e10)  ; limited mask value of 1.e20, because 1.e20 * 1.e20 = inf for idl
+  ICE_vol_S = grossemoyenne(ICE_vol_S, 'xy', /integration, mask2d = masknp)
+  if jpt mod 12 ne 0 then stop
+  nyr=jpt/12.
+  ICE_vol_S = reform(ICE_vol_S, 12, nyr)
+  ICE_vol_S = total(ICE_vol_S,2)/nyr
+  ICE_vol_S = {arr:ICE_vol_S * 1.e-9, unit : '10^9 Km^3'}
+  ;
+  title = 'Northern Hemisphere'+'!C'+prefix+' '+d1_d2+'!C'+'Global Annual Mean Ice Volume (BLACK) '
+  jpt=12
+  time=julday(1,15,1900)+30*lindgen(12)
+  pltt, ICE_vol_N, 't', MIN = 0., MAX = 40000., /REMPLI, /PORTRAIT, XGRIDSTYLE = 1, DATE_FORMAT = '%M' $
+        , small = [1, 2, 1], YTITLE = '10^9 Km^3 ', TITLE = title, _extra = ex
+;
+  title ='Southern Hemisphere' +'!C'+prefix+' '+d1_d2+' - '+'!C'+'Global Annual Mean Ice Volume (BLACK)'
+  pltt, ICE_vol_S, 't', MIN = 0., MAX = 11000., /REMPLI, /NOERASE, XGRIDSTYLE = 1 , DATE_FORMAT = '%M' $
+        , small = [1, 2, 2], YTITLE = '10^9 Km^3 ', TITLE = title, _extra = ex
+;
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  if prefix NE prefix2 then BEGIN
+
+    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
+    tsave = time
+    domdef, 0, jpi-1, 30, 90, /xindex
+    ;ICE Area(=Surface) in NORTH Hemisphere
+    ICE_N2 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec)
+    ICE_thick2 = rseries_ncdf(v2_Ithick, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec)
+    ; Volume = Area(=Surface) * Thickness
+    ICE_vol_N2 = (ICE_N2.arr < 1.e10 ) * ( ICE_thick2.arr < 1.e10) ; limited mask value of 1.e20, because 1.e20 * 1.e20 = inf for idl
+    ICE_vol_N2 = grossemoyenne(ICE_vol_N2, 'xy', /integration, mask2d = masknp)
+    if jpt mod 12 ne 0 then stop
+    nyr=jpt/12.
+    ICE_vol_N2 = reform(ICE_vol_N2, 12, nyr)
+    ICE_vol_N2 = total(ICE_vol_N2,2)/nyr
+    ICE_vol_N2 = {arr:ICE_vol_N2 * 1.e-9, unit : '10^3 Km^3'}
+
+    ;ICE Area(=Surface) in SOUTH Hemisphere
+    domdef, 0, jpi-1, -90, -30, /xindex 
+    ICE_S2 = rseries_ncdf(vICE2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec)
+    ICE_thick2 = rseries_ncdf(v2_Ithick, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec)
+    ; Volume = Area(=Surface) * Thickness
+    ICE_vol_S2 = (ICE_S2.arr < 1.e10 ) * ( ICE_thick.arr < 1.e10) ; limited mask value of 1.e20, because 1.e20 * 1.e20 = inf for idl
+    ICE_vol_S2 = grossemoyenne(ICE_vol_S2, 'xy', /integration, mask2d = masknp)
+    if jpt mod 12 ne 0 then stop
+    nyr=jpt/12.
+    ICE_vol_S2 = reform(ICE_vol_S2, 12, nyr)
+    ICE_vol_S2 = total(ICE_vol_S2,2)/nyr
+    ICE_vol_S2 = {arr:ICE_vol_S2 * 1.e-9, unit : '10^3 Km^3'}
+
+   ; time = tsave   &   IF n_elements(time) NE jpt THEN stop
+
+    if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1
+
+    title = 'Northern Hemisphere'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2 +'!C'+'Global Annual Mean Ice Volume (BLACK) '
+    jpt=12
+    time=julday(1,15,1900)+30*lindgen(12)
+    pltt, ICE_vol_N, 't', MIN = 0., MAX = 40000., /REMPLI, /PORTRAIT, XGRIDSTYLE = 1, window = 2, DATE_FORMAT = '%M' $
+          , small = [1, 2, 1], YTITLE = '10^9 Km^3 ', TITLE = title, _extra = ex
+    pltt, ICE_vol_N2 , 't', /REMPLI, /PORTRAIT $ ; linee tratteggiate LINESTYLE=2  $
+        , /ov1d, COLOR = 250, small = [1, 2, 1], YTITLE = '10^9 Km^3 ', TITLE = title, _extra = ex
+    ;
+    title = 'Southern Hemisphere'+'!C'+prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+'Global Annual Mean Ice Volume'
+    pltt, ICE_vol_S, 't', MIN = 0., MAX = 11000., /REMPLI, /NOERASE, XGRIDSTYLE = 1, DATE_FORMAT = '%M' $
+          , small = [1, 2, 2], YTITLE = '10^9 Km^3 ', TITLE = title, _extra = ex   
+    pltt, ICE_vol_S2, 't',  /REMPLI, /NOERASE $
+          , /ov1d, COLOR = 250, small = [1, 2, 2], YTITLE = '10^9 Km^3 ', TITLE = title, _extra = ex   
+
+    htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_2.png  />  ' ]
+    if KEYWORD_SET(postscript) then closeps
+
+  endif
+
+  domdef
+  
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_Q.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_Q.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_Q.pro	(revision 4751)
@@ -0,0 +1,48 @@
+pro std_ts_Q, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+
+; get exp1 info
+  vq = getenv('VAR1_Q')    &   prefix = getenv('V1Q_PREF')    &   suffix = getenv('V1Q_SUFF')
+; get exp2 info
+  vq2 = getenv('VAR2_Q')   &   prefix2 = getenv('V2Q_PREF')   &   suffix2 = getenv('V2Q_SUFF')
+;
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_ts_Q_'+prefix
+  if prefix NE prefix2 then filename = filename + '_'+prefix2
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+
+  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
+;
+  iodir = std_iodir_data
+;
+  ts_Q = rseries_ncdf(vq, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, direc = 'xy', mask2d = masknp)
+  title = prefix+' '+d1_d2+'!C'+blabla
+  pltt, ts_Q, 't', MIN = -4, MAX = 4, date1, date2, /REMPLI, XGRIDSTYLE = 1 $
+        , small = [1, 2, 1], YTITLE = varunit, TITLE = title, /PORTRAIT, _extra = ex
+  
+  IF prefix NE prefix2 THEN BEGIN
+
+    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
+    tsave = time
+    ts_Q2 = rseries_ncdf(vq2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, direc = 'xy', mask2d = masknp)
+    time = tsave   &   IF n_elements(time) NE jpt THEN stop
+
+    title = prefix+' (BLACK)  - '+prefix2+' (RED) '+d1_d2_2+'!C'+blabla
+    pltt, ts_Q.arr , 't', MIN = -4., MAX = 4., date1, date2, /REMPLI, XGRIDSTYLE = 1 $
+          , small = [1, 2, 2], YTITLE = varunit, TITLE = title, /noerase, _extra = ex
+    pltt, ts_Q2.arr, 't', date1, date2, /REMPLI $
+          , /ov1d, color = 250, small = [1, 2, 2], YTITLE = varunit, TITLE = title, /noerase, _extra = ex
+
+  ENDIF 
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+  
+  return
+end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_S.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_S.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_S.pro	(revision 4751)
@@ -0,0 +1,85 @@
+pro std_ts_S, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+
+; get exp1 info
+  vsal = getenv('VAR1_S')      &   prefix = getenv('V1S_PREF')         &   suffix = getenv('V1S_SUFF')
+  vssh = getenv('VAR1_SSH')    &   sshprefix = getenv('V1SSH_PREF')    &   sshsuffix = getenv('V1SSH_SUFF')
+; get exp2 info
+  vsal2 = getenv('VAR2_S')     &   prefix2 = getenv('V2S_PREF')        &   suffix2 = getenv('V2S_SUFF')
+  vssh2 = getenv('VAR2_SSH')   &   sshprefix2 = getenv('V2SSH_PREF')   &   sshsuffix2 = getenv('V2SSH_SUFF')
+;
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_ts_S_'+prefix
+  if prefix NE prefix2 then filename = filename + '_'+prefix2
+  if KEYWORD_SET(postscript) then openps, filename+'_1.ps', portrait = 1
+
+  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
+
+; read levitus data
+  std_file_Levitus_S =  isafile(getenv('FILE_SAL_3D'), title = 'Levitus_S', iodir = std_iodir_climato)
+  Lev = read_ncdf(getenv('VAR_SAL_3D'), filename = std_file_Levitus_S, /nostruct ) 
+  Lev_xyz = moyenne(Lev, 'xyz', mask2d = masknp)
+  levz = moyenne(temporary(Lev), 'xy', mask2d = masknp, /KEEPBOTTOM)
+;
+  iodir = std_iodir_data
+;
+
+; read exp1 data
+  std_ts_read, vsal, date1, date2, prefix, suffix, ts_Sal, ts_z, masknp $
+               , WITHSSH = vssh, SSHPREFIX = sshprefix, SSHSUFFIX = sshsuffix, LEVZ = levz
+
+  title = prefix+' '+d1_d2+'!C'+blabla
+  pltt, ts_Sal, 't', MIN = 34.54, MAX = 34.76, date1, date2, /REMPLI, XGRIDSTYLE = 1 $
+        , small = [1, 2, 1], YTITLE = varunit, TITLE = title, /PORTRAIT, _extra = ex
+
+  title = prefix+' '+d1_d2+' - Levitus!C'+blabla
+  pltt, ts_Sal - Lev_xyz, 't', MIN = -.05, MAX = .05, date1, date2, /REMPLI, XGRIDSTYLE = 1 $
+        , small = [1, 2, 2], YTITLE = varunit, TITLE = title, /NOERASE, _extra = ex
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_1.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+  if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1
+
+  title = prefix+' '+d1_d2+' - Levitus!C ZT-plot (0-1500m) '+blabla
+  pltt, ts_z, 'zt', MIN = -.5, MAX = .5, INTER = .05, date1, date2, /REMPLI, style = 'so0so', XGRIDSTYLE = 1 $ 
+        , small = [1, 2, 1], YTITLE = varunit, TITLE = title, boxzoom = 1500., /portrait, window = 1, _extra = ex
+  
+  title = prefix+' '+d1_d2+' - Levitus!C ZT-plot (0-6000m) '+blabla
+  pltt, ts_z, 'zt', MIN = -.5, MAX = .5, INTER = .05, date1, date2, /REMPLI, style = 'so0so', XGRIDSTYLE = 1 $ 
+        , small = [1, 2, 2], YTITLE = varunit, TITLE = title, boxzoom = 6000., /NOERASE, _extra = ex
+  
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_2.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  IF prefix NE prefix2 THEN BEGIN
+
+    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
+; read exp2 data
+    tsave = time
+    std_ts_read, vsal2, date1_2, date2_2, prefix2, suffix2, ts_Sal2, ts_z2, masknp $
+                 , WITHSSH = vssh2, SSHPREFIX = sshprefix2, SSHSUFFIX = sshsuffix2, LEVZ = levz
+    time = tsave   &   IF n_elements(time) NE jpt THEN stop
+
+    if KEYWORD_SET(postscript) then openps, filename+'_3.ps', portrait = 1
+
+    title = prefix+' - '+prefix2+' '+d1_d2_2+'!C'+blabla
+    pltt, ts_Sal - ts_Sal2, 't', MIN = -0.1, MAX = 0.1, date1, date2, /REMPLI , XGRIDSTYLE = 1 $
+          , COLOR = 250, small = [1, 2, 1], YTITLE = varunit, TITLE = title, /PORTRAIT, window = 2, _extra = ex
+
+    title = prefix+' - '+prefix2+' '+d1_d2_2+'!C ZT-plot (0-6000m) '+blabla
+    pltt, ts_z - ts_z2, 'zt', MIN = -0.1, MAX = 0.1, INTER = .01, date1, date2, /REMPLI, style = 'so0so', XGRIDSTYLE = 1 $ 
+          , small = [1, 2, 2], YTITLE = varunit, TITLE = title, boxzoom = 6000., /NOERASE, _extra = ex
+
+    htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_3.png  />  ' ]
+    if KEYWORD_SET(postscript) then closeps
+
+  ENDIF
+
+  return
+end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_SSH.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_SSH.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_SSH.pro	(revision 4751)
@@ -0,0 +1,48 @@
+pro std_ts_SSH, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+
+; get exp1 info
+  vssh = getenv('VAR1_SSH')    &   prefix = getenv('V1SSH_PREF')    &   suffix = getenv('V1SSH_SUFF')
+; get exp2 info
+  vssh2 = getenv('VAR2_SSH')   &   prefix2 = getenv('V2SSH_PREF')   &   suffix2 = getenv('V2SSH_SUFF')
+;
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_ts_SSH_'+prefix
+  if prefix NE prefix2 then filename = filename + '_'+prefix2
+  if KEYWORD_SET(postscript) then openps, filename+'.ps', portrait = 1
+
+  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
+;
+  iodir = std_iodir_data
+;
+  ts_SSH = rseries_ncdf(vssh, date1, date2, prefix, suffix, FIRSTONLY = 1 - allrec, direc = 'xy', mask2d = masknp)
+  ts_SSH.arr = ts_SSH.arr   &   ts_SSH.unit = 'm'
+  title = prefix+' '+d1_d2+'!C'+blabla
+  pltt, ts_SSH, 't', MIN = -12., MAX = 12., date1, date2, /REMPLI , XGRIDSTYLE = 1 $
+        , small = [1, 2, 1], YTITLE = 'm', TITLE = title, /PORTRAIT, _extra = ex
+  
+  IF prefix NE prefix2 THEN BEGIN
+
+    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
+    tsave = time
+    ts_SSH2 = rseries_ncdf(vssh2, date1_2, date2_2, prefix2, suffix2, FIRSTONLY = 1 - allrec, direc = 'xy', mask2d = masknp)
+    ts_SSH2.arr = ts_SSH2.arr   &   ts_SSH2.unit = 'm'
+    time = tsave   &   IF n_elements(time) NE jpt THEN stop
+
+    title = prefix+' (BLACK) - '+prefix2+' (RED) '+d1_d2_2+'!C'+blabla
+    pltt, ts_SSH.arr - ts_SSH2.arr, 't', MIN = -10., MAX = 10., date1, date2, /REMPLI, XGRIDSTYLE = 1 $
+          , color = 250, small = [1, 2, 2], YTITLE = 'm', TITLE = title, /noerase, _extra = ex
+
+  ENDIF 
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+  
+  return
+end
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_T.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_T.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_T.pro	(revision 4751)
@@ -0,0 +1,84 @@
+pro std_ts_T, masknp, s_iodir_data, POSTSCRIPT = postscript, _extra = ex
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+
+; get exp1 info
+  vtemp = getenv('VAR1_T')     &   prefix = getenv('V1T_PREF')         &   suffix = getenv('V1T_SUFF')
+  vssh = getenv('VAR1_SSH')    &   sshprefix = getenv('V1SSH_PREF')    &   sshsuffix = getenv('V1SSH_SUFF')
+; get exp2 info
+  vtemp2 = getenv('VAR2_T')    &   prefix2 = getenv('V2T_PREF')        &   suffix2 = getenv('V2T_SUFF')
+  vssh2 = getenv('VAR2_SSH')   &   sshprefix2 = getenv('V2SSH_PREF')   &   sshsuffix2 = getenv('V2SSH_SUFF')
+;
+  cdti3 = string(cnt, format = '(i3.3)')
+  print, cdti3 + ') ' + blabla
+  filename = cdti3 + '_ts_T_'+prefix
+  if prefix NE prefix2 then filename = filename + '_'+prefix2
+  if KEYWORD_SET(postscript) then openps, filename+'_1.ps', portrait = 1
+
+  d1_d2 = '('+strtrim(date1, 1)+' - '+strtrim(date2, 1)+')'
+
+; read levitus data
+  std_file_Levitus_T = isafile(getenv('FILE_TEMP_3D'), title = 'Levitus_T', iodir = std_iodir_climato)
+  Lev = read_ncdf(getenv('VAR_TEMP_3D'), filename = std_file_Levitus_T, /nostruct ) 
+  Lev_xyz = moyenne(Lev, 'xyz', mask2d = masknp)
+  levz = moyenne(temporary(Lev), 'xy', mask2d = masknp, /KEEPBOTTOM)
+;
+  iodir = std_iodir_data
+;
+
+; read exp1 data
+  std_ts_read, vtemp, date1, date2, prefix, suffix, ts_Temp, ts_z, masknp $
+               , WITHSSH = vssh, SSHPREFIX = sshprefix, SSHSUFFIX = sshsuffix, LEVZ = levz
+
+  title = prefix+' '+d1_d2+'!C'+blabla
+  pltt, ts_Temp, 't', MIN = 1., MAX = 4.5, date1, date2, /REMPLI, XGRIDSTYLE = 1 $
+        , small = [1, 2, 1], YTITLE = varunit, TITLE = title, /PORTRAIT, _extra = ex
+
+  title = prefix+' '+d1_d2+' - Levitus!C'+blabla
+  pltt, ts_Temp - Lev_xyz, 't', MIN = -1., MAX = 1., date1, date2, /REMPLI, XGRIDSTYLE = 1 $
+        , small = [1, 2, 2], YTITLE = varunit, TITLE = title, /NOERASE, _extra = ex
+
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_1.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+  if KEYWORD_SET(postscript) then openps, filename+'_2.ps', portrait = 1
+
+  title = prefix+' '+d1_d2+' - Levitus!C ZT-plot (0-1500m) '+blabla
+  pltt, ts_z, 'zt', MIN = -2.,MAX = 2., inter = .1, date1, date2, /REMPLI, style = 'so0so', XGRIDSTYLE = 1 $ 
+        , small = [1, 2, 1], YTITLE = varunit, TITLE = title, boxzoom = 1500., /portrait, window = 1, _extra = ex
+  
+  title = prefix+' '+d1_d2+' - Levitus!C ZT-plot (0-6000m) '+blabla
+  pltt, ts_z, 'zt', MIN = -2., MAX = 2., inter = .1, date1, date2, /REMPLI, style = 'so0so', XGRIDSTYLE = 1 $ 
+        , small = [1, 2, 2], YTITLE = varunit, TITLE = title, boxzoom = 6000., /NOERASE, _extra = ex
+  
+  htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_2.png  />  ' ]
+  if KEYWORD_SET(postscript) then closeps
+
+  IF prefix NE prefix2 THEN BEGIN
+
+    d1_d2_2 = '('+strtrim(date1_2, 1)+' - '+strtrim(date2_2, 1)+')'
+; read exp2 data
+    tsave = time
+    std_ts_read, vtemp2, date1_2, date2_2, prefix2, suffix2, ts_Temp2, ts_z2, masknp $
+                 , WITHSSH = vssh2, SSHPREFIX = sshprefix2, SSHSUFFIX = sshsuffix2, LEVZ = levz
+    time = tsave   &   IF n_elements(time) NE jpt THEN stop
+
+    if KEYWORD_SET(postscript) then openps, filename+'_3.ps', portrait = 1
+
+    title = prefix+' - '+prefix2+' '+d1_d2_2+'!C'+blabla
+    pltt, ts_Temp - ts_Temp2, 't', MIN = -1., MAX = 1., date1, date2, /REMPLI, XGRIDSTYLE = 1 $
+          , COLOR = 250, small = [1, 2, 1], YTITLE = varunit, TITLE = title, /PORTRAIT, window = 2, _extra = ex
+
+    title = prefix+' - '+prefix2+' '+d1_d2_2+'!C ZT-plot (0-6000m) '+blabla
+    pltt, ts_z - ts_z2, 'zt', MIN = -1., MAX = 1., inter = .1, date1, date2, /REMPLI, style = 'so0so', XGRIDSTYLE = 1 $ 
+          , small = [1, 2, 2], YTITLE = varunit, TITLE = title, boxzoom = 6000., /NOERASE, _extra = ex
+
+    htmltxt = [ htmltxt, '<hr>'+blabla, '<br><img width="80%" src='+filename+'_3.png  />  ' ]
+    if KEYWORD_SET(postscript) then closeps
+    
+  ENDIF
+
+  return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_all.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_all.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_all.pro	(revision 4751)
@@ -0,0 +1,89 @@
+pro std_ts_all, doplot = doplot, _extra=ex
+
+  compile_opt idl2, strictarrsubs
+
+@common
+@std_common
+
+  PRINT, ''
+  PRINT, ' 	############################################'
+  PRINT, ''
+  PRINT, '                   plot of all TIME SERIES'
+  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)
+; load the grid
+  load_orca, std_file_mesh  
+; reading variables
+  masknp = read_ncdf('tmaskutil', file = std_file_mesh, /nostruct, /cont_nofill)
+; 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)
+
+
+  date1   = long(getenv('DATE1'))     &   date2   = long(getenv('DATE2'))
+  date1_2 = long(getenv('DATE1_2'))   &   date2_2 = long(getenv('DATE2_2'))
+
+  allrec =  1 - keyword_set(long(getenv('READ_ONLY_FIRST_RECORD')))
+
+;#########################################################################
+;######################  STANDARD PLOTS   ################################
+;#########################################################################
+
+  IF keyword_set(doplot) EQ 0 THEN doplot = 0
+
+; fixed color tabled
+  lct, 64
+  cnt = 0
+  htmltxt = ''
+;
+  cnt = cnt+1   &   blabla = 'Global Mean Temperature'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_ts_T, masknp, POSTSCRIPT = postscript, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Global Mean Salinity'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_ts_S, masknp, POSTSCRIPT = postscript, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Global Mean SSH'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_ts_SSH, masknp, POSTSCRIPT = postscript, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Global Mean Q net'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_ts_Q, masknp, POSTSCRIPT = postscript, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Global Mean EMP'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_ts_EMP, masknp, POSTSCRIPT = postscript, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Drake Transport'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_ts_Drake, masknp, POSTSCRIPT = postscript, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Max AMOC'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_ts_AMOC, masknp, POSTSCRIPT = postscript, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Sea-Ice Cover'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_ts_ICE, masknp, POSTSCRIPT = postscript, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Sea-Ice Volume'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_ts_ICE_Vol, masknp, POSTSCRIPT = postscript, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'ICE Velocity '
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_ts_ICE_Vel, masknp, POSTSCRIPT = postscript, _extra = ex
+;
+  cnt = cnt+1   &   blabla = 'Sea-Ice Volume Export at Fram Strait'
+  IF doplot EQ cnt OR doplot EQ 0 THEN std_ts_ICE_FRAM, masknp, POSTSCRIPT = postscript, _extra = ex
+;
+  IF n_elements(htmltxt) GT 1 THEN putfile, psdir+'std_ts_html_body.txt', htmltxt[1:*]
+
+  return
+END
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_read.pro
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_read.pro	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_read.pro	(revision 4751)
@@ -0,0 +1,44 @@
+PRO std_ts_read, var_name, dt1, dt2, prefix, suffix, ts, ts_z, masknp $
+                 , WITHSSH = withssh, SSHPREFIX = sshprefix, SSHSUFFIX = sshsuffix, LEVZ = levz
+
+  compile_opt idl2, strictarrsubs
+  
+@common
+@std_common
+
+
+  list = rseries_ncdf(var_name, dt1, dt2, prefix, suffix, /fileslist)
+  nfiles = n_elements(list)
+  IF keyword_set(withssh) THEN BEGIN
+    sshlist = rseries_ncdf(withssh, dt1, dt2, sshprefix, sshsuffix, /fileslist)
+    IF nfiles NE n_elements(sshlist) THEN stop
+  ENDIF
+
+  ts = 0.
+  ts_Time = 0.
+  ts_z = fltarr(jpk)
+
+  FOR i = 0, nfiles-1 DO BEGIN
+    IF keyword_set(withssh) THEN ssh = read_ncdf(withssh, allrecords = allrec, filename = sshlist[i], /nostruct)
+    var = read_ncdf(var_name, allrecords = allrec, filename = list[i], /nostruct)
+    ts_Time = [ ts_Time, Time]
+;
+    IF jpt EQ 1 THEN txyz = moyenne(var, 'xyz', mask2d = masknp, ssh = ssh) $
+    ELSE txyz = grossemoyenne(var, 'xyz', mask2d = masknp, ssh = ssh)
+    ts = [ ts, txyz ]
+;
+    IF jpt EQ 1 THEN tz = moyenne(temporary(var), 'xy', mask2d = masknp, ssh = ssh, /KEEPBOTTOM) $
+    ELSE tz = grossemoyenne(temporary(var), 'xy', mask2d = masknp, ssh = ssh, /KEEPBOTTOM)
+    IF keyword_set(levz) THEN ts_z = [ [ts_z], [tz - (levz[*] # replicate(1., jpt))] ] $
+    ELSE ts_z = [ [ts_z], [tz] ]
+  ENDFOR
+
+  time = ts_Time[1:*]           ; remove first record of 0
+  jpt = n_elements(time)
+  
+  ts = ts[1:*]        ; remove first record of 0 
+  ts_z = ts_z[*, 1:*]           ; remove first record of 0
+
+
+return
+end
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh	(revision 4751)
@@ -0,0 +1,137 @@
+#!/bin/sh 
+#
+# AUTHOR - date
+# ===========
+# Sebastien Masson - 04/2011 - LOCEAN
+#
+# DESCRIPTION
+# ===========
+# define all varibles needed by std_ts.sh and std_ts.pro
+#
+# EXAMPLES
+# ========
+# $ . ./std_ts_vardef.sh
+#
+#
+#===================== User PATHS =====================
+#
+idl_command=/Applications/itt/idl64/bin/idl
+#
+PS_DIR=$( pwd )/ts_heatbug_ps
+PDF_DIR=$( pwd )/ts_heatbug_pdf
+HTML_DIR=$( pwd )/html
+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
+#
+# 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 =====================
+#
+READ_ONLY_FIRST_RECORD=0   # if 0 then read all records in files else read only the first reacord in each file
+#
+#DATE1=20010101   ;   DATE2=25001231
+DATE1=20310101   ;   DATE2=20401231
+#DATE1=00010101  		;   DATE2=00101231
+#
+VAR1_T=thetao        ;   V1T_PREF=heatbug       ;   V1T_SUFF=_1Y_grid_T.nc
+VAR1_S=so            ;   V1S_PREF=heatbug      ;   V1S_SUFF=_1Y_grid_T.nc
+VAR1_SSH=zos         ;   V1SSH_PREF=heatbug    ;   V1SSH_SUFF=_1Y_grid_T.nc
+VAR1_Q=tohfls        ;   V1Q_PREF=heatbug      ;   V1Q_SUFF=_1Y_grid_T.nc
+VAR1_EMP=wfo         ;   V1EMP_PREF=heatbug    ;   V1EMP_SUFF=_1Y_grid_T.nc
+VAR1_U=uocetr_eff    ;   V1U_PREF=heatbug      ;   V1U_SUFF=_1Y_grid_U.nc
+VAR1_V=vocetr_eff    ;   V1V_PREF=heatbug      ;   V1V_SUFF=_1Y_grid_V.nc
+VAR1_ICE=siconc      ;   V1ICE_PREF=heatbug    ;   V1ICE_SUFF=_1M_icemod.nc
+VAR1_Ithick=sithic   ;   V1It_PREF=heatbug     ;   V1It_SUFF=_1M_icemod.nc
+VAR1_SNOW=sndept     ;   V1SNOW_PREF=heatbug   ;   V1SNOW_SUFF=_1M_icemod.nc
+VAR1_IvelV=sivelv    ;   V1IvV_PREF=heatbug    ;   V1IvV_SUFF=_1M_icemod.nc
+VAR1_Ivel=sivelo     ;   V1Iv_PREF=heatbug     ;   V1Iv_SUFF=_1M_icemod.nc
+#
+#===================== EXP2 =====================
+#
+#DATE1_2=20010101   ;   DATE2_2=20101231
+DATE1_2=20310101   ;   DATE2_2=20401231
+#DATE1_2=20010101   ;   DATE2_2=25001231
+#
+VAR2_T=thetao      ;   V2T_PREF=heatbug      ;   V2T_SUFF=_1Y_grid_T.nc
+VAR2_S=so          ;   V2S_PREF=heatbug      ;   V2S_SUFF=_1Y_grid_T.nc
+VAR2_SSH=zos       ;   V2SSH_PREF=heatbug    ;   V2SSH_SUFF=_1Y_grid_T.nc
+VAR2_Q=tohfls      ;   V2Q_PREF=heatbug      ;   V2Q_SUFF=_1Y_grid_T.nc
+VAR2_EMP=wfo       ;   V2EMP_PREF=heatbug    ;   V2EMP_SUFF=_1Y_grid_T.nc
+VAR2_U=uocetr_eff  ;   V2U_PREF=heatbug      ;   V2U_SUFF=_1Y_grid_U.nc
+VAR2_V=vocetr_eff  ;   V2V_PREF=heatbug      ;   V2V_SUFF=_1Y_grid_V.nc
+VAR2_ICE=siconc    ;   V2ICE_PREF=heatbug    ;   V2ICE_SUFF=_1M_icemod.nc
+VAR2_Ithick=sithic ;   V2It_PREF=heatbug     ;   V2It_SUFF=_1M_icemod.nc
+VAR2_SNOW=sndept   ;   V2SNOW_PREF=heatbug   ;   V2SNOW_SUFF=_1M_icemod.nc
+VAR2_IvelV=sivelv  ;   V2IvV_PREF=heatbug    ;   V2IvV_SUFF=_1M_icemod.nc
+VAR2_Ivel=sivelo   ;   V2Iv_PREF=heatbug     ;   V2Iv_SUFF=_1M_icemod.nc
+#
+######################### 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     VAR_SNOW_NH     VAR_SNOW_SH    VAR_SNOW_area_NH VAR_SNOW_area_SH
+#===================== EXP1 =====================
+export READ_ONLY_FIRST_RECORD
+#
+export DATE1        DATE2
+export VAR1_T       V1T_PREF     V1T_SUFF
+export VAR1_S       V1S_PREF     V1S_SUFF
+export VAR1_SSH     V1SSH_PREF   V1SSH_SUFF
+export VAR1_Q       V1Q_PREF     V1Q_SUFF
+export VAR1_EMP     V1EMP_PREF   V1EMP_SUFF
+export VAR1_U       V1U_PREF     V1U_SUFF
+export VAR1_V       V1V_PREF     V1V_SUFF
+export VAR1_ICE     V1ICE_PREF   V1ICE_SUFF
+export VAR1_Ithick  V1It_PREF    V1It_SUFF
+export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
+export VAR1_IvelV   V1IvV_PREF   V1IvV_SUFF
+export VAR1_Ivel    V1Iv_PREF    V1Iv_SUFF
+
+#===================== EXP2 =====================
+export DATE1_2      DATE2_2
+export VAR2_T       V2T_PREF     V2T_SUFF
+export VAR2_S       V2S_PREF     V2S_SUFF
+export VAR2_SSH     V2SSH_PREF   V2SSH_SUFF
+export VAR2_Q       V2Q_PREF     V2Q_SUFF
+export VAR2_EMP     V2EMP_PREF   V2EMP_SUFF
+export VAR2_U       V2U_PREF     V2U_SUFF
+export VAR2_V       V2V_PREF     V2V_SUFF
+export VAR2_ICE     V2ICE_PREF   V2ICE_SUFF
+export VAR2_Ithick  V2It_PREF    V2It_SUFF
+export VAR2_SNOW    V2SNOW_PREF  V2SNOW_SUFF
+export VAR2_IvelV   V2IvV_PREF   V2IvV_SUFF
+export VAR2_Ivel    V2Iv_PREF    V2Iv_SUFF
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh.500yfwb0
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh.500yfwb0	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh.500yfwb0	(revision 4751)
@@ -0,0 +1,130 @@
+#!/bin/sh 
+#
+# AUTHOR - date
+# ===========
+# Sebastien Masson - 04/2011 - LOCEAN
+#
+# DESCRIPTION
+# ===========
+# define all varibles needed by std_ts.sh and std_ts.pro
+#
+# EXAMPLES
+# ========
+# $ . ./std_ts_vardef.sh
+#
+#
+#===================== User PATHS =====================
+#
+idl_command=/Applications/itt/idl64/bin/idl
+#
+PS_DIR=$( pwd )/ts_500yfwb0_ps
+PDF_DIR=$( pwd )/ts_500yfwb0_pdf
+HTML_DIR=$( pwd )/html
+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
+#
+# 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 =====================
+#
+READ_ONLY_FIRST_RECORD=0   # if 0 then read all records in files else read only the first reacord in each file
+#
+DATE1=20010101   ;   DATE2=21001231
+#DATE1=00010101  		;   DATE2=00101231
+#
+VAR1_T=votemper         ;   V1T_PREF=500yfwb0      ;   V1T_SUFF=_1Y_grid_T.nc
+VAR1_S=vosaline         ;   V1S_PREF=500yfwb0      ;   V1S_SUFF=_1Y_grid_T.nc
+VAR1_SSH=sossheig       ;   V1SSH_PREF=500yfwb0    ;   V1SSH_SUFF=_1Y_grid_T.nc
+VAR1_Q=sohflxdo         ;   V1Q_PREF=500yfwb0      ;   V1Q_SUFF=_1Y_grid_T.nc
+VAR1_EMP=sowaflup       ;   V1EMP_PREF=500yfwb0    ;   V1EMP_SUFF=_1Y_grid_T.nc
+VAR1_U=vozoeftr         ;   V1U_PREF=500yfwb0      ;   V1U_SUFF=_1Y_grid_U.nc
+VAR1_V=vomeeftr         ;   V1V_PREF=500yfwb0      ;   V1V_SUFF=_1Y_grid_V.nc
+VAR1_ICE=iiceconc       ;   V1ICE_PREF=500yfwb0    ;   V1ICE_SUFF=_1M_icemod.nc
+VAR1_Ithick=iicethic    ;   V1It_PREF=500yfwb0     ;   V1It_SUFF=_1M_icemod.nc
+VAR1_SNOW=isnowthi      ;   V1SNOW_PREF=500yfwb0   ;   V1SNOW_SUFF=_1M_icemod.nc
+VAR1_IvelV=iicevelv     ;   V1IvV_PREF=500yfwb0    ;   V1IvV_SUFF=_1M_icemod.nc
+#
+#===================== EXP2 =====================
+#
+#DATE1_2=20010101   ;   DATE2_2=20101231
+DATE1_2=20010101   ;   DATE2_2=25001231
+#
+VAR2_T=votemper         ;   V2T_PREF=500yfwb0      ;   V2T_SUFF=_1Y_grid_T.nc
+VAR2_S=vosaline         ;   V2S_PREF=500yfwb0      ;   V2S_SUFF=_1Y_grid_T.nc
+VAR2_SSH=sossheig       ;   V2SSH_PREF=500yfwb0    ;   V2SSH_SUFF=_1Y_grid_T.nc
+VAR2_Q=sohflxdo         ;   V2Q_PREF=500yfwb0      ;   V2Q_SUFF=_1Y_grid_T.nc
+VAR2_EMP=sowaflup       ;   V2EMP_PREF=500yfwb0    ;   V2EMP_SUFF=_1Y_grid_T.nc
+VAR2_U=vozoeftr         ;   V2U_PREF=500yfwb0      ;   V2U_SUFF=_1Y_grid_U.nc
+VAR2_V=vomeeftr         ;   V2V_PREF=500yfwb0      ;   V2V_SUFF=_1Y_grid_V.nc
+VAR2_ICE=iiceconc       ;   V2ICE_PREF=500yfwb0    ;   V2ICE_SUFF=_1M_icemod.nc
+VAR2_Ithick=iicethic    ;   V2It_PREF=500yfwb0     ;   V2It_SUFF=_1M_icemod.nc
+VAR2_SNOW=isnowthi      ;   V2SNOW_PREF=500yfwb0   ;   V2SNOW_SUFF=_1M_icemod.nc
+VAR2_IvelV=iicevelv     ;   V2IvV_PREF=500yfwb0    ;   V2IvV_SUFF=_1M_icemod.nc
+#
+######################### 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     VAR_SNOW_NH     VAR_SNOW_SH    VAR_SNOW_area_NH VAR_SNOW_area_SH
+#===================== EXP1 =====================
+export READ_ONLY_FIRST_RECORD
+#
+export DATE1        DATE2
+export VAR1_T       V1T_PREF     V1T_SUFF
+export VAR1_S       V1S_PREF     V1S_SUFF
+export VAR1_SSH     V1SSH_PREF   V1SSH_SUFF
+export VAR1_Q       V1Q_PREF     V1Q_SUFF
+export VAR1_EMP     V1EMP_PREF   V1EMP_SUFF
+export VAR1_U       V1U_PREF     V1U_SUFF
+export VAR1_V       V1V_PREF     V1V_SUFF
+export VAR1_ICE     V1ICE_PREF   V1ICE_SUFF
+export VAR1_Ithick  V1It_PREF    V1It_SUFF
+export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
+export VAR1_IvelV   V1IvV_PREF   V1IvV_PREF
+#===================== EXP2 =====================
+export DATE1_2      DATE2_2
+export VAR2_T       V2T_PREF     V2T_SUFF
+export VAR2_S       V2S_PREF     V2S_SUFF
+export VAR2_SSH     V2SSH_PREF   V2SSH_SUFF
+export VAR2_Q       V2Q_PREF     V2Q_SUFF
+export VAR2_EMP     V2EMP_PREF   V2EMP_SUFF
+export VAR2_U       V2U_PREF     V2U_SUFF
+export VAR2_V       V2V_PREF     V2V_SUFF
+export VAR2_ICE     V2ICE_PREF   V2ICE_SUFF
+export VAR2_Ithick  V2It_PREF    V2It_SUFF
+export VAR2_SNOW    V2SNOW_PREF  V2SNOW_SUFF
+export VAR2_IvelV   V2IvV_PREF   V2IvV_PREF
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh.500yfwb0_500y
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh.500yfwb0_500y	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh.500yfwb0_500y	(revision 4751)
@@ -0,0 +1,127 @@
+#!/bin/sh 
+#
+# AUTHOR - date
+# ===========
+# Sebastien Masson - 04/2011 - LOCEAN
+#
+# DESCRIPTION
+# ===========
+# define all varibles needed by std_ts.sh and std_ts.pro
+#
+# EXAMPLES
+# ========
+# $ . ./std_ts_vardef.sh
+#
+#
+#===================== User PATHS =====================
+#
+idl_command=/Applications/itt/idl64/bin/idl
+#
+PS_DIR=$( pwd )/ts_500yfwb0_ps_500y
+PDF_DIR=$( pwd )/ts_500yfwb0_pdf_500y
+HTML_DIR=$( pwd )/html
+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
+#
+# 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 =====================
+#
+READ_ONLY_FIRST_RECORD=0   # if 0 then read all records in files else read only the first reacord in each file
+#
+DATE1=20010101   ;   DATE2=25001231
+#DATE1=00010101  		;   DATE2=00101231
+#
+VAR1_T=votemper         ;   V1T_PREF=500yfwb0      ;   V1T_SUFF=_1Y_grid_T.nc
+VAR1_S=vosaline         ;   V1S_PREF=500yfwb0      ;   V1S_SUFF=_1Y_grid_T.nc
+VAR1_SSH=sossheig       ;   V1SSH_PREF=500yfwb0    ;   V1SSH_SUFF=_1Y_grid_T.nc
+VAR1_Q=sohflxdo         ;   V1Q_PREF=500yfwb0      ;   V1Q_SUFF=_1Y_grid_T.nc
+VAR1_EMP=sowaflup       ;   V1EMP_PREF=500yfwb0    ;   V1EMP_SUFF=_1Y_grid_T.nc
+VAR1_U=vozoeftr         ;   V1U_PREF=500yfwb0      ;   V1U_SUFF=_1Y_grid_U.nc
+VAR1_V=vomeeftr         ;   V1V_PREF=500yfwb0      ;   V1V_SUFF=_1Y_grid_V.nc
+VAR1_ICE=iiceconc       ;   V1ICE_PREF=500yfwb0    ;   V1ICE_SUFF=_1M_icemod.nc
+VAR1_Ithick=iicethic    ;   V1It_PREF=500yfwb0     ;   V1It_SUFF=_1M_icemod.nc
+VAR1_SNOW=isnowthi      ;   V1SNOW_PREF=500yfwb0   ;   V1SNOW_SUFF=_1M_icemod.nc
+#
+#===================== EXP2 =====================
+#
+#DATE1_2=20010101   ;   DATE2_2=20101231
+DATE1_2=20010101   ;   DATE2_2=25001231
+#
+VAR2_T=votemper         ;   V2T_PREF=500yfwb0      ;   V2T_SUFF=_1Y_grid_T.nc
+VAR2_S=vosaline         ;   V2S_PREF=500yfwb0      ;   V2S_SUFF=_1Y_grid_T.nc
+VAR2_SSH=sossheig       ;   V2SSH_PREF=500yfwb0    ;   V2SSH_SUFF=_1Y_grid_T.nc
+VAR2_Q=sohflxdo         ;   V2Q_PREF=500yfwb0      ;   V2Q_SUFF=_1Y_grid_T.nc
+VAR2_EMP=sowaflup       ;   V2EMP_PREF=500yfwb0    ;   V2EMP_SUFF=_1Y_grid_T.nc
+VAR2_U=vozoeftr         ;   V2U_PREF=500yfwb0      ;   V2U_SUFF=_1Y_grid_U.nc
+VAR2_V=vomeeftr         ;   V2V_PREF=500yfwb0      ;   V2V_SUFF=_1Y_grid_V.nc
+VAR2_ICE=iiceconc       ;   V2ICE_PREF=500yfwb0    ;   V2ICE_SUFF=_1M_icemod.nc
+VAR2_Ithick=iicethic    ;   V2It_PREF=500yfwb0     ;   V2It_SUFF=_1M_icemod.nc
+VAR2_SNOW=isnowthi      ;   V2SNOW_PREF=500yfwb0   ;   V2SNOW_SUFF=_1M_icemod.nc
+#
+######################### 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     VAR_SNOW_NH     VAR_SNOW_SH    VAR_SNOW_area_NH VAR_SNOW_area_SH
+#===================== EXP1 =====================
+export READ_ONLY_FIRST_RECORD
+#
+export DATE1        DATE2
+export VAR1_T       V1T_PREF     V1T_SUFF
+export VAR1_S       V1S_PREF     V1S_SUFF
+export VAR1_SSH     V1SSH_PREF   V1SSH_SUFF
+export VAR1_Q       V1Q_PREF     V1Q_SUFF
+export VAR1_EMP     V1EMP_PREF   V1EMP_SUFF
+export VAR1_U       V1U_PREF     V1U_SUFF
+export VAR1_V       V1V_PREF     V1V_SUFF
+export VAR1_ICE     V1ICE_PREF   V1ICE_SUFF
+export VAR1_Ithick  V1It_PREF    V1It_SUFF
+export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
+
+#===================== EXP2 =====================
+export DATE1_2      DATE2_2
+export VAR2_T       V2T_PREF    V2T_SUFF
+export VAR2_S       V2S_PREF    V2S_SUFF
+export VAR2_SSH     V2SSH_PREF  V2SSH_SUFF
+export VAR2_Q       V2Q_PREF    V2Q_SUFF
+export VAR2_EMP     V2EMP_PREF  V2EMP_SUFF
+export VAR2_U       V2U_PREF    V2U_SUFF
+export VAR2_V       V2V_PREF    V2V_SUFF
+export VAR2_ICE     V2ICE_PREF  V2ICE_SUFF
+export VAR2_Ithick  V2It_PREF   V2It_SUFF
+export VAR2_SNOW    V2SNOW_PREF V2SNOW_SUFF
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh.500yfwb2
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh.500yfwb2	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh.500yfwb2	(revision 4751)
@@ -0,0 +1,130 @@
+#!/bin/sh 
+#
+# AUTHOR - date
+# ===========
+# Sebastien Masson - 04/2011 - LOCEAN
+#
+# DESCRIPTION
+# ===========
+# define all varibles needed by std_ts.sh and std_ts.pro
+#
+# EXAMPLES
+# ========
+# $ . ./std_ts_vardef.sh
+#
+#
+#===================== User PATHS =====================
+#
+idl_command=/Applications/itt/idl64/bin/idl
+#
+PS_DIR=$( pwd )/ts_500yfwb2_ps
+PDF_DIR=$( pwd )/ts_500yfwb2_pdf
+HTML_DIR=$( pwd )/html
+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
+#
+# 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 =====================
+#
+READ_ONLY_FIRST_RECORD=0   # if 0 then read all records in files else read only the first reacord in each file
+#
+DATE1=20010101   ;   DATE2=25001231
+#DATE1=00010101  		;   DATE2=00101231
+#
+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
+VAR1_IvelV=iicevelv     ;   V1IvV_PREF=500yfwb2    ;   V1IvV_SUFF=_1M_icemod.nc
+#
+#===================== EXP2 =====================
+#
+#DATE1_2=20010101   ;   DATE2_2=20101231
+DATE1_2=20010101   ;   DATE2_2=25001231
+#
+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
+VAR2_IvelV=iicevelv     ;   V2IvV_PREF=500yfwb2    ;   V2IvV_SUFF=_1M_icemod.nc
+#
+######################### 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     VAR_SNOW_NH     VAR_SNOW_SH    VAR_SNOW_area_NH VAR_SNOW_area_SH
+#===================== EXP1 =====================
+export READ_ONLY_FIRST_RECORD
+#
+export DATE1        DATE2
+export VAR1_T       V1T_PREF     V1T_SUFF
+export VAR1_S       V1S_PREF     V1S_SUFF
+export VAR1_SSH     V1SSH_PREF   V1SSH_SUFF
+export VAR1_Q       V1Q_PREF     V1Q_SUFF
+export VAR1_EMP     V1EMP_PREF   V1EMP_SUFF
+export VAR1_U       V1U_PREF     V1U_SUFF
+export VAR1_V       V1V_PREF     V1V_SUFF
+export VAR1_ICE     V1ICE_PREF   V1ICE_SUFF
+export VAR1_Ithick  V1It_PREF    V1It_SUFF
+export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
+export VAR1_IvelV   V1IvV_PREF   V1IvV_PREF
+#===================== EXP2 =====================
+export DATE1_2      DATE2_2
+export VAR2_T       V2T_PREF     V2T_SUFF
+export VAR2_S       V2S_PREF     V2S_SUFF
+export VAR2_SSH     V2SSH_PREF   V2SSH_SUFF
+export VAR2_Q       V2Q_PREF     V2Q_SUFF
+export VAR2_EMP     V2EMP_PREF   V2EMP_SUFF
+export VAR2_U       V2U_PREF     V2U_SUFF
+export VAR2_V       V2V_PREF     V2V_SUFF
+export VAR2_ICE     V2ICE_PREF   V2ICE_SUFF
+export VAR2_Ithick  V2It_PREF    V2It_SUFF
+export VAR2_SNOW    V2SNOW_PREF  V2SNOW_SUFF
+export VAR2_IvelV   V2IvV_PREF   V2IvV_PREF
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh.new_names
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh.new_names	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh.new_names	(revision 4751)
@@ -0,0 +1,136 @@
+#!/bin/sh 
+#
+# AUTHOR - date
+# ===========
+# Sebastien Masson - 04/2011 - LOCEAN
+#
+# DESCRIPTION
+# ===========
+# define all varibles needed by std_ts.sh and std_ts.pro
+#
+# EXAMPLES
+# ========
+# $ . ./std_ts_vardef.sh
+#
+#
+#===================== User PATHS =====================
+#
+idl_command=/Applications/itt/idl64/bin/idl
+#
+PS_DIR=$( pwd )/ts_sbcmodMV_ps
+PDF_DIR=$( pwd )/ts_sbcmodMV_pdf
+HTML_DIR=$( pwd )/html
+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
+#
+# 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 =====================
+#
+READ_ONLY_FIRST_RECORD=0   # if 0 then read all records in files else read only the first reacord in each file
+#
+#DATE1=20010101   ;   DATE2=25001231
+DATE1=20010101    ;   DATE2=20501231
+#DATE1=00010101  		;   DATE2=00101231
+#
+VAR1_T=thetao        ;   V1T_PREF=sbcmodMV      ;   V1T_SUFF=_1Y_grid_T.nc
+VAR1_S=so            ;   V1S_PREF=sbcmodMV      ;   V1S_SUFF=_1Y_grid_T.nc
+VAR1_SSH=zos         ;   V1SSH_PREF=sbcmodMV    ;   V1SSH_SUFF=_1Y_grid_T.nc
+VAR1_Q=tohfls        ;   V1Q_PREF=sbcmodMV      ;   V1Q_SUFF=_1Y_grid_T.nc
+VAR1_EMP=wfo         ;   V1EMP_PREF=sbcmodMV    ;   V1EMP_SUFF=_1Y_grid_T.nc
+VAR1_U=uocetr_eff    ;   V1U_PREF=sbcmodMV      ;   V1U_SUFF=_1Y_grid_U.nc
+VAR1_V=vocetr_eff    ;   V1V_PREF=sbcmodMV      ;   V1V_SUFF=_1Y_grid_V.nc
+VAR1_ICE=siconc      ;   V1ICE_PREF=sbcmodMV    ;   V1ICE_SUFF=_1M_icemod.nc
+VAR1_Ithick=sithic   ;   V1It_PREF=sbcmodMV     ;   V1It_SUFF=_1M_icemod.nc
+VAR1_SNOW=sndept     ;   V1SNOW_PREF=sbcmodMV   ;   V1SNOW_SUFF=_1M_icemod.nc
+VAR1_IvelV=sivelv    ;   V1IvV_PREF=sbcmodMV    ;   V1IvV_SUFF=_1M_icemod.nc
+VAR1_Ivel=sivelo     ;   V1Iv_PREF=sbcmodMV     ;   V1Iv_SUFF=_1M_icemod.nc
+#
+#===================== EXP2 =====================
+#
+#DATE1_2=20010101    ;   DATE2_2=20101231
+DATE1_2=20010101     ;   DATE2_2=20501231
+#
+VAR2_T=thetao        ;   V2T_PREF=sbcmodMV      ;   V2T_SUFF=_1Y_grid_T.nc
+VAR2_S=so            ;   V2S_PREF=sbcmodMV      ;   V2S_SUFF=_1Y_grid_T.nc
+VAR2_SSH=zos         ;   V2SSH_PREF=sbcmodMV    ;   V2SSH_SUFF=_1Y_grid_T.nc
+VAR2_Q=tohfls        ;   V2Q_PREF=sbcmodMV      ;   V2Q_SUFF=_1Y_grid_T.nc
+VAR2_EMP=wfo         ;   V2EMP_PREF=sbcmodMV    ;   V2EMP_SUFF=_1Y_grid_T.nc
+VAR2_U=uocetr_eff    ;   V2U_PREF=sbcmodMV      ;   V2U_SUFF=_1Y_grid_U.nc
+VAR2_V=vocetr_eff    ;   V2V_PREF=sbcmodMV      ;   V2V_SUFF=_1Y_grid_V.nc
+VAR2_ICE=siconc      ;   V2ICE_PREF=sbcmodMV    ;   V2ICE_SUFF=_1M_icemod.nc
+VAR2_Ithick=sithic   ;   V2It_PREF=sbcmodMV     ;   V2It_SUFF=_1M_icemod.nc
+VAR2_SNOW=sndept     ;   V2SNOW_PREF=sbcmodMV   ;   V2SNOW_SUFF=_1M_icemod.nc
+VAR2_IvelV=sivelv    ;   V2IvV_PREF=sbcmodMV    ;   V2IvV_SUFF=_1M_icemod.nc
+VAR2_Ivel=sivelo     ;   V2Iv_PREF=sbcmodMV     ;   V2Iv_SUFF=_1M_icemod.nc
+#
+######################### 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     VAR_SNOW_NH     VAR_SNOW_SH    VAR_SNOW_area_NH VAR_SNOW_area_SH
+#===================== EXP1 =====================
+export READ_ONLY_FIRST_RECORD
+#
+export DATE1        DATE2
+export VAR1_T       V1T_PREF     V1T_SUFF
+export VAR1_S       V1S_PREF     V1S_SUFF
+export VAR1_SSH     V1SSH_PREF   V1SSH_SUFF
+export VAR1_Q       V1Q_PREF     V1Q_SUFF
+export VAR1_EMP     V1EMP_PREF   V1EMP_SUFF
+export VAR1_U       V1U_PREF     V1U_SUFF
+export VAR1_V       V1V_PREF     V1V_SUFF
+export VAR1_ICE     V1ICE_PREF   V1ICE_SUFF
+export VAR1_Ithick  V1It_PREF    V1It_SUFF
+export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
+export VAR1_IvelV   V1IvV_PREF   V1IvV_SUFF
+export VAR1_Ivel    V1Iv_PREF    V1Iv_SUFF
+
+#===================== EXP2 =====================
+export DATE1_2      DATE2_2
+export VAR2_T       V2T_PREF     V2T_SUFF
+export VAR2_S       V2S_PREF     V2S_SUFF
+export VAR2_SSH     V2SSH_PREF   V2SSH_SUFF
+export VAR2_Q       V2Q_PREF     V2Q_SUFF
+export VAR2_EMP     V2EMP_PREF   V2EMP_SUFF
+export VAR2_U       V2U_PREF     V2U_SUFF
+export VAR2_V       V2V_PREF     V2V_SUFF
+export VAR2_ICE     V2ICE_PREF   V2ICE_SUFF
+export VAR2_Ithick  V2It_PREF    V2It_SUFF
+export VAR2_SNOW    V2SNOW_PREF  V2SNOW_SUFF
+export VAR2_IvelV   V2IvV_PREF   V2IvV_SUFF
+export VAR2_Ivel    V2Iv_PREF    V2Iv_SUFF
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh_example1
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh_example1	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh_example1	(revision 4751)
@@ -0,0 +1,128 @@
+#!/bin/sh 
+#
+# AUTHOR - date
+# ===========
+# Sebastien Masson - 04/2011 - LOCEAN
+#
+# DESCRIPTION
+# ===========
+# define all varibles needed by std_ts.sh and std_ts.pro
+#
+# EXAMPLES
+# ========
+# $ . ./std_ts_vardef.sh
+#
+#
+#===================== User PATHS =====================
+#
+idl_command=/Applications/itt/idl64/bin/idl
+#
+PS_DIR=$( pwd )/ps_tag33_tag331
+PDF_DIR=$( pwd )/pdf_tag33_tag331
+HTML_DIR=$( pwd )/html
+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
+#
+# 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 =====================
+#
+READ_ONLY_FIRST_RECORD=0   # if 0 then read all records in files else read only the first reacord in each file
+#
+DATE1=20010101   ;   DATE2=21001231
+#
+VAR1_T=thetao          ;   V1T_PREF=tmx_2000     ;   V1T_SUFF=_1Y_grid_T.nc
+VAR1_S=so              ;   V1S_PREF=tmx_2000     ;   V1S_SUFF=_1Y_grid_T.nc
+VAR1_SSH=zos           ;   V1SSH_PREF=tmx_2000   ;   V1SSH_SUFF=_1Y_grid_T.nc
+VAR1_Q=qns+qsr         ;   V1Q_PREF=tmx_2000     ;   V1Q_SUFF=_1Y_grid_T.nc
+VAR1_EMP=wfo           ;   V1EMP_PREF=tmx_2000   ;   V1EMP_SUFF=_1Y_grid_T.nc
+VAR1_U=uoce_eff        ;   V1U_PREF=tmx_2000     ;   V1U_SUFF=_1Y_grid_U.nc
+VAR1_V=voce_eff        ;   V1V_PREF=tmx_2000     ;   V1V_SUFF=_1Y_grid_V.nc
+VAR1_ICE=sic           ;   V1ICE_PREF=tmx_2000   ;   V1ICE_SUFF=_1M_icemod.nc
+VAR1_Ithick=sit        ;   V1It_PREF=tmx_2000    ;   V1It_SUFF=_1M_icemod.nc
+VAR1_SNOW=isnowthi     ;   V1SNOW_PREF=tmx_2000  ;   V1SNOW_SUFF=_1M_icemod.nc
+VAR1_IvelV=vice_ipa    ;   V1IvV_PREF=tmx_2000   ;   V1IvV_SUFF=_1M_icemod.nc
+#
+#===================== EXP2 =====================
+#
+DATE1_2=10101   ;   DATE2_2=20001231
+#
+VAR2_T=thetao         ;   V2T_PREF=core2000     ;   V2T_SUFF=_1Y_grid_T.nc
+VAR2_S=so             ;   V2S_PREF=core2000     ;   V2S_SUFF=_1Y_grid_T.nc
+VAR2_SSH=zos          ;   V2SSH_PREF=core2000   ;   V2SSH_SUFF=_1Y_grid_T.nc
+VAR2_Q=qns+qsr        ;   V2Q_PREF=core2000     ;   V2Q_SUFF=_1Y_grid_T.nc
+VAR2_EMP=wfo          ;   V2EMP_PREF=core2000   ;   V2EMP_SUFF=_1Y_grid_T.nc
+VAR2_U=uoce_eff       ;   V2U_PREF=core2000     ;   V2U_SUFF=_1Y_grid_U.nc
+VAR2_V=voce_eff       ;   V2V_PREF=core2000     ;   V2V_SUFF=_1Y_grid_V.nc
+VAR2_ICE=sic          ;   V2ICE_PREF=core2000   ;   V2ICE_SUFF=_1M_icemod.nc
+VAR2_Ithick=sit       ;   V2It_PREF=core2000    ;   V2It_SUFF=_1M_icemod.nc
+VAR2_SNOW=isnowthi    ;   V2ICE_SNOW=core2000   ;   V2SNOW_SUFF=_1M_icemod.nc
+VAR2_IvelV=vice_ipa   ;   V2IvV_PREF=core2000   ;   V2IvV_SUFF=_1M_icemod.nc
+#
+######################### 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     VAR_SNOW_NH     VAR_SNOW_SH    VAR_SNOW_area_NH VAR_SNOW_area_SH
+#===================== EXP1 =====================
+export READ_ONLY_FIRST_RECORD
+#
+export DATE1        DATE2
+export VAR1_T       V1T_PREF     V1T_SUFF
+export VAR1_S       V1S_PREF     V1S_SUFF
+export VAR1_SSH     V1SSH_PREF   V1SSH_SUFF
+export VAR1_Q       V1Q_PREF     V1Q_SUFF
+export VAR1_EMP     V1EMP_PREF   V1EMP_SUFF
+export VAR1_U       V1U_PREF     V1U_SUFF
+export VAR1_V       V1V_PREF     V1V_SUFF
+export VAR1_ICE     V1ICE_PREF   V1ICE_SUFF
+export VAR1_Ithick  V1It_PREF    V1It_SUFF
+export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
+export VAR1_IvelV   V1IvV_PREF   V1IvV_PREF
+#===================== EXP2 =====================
+export DATE1_2      DATE2_2
+export VAR2_T       V2T_PREF    V2T_SUFF
+export VAR2_S       V2S_PREF    V2S_SUFF
+export VAR2_SSH     V2SSH_PREF  V2SSH_SUFF
+export VAR2_Q       V2Q_PREF    V2Q_SUFF
+export VAR2_EMP     V2EMP_PREF  V2EMP_SUFF
+export VAR2_U       V2U_PREF    V2U_SUFF
+export VAR2_V       V2V_PREF    V2V_SUFF
+export VAR2_ICE     V2ICE_PREF  V2ICE_SUFF
+export VAR2_Ithick  V2It_PREF   V2It_SUFF
+export VAR2_SNOW    V2SNOW_PREF V2SNOW_SUFF
+export VAR2_IvelV   V2IvV_PREF   V2IvV_PREF
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh_example2
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh_example2	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh_example2	(revision 4751)
@@ -0,0 +1,128 @@
+#!/bin/sh 
+#
+# AUTHOR - date
+# ===========
+# Sebastien Masson - 04/2011 - LOCEAN
+#
+# DESCRIPTION
+# ===========
+# define all varibles needed by std_ts.sh and std_ts.pro
+#
+# EXAMPLES
+# ========
+# $ . ./std_ts_vardef.sh
+#
+#
+#===================== User PATHS =====================
+#
+idl_command=/Applications/itt/idl64/bin/idl
+#
+PS_DIR=$( pwd )/ps_tag33_tag331
+PDF_DIR=$( pwd )/pdf_tag33_tag331
+HTML_DIR=$( pwd )/html
+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
+#
+# 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 =====================
+#
+READ_ONLY_FIRST_RECORD=0   # if 0 then read all records in files else read only the first reacord in each file
+#
+DATE1=20010101   ;   DATE2=21001231
+#
+VAR1_T=thetao         ;   V1T_PREF=tag33        ;   V1T_SUFF=_1Y_grid_T.nc
+VAR1_S=so             ;   V1S_PREF=tag33        ;   V1S_SUFF=_1Y_grid_T.nc
+VAR1_SSH=zos          ;   V1SSH_PREF=tag33      ;   V1SSH_SUFF=_1Y_grid_T.nc
+VAR1_Q=qt             ;   V1Q_PREF=tag33        ;   V1Q_SUFF=_1Y_grid_T.nc
+VAR1_EMP=wfo          ;   V1EMP_PREF=tag33      ;   V1EMP_SUFF=_1Y_grid_T.nc
+VAR1_U=uocetr_eff     ;   V1U_PREF=tag33        ;   V1U_SUFF=_1Y_grid_U.nc
+VAR1_V=vocetr_eff     ;   V1V_PREF=tag33        ;   V1V_SUFF=_1Y_grid_V.nc
+VAR1_ICE=sic          ;   V1ICE_PREF=tag33      ;   V1ICE_SUFF=_1M_icemod.nc
+VAR1_Ithick=sit       ;   V1It_PREF=tag33       ;   V1It_SUFF=_1M_icemod.nc
+VAR1_SNOW=isnowthi    ;   V1SNOW_PREF=tag33     ;   V1SNOW_SUFF=_1M_icemod.nc
+VAR1_IvelV=vice_ipa   ;   V1IvV_PREF=tag33      ;   V1IvV_SUFF=_1M_icemod.nc
+#
+#===================== EXP2 =====================
+#
+DATE1_2=20010101   ;   DATE2_2=21001231
+#
+VAR2_T=thetao         ;   V2T_PREF=trunk331     ;   V2T_SUFF=_1Y_grid_T.nc
+VAR2_S=so             ;   V2S_PREF=trunk331     ;   V2S_SUFF=_1Y_grid_T.nc
+VAR2_SSH=zos          ;   V2SSH_PREF=trunk331   ;   V2SSH_SUFF=_1Y_grid_T.nc
+VAR2_Q=qt             ;   V2Q_PREF=trunk331     ;   V2Q_SUFF=_1Y_grid_T.nc
+VAR2_EMP=wfo          ;   V2EMP_PREF=trunk331   ;   V2EMP_SUFF=_1Y_grid_T.nc
+VAR2_U=uocetr_eff     ;   V2U_PREF=trunk331     ;   V2U_SUFF=_1Y_grid_U.nc
+VAR2_V=vocetr_eff     ;   V2V_PREF=trunk331     ;   V2V_SUFF=_1Y_grid_V.nc
+VAR2_ICE=sic          ;   V2ICE_PREF=trunk331   ;   V2ICE_SUFF=_1M_icemod.nc
+VAR2_Ithick=sit       ;   V2It_PREF=trunk331    ;   V2It_SUFF=_1M_icemod.nc
+VAR2_SNOW=isnowthi    ;   V2ICE_SNOW=trunk331   ;   V2SNOW_SUFF=_1M_icemod.nc
+VAR2_IvelV=vice_ipa   ;   V2IvV_PREF=trunk331   ;   V2IvV_SUFF=_1M_icemod.nc
+#
+######################### 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     VAR_SNOW_NH     VAR_SNOW_SH    VAR_SNOW_area_NH VAR_SNOW_area_SH
+#===================== EXP1 =====================
+export READ_ONLY_FIRST_RECORD
+#
+export DATE1        DATE2
+export VAR1_T       V1T_PREF     V1T_SUFF
+export VAR1_S       V1S_PREF     V1S_SUFF
+export VAR1_SSH     V1SSH_PREF   V1SSH_SUFF
+export VAR1_Q       V1Q_PREF     V1Q_SUFF
+export VAR1_EMP     V1EMP_PREF   V1EMP_SUFF
+export VAR1_U       V1U_PREF     V1U_SUFF
+export VAR1_V       V1V_PREF     V1V_SUFF
+export VAR1_ICE     V1ICE_PREF   V1ICE_SUFF
+export VAR1_Ithick  V1It_PREF    V1It_SUFF
+export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
+export VAR1_IvelV   V1IvV_PREF   V1IvV_PREF
+#===================== EXP2 =====================
+export DATE1_2      DATE2_2
+export VAR2_T       V2T_PREF    V2T_SUFF
+export VAR2_S       V2S_PREF    V2S_SUFF
+export VAR2_SSH     V2SSH_PREF  V2SSH_SUFF
+export VAR2_Q       V2Q_PREF    V2Q_SUFF
+export VAR2_EMP     V2EMP_PREF  V2EMP_SUFF
+export VAR2_U       V2U_PREF    V2U_SUFF
+export VAR2_V       V2V_PREF    V2V_SUFF
+export VAR2_ICE     V2ICE_PREF  V2ICE_SUFF
+export VAR2_Ithick  V2It_PREF   V2It_SUFF
+export VAR2_SNOW    V2SNOW_PREF V2SNOW_SUFF
+export VAR2_IvelV   V2IvV_PREF   V2IvV_PREF
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh_example_ipcc
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh_example_ipcc	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh_example_ipcc	(revision 4751)
@@ -0,0 +1,133 @@
+#!/bin/sh 
+#
+# AUTHOR - date
+# ===========
+# Sebastien Masson - 04/2011 - LOCEAN
+#
+# DESCRIPTION
+# ===========
+# define all varibles needed by std_ts.sh and std_ts.pro
+#
+# EXAMPLES
+# ========
+# $ . ./std_ts_vardef.sh
+#
+#
+#===================== User PATHS =====================
+#
+idl_command=/Applications/itt/idl64/bin/idl
+#
+PS_DIR=$( pwd )/ps_tag33_tag331
+PDF_DIR=$( pwd )/pdf_tag33_tag331
+HTML_DIR=$( pwd )/html
+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
+#
+# 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 =====================
+#
+READ_ONLY_FIRST_RECORD=0   # if 0 then read all records in files else read only the first reacord in each file
+#
+DATE1=20010101   ;   DATE2=21001231
+#
+VAR1_T=thetao       ;   V1T_PREF=tag33      ;   V1T_SUFF=_1Y_grid_T.nc
+VAR1_S=so           ;   V1S_PREF=tag33      ;   V1S_SUFF=_1Y_grid_T.nc
+VAR1_SSH=zos        ;   V1SSH_PREF=tag33    ;   V1SSH_SUFF=_1Y_grid_T.nc
+VAR1_Q=qt           ;   V1Q_PREF=tag33      ;   V1Q_SUFF=_1Y_grid_T.nc
+VAR1_EMP=wfo        ;   V1EMP_PREF=tag33    ;   V1EMP_SUFF=_1Y_grid_T.nc
+VAR1_U=uocetr_eff   ;   V1U_PREF=tag33      ;   V1U_SUFF=_1Y_grid_U.nc
+VAR1_V=vocetr_eff   ;   V1V_PREF=tag33      ;   V1V_SUFF=_1Y_grid_V.nc
+VAR1_ICE=sic        ;   V1ICE_PREF=tag33    ;   V1ICE_SUFF=_1M_icemod.nc
+VAR1_Ithick=sit     ;   V1It_PREF=tag33     ;   V1It_SUFF=_1M_icemod.nc
+VAR1_SNOW=isnowthi  ;   V1SNOW_PREF=tag33   ;   V1SNOW_SUFF=_1M_icemod.nc
+VAR1_IvelV=iicevelv ;   V1IvV_PREF=tag33    ;   V1IvV_SUFF=_1M_icemod.nc
+VAR1_Ivel=iicevelo  ;   V1Iv_PREF=tag33     ;   V1Iv_SUFF=_1M_icemod.nc
+#
+#===================== EXP2 =====================
+#
+DATE1_2=20010101    ;   DATE2_2=21001231
+#
+VAR2_T=thetao       ;   V2T_PREF=trunk331      ;   V2T_SUFF=_1Y_grid_T.nc
+VAR2_S=so           ;   V2S_PREF=trunk331      ;   V2S_SUFF=_1Y_grid_T.nc
+VAR2_SSH=zos        ;   V2SSH_PREF=trunk331    ;   V2SSH_SUFF=_1Y_grid_T.nc
+VAR2_Q=qt           ;   V2Q_PREF=trunk331      ;   V2Q_SUFF=_1Y_grid_T.nc
+VAR2_EMP=wfo        ;   V2EMP_PREF=trunk331    ;   V2EMP_SUFF=_1Y_grid_T.nc
+VAR2_U=uocetr_eff   ;   V2U_PREF=trunk331      ;   V2U_SUFF=_1Y_grid_U.nc
+VAR2_V=vocetr_eff   ;   V2V_PREF=trunk331      ;   V2V_SUFF=_1Y_grid_V.nc
+VAR2_ICE=sic        ;   V2ICE_PREF=trunk331    ;   V2ICE_SUFF=_1M_icemod.nc
+VAR2_Ithick=sit     ;   V2It_PREF=trunk331     ;   V2It_SUFF=_1M_icemod.nc
+VAR2_SNOW=isnowthi  ;   V2ICE_SNOW=trunk331    ;   V2SNOW_SUFF=_1M_icemod.nc
+VAR2_IvelV=iicevelv ;   V2IvV_PREF=trunk331    ;   V2IvV_SUFF=_1M_icemod.nc
+VAR2_Ivel=iicevelo  ;   V2Iv_PREF=trunk331     ;   V2Iv_SUFF=_1M_icemod.nc
+#
+######################### 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     VAR_SNOW_NH     VAR_SNOW_SH    VAR_SNOW_area_NH VAR_SNOW_area_SH
+#===================== EXP1 =====================
+export READ_ONLY_FIRST_RECORD
+#
+export DATE1        DATE2
+export VAR1_T       V1T_PREF     V1T_SUFF
+export VAR1_S       V1S_PREF     V1S_SUFF
+export VAR1_SSH     V1SSH_PREF   V1SSH_SUFF
+export VAR1_Q       V1Q_PREF     V1Q_SUFF
+export VAR1_EMP     V1EMP_PREF   V1EMP_SUFF
+export VAR1_U       V1U_PREF     V1U_SUFF
+export VAR1_V       V1V_PREF     V1V_SUFF
+export VAR1_ICE     V1ICE_PREF   V1ICE_SUFF
+export VAR1_Ithick  V1It_PREF    V1It_SUFF
+export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
+export VAR1_IvelV   V1IvV_PREF   V1IvV_SUFF
+export VAR1_Ivel    V1Iv_PREF    V1Iv_SUFF
+
+#===================== EXP2 =====================
+export DATE1_2      DATE2_2
+export VAR2_T       V2T_PREF     V2T_SUFF
+export VAR2_S       V2S_PREF     V2S_SUFF
+export VAR2_SSH     V2SSH_PREF   V2SSH_SUFF
+export VAR2_Q       V2Q_PREF     V2Q_SUFF
+export VAR2_EMP     V2EMP_PREF   V2EMP_SUFF
+export VAR2_U       V2U_PREF     V2U_SUFF
+export VAR2_V       V2V_PREF     V2V_SUFF
+export VAR2_ICE     V2ICE_PREF   V2ICE_SUFF
+export VAR2_Ithick  V2It_PREF    V2It_SUFF
+export VAR2_SNOW    V2SNOW_PREF  V2SNOW_SUFF
+export VAR2_IvelV   V2IvV_PREF   V2IvV_SUFF
+export VAR2_Ivel    V2Iv_PREF    V2Iv_SUFF
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh_example_old_names
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh_example_old_names	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IDL_scripts/std_ts_vardef.sh_example_old_names	(revision 4751)
@@ -0,0 +1,133 @@
+#!/bin/sh 
+#
+# AUTHOR - date
+# ===========
+# Sebastien Masson - 04/2011 - LOCEAN
+#
+# DESCRIPTION
+# ===========
+# define all varibles needed by std_ts.sh and std_ts.pro
+#
+# EXAMPLES
+# ========
+# $ . ./std_ts_vardef.sh
+#
+#
+#===================== User PATHS =====================
+#
+idl_command=/Applications/itt/idl64/bin/idl
+#
+PS_DIR=$( pwd )/amax9999_ts_ps
+PDF_DIR=$( pwd )/amax9999_ts_pdf
+HTML_DIR=$( pwd )/html
+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
+#
+# 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 =====================
+#
+READ_ONLY_FIRST_RECORD=0   # if 0 then read all records in files else read only the first reacord in each file
+#
+DATE1=00010101  		;   DATE2=00101231
+#
+VAR1_T=votemper       	;   V1T_PREF=ow_amax9999      ;   V1T_SUFF=_1m_grid_T.nc
+VAR1_S=vosaline        	;   V1S_PREF=ow_amax9999      ;   V1S_SUFF=_1m_grid_T.nc
+VAR1_SSH=sossheig      	;   V1SSH_PREF=ow_amax9999    ;   V1SSH_SUFF=_1m_grid_T.nc
+VAR1_Q=sohefldo        	;   V1Q_PREF=ow_amax9999      ;   V1Q_SUFF=_1m_grid_T.nc
+VAR1_EMP=sowaflup      	;   V1EMP_PREF=ow_amax9999    ;   V1EMP_SUFF=_1m_grid_T.nc
+VAR1_U=uocetr_eff      	;   V1U_PREF=ow_amax9999      ;   V1U_SUFF=_1m_grid_U.nc
+VAR1_V=vocetr_eff   	;   V1V_PREF=ow_amax9999      ;   V1V_SUFF=_1m_grid_V.nc
+VAR1_ICE=iiceconc 	    ;   V1ICE_PREF=ow_amax9999    ;   V1ICE_SUFF=_1m_icemod.nc
+VAR1_Ithick=iicethic    ;   V1It_PREF=ow_amax9999     ;   V1It_SUFF=_1m_icemod.nc
+VAR1_SNOW=isnowthi   	;   V1SNOW_PREF=ow_amax9999   ;   V1SNOW_SUFF=_1m_icemod.nc
+VAR1_IvelV=sivelv       ;   V1IvV_PREF=ow_amax9999    ;   V1IvV_SUFF=_1m_icemod.nc 
+VAR1_Ivel=sivelo        ;   V1Iv_PREF=ow_amax9999     ;   V1Iv_SUFF=_1m_icemod.nc
+#
+#===================== EXP2 =====================
+#
+DATE1_2=00010101   		;   DATE2_2=00101231
+#
+VAR2_T=votemper     	;   V2T_PREF=ow_amax9999     ;   V2T_SUFF=_1m_grid_T.nc
+VAR2_S=vosaline        	;   V2S_PREF=ow_amax9999     ;   V2S_SUFF=_1m_grid_T.nc
+VAR2_SSH=sossheig      	;   V2SSH_PREF=ow_amax9999   ;   V2SSH_SUFF=_1m_grid_T.nc
+VAR2_Q=sohefldo       	;   V2Q_PREF=ow_amax9999     ;   V2Q_SUFF=_1m_grid_T.nc
+VAR2_EMP=sowaflup     	;   V2EMP_PREF=ow_amax9999   ;   V2EMP_SUFF=_1m_grid_T.nc
+VAR2_U=uocetr_eff   	;   V2U_PREF=ow_amax9999     ;   V2U_SUFF=_1m_grid_U.nc
+VAR2_V=vocetr_eff   	;   V2V_PREF=ow_amax9999     ;   V2V_SUFF=_1m_grid_V.nc
+VAR2_ICE=iiceconc     	;   V2ICE_PREF=ow_amax9999   ;   V2ICE_SUFF=_1m_icemod.nc
+VAR2_Ithick=iicethic    ;   V2It_PREF=ow_amax9999    ;   V2It_SUFF=_1m_icemod.nc
+VAR2_SNOW=isnowthi   	;   V2SNOW_PREF=ow_amax9999  ;   V2SNOW_SUFF=_1m_icemod.nc
+VAR2_IvelV=sivelv       ;   V2IvV_PREF=ow_amax9999   ;   V2IvV_SUFF=_1m_icemod.nc 
+VAR2_Ivel=sivelo        ;   V2IvV_PREF=ow_amax9999   ;   V2IvV_SUFF=_1m_icemod.nc 
+#
+######################### 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     VAR_SNOW_NH     VAR_SNOW_SH    VAR_SNOW_area_NH VAR_SNOW_area_SH
+#===================== EXP1 =====================
+export READ_ONLY_FIRST_RECORD
+#
+export DATE1        DATE2
+export VAR1_T       V1T_PREF     V1T_SUFF
+export VAR1_S       V1S_PREF     V1S_SUFF
+export VAR1_SSH     V1SSH_PREF   V1SSH_SUFF
+export VAR1_Q       V1Q_PREF     V1Q_SUFF
+export VAR1_EMP     V1EMP_PREF   V1EMP_SUFF
+export VAR1_U       V1U_PREF     V1U_SUFF
+export VAR1_V       V1V_PREF     V1V_SUFF
+export VAR1_ICE     V1ICE_PREF   V1ICE_SUFF
+export VAR1_Ithick  V1It_PREF    V1It_SUFF
+export VAR1_SNOW    V1SNOW_PREF  V1SNOW_SUFF
+export VAR1_IvelV   V1IvV_PREF   V1IvV_SUFF
+export VAR1_Ivel    V1Iv_PREF    V1Iv_SUFF
+
+#===================== EXP2 =====================
+export DATE1_2      DATE2_2
+export VAR2_T       V2T_PREF     V2T_SUFF
+export VAR2_S       V2S_PREF     V2S_SUFF
+export VAR2_SSH     V2SSH_PREF   V2SSH_SUFF
+export VAR2_Q       V2Q_PREF     V2Q_SUFF
+export VAR2_EMP     V2EMP_PREF   V2EMP_SUFF
+export VAR2_U       V2U_PREF     V2U_SUFF
+export VAR2_V       V2V_PREF     V2V_SUFF
+export VAR2_ICE     V2ICE_PREF   V2ICE_SUFF
+export VAR2_Ithick  V2It_PREF    V2It_SUFF
+export VAR2_SNOW    V2SNOW_PREF  V2SNOW_SUFF
+export VAR2_IvelV   V2IvV_PREF   V2IvV_SUFF
+export VAR2_Ivel    V2Iv_PREF    V2Iv_SUFF
+#
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/COMP/lim2.card
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/COMP/lim2.card	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/COMP/lim2.card	(revision 4751)
@@ -0,0 +1,28 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+
+[InitialStateFiles]
+List=	()
+
+[BoundaryFiles]
+List=	()
+ListNonDel= ()
+
+[ParametersFiles]
+List=	(${SUBMIT_DIR}/PARAM/namelist_ice_lim2, namelist_ice)
+
+[RestartFiles]
+List=	(${config_UserChoices_JobName}_${NEMO_END}_restart_ice.nc, restart_icemod.nc, restart_ice_in.nc)
+
+[OutputText]
+List=   (ice_evolu)
+
+[OutputFiles]
+List=   (${PREFIX_WFI1}_icemod.nc, ${R_OUT_ICE_WFI1}/${PREFIX}_${WFI1}_icemod.nc, Post_1M_icemod)
+
+[Post_1M_icemod]
+Patches = ()
+GatherWithInternal = (nav_lon, nav_lat, time_counter)
+TimeSeriesVars = (iicethic, ileadfra, isnowthi, iicevelu, iicevelv)
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/COMP/lim2.driver
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/COMP/lim2.driver	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/COMP/lim2.driver	(revision 4751)
@@ -0,0 +1,56 @@
+#!/bin/ksh
+
+#-----------------------------------
+function ICE_Initialize
+{ 
+    IGCM_debug_PushStack "ICE_Initialize"
+
+    echo INITIALIZE ICE !!!
+
+    IGCM_debug_PopStack "ICE_Initialize"
+}
+
+#-----------------------------------
+function ICE_Update
+{
+    IGCM_debug_PushStack "ICE_Update"
+
+    NbFreq=$( echo ${config_ICE_WriteFrequency} | wc -w )
+
+    ##--Write Frequency Purpose ....
+    typeset -Z1 i=1
+    while [ $i -le ${NbFreq} ]; do
+        frequency=$( echo ${config_ICE_WriteFrequency} | awk -v var="$i" "-F " '{print $var}' )
+        factor=$( echo ${frequency} | sed -e "s/[yYmMdD]//" )
+        case ${frequency} in
+            *Y|*y)
+                eval PREFIX_WFI${i}=${config_UserChoices_JobName}_${factor}y_${DatesPeriod} ;
+                eval R_OUT_ICE_WFI${i}=${R_OUT_ICE_O_Y} ;
+                eval WFI${i}=${factor}Y ;;
+            *M|*m)
+                eval PREFIX_WFI${i}=${config_UserChoices_JobName}_${factor}m_${DatesPeriod} ;
+                eval R_OUT_ICE_WFI${i}=${R_OUT_ICE_O_M} ;
+                eval WFI${i}=${factor}M ;;
+            *D|*d)
+                eval PREFIX_WFI${i}=${config_UserChoices_JobName}_${factor}d_${DatesPeriod} ;
+                eval R_OUT_ICE_WFI${i}=${R_OUT_ICE_O_D} ;
+                eval WFI${i}=${factor}D ;;
+            *)
+        esac
+        let i=$i+1
+
+    done
+    echo UPDATE ICE !!!
+
+    IGCM_debug_PopStack "ICE_Update"
+}
+
+#-----------------------------------
+function ICE_Finalize
+{
+    IGCM_debug_PushStack "ICE_Finalize"
+
+    echo FINALIZE ICE !!!
+
+    IGCM_debug_PopStack "ICE_Finalize"
+}
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/COMP/opa9.card
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/COMP/opa9.card	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/COMP/opa9.card	(revision 4751)
@@ -0,0 +1,123 @@
+[Compatibility]
+libIGCM=1.0
+
+[UserChoices]
+OPA_NDT_DAY=15
+#==============================================================
+#-- Name of directory for COMMON ACCOUNT at idris or CCRT
+#-- available directories are:  v3, v3_1, v3_2
+#-- related to NEMO_tag_revision (nemo_v3, nemo_v3_1, nemo_v3_2_beta)
+#-- NOTE: if you use COMMON ACCOUNT you have to de-comment it
+#OPA_version=v3_2
+#==============================================================
+
+#===================================
+#-- Use (y) or not (n) of io_server
+io_server=n
+#===================================
+
+#-- if you run interannual is "y", if not (=climatology) is "n"
+Interannual_Run=n
+
+[Interannual]
+#==================================================================================================
+#-- Surface Boundary Condition original files name ( get by the job ) same as the ones in namelist
+#==================================================================================================
+#-- NOTE: MANDATORY STRUCTURE OF FILE NAMES GET BY THE JOB : 
+#-- "basename_yyyy.nc"  	( for interannual data )
+#-- "basename.nc"	  	( for climatologycal data )
+#-- MANDATORY: NAMES USED IN List_jobsbc VARIABLE MUST BE ONLY THE BASENAME
+
+# default climatology, bulk_clio: 
+#List_jobsbc=(flx, taux_1m, tauy_1m)
+# example for interannual, bulk core, forcing CORE2:
+List_jobsbc=(u_10.15JUNE2009_orca2, v_10.15JUNE2009_orca2, ncar_rad.15JUNE2009_orca2, t_10.15JUNE2009_orca2, q_10.15JUNE2009_orca2, ncar_precip.15JUNE2009_orca2)
+# example for interannual, bulk core, forcing DRAKKAR:
+#List_jobsbc=(radlw_DFS4-ORCA2, radsw_DFS4-ORCA2, q2_DFS4-ORCA2, t2_DFS4-ORCA2, u10_DFS4-ORCA2, v10_DFS4-ORCA2, snow_DFS4-ORCA2, precip_DFS4-ORCA2)
+
+
+[InitialStateFiles]
+List=	()
+
+[BoundaryFiles]
+List=	()
+ListNonDel= (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/ahmcoef, .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/bathy_level.nc, .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/bathy_meter.nc, .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/coordinates.nc, .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/data_1m_potential_temperature_nomask.nc, .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/data_1m_salinity_nomask.nc, .), \
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/geothermal_heating.nc, .),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/runoff_core_monthly.nc, .),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/sss_data.nc, .),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/sst_data.nc, .),\
+	    (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/subbasins.nc, .),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/chlorophyll.nc, .),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/K1rowdrg.nc, .),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/M2rowdrg.nc, .),\
+            (${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/mask_itf.nc, .)
+
+
+
+
+[ParametersFiles]
+List=	(${SUBMIT_DIR}/PARAM/namelist,         namelist), \
+	(${SUBMIT_DIR}/PARAM/iodef.xml,        iodef.xml),      \
+        (${SUBMIT_DIR}/PARAM/xmlio_server.def, xmlio_server.def)
+
+[RestartFiles]
+List=	(${config_UserChoices_JobName}_${NEMO_END}_restart.nc,  restart.nc, restart.nc)
+
+[OutputText]
+List=   (ocean.output, solver.stat, STRAIT.dat, out_nemo)
+
+[OutputFiles]
+List=   (${PREFIX_WF1}_grid_T.nc,         ${R_OUT_OCE_WF1}/${PREFIX}_${WF1}_grid_T.nc,               Post_1Y_grid_T),\
+        (${PREFIX_WF2}_grid_T.nc,         ${R_OUT_OCE_WF2}/${PREFIX}_${WF2}_grid_T.nc,               Post_1M_grid_T),\
+        (${PREFIX_WF3}_grid_T.nc,         ${R_OUT_OCE_WF3}/${PREFIX}_${WF3}_grid_T.nc,               Post_1M_grid_T),\
+        (${PREFIX_WF3}_grid_U.nc,         ${R_OUT_OCE_WF3}/${PREFIX}_${WF3}_grid_U.nc,               Post_1M_grid_U) ,\
+        (${PREFIX_WF3}_grid_V.nc,         ${R_OUT_OCE_WF3}/${PREFIX}_${WF3}_grid_V.nc,               Post_1M_grid_V),\
+        (${PREFIX_WF3}_grid_W.nc,         ${R_OUT_OCE_WF3}/${PREFIX}_${WF3}_grid_W.nc,               Post_1M_grid_W),\
+        (${PREFIX_WF4}_grid_T_0n180w.nc,  ${R_OUT_OCE_WF4}/${PREFIX}_${WF4}_grid_T_0n180w.nc,        NONE ),\
+        (${PREFIX_WF4}_grid_T_Eq.nc,      ${R_OUT_OCE_WF4}/${PREFIX}_${WF4}_grid_T_Eq.nc,            NONE ),\
+        (${PREFIX_WF4}_diaptr.nc,         ${R_OUT_OCE_WF4}/${PREFIX}_${WF4}_diaptr.nc,               Post_1D_diaptr),\
+        (mesh_mask.nc     ,               ${R_OUT_OCE_O}/${config_UserChoices_JobName}_mesh_mask.nc, NONE),\
+        (output.abort.nc  ,               ${R_OUT_OCE_D}/${PREFIX}_output.abort.nc,                  NONE),\
+        (output.init.nc   ,               ${R_OUT_OCE_O_I}/${config_UserChoices_JobName}_${PeriodDateBegin}_output.init.nc, NONE)
+
+
+[Post_1Y_grid_T]
+Patches = (Patch_20091030_histcom_time_axis)
+GatherWithInternal = (nav_lon, nav_lat, deptht, time_counter)
+TimeSeriesVars = (sohtc300, sohefldo, soicecov, somxl010, sosaline, sossheig, sosstsst, sowaflcd, sowaflup)
+
+[Post_1M_grid_T]
+Patches = (Patch_20091030_histcom_time_axis)
+GatherWithInternal = (nav_lon, nav_lat, deptht, time_counter)
+TimeSeriesVars = (sohtc300, sohefldo, soicecov, somxl010, sosaline, sossheig, sosstsst, sowaflcd, sowaflup)
+
+[Post_1M_grid_U]
+Patches = (Patch_20091030_histcom_time_axis)
+GatherWithInternal = (nav_lon, nav_lat, depthu, time_counter)
+TimeSeriesVars = (sozotaux)
+
+[Post_1M_grid_V]
+Patches = (Patch_20091030_histcom_time_axis)
+GatherWithInternal = (nav_lon, nav_lat, depthv, time_counter)
+TimeSeriesVars = (sometauy)
+
+[Post_1M_grid_W]
+Patches = (Patch_20091030_histcom_time_axis)
+GatherWithInternal = (nav_lon, nav_lat, depthw, time_counter)
+TimeSeriesVars =
+
+[Post_1D_diaptr]
+Patches = ()
+GatherWithInternal = (lat, deptht, depthw, time_counter)
+TimeSeriesVars = (zotemglo, zosalglo, zomsfglo, zotematl, zosalatl, zomsfatl, zotempac, zosalpac, zomsfpac, zotemind, zosalind, zomsfind, zotemipc, zosalipc, zomsfipc, sohtatl, sostatl, sohtpac, sostpac, sohtind, sostind, sohtipc, sostipc, sophtadv, sophtove, sophtldf, sopstadv, sopstove, zomsfeiv, sophteiv, sopsteiv)
+
+[Post_time]
+Patches = (Patch_20091030_histcom_time_axis)
+GatherWithInternal =
+TimeSeriesVars =
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/COMP/opa9.driver
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/COMP/opa9.driver	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/COMP/opa9.driver	(revision 4751)
@@ -0,0 +1,288 @@
+#!/bin/ksh
+#-----------------------------------------------------------------
+function OCE_Initialize
+{
+    IGCM_debug_PushStack "OCE_Initialize"
+
+    JOB_NAME=${config_UserChoices_JobName}
+
+    OPA_NDT_DAY=${opa_UserChoices_OPA_NDT_DAY:=15}
+
+
+    ##--Variables used by OPA --
+
+    # cn_exp experience name for vairmer format
+    # nn_it000 number of the first time step
+    # nn_itend number of the last time step
+    # nn_leapy leap year calendar (0/1) (30 for 360d)
+    # nn_write frequency of OUTPUT file
+    # ln_rstart boolean term for restart (true or false)
+    # nn_stock frequency of restart file
+    # nn_rstctl control of the time step (0, 1 or 2)
+    # nn_date0 initial calendar date aammjj
+    # nn_msh  =1 create a mesh file (coordinates, scale factors, masks)
+    # rn_rdt time step in seconds (coming from namelist)
+    # nf_ptr_wri frequency of zonal means and transport output
+
+
+# Local function to find namelists parameters
+supergrep () {
+    grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%"
+}
+
+
+    PAT_CEXPER=$( supergrep cn_exp    ${SUBMIT_DIR}/PARAM/namelist )
+    PAT_NIT000=$( supergrep nn_it000    ${SUBMIT_DIR}/PARAM/namelist )
+    PAT_NITEND=$( supergrep nn_itend    ${SUBMIT_DIR}/PARAM/namelist )
+    PAT_NLEAPY=$( supergrep nn_leapy    ${SUBMIT_DIR}/PARAM/namelist )
+    PAT_RESTAR=$( supergrep ln_rstart ${SUBMIT_DIR}/PARAM/namelist )
+    PAT_NSTOCK=$( supergrep nn_stock    ${SUBMIT_DIR}/PARAM/namelist )
+    PAT_NRSTAR=$( supergrep nn_rstctl    ${SUBMIT_DIR}/PARAM/namelist )
+    PAT_NDATE0=$( supergrep nn_date0    ${SUBMIT_DIR}/PARAM/namelist )
+    PAT_NMSH=$(   supergrep nn_msh      ${SUBMIT_DIR}/PARAM/namelist ) 
+    
+
+    OPA_RDT=$( supergrep rn_rdt  ${SUBMIT_DIR}/PARAM/namelist | sed 's/ *rn_rdt *=//' | sed 's/\. *,//' )
+
+    # Period Length In Days between DateBegin and first day of calendar 0001 01 01
+    # /!\ Needed by OPA namelist to compute file names /!\
+    (( DaysSinceJC = $( IGCM_date_DaysSinceJC ${DateBegin} ) + 1 ))
+
+    # Definition from opa9.card of List_jobsbc and List_runsbc used to do to interannual and climatological runs 
+	IGCM_card_DefineArrayFromOption ${SUBMIT_DIR}/COMP/opa9.card Interannual List_jobsbc
+        set -A ListFormulationJobsbc -- \${opa9_Interannual_Listjobsc${opa9_Interannual_List_jobsbc}[*]}
+
+    ##--Variables used for XMLIO_SERVER configuration file
+	    # using_server: .TRUE.(.FALSE.) to use(bypass) the io_server
+	    PAT_SERVER=$( supergrep using_server ${SUBMIT_DIR}/PARAM/xmlio_server.def )
+	
+    IGCM_debug_PopStack "OCE_Initialize"
+}
+
+#-----------------------------------------------------------------
+function OCE_Update
+{
+    IGCM_debug_PushStack "OCE_Update"
+
+    # Interannual run
+    # In this case job need to calculate previous and following year and give, and if every run needs to add "_y" before every year 
+    if [ X${opa9_UserChoices_Interannual_Run} = Xy ] ; then
+
+	typeset file 
+
+ 	(( PeriodCumulPeriod =  ${CumulPeriod} - 1 )) 
+ 	(( PeriodInitYear =${InitYear} + ${PeriodCumulPeriod} * ${PeriodLengthInYears} ))
+ 	(( PeriodFinalYear =${InitYear} + ${PeriodLengthInYears}*${CumulPeriod} - 1 ))
+
+        NbFileInter=${#opa9_Interannual_List_jobsbc[*]}
+        (( NbFileInter_tot=${#opa9_Interannual_List_jobsbc[*]} * ${PeriodLengthInYears} ))
+	(( i = 0 ))
+
+	while [ ${year} -le ${PeriodFinalYear} ] ; do #copy in ONCE of ALL necessary files for all PeriodLength
+	    
+	    while [ $i -lt ${NbFileInter} ] ; do
+		
+		eval file=${opa9_Interannual_List_jobsbc[$i]}
+		if [ X${year} = X${PeriodInitYear} ] ; then  
+                        	if [ ${month} -eq 01 ] ; then
+		    			# if year-1 does not exist we create a file _noym1.nc copy of year
+		    			eval jobsbc_file_ym1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_$(( year - 1 )).nc
+		    			if  [ ! -f ${jobsbc_file_ym1} ] ; then
+		    				eval jobsbc_file_ym1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_${year}.nc
+		    				eval runsbc_file_ym1=${file}_noym1.nc
+		    			else
+		    			    eval jobsbc_file_ym1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_$(( year - 1 )).nc
+		    			    eval runsbc_file_ym1=${file}_y$(( year - 1 )).nc
+		    			fi
+
+                            IGCM_sys_Get ${jobsbc_file_ym1} ${runsbc_file_ym1}
+                        	fi
+		fi
+		
+       		# download year 
+		eval jobsbc_file_y=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_${year}.nc
+		eval runsbc_file_y=${file}_y${year}.nc
+		
+		if [ ! -f ${runsbc_file_y} ] ; then
+		    IGCM_sys_Get ${jobsbc_file_y} ${runsbc_file_y}
+		fi
+		
+		# download (year+1) if it is last year of run
+		if [ X${year} = X${PeriodFinalYear} ] ; then 	
+	
+		    eval jobsbc_file_yp1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_$(( year + 1 )).nc
+		    eval runsbc_file_yp1=${file}_y$(( year + 1 )).nc
+		    
+		    if  [ ! -f ${runsbc_file_yp1} ] ; then
+			
+		        # if year+1 does not exist we create a file _noyp1.nc copy of year
+		    	eval jobsbc_file_yp1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_$(( year + 1 )).nc
+			if  [ ! -f ${jobsbc_file_yp1} ] ; then
+			    eval jobsbc_file_yp1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_${year}.nc
+		    	    eval runsbc_file_yp1=${file}_noyp1.nc
+			else
+			    eval jobsbc_file_yp1=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}_$(( year + 1 )).nc
+			    eval runsbc_file_yp1=${file}_y$(( year + 1 )).nc
+			fi
+			IGCM_sys_Get ${jobsbc_file_yp1} ${runsbc_file_yp1}
+		    fi
+		    
+		fi
+		(( i = i + 1 ))
+	
+	    done
+	
+	    (( year = year + 1 ))
+	 
+	    (( i = 0 ))
+	done
+
+    # End interannual
+    elif [ X${opa9_UserChoices_Interannual_Run} = Xn ] ; then
+    # Climatological run
+       typeset file 
+
+       eval NbFileInter=${#opa9_Interannual_List_jobsbc[*]}
+
+        (( i = 0 ))
+        while [ $i -lt ${NbFileInter} ] ; do
+            eval file=${opa9_Interannual_List_jobsbc[$i]}
+            eval jobsbc_file=${R_BC}/OCE/${config_UserChoices_TagName}/${opa9_UserChoices_OPA_version}/${file}.nc
+            eval runsbc_file=${file}.nc
+
+            IGCM_sys_Get ${jobsbc_file} ${runsbc_file}
+            (( i = i + 1 ))
+	done
+    fi
+    # End climatological
+
+    NbFreq=$( echo ${config_OCE_WriteFrequency} | wc -w )
+
+    ##--Write Frequency Purpose ....
+    typeset -Z1 i=1
+    while [ $i -le ${NbFreq} ]; do
+        frequency=$( echo ${config_OCE_WriteFrequency} | awk -v var="$i" "-F " '{print $var}' )
+    	factor=$( echo ${frequency} | sed -e "s/[yYmMdD]//" )
+    	case ${frequency} in
+    	    *Y|*y)
+    	        eval PREFIX_WF${i}=${config_UserChoices_JobName}_${factor}y_${DatesPeriod} ;
+    	        eval R_OUT_OCE_WF${i}=${R_OUT_OCE_O_Y} ;
+    	        eval WF${i}=${factor}Y ;;
+    	    *M|*m)
+    	        eval PREFIX_WF${i}=${config_UserChoices_JobName}_${factor}m_${DatesPeriod} ;
+    	        eval R_OUT_OCE_WF${i}=${R_OUT_OCE_O_M} ;
+    	        eval WF${i}=${factor}M ;;
+    	    *D|*d)
+    	        eval PREFIX_WF${i}=${config_UserChoices_JobName}_${factor}d_${DatesPeriod} ;
+    	        eval R_OUT_OCE_WF${i}=${R_OUT_OCE_O_D} ;
+    	        eval WF${i}=${factor}D ;;
+    	    *)
+    	esac
+        let i=$i+1
+
+    done
+    # Period Length In Days between DateBegin and first day of calendar 0001 01 01
+    # Needed by OPA namelist to compute correct file names 
+    (( PeriodDaysSinceJC =  $( IGCM_date_DaysSinceJC ${PeriodDateBegin} ) + 1  ))
+
+    ## Count of number of time steps from begin of OPA job
+    (( OPA_NIT000 = ( PeriodDaysSinceJC - DaysSinceJC ) * OPA_NDT_DAY + 1 ))
+    (( OPA_NDT   = PeriodLengthInDays * OPA_NDT_DAY ))
+    (( OPA_NITEND = OPA_NIT000 + OPA_NDT - 1))
+
+    ## Forcing to write one restart file at the end of period
+    OPA_NSTOCK="${OPA_NITEND}"
+
+    ## Verification of number of time steps per day
+    (( NB_SEC_DAY_MODEL = OPA_NDT_DAY * OPA_RDT ))
+    (( NB_SEC_DAY = 60 * 60 * 24 ))
+
+    if [ ${NB_SEC_DAY_MODEL} -ne ${NB_SEC_DAY} ]
+	then
+        echo " VERIFY OPA_NDT_DAY in opa9.card "
+        exit
+    fi
+
+    ##-- Restart configuration
+    if ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "n" ] ) ; then
+
+        #echo "NO OPA RESTART"
+	OPA_LRSTAR=.FALSE.
+	OPA_NRSTDT=0
+        #Put OPA_NMSH=0 when OPA runnig in parallel mode 
+	OPA_NMSH=1
+	( [ X${BATCH_NUM_PROC_TOT} != X ] && [ "${BATCH_NUM_PROC_TOT}" -gt 1 ] ) && OPA_NMSH=0
+
+    elif ( [ "${CumulPeriod}" -eq 1 ] && [ "${config_OCE_Restart}" = "y" ] ) ; then
+
+        #echo "OPA RESTART"
+	OPA_LRSTAR=.TRUE.
+	OPA_NRSTDT=0
+	OPA_NMSH=0
+
+    else
+
+        #echo "OPA RESTART"
+	OPA_LRSTAR=.TRUE.
+	OPA_NRSTDT=2
+	OPA_NMSH=0
+
+    fi
+   
+     ## nleapy configuration
+	case ${config_UserChoices_CalendarType} in
+        	leap)
+            	OPA_NLEAPY=1;;
+        	noleap)
+            	OPA_NLEAPY=0;;
+        	360d)
+            	OPA_NLEAPY=30;;
+    	esac
+
+
+        typeset -r PRECIS=8
+	NEMO_END=$( echo $( awk "BEGIN { printf \"%0${PRECIS}d\",${OPA_NITEND} }" ) ) 
+
+    sed -e "s%${PAT_CEXPER}%       cn_exp=\"${config_UserChoices_JobName}\"%"  \
+	-e "s%${PAT_NIT000}%       nn_it000=${OPA_NIT000}%"                    \
+	-e "s%${PAT_NITEND}%       nn_itend=${OPA_NITEND}%"                    \
+	-e "s%${PAT_RESTAR}%       ln_rstart=${OPA_LRSTAR}%"                   \
+	-e "s%${PAT_NSTOCK}%       nn_stock=${OPA_NSTOCK}%"                    \
+	-e "s%${PAT_NRSTAR}%       nn_rstctl=${OPA_NRSTDT}%"                   \
+	-e "s%${PAT_NDATE0}%       nn_date0=${PeriodDateBegin}%"               \
+	-e "s%${PAT_NMSH}%         nn_msh=${OPA_NMSH}%"                        \
+	-e "s%${PAT_NLEAPY}%       nn_leapy=${OPA_NLEAPY}%"	               \
+	namelist > namelist.tmp
+
+    IGCM_sys_Mv namelist.tmp namelist
+
+
+    # update xmlio_server.def
+
+    if [ X${opa9_UserChoices_io_server} = Xy ] ; then
+        sed -e "s/${PAT_SERVER}/  using_server = .TRUE./" \
+        xmlio_server.def > xmlio_server.def.tmp
+        IGCM_sys_Mv xmlio_server.def.tmp xmlio_server.def
+    fi
+	
+    IGCM_debug_PopStack "OCE_Update"
+}
+
+#-----------------------------------
+function OCE_Finalize
+{
+    IGCM_debug_PushStack "OCE_Finalize"
+
+    if [ -f date.file ] ; then
+        # Prefix use in opa.card AND in lim2.card :
+	DATE_OPA=$( cat date.file | \
+	    sed "s/\ ${config_UserChoices_JobName}_[0-9]*[a-z]_\([0-9]*_[0-9]*\)_\ */\1/g" )
+        ###DATE_OPA=$( $DATE_OPABF | cut -c1-30 )
+	MainPrefix=${config_UserChoices_JobName}_1d_${DATE_OPA}
+	SecondPrefix=${config_UserChoices_JobName}_5d_${DATE_OPA}
+    fi
+
+    echo FINALIZE OCE !!!
+
+    IGCM_debug_PopStack "OCE_Finalize"
+}
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/config.card
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/config.card	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/IGCM00/config.card	(revision 4751)
@@ -0,0 +1,115 @@
+#
+# This is config.card file for NEMO ORCA2_LIM2 configuration
+#
+#========================================================================
+#D-- Compatibility -
+[Compatibility]
+libIGCM=1.0
+#D-- UserChoices -
+[UserChoices]
+#============================
+#-- (<8 chars MAX for JobName)
+JobName=ORCA2
+LongName="SCRIPT_V1"
+TagName=ORCA2_LIM2
+#============================
+#-- leap, noleap, 360d
+CalendarType=noleap
+#-- Begin and end of Job
+#-- "YYYY-MM-DD"
+DateBegin=2001-01-01
+DateEnd=2005-12-31
+#============================
+#-- 1Y, 1M, 5D, 1D
+PeriodLength=1Y
+#============================
+#-- PBS Class (required on brodie mono/multi)
+JobClass=mono
+#JobClass=multi
+#============================
+#-- Total Number of Processors
+#JobNumProcTot=4
+JobNumProcTot=1
+#============================
+#-- Run Options : 
+#JobRunOptions='"-np "${BATCH_NUM_PROC_TOT}"'
+JobRunOptions=''
+#============================
+# config.card configuration options :
+#R_INIT=/home/mancip/PROG/IPSL/FORCAGE_OL/INIT
+#R_BC=/u/rech/psl/rpsl035/IGCM/BC 
+#R_BC=/dmnfs/cont003/p86ipsl/IGCM/BC 
+#============================
+
+#========================================================================
+#D-- ListOfComponents -
+[ListOfComponents]
+#D- For each component, Name of component, Tag of component
+OCE= (opa9, NEMO_v3)
+ICE= (lim2, LIM_2)
+
+#========================================================================
+#D-- Executable -
+[Executable]
+Name=nemo
+#D- For each component, Real name of executable
+OCE= (nemo.exe, nemo)
+ICE= ("", "")
+
+#========================================================================
+#D-- Restarts -
+[Restarts]
+#D- If you want a GENERAL RULE FOR RESTARTS, put this flag to 'y'
+OverRule=n
+#D- Last day of the experience used as restart
+RestartDate=1999-12-30
+#D- Define restart simulation name
+RestartJobName=NL1
+#D- Path Server Group Login
+RestartPath=${ARCHIVE}/IGCM_OUT/ORCA2_LIM
+
+#========================================================================
+#D-- Post -
+[Post]
+#D- Do we rebuild parallel output, this flag determines
+#D- frequency of rebuild submission
+#-- 1Y
+RebuildFrequency=NONE
+#D- Do we rebuild parallel output from archive
+RebuildFromArchive=true
+#D- If you want to produce time series, this flag determines
+#D- frequency of post-processing submission
+TimeSeriesFrequency=NONE
+#D- If you want to produce seasonal average, this flag determines
+#D- the period of this average
+SeasonalFrequency=NONE
+
+#========================================================================
+#D-- OCE -
+[OCE]
+WriteFrequency="1Y 1M 5D 1D"
+#WriteFrequency="5D"
+Restart= n
+##-- Last day of the experience used as restart
+RestartDate=1999-12-31
+# Define restart simulation name
+RestartJobName=NL1
+RestartPath=${ARCHIVE}/IGCM_OUT/ORCA2_LIM
+# Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+#D-- ICE -
+[ICE]
+WriteFrequency="5D"
+Restart= n
+##-- Last day of the experience used as restart
+RestartDate=1999-12-31
+# Define restart simulation name
+RestartJobName=NL1
+RestartPath=${ARCHIVE}/IGCM_OUT/ORCA2_LIM
+# Old component name for restart (if empty, use new name)
+OldName=
+
+#========================================================================
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/cpp_ORCA2_LIM_OBS.fcm
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/cpp_ORCA2_LIM_OBS.fcm	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/ORCA2_LIM_OBS/cpp_ORCA2_LIM_OBS.fcm	(revision 4751)
@@ -0,0 +1,1 @@
+ bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi key_diaobs key_asminc
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/SHARED/1_namelist_ref
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/SHARED/1_namelist_ref	(revision 4750)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/SHARED/1_namelist_ref	(revision 4751)
@@ -1067,6 +1067,6 @@
                            !     ln_ssh                  Logical switch for SSH observations
 
-   ln_sst     = .true.     ! Logical switch for SST observations
-   ln_reysst  = .true.     !     ln_reysst               Logical switch for Reynolds observations
+   ln_sst     = .false.     ! Logical switch for SST observations
+   ln_reysst  = .false.     !     ln_reysst               Logical switch for Reynolds observations
    ln_ghrsst  = .false.    !     ln_ghrsst               Logical switch for GHRSST observations      
 
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 4750)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 4751)
@@ -1085,6 +1085,6 @@
                            !     ln_ssh                  Logical switch for SSH observations
 
-   ln_sst     = .true.     ! Logical switch for SST observations
-   ln_reysst  = .true.     !     ln_reysst               Logical switch for Reynolds observations
+   ln_sst     = .false.     ! Logical switch for SST observations
+   ln_reysst  = .false.     !     ln_reysst               Logical switch for Reynolds observations
    ln_ghrsst  = .false.    !     ln_ghrsst               Logical switch for GHRSST observations      
 
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/cfg.txt
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/cfg.txt	(revision 4750)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/CONFIG/cfg.txt	(revision 4751)
@@ -11,2 +11,3 @@
 GYRE_BFM OPA_SRC TOP_SRC
 ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC
+ORCA2_LIM_OBS OPA_SRC LIM_SRC_2
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 4750)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 4751)
@@ -208,6 +208,30 @@
       !-----------------------------------------------------------------------
 
+      !Initalise all values in namelist arrays
+      enactfiles(:) = ''
+      coriofiles(:) = ''
+      profbfiles(:) = ''
+      slafilesact(:) = ''
+      slafilespas(:) = ''
+      slafbfiles(:) = ''
+      sstfiles(:)   = ''
+      sstfbfiles(:) = ''
+      seaicefiles(:) = ''
       velcurfiles(:) = ''
       veladcpfiles(:) = ''
+      velavcurfiles(:) = ''
+      velhrcurfiles(:) = ''
+      velavadcpfiles(:) = ''
+      velhradcpfiles(:) = ''
+      velfbfiles(:) = ''
+      velcurfiles(:) = ''
+      veladcpfiles(:) = ''
+      endailyavtypes(:) = -1
+      endailyavtypes(1) = 820
+      ln_profb_ena(:) = .FALSE.
+      ln_profb_enatim(:) = .TRUE.
+      ln_velfb_av(:) = .FALSE.
+      ln_ignmis = .FALSE.      
+
       CALL ini_date( dobsini )
       CALL fin_date( dobsend )
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/SETTE/input_ORCA2_LIM_OBS.cfg
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/SETTE/input_ORCA2_LIM_OBS.cfg	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/SETTE/input_ORCA2_LIM_OBS.cfg	(revision 4751)
@@ -0,0 +1,1 @@
+ORCA2_LIM_nemo_v3.6.tar ORCA2_LIM_nemo_v3.6
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/SETTE/sette.sh
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/SETTE/sette.sh	(revision 4750)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/SETTE/sette.sh	(revision 4751)
@@ -138,5 +138,6 @@
 # AMM12           : 7 &  8
 # SAS             : 9 & 10
-# ORCA2_AGRIF_LIM: 11
+# ORCA2_LIM_OBS:   11
+# ORCA2_AGRIF_LIM: 12
 for config in 1 2 3 4 5 6 7 8 9 10 11
 
@@ -865,6 +866,72 @@
 fi
 
+if [ ${config} -eq 11 ] ; then
+   ## Reproducibility tests for ORCA2_LIM_OBS
+    export TEST_NAME="REPRO_4_4"
+    cd ${CONFIG_DIR}
+    . ./makenemo -m ${CMP_NAM} -n ORCA2_LIM_OBS -r ORCA2_LIM_OBS -j 8 del_key ${DEL_KEYS}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=16
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 75
+    set_namelist namelist_cfg nn_fwb 0
+    set_namelist namelist_cfg ln_ctl .false.
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg jpnij 16
+    set_namelist namelist_cfg nn_solv 2
+    set_namelist namelist_cfg ln_t3d .true.
+    set_namelist namelist_cfg ln_s3d .true.
+    set_namelist namelist_cfg ln_profb .true.
+    set_namelist namelist_cfg ln_sst .false.
+    if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_LIM_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+   cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_2_8"
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=16
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 75
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg nn_fwb 0
+    set_namelist namelist_cfg jpni 2
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg jpnij 16
+    set_namelist namelist_cfg nn_solv 2
+    set_namelist namelist_cfg ln_t3d .true.
+    set_namelist namelist_cfg ln_s3d .true.
+    set_namelist namelist_cfg ln_profb .true.
+    set_namelist namelist_cfg ln_sst .false.
+   if [ ${USING_MPMD} == "yes" ] ; then
+       set_xio_using_server iodef.xml true
+    else
+       set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_LIM_OBS.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+fi
+
 # TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
-if [ ${config} -eq 11 ] ;  then
+if [ ${config} -eq 12 ] ;  then
     ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
     export TEST_NAME="SHORT"
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/date_utils.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/date_utils.F90	(revision 4750)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/date_utils.F90	(revision 4751)
@@ -34,4 +34,36 @@
 
    END SUBROUTINE add_date
+
+
+   SUBROUTINE add_days_to_date(initial_date,days,final_date)
+
+      ! Add a number of days to initial_date and return it in final_date
+
+      IMPLICIT NONE
+
+
+      !! Arguments
+      INTEGER,INTENT(in) :: initial_date ! Initial date (YYYYMMDD)
+      INTEGER,INTENT(in) :: days         ! Number of days to add
+      INTEGER,INTENT(out) :: final_date  ! Final date (YYYYMMDD)
+
+      !! Local variables
+
+      INTEGER :: isec,imin,ihours,iyear,imon,iday ! temporary results
+      REAL(dp):: juld
+
+		! Account for lack of hours in date format (initial_date*100)
+      CALL split_date(initial_date*100,iyear,imon,iday,ihours)
+
+      CALL greg2jul(0,0,ihours,iday,imon,iyear,juld)
+
+      juld=juld+REAL(days)
+
+      CALL jul2greg(isec,imin,ihours,iday,imon,iyear,juld)
+
+      final_date=(iyear*1000000+imon*10000+iday*100+ihours)/100
+
+   END SUBROUTINE add_days_to_date
+
 
    SUBROUTINE split_date(iyyyymmddhh,iyyyy,imm,idd,ihh)
@@ -379,4 +411,72 @@
    END FUNCTION diffdate
 
+   INTEGER FUNCTION difftime(itime1,itime2)
+
+      ! Compute difference in minutes between times
+      ! Assumes HHMM or HMM or MM or M format for dates
+		!
+		! ORDER MATTERS - itime1 is ealier time
+		! Result is an integer number of minutes
+
+      IMPLICIT NONE
+      INTEGER, INTENT(IN) :: itime1,itime2    ! Times to be diffed.
+      INTEGER :: imin1, imin2, ihr1, ihr2
+
+		ihr1 = (itime1/100)
+		ihr2 = (itime2/100)
+		
+		imin1 = (itime1 - ihr1*100) + (60 * ihr1)
+		imin2 = (itime2 - ihr2*100) + (60 * ihr2)
+		
+		! Assume that itime2 is later, so wrap around midnight if necessary.
+		IF (imin2 < imin1) THEN
+			imin2 = imin2 + 24*60
+		END IF
+		
+		difftime = imin2 - imin1
+		
+   END FUNCTION difftime
+
+
+   INTEGER FUNCTION add_mins_to_time(itime1, imin_add)
+
+      ! Add number of minutes onto given time
+      ! Assumes time in HHMM or HMM or MM or M format
+		!
+		! Result is in HHMM format
+
+      IMPLICIT NONE
+      INTEGER, INTENT(IN) :: itime1,imin_add
+      INTEGER :: imin1, ihr1, imin2, ihr2
+
+		ihr1 = (itime1/100)
+		
+		! itime1 in minutes from previous midnight
+		imin1 = (itime1 - ihr1*100) + (60 * ihr1)
+		
+		imin1 = imin1 + imin_add
+		
+		! Add 1day if time went nagative
+		IF (imin1 < 0) THEN
+			imin1 = imin1 + 24*60
+		END IF
+		
+		! Turn number of minutes back into HHMM
+		ihr2 = imin1/60
+		imin2 = imin1 - ihr2*60
+
+		DO
+			IF (ihr2<0) THEN
+				ihr2 = ihr2 + 24
+			ELSE IF (ihr2>=24) THEN
+				ihr2 = ihr2 - 24
+			END IF
+			IF ((ihr2>=0).OR.(ihr2<24)) EXIT
+		END DO
+
+		add_mins_to_time = ihr2*100 + imin2
+	
+   END FUNCTION add_mins_to_time
+
 
 END MODULE date_utils
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/fbgenerate.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/fbgenerate.F90	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/fbgenerate.F90	(revision 4751)
@@ -0,0 +1,327 @@
+PROGRAM fbgenerate
+   !!---------------------------------------------------------------------
+   !!
+   !!                     ** PROGRAM fbmatchup **
+   !!
+   !!  ** Purpose : Generate a feedback file of pseudo obs
+   !!
+   !!  ** Method  : Use of utilities from obs_fbm.
+   !!
+   !!  ** Action  : Read in data from a namelist file and generate a feedback
+   !!               file of pseudo observations
+   !! 
+   !!   Usage: 		For any parameter, if 3 values are given, these will be treated as
+   !!                   bounds (start, stop, step), EXCEPT when only 3 values are expected.
+   !!
+   !!                For spatial coord, date and time
+	!! 						3 values with nlat=3 will be treated as three separate values
+	!! 						3 values with nobs=3 will be treated as three separate values
+	!! 						3 values with nobs>3 will be treated as a start, end and step
+	!! 						Giving a FillValue in one of namelist entries may have unexpected consequences
+	!! 							e.g., discarding rest of list of values
+	!!
+	!! 					For time bounds, start(HHMM), end(HHMM), step(minutes)
+	!!						For date bounds, start(YYYYMMDD), end(YYYYMMDD), step(days)
+   !!
+   !!                To split obs evenly in time, date and time should be given two values 
+   !!                describing the start and end times. 
+   !!
+   !!                Can use logical flag to shuffle timestamps to remove position-time correlation.
+   !!
+   !!                Can use logical flag to add uniformly sampled perturbation (up to defined limit) to positions
+	!!
+	!! 					For obs values, can list either single value for all (x,y,z)
+	!! 					or can specify single profile for all (x,y)
+	!! 					or can specify all values 1 profile after another.
+	!!	 					
+	!! 					In namelist to set vals(nlev,nobs,nvar)
+	!! 						set all obs (for variable 1) at all levels to one value
+	!! 							vals(:,:,1)= 1.0
+	!! 						set all obs (for variable 2) at all levels to one value
+	!! 							vals(:,:,2)= 35.0
+	!! 						set one profile (for variable 1), apply to all	
+	!! 							vals(:,:,1)= 1.0, 2.0, 3.0, 4.0
+	!! 						set all profiles profile (for variable 1)	
+	!! 							vals(:,1,1)= 1.0, 2.0, 3.0, 4.0
+	!! 							vals(:,2,1)= 1.0, 2.0, 3.0, 4.0
+	!! 							vals(:,nobs,1)= 1.0, 2.0, 3.0, 4.0
+   !!     
+   !!
+   !!   Limitations: Uses an allocatable array in a namelist. This is not meant 
+	!!                 to be allowed in F95, but it works when compiled with xlf90_r
+	!!                 (and is allowed in Fortran2003).
+	!!
+	!!                Forces same depth levels on all profiles.
+	!!
+   !!   History :
+   !!        ! 2014    (J. Waters) Initial version
+   !!        ! 2014-02 (R. King)   Adapted for profiles and bounds on vars
+   !!----------------------------------------------------------------------
+   USE obs_fbm
+	USE fbgenerate_coords
+	USE test_fbgenerate
+   IMPLICIT NONE
+   TYPE(obfbdata) :: fbobsdata
+   CHARACTER(len=256) :: filenameout
+#ifndef NOIARGCPROTO
+   INTEGER,EXTERNAL :: iargc
+#endif
+   INTEGER :: nobs, nvar, nlev, ntyp, nadd, next, lgrid, ierr, nlats, nlons
+   INTEGER :: i, j
+   INTEGER :: FillValue_int
+	REAL(KIND=fbdp) :: FillValue_real
+   INTEGER, ALLOCATABLE :: dates(:), times(:)
+   REAL(KIND=fbdp), ALLOCATABLE :: julian_dates(:)
+	REAL(KIND=fbdp) :: phys_spacing, lat_step, current_lat, perturb_limit
+   REAL(KIND=fbdp), ALLOCATABLE :: lats(:), lons(:), deps(:), vals(:,:,:), model_vals(:,:,:) 
+   CHARACTER(LEN=ilenwmo) :: cdwmo, cdtyp
+   CHARACTER(LEN=ilenwmo), ALLOCATABLE :: variable(:)
+	CHARACTER(LEN=ilenlong), ALLOCATABLE :: variable_longname(:)
+	CHARACTER(LEN=ilenunit), ALLOCATABLE :: variable_units(:)
+	LOGICAL, PARAMETER :: test_prog = .FALSE.
+	LOGICAL :: ln_listobs, ln_physpace, ln_gridobs, ln_shuffletimes, ln_perturb_posn
+   REAL(KIND=fbdp), PARAMETER :: earth_radius = 6371.0_fbdp
+   REAL(KIND=fbdp), PARAMETER :: pi = 3.14159_fbdp
+	
+	!!!! set up default values and read in namelist namfbgen.in !!!!!!!!!!!!!!!!!!!!
+   NAMELIST/namfbgeneratesetup/ln_listobs,ln_physpace,ln_gridobs,ln_shuffletimes,ln_perturb_posn,perturb_limit,nobs,nlats,nlons,phys_spacing,nlev,nvar,nadd
+   NAMELIST/namfbgenerate/ntyp,lats,lons,deps,times,dates,vals,model_vals,variable,variable_longname,variable_units,cdwmo,cdtyp
+
+	IF (test_prog) THEN
+		WRITE(*,*) "In test mode:"
+		CALL tester
+	ELSE
+	
+   
+	IF (iargc()/=1) THEN
+      WRITE(*,*)'Usage:'
+      WRITE(*,*)'fbgenerate <output filename>'
+      CALL abort
+   ENDIF
+
+   CALL getarg(1,filenameout)
+	
+   ! set up default values for namfbgeneratesetup
+   ln_listobs=.FALSE.
+   ln_physpace=.FALSE.
+   ln_gridobs=.FALSE.
+   ln_shuffletimes=.FALSE.
+   ln_perturb_posn=.FALSE.
+   nobs=0
+   nlats=0
+   nlons=0
+   phys_spacing =100.0_fbdp
+   nlev=0
+	nvar=0
+
+   ! Read in number of obs and number of depths from namelist (before reading other variables)
+	FillValue_real = 99999.0_fbdp
+	FillValue_int = 99999
+   OPEN(10,file='namfbgen.in')
+   READ(10,namfbgeneratesetup) 
+   CLOSE(10)
+   
+   ! Calculate number of observations
+   IF ((ln_gridobs) .AND. (.NOT.ln_physpace) .AND. (.NOT.ln_listobs)) THEN
+      IF( ( nlats .LE. 0 ) .OR. (nlons .LE. 0) )THEN
+         WRITE(6,*)'ERROR: nlats and nlons must be greater than 0 if ln_gridobs set'
+      ELSE
+         nobs=nlats*nlons
+         WRITE(*,*) "Constructing a grid of lat-lons"
+      ENDIF
+
+   ELSE IF ((.NOT.ln_gridobs) .AND. (ln_physpace) .AND. (.NOT.ln_listobs)) THEN
+      IF ((phys_spacing .LE. 0) .OR.(phys_spacing .GE. earth_radius)) THEN
+         WRITE(6,*)'ERROR: phys_spacing must be greater than 0 and less than 6371km.'
+      ELSE
+        nlats = INT(pi * earth_radius / phys_spacing)
+        IF (MOD(nlats,2)==0) nlats=nlats-1   ! Ensure nlats is odd to have even number around equator.  
+        lat_step = 180.0_fbdp / (nlats-1)
+        nobs=0
+        current_lat=0.0_fbdp
+        ! Sum up number of lons at each latitude
+        DO i=1,(nlats-1)/2
+           current_lat = current_lat + lat_step * (pi/180.0_fbdp)
+           nobs = nobs + INT(2.0_fbdp * pi * earth_radius * cos(current_lat) / phys_spacing) 
+        END DO
+        nobs = nobs * 2 + INT(2.0_fbdp * pi * earth_radius / phys_spacing)
+        WRITE(*,*) "Using a physical seperation of ~", INT(phys_spacing),"km"
+      END IF
+
+   ELSE IF ((.NOT.ln_gridobs) .AND. (.NOT.ln_physpace) .AND. (ln_listobs)) THEN
+      IF( nobs .LE. 0 ) THEN
+         WRITE(6,*)'ERROR: nobs must be greater than 0'
+      ENDIF
+      WRITE(*,*) "Constructing a list of lat-lons"
+   ELSE
+      WRITE(*,*)'ERROR: one (and only one) of the logical flags must be true!'
+      CALL abort 
+   ENDIF
+
+
+   ALLOCATE(dates(nobs),       	&
+	    		times(nobs),       	&
+	    		julian_dates(nobs),  &
+	    		lats(nobs),	       	&
+	    		lons(nobs),	       	&
+	    		deps(nlev),        	&
+	    		variable(nvar),    	&
+	    		variable_longname(nvar),   &
+	    		variable_units(nvar),&
+	    		vals(nlev,nobs,nvar),&
+	    		model_vals(nlev,nobs,nvar),&
+				STAT=ierr          	&
+	    		)
+	IF (ierr /= 0) THEN
+		WRITE(*,*) "Could not allocate observation arrays:"
+		WRITE(*,*) "dates(", nobs, ")"
+		WRITE(*,*) "times(", nobs, ")"
+		WRITE(*,*) "lats(", nobs, ")"
+		WRITE(*,*) "lons(", nobs, ")"
+		WRITE(*,*) "deps(", nlev, ")"
+		WRITE(*,*) "variable(", nvar, ")"
+		WRITE(*,*) "variable_longname(", nvar, ")"
+		WRITE(*,*) "variable_units(", nvar, ")"
+		WRITE(*,*) "vals(", nlev, nobs, nvar, ")"
+		WRITE(*,*) "model_vals(", nlev, nobs, nvar, ")"
+
+		CALL abort
+	END IF			    
+	    
+		 
+   !!!! set up default values and read in namelist namfbgen.in !!!!!!!!!!!!!!!!!!!!
+   ntyp=-1
+   lats(:) = FillValue_real
+   lons(:) = FillValue_real
+   deps(:) = FillValue_real
+   times(:) = FillValue_int
+   dates(:) = FillValue_int
+   vals(:,:,:) = FillValue_real
+   model_vals(:,:,:) = FillValue_real
+   variable=REPEAT('X',ilenwmo)
+   variable_longname=REPEAT('X',ilenwmo)
+   variable_units=REPEAT('X',ilenwmo)
+   cdwmo=REPEAT('X',ilenwmo)  !station identifier
+   cdtyp="90"    !station type
+
+   WRITE(*,*) "Creating a fdbk file with", nobs, "observations"
+   WRITE(*,*) "with", nvar, "variables and",nlev, "depths."
+
+   OPEN(10,file='namfbgen.in')
+   READ(10,namfbgenerate)
+   CLOSE(10)
+	
+	! Use bounds to construct the full arrays of coords and values
+
+   IF (ln_physpace) THEN
+      CALL set_spatial_coords_physpace(lats,lons,nobs,FillValue_real,phys_spacing)
+   ELSE IF (ln_gridobs) THEN
+      CALL set_spatial_coords_grid(lats,lons,nobs,nlats,nlons,FillValue_real)
+   ELSE
+      CALL set_spatial_coords(lats,lons,nobs,FillValue_real)
+   END IF
+   
+   ! Add random perturbation to position if ln_perturb_posn=.TRUE.   
+   IF (ln_perturb_posn) CALL perturb_positions(lats,lons,perturb_limit)
+   
+   CALL set_datetime(dates,times,julian_dates,nobs,FillValue_int)
+   CALL set_depths(deps,nlev,FillValue_real)
+   CALL set_obs_values(vals,nvar,nobs,nlev,FillValue_real)
+   CALL set_obs_values(model_vals,nvar,nobs,nlev,FillValue_real)
+
+
+   !nadd=1	! Hx
+   next=0	! e.g. TEMP 
+	! Add TEMP as extra variable if POTM is defined.
+	DO i=1,nvar
+		IF (variable(i)(1:4) == "POTM") THEN
+		   next=1	! e.g. If set to zero, will not add extra TEMP variable			
+			EXIT
+		END IF
+	END DO
+
+   CALL init_obfbdata(fbobsdata)
+   
+   !!!! Allocate the obfb type !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+   
+   CALL alloc_obfbdata( fbobsdata, nvar, nobs, nlev, nadd, next, .FALSE.)
+   
+   !!!! Read data specified in the namelist into obfd type!!!!!!!!!!!!!!!
+	    
+   fbobsdata%cname = variable(:)
+	fbobsdata%coblong = variable_longname(:)
+	fbobsdata%cobunit = variable_units(:)
+   fbobsdata%cdjuldref = "19500101000000"
+   fbobsdata%cdwmo = cdwmo
+   fbobsdata%cdtyp = cdtyp
+	
+   ! Add model counterpart values if nadd=1
+	IF (nadd > 0) THEN
+		IF (nadd /= 1) THEN
+			CALL abort
+			WRITE(*,*) "Not set-up to add more than 1 additional variable."
+		ELSE
+			fbobsdata%caddname = "Hx"
+   		fbobsdata%caddlong(1,:) = "Model interpolated " // variable_longname(:)
+   		fbobsdata%caddunit(1,:) = variable_units(:)
+         fbobsdata%padd(:,:,1,:)=model_vals(:,:,:)
+		END IF
+	END IF
+	
+	! Add TEMP as extra variable if POTM is defined.
+	IF (next==1) THEN
+		fbobsdata%cextname = "TEMP"
+	END IF
+	
+   ! set up pos/time variables
+   fbobsdata%plam(:)=lons(:)
+   fbobsdata%pphi(:)=lats(:)
+	DO i=1,nobs 
+      fbobsdata%pdep(:,i)=deps(:)
+   END DO
+
+   
+   fbobsdata%ptim(:)= julian_dates(:)
+   
+   ! Shuffle the time array to spread the profiles across the time period
+   IF (ln_shuffletimes) CALL shuffle(fbobsdata%ptim)
+
+   ! read in variable data and flags
+   fbobsdata%ivqc(:,:)=1
+   fbobsdata%ivqcf(:,:,:)=1
+   fbobsdata%ivlqc(:,:,:)=1
+   fbobsdata%pob(:,:,:)=vals(:,:,:)
+
+   !set up all QC flags
+   fbobsdata%ioqc(:)=1
+   fbobsdata%ioqcf(:,:)=0
+   fbobsdata%ipqc(:)=1  
+   fbobsdata%ipqcf(:,:)=0 
+   fbobsdata%idqc(:,:)=1		!0
+   fbobsdata%idqcf(:,:,:)=0
+   fbobsdata%itqc(:)=1
+   fbobsdata%kindex(:)=0
+   
+   !!!! Write out the obfb type !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+	
+   CALL write_obfbdata(TRIM(filenameout),fbobsdata)
+
+   DEALLOCATE(dates,       &
+              times,       &
+              julian_dates,&
+	    		  lats,	      &
+	    		  lons,	      &
+	    		  deps,        &
+	    		  variable,    &
+	    		  variable_longname,    &
+	    		  variable_units,       &
+	    		  vals,        &
+	    		  model_vals   &
+	    		  )
+
+	END IF !test prog
+
+
+END PROGRAM fbgenerate
+
+
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/fbgenerate_coords.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/fbgenerate_coords.F90	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/fbgenerate_coords.F90	(revision 4751)
@@ -0,0 +1,509 @@
+MODULE fbgenerate_coords
+USE obs_fbm
+USE date_utils
+
+CONTAINS
+
+   REAL(KIND=fbdp) FUNCTION fb_dates(timein,datein) 
+      IMPLICIT NONE   
+      INTEGER, INTENT(IN) :: timein 	! Format: HHMM
+		INTEGER, INTENT(IN) :: datein 	! Format: YYYYMMDD
+      INTEGER :: iyea,imon,iday
+      INTEGER :: ihr,imin,isec
+  
+      iyea=datein/10000
+      imon=datein/100-iyea*100
+      iday=datein-iyea*10000-imon*100
+		
+		ihr = timein/100
+		imin = timein - ihr*100
+		isec = 0
+		
+      CALL greg2jul(isec,imin,ihr,iday,imon,iyea,fb_dates)
+   
+   END FUNCTION fb_dates
+
+
+
+	SUBROUTINE set_spatial_coords(lats,lons,n,FillVal)
+	IMPLICIT NONE	
+	INTEGER :: i, j, k, p, nlats, nlons, nlats_in_list, nlons_in_list
+	INTEGER, INTENT(IN) :: n
+	REAL(KIND=fbdp), INTENT(INOUT) :: lats(:), lons(:)
+	REAL(KIND=fbdp) :: FillVal 
+	
+	! A single non-FillVal value should be replicated n times
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	!	unless n is three, in which case treat as list, not bounds.
+	! A full list of n non-FillVals should be left unaltered.
+	
+	!Find number of lats and lons
+	! by finding number of non-FillVal entries in arrays
+	! and expanding bounds if necessary
+	
+	nlats_in_list = last_element(lats,FillVal)
+	nlons_in_list = last_element(lons,FillVal)
+
+   !Expand bounds only if 3 values given and number obs>3
+	IF (nlats_in_list == 1) THEN
+		lats(1:nlats) = lats(1)
+	ELSE IF ((nlats_in_list==3).AND.((n>3))) THEN ! Treat as list of three, not bounds
+		CALL expand_bounds(lats, FillVal)
+	END IF
+
+	IF (nlons_in_list == 1) THEN
+		lons(1:nlons) = lons(1)
+	ELSE IF ((nlons_in_list==3).AND.((n>3))) THEN ! Treat as list of three, not bounds
+		CALL expand_bounds(lons, FillVal)
+	END IF
+
+	nlats = last_element(lats,FillVal)
+	nlons = last_element(lons,FillVal)
+	
+	IF ((n /= nlats) .AND. (n /= nlons)) THEN
+		WRITE(*,*) "ERROR: Number of lat/lons not equal to nobs", nlats, nlons, n
+		CALL abort	
+	END IF
+	
+	END SUBROUTINE set_spatial_coords
+
+
+	SUBROUTINE set_spatial_coords_grid(lats,lons,n,nlats,nlons,FillVal)
+	IMPLICIT NONE	
+	INTEGER :: i, j, k, p, nlats_in_list, nlons_in_list
+	INTEGER, INTENT(IN) :: n, nlats, nlons
+	REAL(KIND=fbdp), INTENT(INOUT) :: lats(:), lons(:)
+	REAL(KIND=fbdp), ALLOCATABLE :: tmp_lats(:), tmp_lons(:)
+	REAL(KIND=fbdp) :: FillVal 
+	
+	! A single non-FillVal value should be replicated n times
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	!	unless n is three, in which case treat as list, not bounds.
+	! A full list of n non-FillVals should be left unaltered.
+	
+	!Find number of lats and lons in list
+	! by finding number of non-FillVal entries in arrays
+	! and then expand bounds if necessary
+	
+	nlats_in_list = last_element(lats,FillVal)
+	nlons_in_list = last_element(lons,FillVal)
+	
+   !Expand bounds only if 3 values given and number lats (or lons) not equal to 3
+	IF (nlats_in_list == 1) THEN
+		lats(1:nlats) = lats(1)
+	ELSE IF ((nlats_in_list==3).AND.((nlats>3))) THEN ! Treat as bounds
+		CALL expand_bounds(lats, FillVal)
+	END IF
+
+	IF (nlons_in_list == 1) THEN
+		lons(1:nlons) = lons(1)
+	ELSE IF ((nlons_in_list==3).AND.((nlons>3))) THEN ! Treat as bounds
+		CALL expand_bounds(lons, FillVal)
+	END IF
+
+	nlats_in_list = last_element(lats,FillVal)
+	nlons_in_list = last_element(lons,FillVal)
+
+
+	IF ((nlats_in_list * nlons_in_list) == n) THEN
+		ALLOCATE(tmp_lons(n))
+		ALLOCATE(tmp_lats(n))
+		k = 0
+		p = 0
+		DO i = 1, nlats
+		   p = p + 1
+			DO j = 1, nlons
+				k = k + 1
+				tmp_lons(k) = lons(j)   
+				tmp_lats(k) = lats(p)   
+			END DO
+		END DO
+		lats(:) = tmp_lats(:)
+		lons(:) = tmp_lons(:)
+		DEALLOCATE(tmp_lons)
+		DEALLOCATE(tmp_lats)
+	ELSE 
+		WRITE(*,*) 
+		WRITE(*,*) "ERROR: Number of lat * lon values not equal to nobs", nlats_in_list, nlons_in_list, n
+		CALL abort	
+	END IF
+	
+	END SUBROUTINE set_spatial_coords_grid
+
+
+	SUBROUTINE set_spatial_coords_physpace(lats,lons,n,FillVal,phys_spacing)
+	IMPLICIT NONE	
+	INTEGER :: i, j, k, nlats, nlons
+	INTEGER, INTENT(IN) :: n
+	REAL(KIND=fbdp), INTENT(INOUT) :: lats(:), lons(:)
+	REAL(KIND=fbdp), ALLOCATABLE :: tmp_lats(:)
+	REAL(KIND=fbdp) :: FillVal 
+   REAL(KIND=fbdp), PARAMETER :: earth_radius = 6371.0_fbdp ! km
+   REAL(KIND=fbdp), PARAMETER :: pi = 3.141592654_fbdp
+	REAL(KIND=fbdp), INTENT(IN) :: phys_spacing
+   REAL(KIND=fbdp) :: lat_step
+	
+	! Use physical spacing to set lats and lons
+
+   nlats = INT(pi * earth_radius / phys_spacing)
+   IF (MOD(nlats,2)==0) nlats=nlats-1   ! Ensure nlats is odd to have even number around equator.  
+      
+   ALLOCATE(tmp_lats(nlats))
+
+   lat_step = 180.0_fbdp / (nlats-1)
+
+   tmp_lats(1) = 0.0_fbdp
+   DO i=1,(nlats-1)/2
+      tmp_lats(i+1) = tmp_lats(i) + lat_step
+      tmp_lats(((nlats-1)/2)+i+1) = tmp_lats(i+1) * (-1.0_fbdp)
+   END DO
+
+   k = 0
+   DO i=1,nlats
+      nlons = INT(2.0_fbdp * pi * earth_radius * cos(tmp_lats(i)* (pi/180.0_fbdp)) / phys_spacing)
+      IF (nlons>0) THEN
+         DO j = 1, nlons
+            k = k + 1
+            lons(k) = REAL(j-1) * 360.0_fbdp / nlons
+            lats(k) = tmp_lats(i)
+         END DO
+      END IF
+   END DO
+   DEALLOCATE(tmp_lats)
+	
+	END SUBROUTINE set_spatial_coords_physpace
+
+
+	SUBROUTINE expand_bounds(array, fillval)
+	!
+	! Checks if there are three entries and expands bounds.
+	!
+	IMPLICIT NONE
+	INTEGER :: i, nentries
+	REAL(KIND=fbdp), INTENT(INOUT) :: array(:)
+	REAL(KIND=fbdp), INTENT(IN) :: fillval
+	REAL(KIND=fbdp) :: nsteps, start, step
+
+	! Find number of elements given in list
+	nentries = last_element(array, fillval)
+
+	IF (nentries==3) THEN 			! Bounds given	
+		nsteps = (array(2) - array(1)) /  array(3) 
+	   IF ((array(2) < array(1)) .AND. (array(3) >= 0.0)) THEN
+		   WRITE(*,*) "Error: if upper bound is less than lower bound, step must be negative.", array
+			CALL abort
+		ELSE IF ( NINT(nsteps)+1 > SIZE(array) ) THEN
+		   WRITE(*,*) "Error: bounds not compatible with length of array.", array
+		   WRITE(*,*) "Error: bounds not compatible with length of array.", nsteps
+			CALL abort
+		END IF
+		start = array(1) 
+		step = array(3)
+		DO i=1,NINT(nsteps)+1
+			array(i) = start + (i-1)*step 	   	
+		END DO
+	END IF
+	
+	END SUBROUTINE expand_bounds
+
+
+
+	INTEGER FUNCTION last_element(array,fillval)
+	!
+	! Returns index of the last non-fill value element in a list
+	! Will return 1, even in first element is the FillValue
+	!
+	IMPLICIT NONE
+	REAL(KIND=fbdp), INTENT(IN) :: array(:), fillval
+	INTEGER :: i
+
+	last_element = 1
+	IF (SIZE(array) > 1) THEN
+		DO i=2, SIZE(array)
+			IF (array(i) /= fillval) THEN 
+				last_element = i
+			END IF
+		END DO
+	END IF
+		
+	END FUNCTION last_element
+
+
+
+	SUBROUTINE set_depths(array,n,FillVal)
+	IMPLICIT NONE	
+	INTEGER :: i
+	INTEGER, INTENT(IN) :: n
+	REAL(KIND=fbdp), INTENT(INOUT) :: array(:)
+	REAL(KIND=fbdp) :: FillVal
+	REAL(KIND=fbdp) :: start, step, nstep
+	! Top bound not necessarily inclusive - will use start, step and number of obs
+	
+	! A single non-FillVal value should be replicated n times
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	!	unless n is three, in which case treat as list, not bounds.
+	! A full list of n non-FillVals should be left unaltered.
+	IF (n==1) THEN
+		array(:) = array(1)
+	ELSE IF ((n > 1) .AND. (array(2)==FillVal)) THEN
+		array(:) = array(1)
+	ELSE IF ((n==2) .AND. (array(2)/=FillVal)) THEN
+		array(:) = array(:)
+	ELSE IF (n==3) THEN ! Treat as list of three, not bounds
+		array(:) = array(:)
+	ELSE IF ((n>=4) .AND. (array(4)==FillVal)) THEN ! Assume start, stop, step
+		nstep = (array(2) - array(1)) /  array(3) 
+	   IF ((array(2) < array(1)) .AND. (array(3) >= 0.0)) THEN
+		   WRITE(*,*) "Error: if upper bound is less than lower bound, step must be negative.", array
+			CALL abort
+		ELSE IF ( ( nstep < (0.99 * real(n-1)) ) .OR. &
+		          ( nstep > (1.01 * real(n-1)) ) ) THEN
+		   WRITE(*,*) "Error: depth bounds not compatible.", array
+		   WRITE(*,*) "Error: depth bounds not compatible.", nstep
+			CALL abort
+		END IF
+		start = array(1) 
+		step = array(3)
+		DO i=1,n
+			array(i) = start + (i-1)*step 	   	
+		END DO
+	END IF
+	
+	END SUBROUTINE set_depths
+
+
+
+
+
+	SUBROUTINE set_datetime(date,time,julian_date,n,FillVal)
+	!
+	! Transform input array from m values describing n dates to a list of n dates.
+	!
+	IMPLICIT NONE	
+	INTEGER :: i
+	INTEGER, INTENT(IN) :: n
+	INTEGER, INTENT(INOUT) :: date(:), time(:)
+	INTEGER :: FillVal
+	REAL(KIND=fbdp), INTENT(INOUT) :: julian_date(:)
+	REAL(KIND=fbdp) :: start, step, finish
+
+   ! Check if user has supplied start and end times to be split amongst number of obs
+   ! (i.e. more than 2 obs, but only 2 dates and 2 times given.)
+   IF ((n>2) .AND. (date(2)/=FillVal) .AND. (date(3)==FillVal) &
+      &      .AND. (time(2)/=FillVal) .AND. (time(3)==FillVal)) THEN
+      
+      !work out JD of each
+      start = fb_dates(time(1),date(1)) 
+      finish = fb_dates(time(2),date(2)) 
+
+      ! use info to calc step
+      step = ( finish - start ) / n
+      ! calc all JDs and put output in dates
+      DO i=1,n 
+	      ! Could make this an elemental function if dateutils were pure funcs
+         julian_date(i)= start + (i-1)*step
+      END DO
+
+   ELSE
+      CALL set_date(date,n,FillVal)
+      CALL set_time(time,n,FillVal)
+      ! Replace dates with JD including time info
+      DO i=1,n 
+	      ! Could make this an elemental function if dateutils were pure funcs
+         julian_date(i)= fb_dates(time(i),date(i))
+      END DO
+   END IF
+
+
+	END SUBROUTINE set_datetime
+
+
+	SUBROUTINE set_date(array,n,FillVal)
+	!
+	! Transform input array from m values describing n dates to a list of n dates.
+	!
+	IMPLICIT NONE	
+	INTEGER :: i
+	INTEGER, INTENT(IN) :: n
+	INTEGER, INTENT(INOUT) :: array(:)
+	INTEGER :: FillVal
+	INTEGER :: start, step, diff
+	! Top bound not necessarily inclusive - will use start, step and number of obs
+	
+	! A single non-FillVal value should be replicated n times
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	!	unless n is three, in which case treat as list, not bounds.
+	! A full list of n non-FillVals should be left unaltered.
+	IF (n==1) THEN
+		array(:) = array(1)
+	ELSE IF ((n > 1) .AND. (array(2)==FillVal)) THEN
+		array(:) = array(1)
+	ELSE IF ((n==2) .AND. (array(2)/=FillVal)) THEN
+		array(:) = array(:)
+	ELSE IF (n==3) THEN ! Treat as list of three, not bounds
+		array(:) = array(:)
+	ELSE IF ((n>=4) .AND. (array(4)==FillVal)) THEN ! Assume start, stop, step
+   	diff = diffdate(array(2),array(1))	! in number of days
+	   IF ((array(2) < array(1)) .AND. (array(3) >= 0)) THEN
+		   WRITE(*,*) "Error: if upper bound is less than lower bound, step must be negative.", array
+			CALL abort
+		ELSE IF ( ( diff / ABS(array(3)) ) /= (n-1) ) THEN
+		   WRITE(*,*) "Error: date bounds not compatible.", array
+			CALL abort
+		END IF
+		start = array(1) 
+		step = array(3)
+		DO i=1,n
+			CALL add_days_to_date(start,(i-1)*step,array(i)) 	   	
+		END DO
+	END IF
+	
+	END SUBROUTINE set_date
+
+
+
+	SUBROUTINE set_time(array,n,FillVal)
+	!
+	! Transform input array from m (m<=n) values describing n times to a list of n times.
+	!
+	IMPLICIT NONE	
+	INTEGER :: i
+	INTEGER, INTENT(IN) :: n
+	INTEGER, INTENT(INOUT) :: array(:)
+	INTEGER :: FillVal
+	INTEGER :: start, step, nstep
+	! Top bound not necessarily inclusive - will use start, step and number of obs
+	
+	! A single non-FillVal value should be replicated n times
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	!	unless n is three, in which case treat as list, not bounds.
+	! A full list of n non-FillVals should be left unaltered.
+	IF (n==1) THEN
+		array(:) = array(1)
+	ELSE IF ((n > 1) .AND. (array(2)==FillVal)) THEN
+		array(:) = array(1)
+	ELSE IF ((n==2) .AND. (array(2)/=FillVal)) THEN
+		array(:) = array(:)
+	ELSE IF (n==3) THEN ! Treat as list of three, not bounds
+		array(:) = array(:)
+	ELSE IF ((n>=4) .AND. (array(4)==FillVal)) THEN ! Assume start, stop, step
+		IF (array(3)<0) nstep = difftime(array(2),array(1)) / ABS(array(3)) 
+		IF (array(3)>=0) nstep = difftime(array(1),array(2)) / ABS(array(3)) 
+		IF ( nstep /= (n-1) ) THEN
+		   WRITE(*,*) "Error: time bounds not compatible.", array
+			CALL abort
+		END IF
+		start = array(1) 
+		step = array(3)
+		DO i=1,n
+			array(i) = add_mins_to_time(start,(i-1)*step) 	   	
+		END DO
+	END IF
+	
+	END SUBROUTINE set_time
+	
+	
+
+	SUBROUTINE set_obs_values(array,p,n,m,FillVal)
+	!
+	! n profiles at m depths
+	!
+	IMPLICIT NONE	
+	INTEGER :: i, j, k
+	INTEGER, INTENT(IN) :: n, m, p
+	REAL(KIND=fbdp), INTENT(INOUT) :: array(:,:,:) 			! (nlevels, nprofiles, nvars) = (m,n,p)
+	REAL(KIND=fbdp) :: FillVal 
+	
+	
+	DO k=1,p
+	   IF ((k > 1) .AND. (array(1,1,k) == FillVal)) THEN  ! set to same values as first variable
+			array(:,:,k) = array(:,:,1)
+		ELSE
+			IF ((n==1).AND.(m==1)) THEN
+				array(:,:,k) = array(1,1,k)
+
+			! If mult depths, but not specified, set all to one value	
+			ELSE IF ((m > 1) .AND. (array(2,1,k) == FillVal)) THEN
+				array(:,:,k) = array(1,1,k)
+
+			! If mult profiles and mult depths and only one value set in first profile	
+			ELSE IF ((n > 1) .AND. (m > 1) .AND. (array(2,1,k) == FillVal)) THEN
+				array(:,:,k) = array(1,1,k)
+				
+			! If mult profiles and mult depths and only one first profile set	
+			ELSE IF ((n > 1) .AND. (m > 1) .AND. (array(1,2,k) == FillVal)) THEN
+				DO j=1,m
+					array(j,:,k) = array(j,1,k)
+				END DO
+				
+			ELSE 
+	   		array(:,:,k) = array(:,:,k)
+			END IF
+		END IF
+	END DO	
+	
+	END SUBROUTINE set_obs_values
+
+
+   ! Unbiased shuffle of array
+   SUBROUTINE shuffle(a)
+   REAL(KIND=fbdp), INTENT(INOUT) :: a(:)
+   INTEGER :: i, randpos
+   REAL(KIND=fbdp) :: r, temp
+
+   CALL random_seed()
+   DO i = SIZE(a), 2, -1
+      CALL random_number(r)
+      randpos = int(r * i) + 1
+      temp = a(randpos)
+      a(randpos) = a(i)
+      a(i) = temp
+   END DO
+   
+   END SUBROUTINE shuffle
+   
+   
+   ! Add a random perturbation to the lats and lons
+   ! Perturbation is sampled from a uniform distribution +/-perturb_limit
+   SUBROUTINE perturb_positions(lats,lons,perturb_limit)
+   INTEGER :: i
+   REAL(KIND=fbdp), INTENT(INOUT) :: lats(:), lons(:)
+   REAL(KIND=fbdp), INTENT(IN) :: perturb_limit
+   REAL(KIND=fbdp) :: randpos, lat_perturb, lon_perturb
+   REAL(KIND=fbdp), PARAMETER :: earth_radius = 6371.0_fbdp
+   REAL(KIND=fbdp), PARAMETER :: pi = 3.141592654_fbdp
+   
+ 	IF ( SIZE(lats) /= SIZE(lons) ) THEN
+		WRITE(*,*) "Error: different number of lat and lon elements", SIZE(lats), SIZE(lons)
+		CALL abort
+	END IF
+
+   CALL random_seed()
+   
+   ! Convert physical sep into a latidue sep in degrees
+   lat_perturb = 360.0_fbdp * perturb_limit / (2.0_fbdp * pi * earth_radius)
+   
+   DO i=1,SIZE(lats)
+   
+      ! Perturb lats first, as lon conversion uses lat
+      CALL random_number(randpos)
+      lats(i) = lats(i) + randpos*lat_perturb
+      IF (lats(i) > 90.0_fbdp) lats(i) = 180.0_fbdp - lats(i) 
+      IF (lats(i) < -90.0_fbdp) lats(i) = (lats(i) + 180.0_fbdp) * (-1.0_fbdp)
+      
+      ! Use lat to convert physical size to delta_longitude   
+      IF (ABS(lats(i)) == 90.0_fbdp) THEN 
+         lon_perturb = 0.0_fbdp
+      ELSE
+         lon_perturb = 360.0_fbdp * perturb_limit / (2.0_fbdp * pi * earth_radius * cos(lats(i)*(pi/180.0_fbdp)))
+      END IF
+      CALL random_number(randpos)
+      lons(i) = lons(i) + randpos*lon_perturb
+      IF (lons(i) >= 360.0_fbdp) lons(i) = lons(i) - 360.0_fbdp 
+      IF (lons(i) < 0.0_fbdp) lons(i) = lons(i) + 360.0_fbdp 
+   
+   END DO
+   
+   END SUBROUTINE perturb_positions
+    
+END MODULE fbgenerate_coords
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/ooo_data.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/ooo_data.F90	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/ooo_data.F90	(revision 4751)
@@ -0,0 +1,1 @@
+link ../../../NEMO/OOO_SRC/ooo_data.F90
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/ooo_write.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/ooo_write.F90	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/ooo_write.F90	(revision 4751)
@@ -0,0 +1,1 @@
+link ../../../NEMO/OOO_SRC/ooo_write.F90
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/test_arrays_mod.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/test_arrays_mod.F90	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/test_arrays_mod.F90	(revision 4751)
@@ -0,0 +1,94 @@
+MODULE test_arrays_mod
+USE obs_fbm
+
+INTERFACE test_arrays
+	MODULE PROCEDURE test_real_arrays
+	MODULE PROCEDURE test_real_arrays_2D
+	MODULE PROCEDURE test_real_arrays_3D
+	MODULE PROCEDURE test_integer_arrays
+END INTERFACE test_arrays
+
+CONTAINS
+
+   LOGICAL FUNCTION test_real_arrays(array_in,array_out)
+	IMPLICIT NONE
+	INTEGER :: i
+	REAL(KIND=fbdp) :: array_in(:), array_out(:)
+
+	test_real_arrays=.TRUE.
+	DO i=1,SIZE(array_in)
+		IF (array_in(i) /= array_out(i)) THEN
+			test_real_arrays=.FALSE.
+		END IF
+	END DO
+
+	IF (SIZE(array_in) /= SIZE(array_out)) THEN
+			test_real_arrays=.FALSE.
+	END IF
+
+	END FUNCTION test_real_arrays
+
+
+   LOGICAL FUNCTION test_real_arrays_2D(array_in,array_out)
+	IMPLICIT NONE
+	INTEGER :: i, j
+	REAL(KIND=fbdp) :: array_in(:,:), array_out(:,:)
+
+	test_real_arrays_2D=.TRUE.
+	DO j=1,SIZE(array_in,2)
+		DO i=1,SIZE(array_in,1)
+			IF (array_in(i,j) /= array_out(i,j)) THEN
+				test_real_arrays_2D=.FALSE.
+			END IF
+		END DO
+	END DO
+
+	IF (SIZE(array_in) /= SIZE(array_out)) THEN
+			test_real_arrays_2D=.FALSE.
+	END IF
+
+	END FUNCTION test_real_arrays_2D
+
+
+   LOGICAL FUNCTION test_real_arrays_3D(array_in,array_out)
+	IMPLICIT NONE
+	INTEGER :: i, j, k
+	REAL(KIND=fbdp) :: array_in(:,:,:), array_out(:,:,:)
+
+	test_real_arrays_3D=.TRUE.
+	DO k=1,SIZE(array_in,3)
+		DO j=1,SIZE(array_in,2)
+			DO i=1,SIZE(array_in,1)
+				IF (array_in(i,j,k) /= array_out(i,j,k)) THEN
+					test_real_arrays_3D=.FALSE.
+				END IF
+			END DO
+		END DO
+	END DO
+
+	IF (SIZE(array_in) /= SIZE(array_out)) THEN
+			test_real_arrays_3D=.FALSE.
+	END IF
+
+	END FUNCTION test_real_arrays_3D
+
+
+   LOGICAL FUNCTION test_integer_arrays(array_in,array_out)
+	IMPLICIT NONE
+	INTEGER :: i
+	INTEGER :: array_in(:), array_out(:)
+
+	test_integer_arrays=.TRUE.
+	DO i=1,SIZE(array_in)
+		IF (array_in(i) /= array_out(i)) THEN
+			test_integer_arrays=.FALSE.
+		END IF
+	END DO
+
+	IF (SIZE(array_in) /= SIZE(array_out)) THEN
+			test_integer_arrays=.FALSE.
+	END IF
+
+	END FUNCTION test_integer_arrays
+
+END MODULE test_arrays_mod
Index: /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/test_fbgenerate.F90
===================================================================
--- /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/test_fbgenerate.F90	(revision 4751)
+++ /branches/2014/dev_r4650_UKMO14.11_SETTE_OBSASM/NEMOGCM/TOOLS/OBSTOOLS/src/test_fbgenerate.F90	(revision 4751)
@@ -0,0 +1,787 @@
+MODULE test_fbgenerate	
+USE obs_fbm
+USE test_arrays_mod
+USE fbgenerate_coords
+
+CONTAINS
+
+   SUBROUTINE tester
+	IMPLICIT NONE
+	REAL(KIND=fbdp) :: array10_in(10), array1_in(1), array2_in(2), array3_in(3)
+	REAL(KIND=fbdp) :: array10_out(10), array1_out(1), array2_out(2), array3_out(3)
+	REAL(KIND=fbdp) :: array_4x3_in(3,4,1), array_4x3_out(3,4,1)
+	REAL(KIND=fbdp), ALLOCATABLE :: lat_array_in(:), lat_array_out(:)
+	REAL(KIND=fbdp), ALLOCATABLE :: lon_array_in(:), lon_array_out(:)
+	INTEGER :: iarray10_in(10), iarray1_in(1), iarray2_in(2), iarray3_in(3)
+	INTEGER :: iarray10_out(10), iarray1_out(1), iarray2_out(2), iarray3_out(3)
+	LOGICAL :: okay = .TRUE.
+	LOGICAL :: okay_too = .TRUE.
+	LOGICAL :: all_okay = .TRUE.
+	INTEGER, PARAMETER :: FV_int = 99999
+	REAL(KIND=fbdp), PARAMETER :: FV_real = 99999.0_fbdp
+	
+   ! A single non-FillVal value should be replicated n times
+	array1_in(:)=(/1.0_fbdp/)
+	array1_out(:)=(/1.0_fbdp/)
+	CALL set_depths(array1_in,1,FV_real)
+	okay = test_arrays(array1_in,array1_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 1 failed"
+		all_okay = .FALSE.
+	END IF
+
+   ! A single non-FillVal value should be replicated n times
+	array2_in(:) = (/1.0_fbdp, FV_real/)
+	array2_out(:) = (/1.0_fbdp, 1.0_fbdp/)
+	CALL set_depths(array2_in,2,FV_real)
+	okay = test_arrays(array2_in,array2_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 2 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! A single non-FillVal value should be replicated n times
+	array10_in(:) = (/1.0_fbdp,FV_real,FV_real,FV_real,FV_real,FV_real,FV_real,FV_real,FV_real,FV_real/)
+	array10_out(:) = 1.0_fbdp
+	CALL set_depths(array10_in,10,FV_real)
+	okay = test_arrays(array10_in,array10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 3 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! A single non-FillVal value should be replicated n times
+	array3_in(:) = (/1.0_fbdp,FV_real,FV_real/)
+	array3_out(:) = 1.0_fbdp
+	CALL set_depths(array3_in,3,FV_real)
+	okay = test_arrays(array3_in,array3_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 4 failed"
+		all_okay = .FALSE.
+	END IF
+		
+	! A full list of n non-FillVals should be left unaltered.
+	array2_in(:) = (/1.0_fbdp, 2.0_fbdp/)
+	array2_out(:) = (/1.0_fbdp, 2.0_fbdp/)
+	CALL set_depths(array2_in,2,FV_real)
+	okay = test_arrays(array2_in,array2_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 5 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! A full list of n non-FillVals should be left unaltered.
+	array3_in(:) = (/3.0_fbdp, 2.0_fbdp, 56.23_fbdp/)
+	array3_out(:) = (/3.0_fbdp, 2.0_fbdp, 56.23_fbdp/)
+	CALL set_depths(array3_in,3,FV_real)
+	okay = test_arrays(array3_in,array3_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 6 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! A full list of n non-FillVals should be left unaltered.
+	array10_in(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, -5.0_fbdp, 5.0_fbdp, 67.0_fbdp, 7.0_fbdp, 8.0_fbdp, 9.0_fbdp, 10.0_fbdp/)
+	array10_out(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, -5.0_fbdp, 5.0_fbdp, 67.0_fbdp, 7.0_fbdp, 8.0_fbdp, 9.0_fbdp, 10.0_fbdp/)
+	CALL set_depths(array10_in,10,FV_real)
+	okay = test_arrays(array10_in,array10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 7 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	array10_in(:) = (/1.0_fbdp,10.0_fbdp,1.0_fbdp,FV_real,FV_real,FV_real,FV_real,FV_real,FV_real,FV_real/)
+	array10_out(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp, 6.0_fbdp, 7.0_fbdp, 8.0_fbdp, 9.0_fbdp, 10.0_fbdp/)
+	CALL set_depths(array10_in,10,FV_real)
+	okay = test_arrays(array10_in,array10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 8 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	array10_in(:) = (/1.0_fbdp, 3.25_fbdp, 0.25_fbdp, FV_real,FV_real,FV_real,FV_real,FV_real,FV_real,FV_real/)
+	array10_out(:) = (/1.0_fbdp, 1.25_fbdp, 1.5_fbdp, 1.75_fbdp, 2.0_fbdp, 2.25_fbdp, 2.5_fbdp, 2.75_fbdp, 3.0_fbdp, 3.25_fbdp/)
+	CALL set_depths(array10_in,10,FV_real)
+	okay = test_arrays(array10_in,array10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 9 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	array10_in(:) = (/3.25_fbdp, 1.0_fbdp, -0.25_fbdp, FV_real,FV_real,FV_real,FV_real,FV_real,FV_real,FV_real/)
+	array10_out(:) = (/3.25_fbdp, 3.0_fbdp, 2.75_fbdp, 2.5_fbdp, 2.25_fbdp, 2.0_fbdp, 1.75_fbdp, 1.5_fbdp, 1.25_fbdp, 1.0_fbdp/)
+	CALL set_depths(array10_in,10,FV_real)
+	okay = test_arrays(array10_in,array10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 11 failed"
+		all_okay = .FALSE.
+	END IF
+	
+   ! A single non-FillVal value should be replicated n times
+	iarray1_in(:)=(/19991231/)
+	iarray1_out(:)=(/19991231/)
+	CALL set_date(iarray1_in,1,FV_int)
+	okay = test_arrays(iarray1_in,iarray1_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 12 failed"
+		all_okay = .FALSE.
+	END IF
+
+   ! A single non-FillVal value should be replicated n times
+	iarray2_in(:) = (/19991231, FV_int/)
+	iarray2_out(:) = (/19991231, 19991231/)
+	CALL set_date(iarray2_in,2,FV_int)
+	okay = test_arrays(iarray2_in,iarray2_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 13 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! A single non-FillVal value should be replicated n times
+	iarray10_in(:) = (/20110101,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int/)
+	iarray10_out(:) = 20110101
+	CALL set_date(iarray10_in,10,FV_int)
+	okay = test_arrays(iarray10_in,iarray10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 14 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! A single non-FillVal value should be replicated n times
+	iarray3_in(:) = (/20110101,FV_int,FV_int/)
+	iarray3_out(:) = 20110101
+	CALL set_date(iarray3_in,3,FV_int)
+	okay = test_arrays(iarray3_in,iarray3_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 15 failed"
+		all_okay = .FALSE.
+	END IF
+		
+	! A full list of n non-FillVals should be left unaltered.
+	iarray2_in(:) = (/19991231, 20000101/)
+	iarray2_out(:) = (/19991231, 20000101/)
+	CALL set_date(iarray2_in,2,FV_int)
+	okay = test_arrays(iarray2_in,iarray2_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 16 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! A full list of n non-FillVals should be left unaltered.
+	iarray3_in(:) = (/19840101, 19001231, 20500612/)
+	iarray3_out(:) = (/19840101, 19001231, 20500612/)
+	CALL set_date(iarray3_in,3,FV_int)
+	okay = test_arrays(iarray3_in,iarray3_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 17 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! A full list of n non-FillVals should be left unaltered.
+	iarray10_in(:) = (/20091231, 20100101, 20100102, 20100103, 20091231, &
+	                    20100105, 20100106, 20091231, 20100108, 20100109/)
+	iarray10_out(:) = (/20091231, 20100101, 20100102, 20100103, 20091231, &
+	                    20100105, 20100106, 20091231, 20100108, 20100109/)
+	CALL set_date(iarray10_in,10,FV_int)
+	okay = test_arrays(iarray10_in,iarray10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 18 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	iarray10_in(:) = (/20091231,20100109,1,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int/)
+	iarray10_out(:) = (/20091231, 20100101, 20100102, 20100103, 20100104, &
+	                    20100105, 20100106, 20100107, 20100108, 20100109/)
+	CALL set_date(iarray10_in,10,FV_int)
+	okay = test_arrays(iarray10_in,iarray10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 19 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	iarray10_in(:) = (/20100109,20091231,-1,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int/)
+	iarray10_out(:) = (/20100109, 20100108, 20100107, 20100106, 20100105, &
+	                    20100104, 20100103, 20100102, 20100101, 20091231/)
+	CALL set_date(iarray10_in,10,FV_int)
+	okay = test_arrays(iarray10_in,iarray10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 20 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	iarray10_in(:) = (/20100101,20100401,10,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int/)
+	iarray10_out(:) = (/20100101, 20100111, 20100121, 20100131, 20100210, &
+	                    20100220, 20100302, 20100312, 20100322, 20100401/)
+	CALL set_date(iarray10_in,10,FV_int)
+	okay = test_arrays(iarray10_in,iarray10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 21 failed"
+		all_okay = .FALSE.
+	END IF
+
+   ! A single non-FillVal value should be replicated n times
+	iarray1_in(:)=(/0000/)
+	iarray1_out(:)=(/0/)
+	CALL set_time(iarray1_in,1,FV_int)
+	okay = test_arrays(iarray1_in,iarray1_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 22 failed"
+		all_okay = .FALSE.
+	END IF
+
+   ! A single non-FillVal value should be replicated n times
+	iarray2_in(:) = (/0600, FV_int/)
+	iarray2_out(:) = (/600, 600/)
+	CALL set_time(iarray2_in,2,FV_int)
+	okay = test_arrays(iarray2_in,iarray2_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 23 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! A full list of n non-FillVals should be left unaltered.
+	iarray2_in(:) = (/0600, 1200/)
+	iarray2_out(:) = (/0600, 1200/)
+	CALL set_time(iarray2_in,2,FV_int)
+	okay = test_arrays(iarray2_in,iarray2_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 24 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! A full list of n non-FillVals should be left unaltered.
+	iarray10_in(:) = (/1, 2, 3, -5, 5, 67, 7, 8, 9, 10/)
+	iarray10_out(:) = (/1, 2, 3, -5, 5, 67, 7, 8, 9, 10/)
+	CALL set_time(iarray10_in,10,FV_int)
+	okay = test_arrays(iarray10_in,iarray10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 25 failed"
+		all_okay = .FALSE.
+	END IF
+
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	iarray10_in(:) = (/0000,0430,0030,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int/)
+	iarray10_out(:) = (/0, 30, 100, 130, 200, &
+	                    230, 300, 330, 400, 430/)
+	CALL set_time(iarray10_in,10,FV_int)
+	okay = test_arrays(iarray10_in,iarray10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 26 failed"
+		WRITE(*,*) iarray10_in
+		all_okay = .FALSE.
+	END IF
+
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	iarray10_in(:) = (/2200,0230,0030,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int/)
+	iarray10_out(:) = (/2200, 2230, 2300, 2330, 0, &
+	                    30, 100, 130, 200, 230/)
+	CALL set_time(iarray10_in,10,FV_int)
+	okay = test_arrays(iarray10_in,iarray10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 27 failed"
+		WRITE(*,*) iarray10_in
+		all_okay = .FALSE.
+	END IF
+
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	iarray10_in(:) = (/2200,1730,-0030,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int/)
+	iarray10_out(:) = (/2200, 2130, 2100, 2030, 2000, &
+	                    1930, 1900, 1830, 1800, 1730/)
+	CALL set_time(iarray10_in,10,FV_int)
+	okay = test_arrays(iarray10_in,iarray10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 28 failed"
+		WRITE(*,*) iarray10_in
+		all_okay = .FALSE.
+	END IF
+
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	iarray10_in(:) = (/0100,2200,-0020,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int/)
+	iarray10_out(:) = (/0100, 0040, 0020, 0000, 2340, &
+	                    2320, 2300, 2240, 2220, 2200/)
+	CALL set_time(iarray10_in,10,FV_int)
+	okay = test_arrays(iarray10_in,iarray10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 29 failed"
+		WRITE(*,*) iarray10_in
+		all_okay = .FALSE.
+	END IF
+
+	! Three non-FillVal values should be used as the start, end, step in conjunction with n
+	iarray10_in(:) = (/1700,0630,90,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int,FV_int/)
+	iarray10_out(:) = (/1700, 1830, 2000, 2130, 2300, &
+	                    0030, 0200, 0330, 0500, 0630/)
+	CALL set_time(iarray10_in,10,FV_int)
+	okay = test_arrays(iarray10_in,iarray10_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 30 failed"
+		WRITE(*,*) iarray10_in
+		all_okay = .FALSE.
+	END IF
+
+	! A single obs value should be replicated throught the array(obs,levels)
+	array_4x3_in(:,1,1) = (/1.0,FV_real,FV_real/)
+	array_4x3_in(:,2,1) = (/FV_real,FV_real,FV_real/)
+	array_4x3_in(:,3,1) = (/FV_real,FV_real,FV_real/)
+	array_4x3_in(:,4,1) = (/FV_real,FV_real,FV_real/)
+	array_4x3_out(:,1,1) = (/1.0_fbdp, 1.0_fbdp, 1.0_fbdp/)
+	array_4x3_out(:,2,1) = (/1.0_fbdp, 1.0_fbdp, 1.0_fbdp/)
+	array_4x3_out(:,3,1) = (/1.0_fbdp, 1.0_fbdp, 1.0_fbdp/)
+	array_4x3_out(:,4,1) = (/1.0_fbdp, 1.0_fbdp, 1.0_fbdp/)
+	CALL set_obs_values(array_4x3_in,1,4,3,FV_real)
+	okay = test_arrays(array_4x3_in,array_4x3_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 31 failed"
+		WRITE(*,*) array_4x3_in
+		WRITE(*,*)
+		WRITE(*,*) array_4x3_out
+		all_okay = .FALSE.
+	END IF
+
+	! A full specification of the obs values should be unaltered
+	array_4x3_in(:,1,1) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp/)
+	array_4x3_in(:,2,1) = (/4.0_fbdp, 5.0_fbdp, 6.0_fbdp/)
+	array_4x3_in(:,3,1) = (/7.0_fbdp, 8.0_fbdp, 9.0_fbdp/)
+	array_4x3_in(:,4,1) = (/10.0_fbdp, 11.0_fbdp, 12.0_fbdp/)
+	array_4x3_out(:,1,1) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp/)
+	array_4x3_out(:,2,1) = (/4.0_fbdp, 5.0_fbdp, 6.0_fbdp/)
+	array_4x3_out(:,3,1) = (/7.0_fbdp, 8.0_fbdp, 9.0_fbdp/)
+	array_4x3_out(:,4,1) = (/10.0_fbdp, 11.0_fbdp, 12.0_fbdp/)
+	CALL set_obs_values(array_4x3_in,1,4,3,FV_real)
+	okay = test_arrays(array_4x3_in,array_4x3_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 32 failed"
+		WRITE(*,*) array_4x3_in
+		WRITE(*,*)
+		WRITE(*,*) array_4x3_out
+		all_okay = .FALSE.
+	END IF
+
+	! A single profile should be replicated at all lat/lons
+	array_4x3_in(:,1,1) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp/)
+	array_4x3_in(:,2,1) = (/FV_real, FV_real, FV_real/)
+	array_4x3_in(:,3,1) = (/FV_real, FV_real, FV_real/)
+	array_4x3_in(:,4,1) = (/FV_real, FV_real, FV_real/)
+	array_4x3_out(:,1,1) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp/)
+	array_4x3_out(:,2,1) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp/)
+	array_4x3_out(:,3,1) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp/)
+	array_4x3_out(:,4,1) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp/)
+	CALL set_obs_values(array_4x3_in,1,4,3,FV_real)
+	okay = test_arrays(array_4x3_in,array_4x3_out)
+	IF (okay .EQV. .FALSE.) THEN
+	   WRITE(*,*) "Test 33 failed"
+		WRITE(*,*) array_4x3_in
+		WRITE(*,*)
+		WRITE(*,*) array_4x3_out
+		all_okay = .FALSE.
+	END IF
+
+	! A single profile position should only be given where nobs=1
+	ALLOCATE(lat_array_in(1),	&
+				lon_array_in(1),	&
+				lat_array_out(1), &
+				lon_array_out(1)	)
+	lat_array_in(:) = (/1.0_fbdp/)
+	lon_array_in(:) = (/1.0_fbdp/)
+	lat_array_out(:) = (/1.0_fbdp/)
+	lon_array_out(:) = (/1.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,1,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 34 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+
+	! A single lat and list of lons should give nobs observations
+	ALLOCATE(lat_array_in(4),	&
+				lon_array_in(4),	&
+				lat_array_out(4), &
+				lon_array_out(4)	)
+	lat_array_in(:) = (/1.0_fbdp, FV_real, FV_real, FV_real/)
+	lon_array_in(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp/)
+	lat_array_out(:) = (/1.0_fbdp, 1.0_fbdp, 1.0_fbdp, 1.0_fbdp/)
+	lon_array_out(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,4,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 35 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+
+	! A single lat and bounded lons should give nobs = no elements in expanded bounds
+	ALLOCATE(lat_array_in(3),	&
+				lon_array_in(3),	&
+				lat_array_out(3), &
+				lon_array_out(3)	)
+	lat_array_in(:) = (/1.0_fbdp, FV_real, FV_real/)
+	lon_array_in(:) = (/1.0_fbdp, 3.0_fbdp, 1.0_fbdp/)
+	lat_array_out(:) = (/1.0_fbdp, 1.0_fbdp, 1.0_fbdp/)
+	lon_array_out(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,3,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 36 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+
+	! A single lat and bounded lons should give nobs = no elements in expanded bounds
+	ALLOCATE(lat_array_in(5),	&
+				lon_array_in(5),	&
+				lat_array_out(5), &
+				lon_array_out(5)	)
+	lat_array_in(:) = (/1.0_fbdp, FV_real, FV_real, FV_real, FV_real/)
+	lon_array_in(:) = (/1.0_fbdp, 5.0_fbdp, 1.0_fbdp, FV_real, FV_real/)
+	lat_array_out(:) = (/1.0_fbdp, 1.0_fbdp, 1.0_fbdp, 1.0_fbdp, 1.0_fbdp/)
+	lon_array_out(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,5,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 37 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+
+	! A single lon and bounded lats should give nobs = no elements in expanded bounds
+	ALLOCATE(lat_array_in(5),	&
+				lon_array_in(5),	&
+				lat_array_out(5), &
+				lon_array_out(5)	)
+	lat_array_in(:) = (/1.0_fbdp, 5.0_fbdp, 1.0_fbdp, FV_real, FV_real/)
+	lon_array_in(:) = (/1.0_fbdp, FV_real, FV_real, FV_real, FV_real/)
+	lat_array_out(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp/)
+	lon_array_out(:) = (/1.0_fbdp, 1.0_fbdp, 1.0_fbdp, 1.0_fbdp, 1.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,5,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 38 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+
+	! A list of lats and lons with same number of elements as nobs should be unaltered
+	ALLOCATE(lat_array_in(5),	&
+				lon_array_in(5),	&
+				lat_array_out(5), &
+				lon_array_out(5)	)
+	lat_array_in(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp/)
+	lon_array_in(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp/)
+	lat_array_out(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp/)
+	lon_array_out(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,5,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 39 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+
+	! A list of lats and lons with fewer elements as nobs should be gridded 
+	! to produce nobs observations - list all lons at same lat, before stepping in lat.
+	ALLOCATE(lat_array_in(25),	&
+				lon_array_in(25),	&
+				lat_array_out(25), &
+				lon_array_out(25)	)
+	lat_array_in(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp,&
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real/)
+	lon_array_in(:) = (/10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp,&
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real/)
+	lat_array_out(:) = (/1.0_fbdp, 1.0_fbdp, 1.0_fbdp, 1.0_fbdp, 1.0_fbdp, & 
+								2.0_fbdp, 2.0_fbdp, 2.0_fbdp, 2.0_fbdp, 2.0_fbdp, &
+								3.0_fbdp, 3.0_fbdp, 3.0_fbdp, 3.0_fbdp, 3.0_fbdp, &
+								4.0_fbdp, 4.0_fbdp, 4.0_fbdp, 4.0_fbdp, 4.0_fbdp, &
+								5.0_fbdp, 5.0_fbdp, 5.0_fbdp, 5.0_fbdp, 5.0_fbdp/)
+	lon_array_out(:) = (/10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp,&
+								10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp,&
+								10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp,&
+								10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp,&
+								10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,25,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 40 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+
+	! A list of lats and lon bounds with fewer elements as nobs should be gridded 
+	! to produce nobs observations - list all lons at same lat, before stepping in lat.
+	ALLOCATE(lat_array_in(25),	&
+				lon_array_in(25),	&
+				lat_array_out(25), &
+				lon_array_out(25)	)
+	lat_array_in(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp,&
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real/)
+	lon_array_in(:) = (/10.0_fbdp, 50.0_fbdp, 10.0_fbdp, FV_real, FV_real,&
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real/)
+	lat_array_out(:) = (/1.0_fbdp, 1.0_fbdp, 1.0_fbdp, 1.0_fbdp, 1.0_fbdp, & 
+								2.0_fbdp, 2.0_fbdp, 2.0_fbdp, 2.0_fbdp, 2.0_fbdp, &
+								3.0_fbdp, 3.0_fbdp, 3.0_fbdp, 3.0_fbdp, 3.0_fbdp, &
+								4.0_fbdp, 4.0_fbdp, 4.0_fbdp, 4.0_fbdp, 4.0_fbdp, &
+								5.0_fbdp, 5.0_fbdp, 5.0_fbdp, 5.0_fbdp, 5.0_fbdp/)
+	lon_array_out(:) = (/10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp,&
+								10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp,&
+								10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp,&
+								10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp,&
+								10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,25,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 41 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+
+
+	! A list of lats and lon bounds with the same number of elements as nobs should be 
+	! unaltered expect for bounds expansion
+	ALLOCATE(lat_array_in(5),	&
+				lon_array_in(5),	&
+				lat_array_out(5), &
+				lon_array_out(5)	)
+	lat_array_in(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp/)
+	lon_array_in(:) = (/10.0_fbdp, 50.0_fbdp, 10.0_fbdp, FV_real, FV_real/)
+	lat_array_out(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp/)
+	lon_array_out(:) = (/10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,5,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 42 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+	
+
+	! A list of lons and lat bounds with the same number of elements as nobs should be 
+	! unaltered expect for bounds expansion
+	ALLOCATE(lat_array_in(5),	&
+				lon_array_in(5),	&
+				lat_array_out(5), &
+				lon_array_out(5)	)
+	lat_array_in(:) = (/10.0_fbdp, 50.0_fbdp, 10.0_fbdp, FV_real, FV_real/)
+	lon_array_in(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp/)
+	lat_array_out(:) = (/10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp, 50.0_fbdp/)
+	lon_array_out(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,5,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 43 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+	
+
+	! A list of lons and lat bounds with fewer elements as nobs should be gridded 
+	! to produce nobs observations - list all lons at same lat, before stepping in lat.
+	ALLOCATE(lat_array_in(25),	&
+				lon_array_in(25),	&
+				lat_array_out(25), &
+				lon_array_out(25)	)
+	lat_array_in(:) = (/10.0_fbdp, 50.0_fbdp, 10.0_fbdp, FV_real, FV_real,&
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real/)
+	lon_array_in(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp,&
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real/)
+	lat_array_out(:) = (/10.0_fbdp, 10.0_fbdp, 10.0_fbdp, 10.0_fbdp, 10.0_fbdp, & 
+								20.0_fbdp, 20.0_fbdp, 20.0_fbdp, 20.0_fbdp, 20.0_fbdp, &
+								30.0_fbdp, 30.0_fbdp, 30.0_fbdp, 30.0_fbdp, 30.0_fbdp, &
+								40.0_fbdp, 40.0_fbdp, 40.0_fbdp, 40.0_fbdp, 40.0_fbdp, &
+								50.0_fbdp, 50.0_fbdp, 50.0_fbdp, 50.0_fbdp, 50.0_fbdp/)
+	lon_array_out(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp,&
+								1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp,&
+								1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp,&
+								1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp,&
+								1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,25,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 44 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+
+
+	! A single lat and bounded lons should give nobs = no elements in expanded bounds
+	ALLOCATE(lat_array_in(5),	&
+				lon_array_in(5),	&
+				lat_array_out(5), &
+				lon_array_out(5)	)
+	lat_array_in(:) = (/1.0_fbdp, FV_real, FV_real, FV_real, FV_real/)
+	lon_array_in(:) = (/1.0_fbdp, 5.0_fbdp, 1.0_fbdp, FV_real, FV_real/)
+	lat_array_out(:) = (/1.0_fbdp, 1.0_fbdp, 1.0_fbdp, 1.0_fbdp, 1.0_fbdp/)
+	lon_array_out(:) = (/1.0_fbdp, 2.0_fbdp, 3.0_fbdp, 4.0_fbdp, 5.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,5,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 45 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+
+
+	! Bounded lat and bounded lons - list all lons at same lat, before stepping in lat.
+	ALLOCATE(lat_array_in(20),	&
+				lon_array_in(20),	&
+				lat_array_out(20), &
+				lon_array_out(20)	)
+	lat_array_in(:) = (/1.0_fbdp, 5.0_fbdp, 1.0_fbdp, FV_real, FV_real,&
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real/)
+	lon_array_in(:) = (/10.0_fbdp, 40.0_fbdp, 10.0_fbdp, FV_real, FV_real,&
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real, &
+	                    FV_real, FV_real, FV_real, FV_real, FV_real/)
+	lat_array_out(:) = (/1.0_fbdp, 1.0_fbdp, 1.0_fbdp, 1.0_fbdp, & 
+								2.0_fbdp, 2.0_fbdp, 2.0_fbdp, 2.0_fbdp, &
+								3.0_fbdp, 3.0_fbdp, 3.0_fbdp, 3.0_fbdp, &
+								4.0_fbdp, 4.0_fbdp, 4.0_fbdp, 4.0_fbdp, &
+								5.0_fbdp, 5.0_fbdp, 5.0_fbdp, 5.0_fbdp/)
+	lon_array_out(:) = (/10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp,&
+								10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp,&
+								10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp,&
+								10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp,&
+								10.0_fbdp, 20.0_fbdp, 30.0_fbdp, 40.0_fbdp/)
+	CALL set_spatial_coords(lat_array_in,lon_array_in,20,FV_real)
+	okay = test_arrays(lat_array_in,lat_array_out)
+	okay_too = test_arrays(lon_array_in,lon_array_out)
+	IF ((okay .EQV. .FALSE.) .OR. (okay_too .EQV. .FALSE.)) THEN
+	   WRITE(*,*) "Test 46 failed"
+		WRITE(*,*) lat_array_in
+		WRITE(*,*) lon_array_in
+		WRITE(*,*) lat_array_out
+		WRITE(*,*) lon_array_out
+		all_okay = .FALSE.
+	END IF
+	DEALLOCATE(lat_array_in,	&
+				  lon_array_in,	&
+				  lat_array_out,	&
+				  lon_array_out	)
+
+
+	IF (all_okay) WRITE(*,*) "All tests passed"
+	
+	END SUBROUTINE tester
+
+END MODULE test_fbgenerate	
