oas_dev/util/Nd/sizedist_class_v2/__init__.py
def make_sure_sizedist_varfile_exists(self, var_name):
        """
        Check that var is computed and if not compute the var
        :param var_name: the variable in question
        :return: filename of file
        """
        fn = self.dataset_savepath_var(var_name, self.case_name, self.model_name)
        if not os.path.isfile(fn):
            log.ger.debug('computing file for %s: \n %s' % (var_name, fn))
            t1 = time.time()
            ds = self.compute_sizedist_var(var_name)
            if not os.path.isfile(fn):
                self.to_netcdf(ds, fn)
                ds.close()
                del ds
            t2 = time.time()
            log.ger.info('computed %s in time : %s m' % (fn,(t2-t1)/60.))

        return fn

        Check that var is computed and if not compute the var
        :param var_name: the variable in question
        :return: filename of file
        
Check that var is computed and if not compute the var
Check that var is computed and if not compute the var
def make_sure_sizedist_varfile_exists(self, var_name):
        fn = self.dataset_savepath_var(var_name, self.case_name, self.model_name)
        if not os.path.isfile(fn):
            log.ger.debug('computing file for %s: \n %s' % (var_name, fn))
            t1 = time.time()
            ds = self.compute_sizedist_var(var_name)
            if not os.path.isfile(fn):
                self.to_netcdf(ds, fn)
                ds.close()
                del ds
            t2 = time.time()
            log.ger.info('computed %s in time : %s m' % (fn,(t2-t1)/60.))
        return fn
def make_sure_sizedist_varfile_exists ( self , var_name ) : fn = self . dataset_savepath_var ( var_name , self . case_name , self . model_name ) if not os . path . isfile ( fn ) : log . ger . debug ( 'computing file for %s: \n %s' % ( var_name , fn ) ) t1 = time . time ( ) ds = self . compute_sizedist_var ( var_name ) if not os . path . isfile ( fn ) : self . to_netcdf ( ds , fn ) ds . close ( ) del ds t2 = time . time ( ) log . ger . info ( 'computed %s in time : %s m' % ( fn , ( t2 - t1 ) / 60. ) ) return fn
Check that var is computed and if not compute the var
Check that var is computed and if not compute the var
"""
        Check that var is computed and if not compute the var
        :param var_name: the variable in question
        :return: filename of file
        """
filename of file
filename of file
self
var_name
the variable in question
the variable in question