Changeset 421 for trunk/SRC


Ignore:
Timestamp:
02/02/10 09:47:19 (14 years ago)
Author:
smasson
Message:

make sure that x[y]min[max]mesh are properly used

Location:
trunk/SRC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Grid/computegrid.pro

    r399 r421  
    232232; if (we did not activate /plain and xminmesh, xmaxmesh, yminmesh, 
    233233; ymaxmesh keywords are defined to their default values), we redefine 
    234 ; xminmesh, xmaxmesh, yminmesh, ymaxmesh in order to reove the 
     234; xminmesh, xmaxmesh, yminmesh, ymaxmesh in order to remove the 
    235235; overlapping part and/or to open the domain (avoid it be forced 
    236236; to use cell_fill = 1). 
     
    362362  IF strlen(key_gridtype) EQ 3 THEN fullcgrid = 1 
    363363; 
    364   IF n_elements(xminmesh) NE 0 AND n_elements(xmaxmesh) NE 0 THEN BEGIN 
     364  IF n_elements(xminmesh) NE 0 OR n_elements(xmaxmesh) NE 0 THEN BEGIN 
     365    IF n_elements(xminmesh) EQ 0 THEN xminmesh = ixminmesh 
     366    IF n_elements(xmaxmesh) EQ 0 THEN xmaxmesh = ixmaxmesh 
    365367    IF nx EQ jpi AND xminmesh EQ ixminmesh AND xmaxmesh EQ ixmaxmesh THEN xalreadycut = 1 
    366368  ENDIF 
     
    383385  ENDELSE 
    384386 
    385   IF n_elements(yminmesh) NE 0 AND n_elements(ymaxmesh) NE 0 THEN BEGIN 
     387  IF n_elements(yminmesh) NE 0 OR n_elements(ymaxmesh) NE 0 THEN BEGIN 
     388    IF n_elements(yminmesh) EQ 0 THEN yminmesh = iyminmesh 
     389    IF n_elements(ymaxmesh) EQ 0 THEN ymaxmesh = iymaxmesh 
    386390    IF ny EQ jpj AND yminmesh EQ iyminmesh AND ymaxmesh EQ iymaxmesh THEN yalreadycut = 1 
    387391  ENDIF 
  • trunk/SRC/ToBeReviewed/INIT/initncdf.pro

    r371 r421  
    2424; x/yaxis = keyword_set(start1) + findgen(jpi/jpj) 
    2525; this forces key_onearth = 0 
     26; 
     27; @keyword XMINMESH {default=0L}{type=scalar} 
     28; Define common (cm_4mesh) variables ixminmesh used to define the localization 
     29; of the first point of the grid along the x direction in a zoom of the original grid 
     30; 
     31; @keyword YMINMESH {default=0L}{type=scalar} 
     32; Define common (cm_4mesh) variables iyminmesh used to define the localization 
     33; of the first point of the grid along the y direction in a zoom of the original grid 
     34; 
     35; @keyword XMAXMESH {default=jpiglo-1}{type=scalar} 
     36; Define common (cm_4mesh) variables ixmaxmesh used to define the localization 
     37; of the last point of the grid along the x direction in a zoom of the original grid 
     38; Note that if XMAXMESH < 0 then ixmaxmesh is defined as ixmaxmesh = jpiglo -1 + xmaxmesh 
     39; 
     40; @keyword YMAXMESH {default=jpjglo-1}{type=scalar} 
     41; Define common (cm_4mesh) variables iymaxmesh used to define the localization 
     42; of the last point of the grid along the y direction in a zoom of the original grid 
     43; Note that if YMAXMESH < 0 then iymaxmesh is defined as iymaxmesh = jpjglo -1 + ymaxmesh 
    2644; 
    2745; @keyword ZINDEX {default=0}{type=scalar: 0 or 1} 
     
    5573;- 
    5674PRO initncdf, ncfilein $ 
     75              , XMINMESH = xminmesh, XMAXMESH = xmaxmesh $ 
     76              , YMINMESH = yminmesh, YMAXMESH = ymaxmesh $ 
    5777              , ZAXISNAME=zaxisname, START1=start1 $ 
    5878              , XYINDEX=xyindex, ZINDEX=zindex $ 
     
    86106; find the x/yaxis 
    87107 ncdf_getaxis, cdfid, dimidx, dimidy, xaxis, yaxis $ 
     108               , XMINMESH = xminmesh, XMAXMESH = xmaxmesh $ 
     109               , YMINMESH = yminmesh, YMAXMESH = ymaxmesh $ 
    88110               , START1 = start1, XYINDEX = xyindex, ROMSGRID = romsgrid, _extra = ex 
    89111;---------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.