Changeset 2279 in lmdz_wrf for trunk/tools
- Timestamp:
- Jan 15, 2019, 2:18:09 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r2259 r2279 521 521 'Y-m-d_H:M:S': [YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] format 522 522 'Y-m-d H:M:S': [YYYY]-[MM]-[DD] [HH]:[MI]:[SS] format 523 'Y-m-d H': [YYYY]-[MM]-[DD] [HH] format 523 524 'Y/m/d H-M-S': [YYYY]/[MM]/[DD] [HH]-[MI]-[SS] format 524 525 'Y-m-dTH:M:SZ': [YYYY]-[MM]-[DD]T[HH]:[MI]:[SS]Z UNIDATA format … … 542 543 'Y-m-d_H:M:S': '[YYYY]-[MM]-[DD]_[HH]:[MI]:[SS] format', \ 543 544 'Y-m-d H:M:S': '[YYYY]-[MM]-[DD] [HH]:[MI]:[SS] format', \ 545 'Y-m-d H': '[YYYY]-[MM]-[DD] [HH] format', \ 544 546 'Y/m/d H-M-S': '[YYYY]/[MM]/[DD] [HH]-[MI]-[SS] format', \ 545 547 'Y-m-dTH:M:SZ': '[YYYY]-[MM]-[DD]T[HH]:[MI]:[SS]Z UNIDATA format', \ … … 640 642 mi = int(timeT[1]) 641 643 se = int(timeT[2]) 644 elif typeSi == 'Y-m-d H': 645 dateDT = StringDT.split(' ') 646 dateD = dateDT[0].split('-') 647 timeT = dateDT[1].split(':') 648 yr = int(dateD[0]) 649 mo = int(dateD[1]) 650 da = int(dateD[2]) 651 ho = int(timeT[0]) 652 print infmsg 653 print ' ' + fname + ": for input format '" + typeSi + "' assuming " + \ 654 'minute = 0 & second = 0 !!' 655 mi = 0 656 se = 0 642 657 elif typeSi == 'Y/m/d H-M-S': 643 658 dateDT = StringDT.split(' ') … … 749 764 str(da).zfill(2) + ' ' + str(ho).zfill(2) + ':' + str(mi).zfill(2) + ':' + \ 750 765 str(se).zfill(2) 766 elif typeSo == 'Y-m-d H': 767 dateYmdHMS = str(yr).zfill(4) + '-' + str(mo).zfill(2) + '-' + \ 768 str(da).zfill(2) + ' ' + str(ho).zfill(2) 751 769 elif typeSo == 'Y/m/d H-M-S': 752 770 dateYmdHMS = str(yr).zfill(4) + '/' + str(mo).zfill(2) + '/' + \
Note: See TracChangeset
for help on using the changeset viewer.