Ignore:
Timestamp:
01/26/08 10:18:52 (16 years ago)
Author:
ericg
Message:

Misc modifs, incl. read_from_grid in yfx, debug_w prints, removal of mesh_lmdz and small bug corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/procs/meshes/mesh_from_file.pro

    r26 r41  
    4040         ELSE: var_local = var_read_grd_file 
    4141      ENDCASE  
     42      IF strpos(var_local, '=f(next)') NE -1 THEN BEGIN 
     43         idx = strpos(var_local, '=f(') 
     44         var_local = strmid(var_local, 0, idx) 
     45      ENDIF  
     46 
     47      IF debug_w THEN print, '   var_local = ', var_local 
    4248 
    4349      ; find valmask 
     
    4955      FOR i = 0, varcontient.natts-1 DO BEGIN 
    5056         att_txt = ncdf_attname(cdfidl, varidl, i) 
    51          IF att_txt EQ 'missing_value' OR att_txt EQ 'mask value' OR att_txt EQ '_FillValue' THEN ncdf_attget, cdfidl, varidl, att_txt, valmask 
    52          IF debug_w THEN print, 'valmask found = ',valmask  
     57         IF att_txt EQ 'missing_value' OR att_txt EQ 'mask value' OR att_txt EQ '_FillValue' THEN BEGIN  
     58            ncdf_attget, cdfidl, varidl, att_txt, valmask 
     59            IF debug_w THEN print, '     valmask found = ',valmask, ' in attribute ', att_txt 
     60         ENDIF  
    5361      ENDFOR  
    5462      ncdf_close, cdfidl 
    55       ; read grid 
    56       initncdf, s_file, USEASMASK = var_local, missing_value = valmask, GLAMBOUNDARY = glamboundary_box, ZAXISNAME = 'depth' 
    57  
     63      ; build grid 
     64      CASE mesh_type of 
     65         'atm': initncdf, s_file, GLAMBOUNDARY = glamboundary_box, ZAXISNAME = name_level 
     66         ELSE: initncdf, s_file, USEASMASK = var_local, missing_value = valmask, GLAMBOUNDARY = glamboundary_box, ZAXISNAME = 'depth' 
     67      ENDCASE  
     68      IF debug_w THEN print,  '     Grid info after initncdf :' 
     69      IF debug_w THEN print,  '     glamt :', size(glamt) 
     70      IF debug_w THEN print,  '     gphit :', size(gphit) 
     71      IF debug_w THEN print,  '     gdept :', size(gdept) 
     72       
    5873   ENDELSE  
    5974 
     
    6580; 
    6681   diaznl_idx = 1 
    67    IF debug_w THEN print, '     model, vargrid, varexp at exit = ',model, vargrid,  varexp 
     82   IF debug_w THEN print, '     model, vargrid, varexp at exit = ',model, ' ', vargrid,' ',  varexp 
    6883   IF debug_w THEN print, '  ...EXIT mesh_from_file' 
     84   IF debug_w THEN print, '  ' 
    6985 
    7086  return 
Note: See TracChangeset for help on using the changeset viewer.