当前位置: 首页>>代码示例>>Python>>正文


Python WhfLog.setData方法代码示例

本文整理汇总了Python中WhfLog.setData方法的典型用法代码示例。如果您正苦于以下问题:Python WhfLog.setData方法的具体用法?Python WhfLog.setData怎么用?Python WhfLog.setData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WhfLog的用法示例。


在下文中一共展示了WhfLog.setData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _passthroughRap

# 需要导入模块: import WhfLog [as 别名]
# 或者: from WhfLog import setData [as 别名]
    def _passthroughRap(self, parms):
        """ Perform pass through of RAP data as if it were layered

        NOTE: Add some error status catching for return
        
        Parameters
        ----------
        parms : Parms
          parameters

        """        

        # lots of hardwires here
        ymdh = self._issue.strftime("%Y%m%d%H")
        path = ymdh + "/"
        fname = self._valid.strftime("%Y%m%d%H%M") + ".LDASIN_DOMAIN1.nc"
        fnameOut = self._valid.strftime("%Y%m%d%H%M") + ".LDASIN_DOMAIN1"
        path += fname
        WhfLog.setData('RAP')
        WhfLog.info("LAYERING (Passthrough) %s ", path)

        # if not there, create the directory to put the file into
        fullPath = parms._layerDir + "/"
        fullPath += ymdh
        if not os.path.exists(fullPath):
            os.makedirs(fullPath)

        if not os.path.isdir(fullPath):
            WhfLog.error("%s is not a directory", fullPath)
        else:
            # create copy command and do it
            cmd = "cp " + parms._rapDir
            cmd += "/" + path
            cmd += " " + fullPath
            cmd += "/"
            cmd += fnameOut
            WhfLog.info(cmd)
            os.system(cmd)

        WhfLog.info("LAYERING (Passthrough) %s complete", path)
        WhfLog.setData('RAP/HRRR')
开发者ID:NCAR,项目名称:wrf_hydro_forcing,代码行数:43,代码来源:ShortRangeLayeringDriver.py

示例2: forceLayer

# 需要导入模块: import WhfLog [as 别名]
# 或者: from WhfLog import setData [as 别名]
    def forceLayer(self, parms, config, itime):
        """  Perform layering if state is partially ready enough

        Parameters
        ----------
        parms : Parms
           Parameters
        itime : datetime
        Returns
        -------
        bool
           True if layering was done, or had previously been done
        """
        
        if (self._layered):
            return True

        self.setAvailability(parms, itime)
        if (self._rap0 and self._rap3):
            if (self._hrrr0 and self._hrrr3):
                self._layered = True
                if (self._mrms == True):
                    WhfLog.setData('RAP/HRRR/MRMS')
                    layer(parms, itime, self._step, "RAP_HRRR_MRMS", config)
                else:
                    WhfLog.setData('RAP/HRRR')
                    layer(parms, itime, self._step, "RAP_HRRR", config)
                    WhfLog.setData('RAP/HRRR/MRMS')
            else:
                self._layered = True
                WhfLog.setData('RAP')
                layer(parms, itime, self._step, "RAP", config)
                WhfLog.setData('RAP/HRRR/MRMS')
        else:
            self._layered = True
            WhfLog.warning("WARNING, no layering of %s, step=-%d",
                            itime.strftime("%Y%m%d%h"), self._step)
        return True
开发者ID:Kevin-M-Smith,项目名称:wrf_hydro_forcing,代码行数:40,代码来源:AnalysisAssimLayeringDriver.py

示例3: layerIfReady

# 需要导入模块: import WhfLog [as 别名]
# 或者: from WhfLog import setData [as 别名]
    def layerIfReady(self, parms, config, itime):
        """  Perform layering if state is fully ready

        Parameters
        ----------
        parms : Parms
           Parameters
        itime : datetime
        Returns
        -------
        bool
           True if layering was done, or had previously been done
        """
        
        if (self._layered):
            return True
        self.setAvailability(parms, itime)
        if (self._hrrr0 and self._rap0 and
            self._hrrr3 and self._rap3 and self._mrms):
            self._layered = True
            WhfLog.setData('RAP/HRRR/MRMS')
            layer(parms, itime, self._step, "RAP_HRRR_MRMS", config)
            return True
        return False
开发者ID:Kevin-M-Smith,项目名称:wrf_hydro_forcing,代码行数:26,代码来源:AnalysisAssimLayeringDriver.py


注:本文中的WhfLog.setData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。