Changeset 2515 in lmdz_wrf
- Timestamp:
- May 7, 2019, 2:54:28 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/nc_var_tools.py
r2511 r2515 2614 2614 self.firstTt = gen.timeref_datetime(self.refdate, self.firstTu, \ 2615 2615 self.units, cal) 2616 if self.firs Tt.year >= 1900:2616 if self.firstTt.year >= 1900: 2617 2617 self.firstTS = self.firstTt.strftime("%Y%m%d%H%M%S") 2618 2618 self.firstTm = gen.timeref_datetime_mat(self.refdate, \ … … 2621 2621 print warnmsg 2622 2622 print ' first time step:', self.firsTt, 'below 1900 !!' 2623 self.firstTs = str(self.firstTt.year) + str(self.firstTt.month)+ \ 2624 str(self.firstTt.day) + str(self.firstTt.hour) + \ 2625 str(self.firstTt.minute) + str(self.firstTt.second) 2623 self.firstTs = str(self.firstTt.year).zfill(4) + \ 2624 str(self.firstTt.month).zfill(2) + \ 2625 str(self.firstTt.day).zfill(2) + \ 2626 str(self.firstTt.hour).zfill(2) + \ 2627 str(self.firstTt.minute).zfill(2) + \ 2628 str(self.firstTt.second).zfill(2) 2626 2629 self.lastTu = timev[self.dimt-1] 2627 2630 self.lastTt = gen.timeref_datetime(self.refdate, self.lastTu, \ 2628 2631 self.units, cal) 2629 if self.las Tt.year >= 1900:2632 if self.lastTt.year >= 1900: 2630 2633 self.lastTS = self.lastTt.strftime("%Y%m%d%H%M%S") 2631 2634 self.lastTm = gen.timeref_datetime_mat(self.refdate, self.lastTu,\ … … 2634 2637 print warnmsg 2635 2638 print ' last time step:', self.lastTt, 'below 1900 !!' 2636 self.lastTs = str(self.lastTt.year) + str(self.lastTt.month) + \ 2637 str(self.lastTt.day) + str(self.lastTt.hour) + \ 2638 str(self.lastTt.minute) + str(self.lastTt.second) 2639 self.lastTs = str(self.lastTt.year).zfill(4) + \ 2640 str(self.lastTt.month).zfill(2) + \ 2641 str(self.lastTt.day).zfill(2) + \ 2642 str(self.lastTt.hour).zfill(2) + \ 2643 str(self.lastTt.minute).zfill(2) + \ 2644 str(self.lastTt.second).zfill(2) 2639 2645 2640 2646 return
Note: See TracChangeset
for help on using the changeset viewer.