- Timestamp:
- Feb 26, 2015, 11:22:37 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r309 r310 2651 2651 '" does not have attribute: "units"' 2652 2652 units = None 2653 self.unitsval = None 2654 self.units = None 2655 self.calendar = None 2656 self.Urefdate = None 2657 self.Srefdate = None 2658 self.refdate = None 2659 if len(times.shape) == 1: 2660 self.dimt = len(times[:]) 2661 self.dt = times[1] - times[0] 2662 self.firstTu = times[0] 2663 self.firstTt = None 2664 self.firstTS = None 2665 self.firstTm = None 2666 self.lastTu = times[self.dimt] 2667 self.lastTt = None 2668 self.lastTS = None 2669 self.lastTm = None 2670 else: 2671 self.dimt = None 2672 self.dt = None 2673 self.firstTu = None 2674 self.firstTt = None 2675 self.firstTS = None 2676 self.firstTm = None 2677 self.lastTu = None 2678 self.lastTt = None 2679 self.lastTS = None 2680 self.lastTm = None 2653 2681 else: 2654 2682 units = times.getncattr('units') … … 13498 13526 else: 13499 13527 print warnmsg 13500 print ' ' + fname ": variable '"vn + "de' already exist!!"13528 print ' ' + fname + ": variable '" + vn + "de' already exist!!" 13501 13529 print ' replacing values' 13502 13530 newvar = onc.variables[vn + 'de'] … … 13506 13534 newattr = set_attribute(newvar, 'deaccumulated', 'True') 13507 13535 if timeinf.dt is not None: 13536 print timeinf.dt 13508 13537 newattr = set_attributek(newvar, 'time_step_diff', timeinf.dt, \ 13509 13538 'npfloat')
Note: See TracChangeset
for help on using the changeset viewer.