o e @s2ddlZddlZddZddZGdddZdS)Ncs fddtdtDS)Nc3s |] }||VqdS)N).0posseqsizer8/lfs/h1/ops/prod/packages/epoch.v1.0.5/ush/epochparms.py szchunker..r)Zxrangelenrrrrchunkers r cs|dfdd|DS)N/csg|]}|qSrr)rnZsprr szprependPath..r)subpathnamesrrr prependPathsrc@s$eZdZddZddZddZdS) EpochParmscCsd|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ d|_ d|_ d|_ d|_ d|_d|_d|_d|_d|_d|_d|_d|_g|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_ dS)Nznot setFrWCOSS)! _parmfile_ok_maxLookbackDays_maxModelLookbackDays_maxLookaheadDays_maxEnsembleLeadHours _debugLevel _debugCmds_logGrib2ToMdv_globcompAccessMode_fileNamingLIR_globcompDataPathLIR_globcompLirYmdIndex_globcompLirHourIndex _gfsPattern _gfsPatternb _gfsYmdIndex _gfsbYmdIndex _gfsHourIndex_gfsbHourIndex _gfsLeadIndex_gfsbLeadIndex_gfsModelLeadTimeHours_cmorph2AccessMode _cmorph2Path_cmorph2Pattern_cmorph2YmdIndex_cmorph2HourIndex_cmorph2MinuteIndex_cmorph2FrequencyMinutes_cmorph2DelayHours_cmceDataPath3_gefsDataPath3selfrrr__init__ sB zEpochParms.__init__cCs||_d|_tjtjdd}||jt|dd|_ t|dd|_ t|dd|_ t|dd|_ t|dd |_ |j d krId |_ |j d krQd |_ t|dd }|d krad|_nd|_t|dd}|d krtd|_nd|_t|dd}|d krd|_nd|_t|dd}|d krd|_nd|_t|dd}|d krd|_nd|_t|dd}|d krd|_nd|_|dd|_|dd|_t|dd|_t|dd|_|dd|_|dd|_t|dd|_t|dd|_t|dd|_t|dd |_t|dd!|_t|dd"|_d#d$|dd% D|_!t|d&d'}|d krFd|_"nd|_"|d&d(|_#|d&d)|_$t|d&d*|_%t|d&d+|_&t|d&d,|_'t|d&d-|_(t|d&d.|_)t|d&d/|_*|j)|j d0krt+d1|j)|j)d0d |_ t+d2|j |j*|j d0krt+d3|j*|j*d0d |_ t+d2|j |d4d5|_,|d6d7|_-dS)8NTF)strictmainZmaxLookbackDaysZmaxModelLookbackDaysZmaxLookaheadDaysZmaxEnsembleLeadHoursZ debugLevelrZdebugCmdrZ logGrib2ToMdvZdo_delete_temp_data_dirZdo_delete_workspaceZdo_copy_into_workspaceZglobcompZglobcompAccessModeWcossrNCARZ fileNamingLIRglobcompDataPathLIRZglobcompLirYmdIndexZglobcompLirHourIndexZgfs gfsPattern gfsPatternb gfsYmdIndexZ gfsbYmdIndex gfsHourIndexZ gfsbHourIndex gfsLeadIndexZ gfsbLeadIndexcSsg|]}|qSrr)rnamerrrrsz#EpochParms.read..ZgfsModelLeaDtimeHourscmorph2Zcmorph2AccessModeWcossZ cmorph2Pathcmorph2PatternZcmorph2YmdIndexZcmorph2HourIndexZcmorph2MinuteIndexZcmorph2FrequencyMinutesZcmorph2MaxLatencyHoursZcmorph2DelayHoursz=Upping max lookback days to agree with cmorph max latency of zNew max lookback = z7Upping max lookback days to agree with cmorph delay of cmceZ cmceDataPath3gefsZ gefsDataPath3).rr configparserZ ConfigParserosenvironreadintgetrrrrrrr_do_delete_temp_data_dir_do_delete_workspace_do_copy_into_workspacer r!r"r#r$r%r&r'r(r)r*r+r,splitr-r.r/r0r1r2r3r4_cmorph2MaxLatencyHoursr5printr6r7)r9parmfileparseriZivalrrrrNOs        zEpochParms.readcCsxtd|jtd|jtd|jtd|jtd|jtd|jtd|jtd|jtd |j td |j td |j td |j td |j td|jtd|jtd|jtd|jtd|jtd|jtd|jtd|jtd|jtd|jtd|jtd|jtd|jtd|jtd|jtd|jtd|jtd|jdS) Nzself._maxLookbackDayszself._maxModelLookbackDayszself._maxLookaheadDayszself._maxEnsembleLeadHourszself._debugLevelzself._debugCmdszself._logGrib2ToMdvzself._globcompAccessModezself._fileNamingLIRzself._globcompDataPathLIRzself._globcompLirYmdIndexzself._globcompLirHourIndexzself._gfsPatternzself._gfsPatternbzself._gfsYmdIndexzself._gfsbYmdIndexzself._gfsHourIndexzself._gfsbHourIndexzself._gfsLeadIndexzself._gfsbLeadIndexzself._gfsModelLeadTimeHourszself._cmorph2AccessModezself._cmorph2Pathzself._cmorph2Patternzself._cmorph2YmdIndexzself._cmorph2HourIndexzself._cmorph2MinuteIndexzself._cmorph2FrequencyMinuteszself._cmorph2DelayHourszself._cmceDataPath3zself._gefsDataPath3) rVrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8rrr printParmss>                              zEpochParms.printParmsN)__name__ __module__ __qualname__r:rNrZrrrrrs/ br)rKrLr rrrrrrs