U g=@sxdZGdddeZGdddeZGdddeZGdddeZGd d d eZGd d d eZGd ddeZ Gddde Z GdddeZ Gddde Z Gddde ZGdddeZGdddeZGddde ZGddde ZGdd d e ZGd!d"d"e ZGd#d$d$e ZGd%d&d&e ZGd'd(d(e ZGd)d*d*e ZGd+d,d,e ZGd-d.d.eZGd/d0d0eZGd1d2d2eZGd3d4d4eZGd5d6d6eZGd7d8d8eZGd9d:d:eZ Gd;d<dd>e!Z"Gd?d@d@eZ#GdAdBdBe#Z$GdCdDdDe#Z%GdEdFdFeZ&GdGdHdHeZ'GdIdJdJeZ(GdKdLdLe(Z)GdMdNdNe(Z*GdOdPdPe(Z+GdQdRdRe+Z,GdSdTdTe+Z-GdUdVdVeZ.GdWdXdXe.Z/GdYdZdZe.Z0Gd[d\d\e.Z1Gd]d^d^e.Z2Gd_d`d`e.Z3Gdadbdbe.Z4Gdcdddde.Z5Gdedfdfe.Z6Gdgdhdhe.Z7Gdidjdje7Z8Gdkdldle7Z9Gdmdndne7Z:Gdodpdpe7Z;Gdqdrdre7ZGdwdxdxe>Z?Gdydzdze>Z@Gd{d|d|e>ZAGd}d~d~e>ZBGdddeBZCGdddeBZDGddde>ZEGddde>ZFGdddeFZGGddde>ZHGdddeHZIGdddeHZJGddde>ZKGdddeZLGdddeLZMGdddeLZNGdddeLZOGdddeLZPGdddeZQGdddeZRGdddeZSGdddeSZTGdddeSZUGdddeSZVGdddeSZWGdddeSZXGdddeSZYGdddeSZZdS)zc!Exceptions raised by the hafs package This module contains exceptions raised by the hafs package.c@seZdZdZdS) HAFSErrora!Base class of all exceptions in this module. This is the base class of exceptions raised by the HAFS module due to HAFS-specific failures. It is possible to get other exceptions from the StandardException hierarchy in certain failure cases. For example, trying to obtain the fifth of three domains may raise KeyError. Also, see pom.exceptions for exceptions that may be raised from the pom package. See the produtil package for exceptions that may come from lower levels.N__name__ __module__ __qualname____doc__rrsr>c@seZdZdZdS)MissingGRIBErrorzZ!Not currently used, this would be raised when GRIB inputs to the tracker are missing.Nrrrrrr?sr?c@seZdZdZdS)GRIBLocationErrorzH!Raised when no location is specified for a tracker input GRIB file.Nrrrrrr@sr@c@seZdZdZdS) HAFSTimeErrorz2!Base class used for time-related HAFS exceptions.NrrrrrrAsrAc@seZdZdZdS)InvalidTimestepzq!Raised when a timestep is invalid, such as a negative timestep for a situation that requires a positive one.NrrrrrrBsrBc@seZdZdZdS)TimestepModularityErrorzF!Called when one hour is not divisable by the WRF output timestep.NrrrrrrCsrCc@seZdZdZdS)OverspecifiedOutputTimez!Raised when an output time is specified in two redundant ways. For example, one could specify a forecast time directly, and also specify the analysis time and forecast time delta.NrrrrrrDsrDc@seZdZdZdS) NoOutputTimez8!Raised when a time was required, but none was provided.NrrrrrrEsrEc@seZdZdZdS)TimezoneProvidedzl!Raised when a timezone is provided. The hafs package does not support timezones: all times are in UTC.NrrrrrrFsrFc@seZdZdZdS)PrecisionTooHigha !Raised when a time was requested with higher precision than available. Raised when a time was provided that contained fractions of a second, for a function that cannot handle that. For example, the WRF output files must be exactly on a second boundary.NrrrrrrGsrGc@seZdZdZdS) NotInTimespanzT!Raised when a time is outside the range of times being processed by a function.NrrrrrrHsrHc@seZdZdZdS)NoNearbyValueszw!Raised when an operation has a set of known times, but another provided time is not near one of those known times.NrrrrrrIsrIcs eZdZdZfddZZS)InvalidTimespanzn!Superclass of exceptions relating to groups of one or more distinct times and relationships between them.cs tt||||_||_dS)z! Constructor for InvalidTimespan @param message the string explanation of the problem @param start the start of the timespan @param end the end of the timespanN)rrJrstartend)rrrKrLrrrrszInvalidTimespan.__init__r rrrrrJsrJc@seZdZdZdS)EndBeforeStartz;!Raised when the end of a timespan is before the beginning.NrrrrrrMsrMc@seZdZdZdS)EndNotTimestepa!Raised when the end of a timespan is not a timestep. Presently unused. Presently unused, this was to indicate that the end of a timespan is not on a timestep, for temporally discrete processes. Such end times are allowed in WRF, so this exception is unused.NrrrrrrNsrNc@seZdZdZdS)StartNotAtParentTimestepz9!Raised when a timespan's beginning is not at a timestep.NrrrrrrOsrOc@seZdZdZdS)TimestepTooLongzL!Raised when a timestep is too long for the process under consideration.NrrrrrrPsrPc@seZdZdZdS)TimestepTooShortzM!Raised when a timestep is too short for the process under consideration.NrrrrrrQ srQc@seZdZdZdS) NoTimespanz=!Raised when a timespan was expected, but none was available.NrrrrrrR srRc@seZdZdZdS) RegribErrorz%!Superclass of errors used by Regrib.NrrrrrrSsrSc@seZdZdZdS)GRIBInputErrorz!Raised when a GRIB file is invalid. Raised when a GRIB file is provided, but that file is invalid. This can be due to either an input to an operation, or the output from the operation.NrrrrrrTsrTc@seZdZdZdS) Subsetlessze!Raised when a Regrib was expecting a GRIB subsetter function, but no such function was provided.NrrrrrrUsrUc@seZdZdZdS)InvalidRegribResultz!Debug assetion in hafs.regrib used to detect type mismatches. Part of debug assertions in hafs.regrib, this is raised when the wrong type is generated by the "make" function.NrrrrrrVsrVc@seZdZdZdS)RegribProductErrorz2!Superclass of errors relating to regrib products.NrrrrrrW%srWc@seZdZdZdS)NoProductErrorzx!Raised when an operation that produces input to Regrib should have produced a Product, but produced nothing at all.NrrrrrrX'srXc@seZdZdZdS)ProductAmbiguityErrorz[!Raised when an operation that provides input to Regrib produces more than one product.NrrrrrrY*srYc@seZdZdZdS) NoIndexErrorzL!Raised when a GRIB file should have an index file already, but doesn't.NrrrrrrZ-srZc@seZdZdZdS)RegribManyErrorz5!Base class of errors from the hafs.regrib.RegribManyNrrrrrr[1sr[c@seZdZdZdS)RegribKeyErrorzj!Raised when a RegribMany is given an invalid name: one that does not match a known grid or operation.Nrrrrrr\3sr\c@seZdZdZdS)RegribGridErrorz*!Base class of grid-related regrib errors.Nrrrrrr]7sr]c@seZdZdZdS) GridlessErrorz7!Raised when a grid was expected but none was provided.Nrrrrrr^9sr^c@seZdZdZdS)GridMismatchErrorzY!Raised when two GRIB files have non-matching grids, but a matching grid is required.Nrrrrrr_;sr_c@seZdZdZdS) GribberErrorz!Exceptions for hafs.regrib.GRIBTask for certain internal errors. Raised by GRIBTask for unexpected errors that did not come from the underlying RegribAll object. This is used in GRIBTask.run's "run it now" mode, when setting raiseall=True.Nrrrrrr`?sr`c@seZdZdZdS)HAFSInputErrorz;!Base class of exceptions related to the hafs.input module.NrrrrrraIsrac@seZdZdZdS)InputSourceBadTypezW!Raised when a configuration file requests a DataCatalog class that does not exist.NrrrrrrbKsrbc@seZdZdZdS)InvalidInputSpecificationzX!Raised when an input source is missing the location, or both histprio and fcstprio.NrrrrrrcNsrcc@seZdZdZdS)PartialTransferzI!Raised when a file transfer, done by an InputSource, was incomplete.NrrrrrrdQsrdc@seZdZdZdS)UnsupportedTransferzl!Raised when a configuration file requests an unsupported data transfer method (such as carrier pigeon).NrrrrrreTsrec@seZdZdZdS) PostFailedzo!Raised upon errors that would cause a retry, in the PostOneWRF.run when passed the raiseall=True argument.Nrrrrrrf[srfc@seZdZdZdS)PostHasNoInputz[!Raised when the post's input file is not available and raiseall=True in PostOneWRF.runNrrrrrrg_srgc@seZdZdZdS)RelocationErrorz6!Raised when something in the vortex relocation fails.Nrrrrrrhfsrhc@seZdZdZdS)RelocationInputErrorz;!Raised when required inputs to the relocation are missing.Nrrrrrrihsric@seZdZdZdS)RelocationConfigurationErrorz6!Raised when an impossible configuration is requested.Nrrrrrrjjsrjc@seZdZdZdS)RelocateOutputMissingzN!Raised when a relocation program did not produce an expected output file.Nrrrrrrklsrkc@seZdZdZdS)UnexpectedColdStartzm!Raised when the relocation could not find the prior cycle's 6hr forecast, but it expected to be able to.Nrrrrrrlosrlc@seZdZdZdS)StormRadiusErrorz^!Raised when the merge cannot find the storm_radius file in the relocate or fix directory.Nrrrrrrmrsrmc@seZdZdZdS) NoSuchDomainzl!Raised by hafs.input when trying to get the wrong domain from its hafs.relocate.Relocate child objects.Nrrrrrrnusrnc@seZdZdZdS)EnsdaTrackerMissingzwRaised when the relocation could not find the prior cycle's ensemble forecast track, but it expected to be able to.NrrrrrroxsroN)[r Exceptionrr r r r r ValueErrorrKeyErrorrrrr!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorrrrs #