Changeset 344 for trunk


Ignore:
Timestamp:
04/15/08 13:05:43 (16 years ago)
Author:
smasson
Message:

small improvements

Location:
trunk/SRC
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ReadWrite/ncdf_getatt.pro

    r338 r344  
    104104            'noleap':calendar = 'noleap' 
    105105            '360d':calendar = '360d' 
    106             'greg':IF n_elements(calendar) EQ 0 THEN calendar = 'greg' 
    107             ELSE:BEGIN 
    108 ;            notused = report('Unknown calendar: '+tmp+', we use greg calendar.') 
    109               calendar = 'greg' 
    110             END 
     106            'greg':calendar = 'greg' 
     107            '360_day':calendar = '360d' 
     108            '365_day':calendar = 'noleap' 
     109            'gregorian': calendar = 'greg' 
     110            ELSE:notused = report('Unknown calendar: '+tmp+', we use greg calendar.') 
    111111          ENDCASE 
    112112        END 
  • trunk/SRC/ReadWrite/ncdf_gettime.pro

    r327 r344  
    129129; If no, we suppose that the calendar is gregorian calendar 
    130130; 
    131   if (where(attnames EQ 'calendar'))[0] NE -1 then BEGIN 
    132     ncdf_attget, cdfid, timeid, 'calendar', value 
    133     value = strlowcase(strtrim(value, 2)) 
    134 ; unpade cm_4cal variable key_caltype (used by julday and caldat) 
    135     CASE value OF 
    136       'noleap':key_caltype = 'noleap' 
    137       '360d':key_caltype = '360d' 
    138       'greg':IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' 
    139       ELSE:BEGIN 
    140 ;            notused = report('Unknown calendar: '+value+', we use greg calendar.') 
    141         key_caltype = 'greg' 
    142       END 
    143     ENDCASE 
    144   ENDIF ELSE BEGIN 
    145 ;        notused = report('Unknown calendar, we use '+key_caltype+' calendar.') 
    146     IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' 
    147   ENDELSE 
     131  ncdf_getatt, cdfid, timeid, calendar = calendar, units = value 
     132  CASE calendar OF 
     133    'noleap':key_caltype = 'noleap' 
     134    '360d':key_caltype = '360d' 
     135    'greg':key_caltype = 'greg' 
     136  ENDCASE 
    148137;---------------------------------------------------- 
    149138; decode units attribute 
    150139;---------------------------------------------------- 
    151   ncdf_attget, cdfid, timeid, 'units', value 
    152140; 
    153141; time_counter:units = "seconds since 0001-01-01 00:00:00" ; 
  • trunk/SRC/ToBeReviewed/PLOTS/legende.pro

    r327 r344  
    8585  IF key_onearth THEN lattitle = 'Latitude' ELSE lattitle = 'j index' 
    8686 
    87   vertz = depthf2 
    88   legniv = ' m' 
    8987  IF keyword_set(TYPE_YZ) THEN BEGIN 
    90     IF type_yz EQ 'hPa' THEN vertz = 'hPa' 
    91     IF type_yz EQ 'hPa' THEN legniv = ' hPa' 
    92   ENDIF 
     88    vertz = type_yz 
     89    legniv = ' '+type_yz 
     90  ENDIF ELSE BEGIN  
     91    vertz = depthf2 
     92    legniv = ' m' 
     93  ENDELSE  
    9394; 
    9495; Start legende 
     
    160161        IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lataxe(0, 0, lat1), 1) ELSE !x.title = !x.title+' at j index '+strtrim(lat1, 1) 
    161162      ENDIF 
    162       !y.title = depthf2 
     163      !y.title = vertz 
    163164    end 
    164165 
     
    203204;         IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n=strtrim(nx*ny, 1) 
    204205      !p.title = hovzt+varexp+fieldf+varname 
    205       !y.title = depthf2 
     206      !y.title = vertz 
    206207      IF (time[(size(time))[0]-1] - time[0]) GE 10 THEN !x.title = timef 
    207208    end 
     
    239240      IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n = strtrim(nx*ny, 1) 
    240241      !p.title = varexp+datef+svardate+fieldf+varname 
    241       !y.title = depthf2 
     242      !y.title = vertz 
    242243      !x.title = varname 
    243244    end 
Note: See TracChangeset for help on using the changeset viewer.