Index: trunk/SRC/Documentation/idldoc_html_output/Interpolation/fromirr.html
===================================================================
--- trunk/SRC/Documentation/idldoc_html_output/Interpolation/fromirr.html	(revision 112)
+++ trunk/SRC/Documentation/idldoc_html_output/Interpolation/fromirr.html	(revision 113)
@@ -717,5 +717,5 @@
 	
 	  <p class="header">
-	    <span class="result">result = </span>fromirr(<span class="result"><a href="#_fromirr_param_method">method</a>, <a href="#_fromirr_param_datain">datain</a>[, <a href="#_fromirr_param_lonin">lonin</a>][, <a href="#_fromirr_param_latin">latin</a>][, <a href="#_fromirr_param_mskin">mskin</a>][, <a href="#_fromirr_param_lonout">lonout</a>][, <a href="#_fromirr_param_latout">latout</a>][, <a href="#_fromirr_param_mskout">mskout</a>]</span>, <a href="#_fromirr_keyword_WEIG">WEIG</a>=<span class="result">WEIG</span>, <a href="#_fromirr_keyword_ADDR">ADDR</a>=<span class="result">ADDR</span>)</p>
+	    <span class="result">result = </span>fromirr(<span class="result"><a href="#_fromirr_param_method">method</a>, <a href="#_fromirr_param_datain">datain</a>, <a href="#_fromirr_param_lonin">lonin</a>, <a href="#_fromirr_param_latin">latin</a>, <a href="#_fromirr_param_mskin">mskin</a>, <a href="#_fromirr_param_lonout">lonout</a>, <a href="#_fromirr_param_latout">latout</a>, <a href="#_fromirr_param_mskout">mskout</a></span>, <a href="#_fromirr_keyword_WEIG">WEIG</a>=<span class="result">WEIG</span>, <a href="#_fromirr_keyword_ADDR">ADDR</a>=<span class="result">ADDR</span>)</p>
 	
 	  <div class="comments">
@@ -758,6 +758,6 @@
 	      <span class="attr">in</span>
 	      
-	      <span class="attr">optional</span>
-	      
+	      
+	      <span class="attr">required</span>
 	      
 	      
@@ -766,12 +766,11 @@
 	    </h4>
 	
-	  <div class="comments"> a 2D array defining the longitude of the input data
-           optionals if WEIG and ADDR keywords used.</div>
+	  <div class="comments"> a 2D array defining the longitude of the input data</div>
 	    
 	    <h4 id="_fromirr_param_latin">latin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 	      <span class="attr">in</span>
 	      
-	      <span class="attr">optional</span>
-	      
+	      
+	      <span class="attr">required</span>
 	      
 	      
@@ -780,12 +779,11 @@
 	    </h4>
 	
-	  <div class="comments"> a 2D array defining the latitude of the input data.
-                     optionals if WEIG and ADDR keywords used.</div>
+	  <div class="comments"> a 2D array defining the latitude of the input data.</div>
 	    
 	    <h4 id="_fromirr_param_mskin">mskin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 	      <span class="attr">in</span>
 	      
-	      <span class="attr">optional</span>
-	      
+	      
+	      <span class="attr">required</span>
 	      
 	      
@@ -799,6 +797,6 @@
 	      <span class="attr">in</span>
 	      
-	      <span class="attr">optional</span>
-	      
+	      
+	      <span class="attr">required</span>
 	      
 	      
@@ -807,12 +805,11 @@
 	    </h4>
 	
-	  <div class="comments"> 1D or 2D array defining the longitude of the output data.
-                       optionals if WEIG and ADDR keywords used.</div>
+	  <div class="comments"> 1D or 2D array defining the longitude of the output data.</div>
 	    
 	    <h4 id="_fromirr_param_latout">latout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 	      <span class="attr">in</span>
 	      
-	      <span class="attr">optional</span>
-	      
+	      
+	      <span class="attr">required</span>
 	      
 	      
@@ -821,12 +818,11 @@
 	    </h4>
 	
-	  <div class="comments"> 1D or 2D array defining the latitude of the output data.
-                       optionals if WEIG and ADDR keywords used.</div>
+	  <div class="comments"> 1D or 2D array defining the latitude of the output data.</div>
 	    
 	    <h4 id="_fromirr_param_mskout">mskout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 	      <span class="attr">in</span>
 	      
-	      <span class="attr">optional</span>
-	      
+	      
+	      <span class="attr">required</span>
 	      
 	      
@@ -869,10 +865,10 @@
 	    </h4>
 	
-	    <div class="comments">: 2D arrays, weig and addr are the weight and addresses used to
+	    <div class="comments"> 2D arrays, weig and addr are the weight and addresses used to
      perform the interpolation:
           dataout = total(weig*datain[addr], 1)
           dataout = reform(dataout, jpio, jpjo, /over)
-     Those keywords can be set to named variables into which the values will be
-     copied when the current routine exits. Next, they can be used to perform
+     Those keywords can be set to named variables (that are undefined or equal to 0) into which the
+     values will be copied when the current routine exits. Next, they can be used to perform
      the interpolation whithout computing again those 2 parameters. This greatly
      speed-up the interpolation! In that case, lonin, latin, lonout and latout are not necessary.
Index: trunk/SRC/Documentation/idldoc_html_output/Interpolation/fromreg.html
===================================================================
--- trunk/SRC/Documentation/idldoc_html_output/Interpolation/fromreg.html	(revision 112)
+++ trunk/SRC/Documentation/idldoc_html_output/Interpolation/fromreg.html	(revision 113)
@@ -719,5 +719,5 @@
 	
 	  <p class="header">
-	    <span class="result">result = </span>fromreg(<span class="result"><a href="#_fromreg_param_method">method</a>, <a href="#_fromreg_param_datain">datain</a>[, <a href="#_fromreg_param_lonin">lonin</a>][, <a href="#_fromreg_param_latin">latin</a>][, <a href="#_fromreg_param_lonout">lonout</a>], <a href="#_fromreg_param_latout">latout</a></span>, <a href="#_fromreg_keyword_WEIG">WEIG</a>=<span class="result">WEIG</span>, <a href="#_fromreg_keyword_ADDR">ADDR</a>=<span class="result">ADDR</span>, <a href="#_fromreg_keyword_NONORTHERNLINE">NONORTHERNLINE</a>=<span class="result">NONORTHERNLINE</span>, <a href="#_fromreg_keyword_NOSOUTHERNLINE">NOSOUTHERNLINE</a>=<span class="result">NOSOUTHERNLINE</span>)</p>
+	    <span class="result">result = </span>fromreg(<span class="result"><a href="#_fromreg_param_method">method</a>, <a href="#_fromreg_param_datain">datain</a>, <a href="#_fromreg_param_lonin">lonin</a>, <a href="#_fromreg_param_latin">latin</a>, <a href="#_fromreg_param_lonout">lonout</a>, <a href="#_fromreg_param_latout">latout</a></span>, <a href="#_fromreg_keyword_WEIG">WEIG</a>=<span class="result">WEIG</span>, <a href="#_fromreg_keyword_ADDR">ADDR</a>=<span class="result">ADDR</span>, <a href="#_fromreg_keyword_NONORTHERNLINE">NONORTHERNLINE</a>=<span class="result">NONORTHERNLINE</span>, <a href="#_fromreg_keyword_NOSOUTHERNLINE">NOSOUTHERNLINE</a>=<span class="result">NOSOUTHERNLINE</span>)</p>
 	
 	  <div class="comments">
@@ -761,6 +761,6 @@
 	      <span class="attr">in</span>
 	      
-	      <span class="attr">optional</span>
-	      
+	      
+	      <span class="attr">required</span>
 	      
 	      
@@ -769,12 +769,11 @@
 	    </h4>
 	
-	  <div class="comments">  longitude of the input data. optionals if
-            WEIG and ADDR keywords used.</div>
+	  <div class="comments">  1D or 2D array defining the longitude of the input data</div>
 	    
 	    <h4 id="_fromreg_param_latin">latin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 	      <span class="attr">in</span>
 	      
-	      <span class="attr">optional</span>
-	      
+	      
+	      <span class="attr">required</span>
 	      
 	      
@@ -783,12 +782,11 @@
 	    </h4>
 	
-	  <div class="comments">  latitude of the input data. optionals if
-            WEIG and ADDR keywords used.</div>
+	  <div class="comments">  1D or 2D array defining the latitude of the input data</div>
 	    
 	    <h4 id="_fromreg_param_lonout">lonout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 	      <span class="attr">in</span>
 	      
-	      <span class="attr">optional</span>
-	      
+	      
+	      <span class="attr">required</span>
 	      
 	      
@@ -797,8 +795,6 @@
 	    </h4>
 	
-	  <div class="comments">  longitude of the output data. optionals if
-            WEIG and ADDR keywords used.
-  latitude of the output data. optionals if
-            WEIG and ADDR keywords used.
+	  <div class="comments">  1D or 2D array defining the longitude of the output data
+  1D or 2D array defining the latitude of the output data
 </div>
 	    
@@ -851,6 +847,6 @@
           dataout = total(weig*datain[addr], 1)
           dataout = reform(dataout, jpio, jpjo, /over)
-     Those keywords can be set to named variables into which the values will be
-     copied when the current routine exits. Next, they can be used to perform
+     Those keywords can be set to named variables (that are undefined or equal to 0) into which the
+     values will be copied when the current routine exits. Next, they can be used to perform
      the interpolation whithout computing again those 2 parameters. In that
      case, lonin, latin, lonout and latout are not necessary.
Index: trunk/SRC/Documentation/idldoc_html_output/overview.html
===================================================================
--- trunk/SRC/Documentation/idldoc_html_output/overview.html	(revision 112)
+++ trunk/SRC/Documentation/idldoc_html_output/overview.html	(revision 113)
@@ -969,5 +969,5 @@
 	<tr>
 	  <td>Lines of code</td>
-	  <td class="value">       55805</td>
+	  <td class="value">       55797</td>
 	</tr>
       </table>
Index: trunk/SRC/Documentation/idldoc_html_output/search.js
===================================================================
--- trunk/SRC/Documentation/idldoc_html_output/search.js	(revision 112)
+++ trunk/SRC/Documentation/idldoc_html_output/search.js	(revision 113)
@@ -40,6 +40,6 @@
 a[38] = new Array("./Interpolation/cutsegment.html", "cutsegment.pro", "", "       file_comments cut p segments into p n equal parts      categories basic work      examples     res   cutsegment x0  y0  x1  y1  n               param x0 y0 and x1 y1   in required   1d arrays of p elements  the coordinates of           the endpoints of the p segmements            param  n  in required   the number of pieces we want to cut each segment        keyword          endpoints see ouputs      keyword          onsphere to specify that the points are located on a           sphere  In this case  x and y corresponds to longitude and           latitude in degrees       returns          defaut: a 3d array  2 n p  that gives the coordinates of the          middle of the cutted segments           if  endpoints  a 3d array  2 n 1 p  that gives the          coordinates of the endpoints of the cutted segments       examples       IDL  x0 2 5     IDL  y0 5 1     IDL  x1 9 3     IDL  y1 1 8     IDL  res cutsegment x0  y0  x1  y1  10     IDL  splot   0 10   0 10  xstyle   1  ystyle   1 nodata    IDL  oplot   x0 0  x1 0   y0 0  y1 0     IDL  oplot   res 0 0   res 1 0  color   20  psym   1  thick   3    IDL  oplot   x0 1  x1 1   y0 1  y1 1     IDL  oplot   res 0 1   res 1 1  color   40  psym   1  thick   3      history             S  Masson  smasson lodyc jussieu fr              July 5th  2002   FUNCTION cutsegment  x0  y0  x1  y1  n  endpoints   endpoints  onsphere   onsphere   number of segment   nseg   n_elements x0     number of point to find on each segment   n2find   n keyword_set endpoints       IF keyword_set onsphere  THEN BEGIN   save the inputs arrays     x0in   temporary x0      y0in   temporary y0      x1in   temporary x1      y1in   temporary y1      sp_cood    transpose x0in transpose y0in replicate 1  1  nseg      rect_coord   CV_COORD FROM_SPHERE   temporary sp_cood   TO_RECT   DEGREES      x0   rect_coord 0        y0   rect_coord 1        z0   rect_coord 2        rect_coord    1  free memory     sp_cood    transpose x1in transpose y1in replicate 1  1  nseg      rect_coord   CV_COORD FROM_SPHERE   temporary sp_cood   TO_RECT   DEGREES      x1   rect_coord 0        y1   rect_coord 1        z1   rect_coord 2        rect_coord    1  free memory   ENDIF     resx   replicate 1  n2find x0    resx   temporary resx 1 n findgen n2find                                     5 1 keyword_set endpoints x1 x0    resx    temporary resx      resy   replicate 1  n2find y0    resy   temporary resy 1 n findgen n2find                                     5 1 keyword_set endpoints y1 y0    resy    temporary resy     IF keyword_set onsphere  THEN BEGIN     resz   replicate 1  n2find z0      resz   temporary resz 1 n findgen n2find                                       5 1 keyword_set endpoints z1 z0      resz    temporary resz       rec_cood    transpose temporary resx  transpose temporary resy                      transpose temporary resz      res   CV_COORD FROM_RECT   temporary rec_cood   TO_SPHERE   DEGREES    restore the input arrays     x0   temporary x0in      y0   temporary y0in      x1   temporary x1in      y1   temporary y1in    ENDIF ELSE res    transpose temporary resx  transpose temporary resy     res   reform res 0:1    2  n2find  nseg   overwrite     RETURN  res END");
 a[39] = new Array("./Interpolation/extrapolate.html", "extrapolate.pro", "", "     file_comments extrapolate data  zinput  where maskinput eq 0 by filling step by   step the coastline points with the mean value of the 8 neighbourgs      FUNCTION extrapolate  zinput  maskinput  nb_iteration  x_periodic   x_periodic  MINVAL   minval  MAXVAL   maxval     compile_opt strictarr  strictarrsubs      check the number of iteration used in the extrapolation    IF n_elements nb_iteration  EQ 0 THEN nb_iteration   10 E20   IF nb_iteration EQ 0 THEN return  zinput   nx    size zinput 1    ny    size zinput 2    take care of the boundary conditions       for the x direction  we put 2 additional columns at the left and   right side of the array     for the y direction  we put 2 additional lines at the bottom and   top side of the array     These changes allow us to use shift function without taking care of   the x and y periodicity      ztmp   bytarr nx 2  ny 2    ztmp 1:nx  1:ny    byte maskinput    msk   temporary ztmp      ztmp   replicate 1 e20  nx 2  ny 2    ztmp 1:nx  1:ny    zinput   if keyword_set x_periodic  then begin     ztmp 0  1:ny    zinput nx 1        ztmp nx 1  1:ny    zinput 0      ENDIF   remove NaN points if there is some    nan   where finite ztmp  EQ 0  cnt_nan    IF cnt_nan NE 0 THEN ztmp temporary nan    1 e20   z   temporary ztmp    nx2   nx 2   ny2   ny 2       extrapolation      sqrtinv   1 sqrt 2      cnt   1   When we look for the coast line  we don t whant to select the   borderlines of the array    we force the value of the mask for   those lines    msk 0      1b   msk nx 1      1b   msk  0    1b   msk  ny 1    1b   find the land points   land   where msk EQ 0  cnt_land      WHILE cnt LE nb_iteration AND cnt_land NE 0 DO BEGIN     find the coast line points      Once the land points list has been found  we change back the the   mask values for the boundary conditions      msk 0      0b     msk nx 1      0b     msk  0    0b     msk  ny 1    0b     if keyword_set x_periodic  then begin       msk 0      msk nx          msk nx 1      msk 1        endif     we compute the weighted number of sea neighbourgs    those 4 neighbours have a weight of 1:                                          those 4 neighbours have a weight of 1 sqrt 2 :                                        As we make sure that none of the land points are located on the   border of the array  we can compute the weight without shift    faster        weight   msk land 1 msk land 1 msk land nx2 msk land nx2                  sqrtinv msk land nx2 1 msk land nx2 1                            msk land nx2 1 msk land nx2 1    list all the points that have sea neighbourgs     ok   where weight GT 0    the coastline points     coast   land ok    their weighted number of sea neighbourgs      weight   weight temporary ok      fill the coastine points       z   temporary z msk       zcoast   z 1 coast z 1 coast z nx2 coast z nx2 coast                  1 sqrt 2 z nx2 1 coast z nx2 1 coast                               z nx2 1 coast z nx2 1 coast            IF n_elements minval  NE 0 THEN zcoast   minval   temporary zcoast      IF n_elements maxval  NE 0 THEN zcoast   temporary zcoast   we force the value of the mask for   those lines      msk 0      1b     msk nx 1      1b     msk  0    1b     msk  ny 1    1b   find the land points     land   where msk EQ 0  cnt_land      ENDWHILE     we return the original size of the array        return  z 1:nx  1:ny  END  ");
-a[40] = new Array("./Interpolation/fromirr.html", "fromirr.pro", "", "       file_comments interpolate data from an irregular 2D grid to any 2D grid      Only 1 metod available: bilinear         categories interpolation      examples     dataout   fromirr method  datain   lonin  latin  mskin  lonout  latout  mskout          param method:  in required  a string defining the interpolation method  must be  bilinear        param datain:  in required  a 2D array the input data to interpolate       param lonin:  in optional  a 2D array defining the longitude of the input data             optionals if WEIG and ADDR keywords used        param latin:  in optional  a 2D array defining the latitude of the input data                        optionals if WEIG and ADDR keywords used        param mskin:  in optional  a 2D array  the land sea mask of the input data  1 on ocean  0 on land        param lonout:  in optional  1D or 2D array defining the longitude of the output data                          optionals if WEIG and ADDR keywords used        param latout:  in optional  1D or 2D array defining the latitude of the output data                          optionals if WEIG and ADDR keywords used        param mskout:  in optional  a 2D array  the land sea mask of the ouput data  1 on ocean  0 on land       keyword WEIG  see ADDR     keyword ADDR: 2D arrays  weig and addr are the weight and addresses used to       perform the interpolation:            dataout   total weig datain addr  1             dataout   reform dataout  jpio  jpjo   over        Those keywords can be set to named variables into which the values will be       copied when the current routine exits  Next  they can be used to perform       the interpolation whithout computing again those 2 parameters  This greatly       speed up the interpolation  In that case  lonin  latin  lonout and latout are not necessary       returns 2D array: the interpolated data      restrictions We supposed the data are located on a sphere  with a periodicity along                the longitude                 Note that the input data can contain the same cells several times                like ORCA grid near the north pole boundary       examples        tncep   fromirr bilinear  topa  glamt  gphit  tmask 0  lonout  latout  mskout       or       t1ncep   fromirr bilinear  topa  glamt  gphit  tmask 0  lonout  latout  mskout                                  WEIG   a  ADDR   b     help  a  b    t2ncep   fromirr bilinear  topa  WEIG   a  ADDR   b       history    June 2006: Sebastien Masson  smasson lodyc jussieu fr              FUNCTION fromirr  method  datain  lonin  latin  mskin  lonout  latout  mskout                       WEIG   weig  ADDR   addr     compile_opt strictarr  strictarrsubs      IF NOT  keyword_set weig  AND keyword_set addr  THEN BEGIN     atmospheric grid parameters       alon   lonin     alat   latin     get_gridparams  alon  alat  jpia  jpja  2   double     Oceanic grid parameters       olon   lonout     olat   latout     get_gridparams  olon  olat  jpio  jpjo  2   double     Compute weight and address       CASE method OF        bilinear :compute_fromirr_bilinear_weigaddr  alon  alat  mskin  olon  olat  mskout  weig  addr       ELSE:BEGIN          print    unknown interpolation method  we stop          stop       ENDELSE     ENDCASE   ENDIF     to the interpolation     dataout   total weig datain addr  1    dataout   reform dataout  jpio  jpjo   over      RETURN  dataout END");
-a[41] = new Array("./Interpolation/fromreg.html", "fromreg.pro", "", "       file_comments interpolate data from a  regular rectangular grid  to any grid      2 metods availables: bilinear and imoms3      A  regular rectangular grid  is defined as a grid for which each lontitudes lines have      the same latitude and each latitudes columns have the same longitude          categories interpolation      examples     dataout   fromreg method  datain   lonin  latin  lonout  latout          param method  in required   a string defining the interpolation method                must be  bilinear  or  imoms3        param datain  in required   a 2D array the input data to interpolate       param lonin  in optional   longitude of the input data  optionals if              WEIG and ADDR keywords used        param latin  in optional   latitude of the input data  optionals if              WEIG and ADDR keywords used        param lonout  in optional   longitude of the output data  optionals if              WEIG and ADDR keywords used        param lonout  in optional   latitude of the output data  optionals if              WEIG and ADDR keywords used       keyword     WEIG  see ADDR     keyword     ADDR 2D arrays  weig and addr are the weight and addresses used to       perform the interpolation:            dataout   total weig datain addr  1             dataout   reform dataout  jpio  jpjo   over        Those keywords can be set to named variables into which the values will be       copied when the current routine exits  Next  they can be used to perform       the interpolation whithout computing again those 2 parameters  In that       case  lonin  latin  lonout and latout are not necessary       keyword      NONORTHERNLINE and  NOSOUTHERNLINE activate if you don t whant to take into            account the northen southern line of the input data when perfoming the            interpolation       returns 2D array: the interpolated data      restrictions We supposed the data are located on a sphere  with a    periodicity along the longitude       examples          topa   fromreg bilinear  tncep  xncep  yncep  glamt  gphit       or       t1opa   fromreg bilinear  t1ncep  xncep  yncep  glamt  gphit  WEIG   a  ADDR   b     help  a  b    t2opa   fromreg bilinear  t2ncep  xncep  WEIG   a  ADDR   b       history    November 2005: Sebastien Masson  smasson lodyc jussieu fr              FUNCTION fromreg  method  datain  lonin  latin  lonout  latout                       WEIG   weig  ADDR   addr                       NONORTHERNLINE   nonorthernline                       NOSOUTHERNLINE   nosouthernline     compile_opt strictarr  strictarrsubs      IF NOT  keyword_set weig  AND keyword_set addr  THEN BEGIN     atmospheric grid parameters       alon   lonin     alat   latin     get_gridparams  alon  alat  jpia  jpja  1   double     Oceanic grid parameters       olon   lonout     olat   latout     get_gridparams  olon  olat  jpio  jpjo  2   double     Compute weight and address       CASE method OF        bilinear :compute_fromreg_bilinear_weigaddr  alon  alat  olon  olat  weig  addr  NONORTHERNLINE   nonorthernline  NOSOUTHERNLINE   nosouthernline        imoms3 :  compute_fromreg_imoms3_weigaddr    alon  alat  olon  olat  weig  addr  NONORTHERNLINE   nonorthernline  NOSOUTHERNLINE   nosouthernline       ELSE:BEGIN          print    unknown interpolation method  we stop          stop       ENDELSE     ENDCASE   ENDIF     dataout   total weig datain addr  1    dataout   reform dataout  jpio  jpjo   over      RETURN  dataout END");
+a[40] = new Array("./Interpolation/fromirr.html", "fromirr.pro", "", "       file_comments interpolate data from an irregular 2D grid to any 2D grid      Only 1 metod available: bilinear         categories interpolation      examples     dataout   fromirr method  datain   lonin  latin  mskin  lonout  latout  mskout          param method:  in required  a string defining the interpolation method  must be  bilinear        param datain:  in required  a 2D array the input data to interpolate       param lonin:  in required  a 2D array defining the longitude of the input data       param latin:  in required  a 2D array defining the latitude of the input data        param mskin:  in required  a 2D array  the land sea mask of the input data  1 on ocean  0 on land        param lonout:  in required  1D or 2D array defining the longitude of the output data        param latout:  in required  1D or 2D array defining the latitude of the output data        param mskout:  in required  a 2D array  the land sea mask of the ouput data  1 on ocean  0 on land       keyword WEIG  see ADDR     keyword ADDR 2D arrays  weig and addr are the weight and addresses used to       perform the interpolation:            dataout   total weig datain addr  1             dataout   reform dataout  jpio  jpjo   over        Those keywords can be set to named variables  that are undefined or equal to 0  into which the       values will be copied when the current routine exits  Next  they can be used to perform       the interpolation whithout computing again those 2 parameters  This greatly       speed up the interpolation  In that case  lonin  latin  lonout and latout are not necessary       returns 2D array: the interpolated data      restrictions We supposed the data are located on a sphere  with a periodicity along                the longitude                 Note that the input data can contain the same cells several times                like ORCA grid near the north pole boundary       examples        tncep   fromirr bilinear  topa  glamt  gphit  tmask 0  lonout  latout  mskout       or       t1ncep   fromirr bilinear  topa  glamt  gphit  tmask 0  lonout  latout  mskout                                  WEIG   a  ADDR   b     help  a  b    t2ncep   fromirr bilinear  topa  WEIG   a  ADDR   b       history    June 2006: Sebastien Masson  smasson lodyc jussieu fr              FUNCTION fromirr  method  datain  lonin  latin  mskin  lonout  latout  mskout                       WEIG   weig  ADDR   addr     compile_opt strictarr  strictarrsubs        atmospheric grid parameters       alon   lonin     alat   latin     get_gridparams  alon  alat  jpia  jpja  2   double     Oceanic grid parameters       olon   lonout     olat   latout     get_gridparams  olon  olat  jpio  jpjo  2   double     Compute weight and address     IF NOT  keyword_set weig  AND keyword_set addr  THEN BEGIN     CASE method OF        bilinear :compute_fromirr_bilinear_weigaddr  alon  alat  mskin  olon  olat  mskout  weig  addr       ELSE:BEGIN          print    unknown interpolation method  we stop          stop       ENDELSE     ENDCASE   ENDIF     to the interpolation     dataout   total weig datain addr  1    dataout   reform dataout  jpio  jpjo   over      RETURN  dataout END");
+a[41] = new Array("./Interpolation/fromreg.html", "fromreg.pro", "", "       file_comments interpolate data from a  regular rectangular grid  to any grid      2 metods availables: bilinear and imoms3      A  regular rectangular grid  is defined as a grid for which each lontitudes lines have      the same latitude and each latitudes columns have the same longitude          categories interpolation      examples     dataout   fromreg method  datain   lonin  latin  lonout  latout          param method  in required   a string defining the interpolation method                must be  bilinear  or  imoms3        param datain  in required   a 2D array the input data to interpolate       param lonin  in required   1D or 2D array defining the longitude of the input data       param latin  in required   1D or 2D array defining the latitude of the input data       param lonout  in required   1D or 2D array defining the longitude of the output data       param lonout  in required   1D or 2D array defining the latitude of the output data      keyword     WEIG  see ADDR     keyword     ADDR 2D arrays  weig and addr are the weight and addresses used to       perform the interpolation:            dataout   total weig datain addr  1             dataout   reform dataout  jpio  jpjo   over        Those keywords can be set to named variables  that are undefined or equal to 0  into which the       values will be copied when the current routine exits  Next  they can be used to perform       the interpolation whithout computing again those 2 parameters  In that       case  lonin  latin  lonout and latout are not necessary       keyword      NONORTHERNLINE and  NOSOUTHERNLINE activate if you don t whant to take into            account the northen southern line of the input data when perfoming the            interpolation       returns 2D array: the interpolated data      restrictions We supposed the data are located on a sphere  with a    periodicity along the longitude       examples          topa   fromreg bilinear  tncep  xncep  yncep  glamt  gphit       or       t1opa   fromreg bilinear  t1ncep  xncep  yncep  glamt  gphit  WEIG   a  ADDR   b     help  a  b    t2opa   fromreg bilinear  t2ncep  xncep  WEIG   a  ADDR   b       history    November 2005: Sebastien Masson  smasson lodyc jussieu fr              FUNCTION fromreg  method  datain  lonin  latin  lonout  latout                       WEIG   weig  ADDR   addr                       NONORTHERNLINE   nonorthernline                       NOSOUTHERNLINE   nosouthernline     compile_opt strictarr  strictarrsubs        atmospheric grid parameters       alon   lonin     alat   latin     get_gridparams  alon  alat  jpia  jpja  1   double     Oceanic grid parameters       olon   lonout     olat   latout     get_gridparams  olon  olat  jpio  jpjo  2   double     Compute weight and address     IF NOT  keyword_set weig  AND keyword_set addr  THEN BEGIN     CASE method OF        bilinear :compute_fromreg_bilinear_weigaddr  alon  alat  olon  olat  weig  addr  NONORTHERNLINE   nonorthernline  NOSOUTHERNLINE   nosouthernline        imoms3 :  compute_fromreg_imoms3_weigaddr    alon  alat  olon  olat  weig  addr  NONORTHERNLINE   nonorthernline  NOSOUTHERNLINE   nosouthernline       ELSE:BEGIN          print    unknown interpolation method  we stop          stop       ENDELSE     ENDCASE   ENDIF     dataout   total weig datain addr  1    dataout   reform dataout  jpio  jpjo   over      RETURN  dataout END");
 a[42] = new Array("./Interpolation/get_gridparams.html", "get_gridparams.pro", "", "       file_comments      1  extract from a NetCDF file the longitude  latidude  and their dimensions        and make sure it is 1D or 2D arrays           or 2  given longitude and latitude arrays get their dimensions and make sure         they are 1D or 2D arrays       categories interpolation      examples       1  get_gridparams  file  lonname  latname  lon  lat  jpi  jpj  n_dimensions     or      2  get_gridparams  lon  lat  jpi  jpj  n_dimensions     1      param in1  in required   the name of the netcdf file     param in2  in required   the name of the variable that contains the longitude in the NetCDF file     param in3  in required   the name of the variable that contains the latitude in the NetCDF file     param in4   out  the number of points in the longitudinal direction     param in5   out  the number of points in the latitudinal direction    param in6  out  the variable that will contain the longitudes     param in7   out  the variable that will contain the latitudes     param in8  out  1 or 2 to specify if lon and lat should be 1D  jpi or jpj      or      2      param in1  in required   1d or 2D arrays defining longitudes and latitudes      param in2  in required   1d or 2D arrays defining longitudes and latitudes        Note that these arrays are also outputs and can therefore be modified       param in1  out  the variable that will contain the longitudes     param in2   out  the variable that will contain the latitudes     param in3   in  the number of points in the longitudinal direction     param in4   in  the number of points in the latitudinal direction     param in5  in  1 or 2 to specify if lon and lat should be 1D  jpi or jpj       arrays or 2D arrays  jpi jpj  Note that of  n_dimensions   1  then the      grid must be regular  each longitudes must be the same for all latitudes      and each latitudes should be the sae for all longitudes        examples        1  ncdf_get_gridparams   coordinates_ORCA_R05 nc   glamt   gphit                   olon  olat  jpio  jpjo  2     2  ncdf_get_gridparams  olon  olat  jpio  jpjo  2      history    November 2005: Sebastien Masson  smasson lodyc jussieu fr                 PRO get_gridparams  in1    in2    in3      in4  in5  in6  in7  in8  DOUBLE   double                    file  lonname  latname  lon  lat  jpi  jpj  n_dimensions                     lon    lat    jpi      jpj  n_dimensions     CASE n_params  OF     8:BEGIN   get longitude and latitude       IF file_test in1  EQ 0 THEN BEGIN          print   file     in1     does not exist          stop       ENDIF       cdfido   ncdf_open in1        ncdf_varget  cdfido  in2  lon       ncdf_varget  cdfido  in3  lat       ncdf_close  cdfido        n_dimensions   in8     END     5:BEGIN        lon   temporary in1        lat   temporary in2        n_dimensions   in5     END     ELSE:BEGIN        print   Bad nimber of input parameters        stop     end   ENDCASE     sizelon   size lon    sizelat   size lat    CASE 1 OF      lon and lat are 1D arrays       sizelon 0  EQ 1 AND sizelat 0  EQ 1:BEGIN    get jpi and jpj       jpi   sizelon 1        jpj   sizelat 1    make sure that lon and lat have the good number of dimensions       CASE n_dimensions OF          1:         2:BEGIN   make lon and lat 2D arrays           lon   temporary lon    replicate 1  jpj            lat   replicate 1  jpi    temporary lat          END         ELSE:stop       ENDCASE     END     lon is 2D array and lat is 1D array       sizelon 0  EQ 2 AND sizelat 0  EQ 1:BEGIN    get jpi and jpj       jpi   sizelon 1        jpj   sizelon 2        IF jpj NE n_elements lat  THEN stop   make sure that lon and lat have the good number of dimensions       CASE n_dimensions OF          1:BEGIN            IF array_equal lon  lon  0    replicate 1  jpj  NE 1 THEN BEGIN              print   Longitudes are not the same for all latitudes  imposible to extract a 1D array of the longitudes              stop           ENDIF           lon   lon  0          END         2:lat   replicate 1  jpi    temporary lat          ELSE:stop       ENDCASE     END     lon is 1D array and lat is 2D array       sizelon 0  EQ 1 AND sizelat 0  EQ 2:BEGIN    get jpi and jpj       jpi   sizelat 1        jpj   sizelat 2        IF jpi NE n_elements lon  THEN stop   make sure that lon and lat have the good number of dimensions       CASE n_dimensions OF          1:BEGIN            IF array_equal lat  replicate 1  jpi    lat 0    NE 1 THEN BEGIN              print   Latitudes are not the same for all longitudes  imposible to extract a 1D array of the latitudes              stop           ENDIF           lat   reform lat 0            END         2:lon   temporary lon    replicate 1  jpj          ELSE:stop       ENDCASE     END     lon and lat are 2D arrays       sizelon 0  EQ 2 AND sizelat 0  EQ 2:BEGIN    get jpi and jpj       IF array_equal sizelon 1:2  sizelat 1:2  NE 1 THEN stop       jpi   sizelon 1        jpj   sizelon 2          make sure that lon and lat have the good number of dimensions       CASE n_dimensions OF          1:BEGIN            IF array_equal lon  lon  0    replicate 1  jpj  NE 1 THEN BEGIN              print   Longitudes are not the same for all latitudes  imposible to extract a 1D array of the longitudes              stop           ENDIF           lon   lon  0            IF array_equal lat  replicate 1  jpi    reform lat 0    NE 1 THEN BEGIN              print   Latitudes are not the same for all longitudes  imposible to extract a 1D array of the latitudes              stop           ENDIF         lat   reform lat 0            END         2:         ELSE:stop       ENDCASE     END     lon and lat are not 1D and or 2D arrays       ELSE:stop   ENDCASE       double keyword     if keyword_set double  then BEGIN      lon   double temporary lon      lat   double temporary lat    ENDIF     give back the right outparameters       CASE n_params  OF     8:BEGIN       in4   temporary lon        in5   temporary lat        in6   temporary jpi        in7   temporary jpj      END     5:BEGIN       in1   temporary lon        in2   temporary lat        in3   temporary jpi        in4   temporary jpj      END   ENDCASE    return END");
 a[43] = new Array("./Interpolation/imoms3.html", "imoms3.pro", "", "       FUNCTION imoms3  xin    x   abs xin    y   fltarr n_elements x      test1   where x LT 1    IF test1 0  NE  1 THEN BEGIN     xtmp   x test1      y test1    0 5 xtmp xtmp xtmp  xtmp xtmp  0 5 xtmp   1   ENDIF   test1   where x LT 2 AND x GE 1    IF test1 0  NE  1 THEN BEGIN     xtmp   x test1      y test1     1 6 xtmp xtmp xtmp   xtmp xtmp    11 6 xtmp   1   ENDIF    RETURN  y END");
