Index: unk/for_createpro.pro
===================================================================
--- /trunk/for_createpro.pro	(revision 16)
+++ 	(revision )
@@ -1,4 +1,0 @@
-pro for_createpro
-@/usr/work/sur/fvi/OPA/geomag/initorca2_bab
-return
-end
Index: /trunk/geomag_profile.sh
===================================================================
--- /trunk/geomag_profile.sh	(revision 16)
+++ /trunk/geomag_profile.sh	(revision 17)
@@ -1,3 +1,3 @@
-# !/bin/sh
+# !/bin/sh -xv
 #
 # module :
@@ -6,8 +6,16 @@
 # usage :
 # online usage
-# $ . geomag_profile.sh
+# $ . geomag_profile.sh -d directory
 #
 # in ${HOME}/.profile, add the following line
-# . geomag_profile.sh
+# . geomag_profile.sh -d directory
+#
+# examples :
+# for fplod, on aedon.locean-ipsl.upmc.fr
+# $ cd /usr/home/fplod/incas/geomag/geomag_ws
+# $  . geomag_profile.sh -d /usr/home/fplod/incas/geomag/geomag_ws/
+# for reee522 on rhodes.idris.fr
+# $ cd ${HOME}/incas/geomag/geomag_ws/
+# $ . geomag_profile.sh -d ${HOME}/incas/geomag/geomag_ws/
 #
 # original location
@@ -18,4 +26,7 @@
 # ++ machine dependant
 # ++ besoin de posix
+# ++ pas de MANPATH defini par déut sur zeus
+# fplod 2007-03-13T16:12:41Z zeus.locean-ipsl.upmc.fr (Linux)
+# add creation of $GEOMAG_ID and $GEOMAG_OD if they don't exist
 # reee522 2006-11-23T11:41:41Z rhodes (IRIX64)
 # pas de set -o posix sur rhodes (IRIX64)
@@ -24,4 +35,37 @@
 # creation
 #
+#
+command=geomag_profile.sh
+#
+usage=" Usage : ${command} -d directory"
+#
+while [ ! -z "${1}" ] # ++ pb bash
+do
+ case ${1} in
+ -d) # directory choosen by user
+  directory=${2}
+  shift
+ ;;
+ *) # other choice
+  echo "${usage}"
+  # nb : no exit because this file should be launched by login process
+ ;;
+ esac
+ shift # next flag
+done
+
+# check for ${directory}
+if [ ! -d ${directory} ]
+then
+ echo " eee : ${directory} not found"
+ # nb : no exit because this file should be launched by login process
+fi
+#
+# check for permission on directory
+if [ ! -x ${directory} ]
+then
+ echo " eee : ${directory} not reachable"
+ # nb : no exit because this file should be launched by login process
+fi
 #
 set -u
@@ -36,14 +80,7 @@
 esac
 #
-command='geomag_profile.sh'
 #
-GEOMAG=${HOME}/incas/geomag/ # ++  
-# test if $GEOMAG available
-if [ ! -d ${GEOMAG} ]
-then
- echo "${command} : eee : ${GEOMAG} directory not available"
- # nb : no exit because this file should be launched by login process
- # ++ how to worn user
-fi
+GEOMAG=${directory}
+export GEOMAG
 #
 # add GEOMAG tools to PATH
@@ -82,8 +119,17 @@
 GEOMAG_ID=${HOME}/geomag_d/
 export GEOMAG_ID
+if [ ! -d ${GEOMAG_ID} ] 
+then
+  mkdir -p ${GEOMAG_ID}
+  echo "${command} : iii : creation of \${GEOMAG_ID}"
+fi 
 GEOMAG_OD=${HOME}/geomag_d/
 export GEOMAG_OD
+if [ ! -d ${GEOMAG_ID} ]
+then
+  mkdir -p ${GEOMAG_OD}
+  echo "${command} : iii : creation of \${GEOMAG_OD}"
+fi
 #
 # end
 # nb : no exit because this file should be launched by login process
-# ++ how to worn user
Index: /trunk/initorca2_bab.pro
===================================================================
--- /trunk/initorca2_bab.pro	(revision 16)
+++ /trunk/initorca2_bab.pro	(revision 17)
@@ -1,19 +1,40 @@
+; +
+; @file_comments
+; initialisation on ORCA2 grid
 ;
+; @history
+; F. Vivier 2003
+; F. Pinsard adaptation to new SAXO
+; according to SAXO ./SRC/Tests/tst_initorca2.pro
 ;
-@common
+; @todo
+; parametrisation for ORCA025
+;
+; zminmesh and izmaxmesh may be set to 0,0 because we only work with 
+; surface problem (no z) whatever the resolution of ORCA. this will safe lot 
+; of memory
+; 
+; use ncdf_getaxis to recover meshmask dimension
+; on x, retrieve -1 and -1 (bande de recouvrement haut et bas)
+; on y, for ORCA2, retrieve -2 (bande de recouvrement ++ et ++) 
+;
+; reminder : ORCA2 = 182 x 149 and ORCA025 1442 x 1021
+; 
+; for ORCA025, user /keepcont in triangule call.
+;
+; @version
+; $Id$
+;-
+;
+@cm_4mesh
+@cm_4cal
+@cm_4data
+;
 ;---------------------------------------------------------
-; bornes de la grille
+; boundaries of the read grid regarding to the original grid
 ;----------------------------------------------------------
-;ixminmesh  =2
-;ixmaxmesh  =181
-; ;
-; iyminmesh  =0
-; iymaxmesh  =147
-
+;
 ixminmesh  =1
 ixmaxmesh  =180
-
-;ixminmesh  =0
-;ixmaxmesh  =179
 ;
 iyminmesh  =0
@@ -26,21 +47,16 @@
 time = 0
 ;------------------------------------------------------
-; lecture de la grille
+; read the grid
 ;------------------------------------------------------
 iodir = '/usr/work/sur/fvi/OPA/ORCA2/'
 
-;key_shift = 31
-key_shift = 0
 key_stride = [1, 1, 1]
 ncdf_meshlec, 'meshmask_bab.nc', glamboundary = [20, 380]
-;, glamboundary = [20, 380]
-;,/checkdat
 ;-------------------------------------------------------------
 domdef
 ;
-key_periodique = 1
-triangles = triangule()
+triangles_list = triangule()
 ;----------------------------------------------------------
-; bornes pour la lecture des donnees
+; boundaries of the data regarding to the original grid
 ;----------------------------------------------------------
 jpidta = jpiglo
@@ -53,3 +69,4 @@
 izmindta = 0
 izmaxdta = jpkdta-1
-
+;----------------------------------------------------------
+@updateold
Index: /trunk/rseries_ncdf.pro
===================================================================
--- /trunk/rseries_ncdf.pro	(revision 16)
+++ /trunk/rseries_ncdf.pro	(revision 17)
@@ -250,4 +250,6 @@
 ; if we need to read more than one file,
 ; first we read the first file
+;++    print,var,date1+century*1000000L, datelast[0]+century*1000000L 
+;++READ, B, PROMPT='Enter Name: '  
     res1 = read_ncdf(var, date1+century*1000000L, datelast[0]+century*1000000L $
                      , filename = filename, /nostruct, _extra = ex)
Index: /trunk/step1_diff.pro
===================================================================
--- /trunk/step1_diff.pro	(revision 16)
+++ /trunk/step1_diff.pro	(revision 17)
@@ -13,14 +13,18 @@
 ;
 ; @examples
-; test (for header and delta) 
+; test (for header and delta)
 ; to compute difference between cond_sed in cond_sed_ORCA2.nc and
 ; itself and write it in ginette.nc :
-; rhodes\@reee522$ cd /home/rech/eee/reee522/incas/geomag/geomag_ws
-; rhodes\@reee522$ idl
-; IDL> step1_diff, 'cond_sed_ORCA2.nc', 'cond_sed_ORCA2.nc', 'ginette.nc'
+; $ cd ${GEOMAG}
+; $ idl
+; IDL> file1=getenv('GEOMAG') + '/cond_sed_ORCA2.nc'
+; IDL> file2=getenv('GEOMAG_OD') + '/cond_sed_ORCA2.nc'
+; IDL> step1_diff, file1, file2, 'ginette.nc'
 ; values of delta must be 0 everywhere
-; rhodes\@reee522$ rm ginette.nc
+; $ rm ginette.nc
 ; idem with BR file
-; IDL> step1_diff, 'Br_ORCA2.nc', 'Br_ORCA2.nc', 'ginette.nc'
+; IDL> file1=getenv('GEOMAG') + '/Br_ORCA2.nc'
+; IDL> file2=getenv('GEOMAG_OD') + '/Br_ORCA2.nc'
+; IDL> step1_diff, file1, file2, 'ginette.nc'
 ;
 ; real life
@@ -28,12 +32,12 @@
 ; /home/rech/eee/reee522/geomag_d/cond_sed_ORCA2.nc and write it in
 ; cond_sed_ORCA2_diff.nc :
-; rhodes\@reee522$ cd /home/rech/eee/reee522/incas/geomag/geomag_ws
-; rhodes\@reee522$ idl
-; IDL> step1_diff, 'cond_sed_ORCA2.nc', $
-;      '/home/rech/eee/reee522/geomag_d/cond_sed_ORCA2.nc', $
-;      'cond_sed_ORCA2_diff.nc'
-; IDL> step1_diff, 'Br_ORCA2.nc', $
-;      '/home/rech/eee/reee522/geomag_d/Br_ORCA2.nc', $
-;      'Br_ORCA2_diff.nc'
+; $ cd ${GEOMAG}
+; $ idl
+; IDL> file1=getenv('GEOMAG') + '/cond_sed_ORCA2.nc'
+; IDL> file2=getenv('GEOMAG_OD') + '/cond_sed_ORCA2.nc'
+; IDL> step1_diff, file1, file2, 'cond_sed_ORCA2_diff.nc'
+; IDL> file1=getenv('GEOMAG') + '/Br_ORCA2.nc'
+; IDL> file2=getenv('GEOMAG_OD') + '/Br_ORCA2.nc'
+; IDL> step1_diff, file1, file2, 'Br_ORCA2_diff.nc'
 ;
 ; to see the difference, for example
@@ -41,5 +45,5 @@
 ; IDL> xxx,'Br_ORCA2_diff.nc'
 ; select xy on plt wigdet
-; 
+;
 ; @history
 ; reee522 2006-12-18T10:38:49Z rhodes (IRIX64)
@@ -53,5 +57,5 @@
 ; $Id$
 ;
-PRO step1_diff, file1,file2,file3
+PRO step1_diff, file1, file2, file3
 ;
 ncverbose=1
@@ -102,8 +106,8 @@
 checknonzero=where(delta NE 0.,count)
 IF count EQ 0 THEN BEGIN
-   msg = ' iii : delta is zero everywhere'
+   msg = 'iii : delta is zero everywhere'
    PRINT, msg
 ENDIF ELSE BEGIN
-   msg = ' iii : delta is not zero ' + STRING(count)  + ' times'
+   msg = 'iii : delta is not zero ' + STRING(count)  + ' times'
    PRINT, msg
 ENDELSE
Index: unk/xxx_oneplot.pro
===================================================================
--- /trunk/xxx_oneplot.pro	(revision 16)
+++ 	(revision )
@@ -1,32 +1,0 @@
-pro xxx_oneplot
-@common
-noerase = 1
-portrait = 0
-; beginning of reading the field to draw
-; field number: 1
-; declaration de la structure extra:
-extra=create_struct('NOTHING',0)
-; declaration de la structure readparameters:
-readparameters=create_struct('FUNCLEC_NAME','read_ncdf','JPIDTA',182,'JPJDTA',149,'JPKDTA',31,'IXMINDTA',0,'IXMAXDTA',181,'IYMINDTA',0,'IYMAXDTA',148,'IZMINDTA',0,'IZMAXDTA',30)
-; on change de lecture?:
-nothing=changeread(readparameters)
-; declaration de la structure meshparameters:
-meshparameters=create_struct('FILENAME','/usr/work/sur/fvi/OPA/geomag/INTERP2/initorca_reg.pro','FILETYPE','batch file','JPIGLO',182,'JPJGLO',149,'JPKGLO',31,'JPI',180,'JPJ',148,'JPK',31,'IXMINMESH',1,'IXMAXMESH',180,'IYMINMESH',0,'IYMAXMESH',147,'IZMINMESH',0,'IZMAXMESH',30,'KEY_SHIFT',0,'KEY_PERIODIQUE',1,'TRIANGULATION',1,'BOUNDARY',[80.0000,439.000])
-; on change de grille?:
-nothing=changegrid(meshparameters)
-; lecture du champ
-if keyword_set(date1in) then date1 = date1in else date1 = 10115
-if keyword_set(date2in) then date2 = date2in else date2 = 10115
-field = litchamp(read_ncdf('Diver', date1, date2,'',parent=1,boite=[80, 440, -79, 90, 0, 5] $
-, filename='/usr/work/sur/fvi/OPA/ORCA2/DivBustar_5d_1993_reg.nc' $
-, _extra=mixstru(ex, extra)))
-field = field
-field = create_struct({tab:field, grille:vargrid, unite:varunit, experience:varexp, nom:varname})
-; end of reading the field to draw
-;
-extra = create_struct('NOTHING',0,'MIN',0.00000,'MAX',0.00000,'INTER',0.00000,'LCT',39)
-plt, field $
-, boite=[80, 440, -79, 90, 0, 5], typein='plt', petit=[1,1,1] $
-, _extra= mixstru(ex, extra), NOERASE=noerase
-return
-end
