Changeset 2474 in lmdz_wrf for trunk/tools
- Timestamp:
- Apr 25, 2019, 2:34:24 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic_tools.py
r2473 r2474 79 79 # CFmonthU_daysU: Function to transform from a CF date series with units as 'months since [DATE]' to 'days since [DATE]' 80 80 # CFtime_freq: Function to provide the frequency of CF times (in seconds) 81 # CFtimeU_inf: Classs to provide information of CFtime units 81 82 # CFtimes_datetime: Provide date/time array from a file with a series of netCDF CF-compilant time variable 82 83 # CFtimesvar_datetime: Provide date/time array from a CF-compilant time variable … … 16469 16470 return newtimevals, newcftimeu 16470 16471 16471 print fromanydate_CFYmd('1979.12.07')16472 16473 16472 class CFtimeU_inf(object): 16474 16473 """ Classs to provide information of CFtime units … … 16490 16489 # Does original reference date contain a time value [YYYY]-[MM]-[DD] [HH]:[MI]:[SS] 16491 16490 ## 16492 trefT = origcftimeu.find(':')16491 trefT = cftimeu.find(':') 16493 16492 if not trefT == -1: 16494 16493 if len(origtv) == 3: … … 16506 16505 secref = 0 16507 16506 16508 self.refdate = origSrefdate + ' ' + horref + ':' + minref + ':' + secref 16509 self.refdateYMHdms = yrref + monref + dayref + horref + minref + secref 16507 horrefS = str(horref).zfill(2) 16508 minrefS = str(minref).zfill(2) 16509 secrefS = str(secref).zfill(2) 16510 16511 self.refdate = origSrefdate + ' ' + horrefS + ':' + minrefS + ':' + secrefS 16512 self.refdateYMHdms = origSrefdate[0:4] + origSrefdate[5:7] + \ 16513 origSrefdate[8:10] + horrefS + ':' + minrefS + ':' + secrefS 16514 self.refdatemat = [yrref, monref, dayref, horref, minref, secref] 16510 16515 self.Tunits = origtunits 16511 16512 cftimev = CFtimeU_inf('hours since 1979-12-1')16513 printing_class(cftimev)16514 16515 quit()16516 16516 16517 16517 def from360d_reg(tvals, tunits): … … 16522 16522 fname = 'from360d_reg' 16523 16523 16524 inftunits = CFtimeU_inf(tunits) 16525 16526 refdate = inftunits.refdatemat 16524 16527 16525 16528
Note: See TracChangeset
for help on using the changeset viewer.