#Define dictionaries.
  ctime=itime 

  it=0

  while ( ctime <= etime ):

    print( ctime )

    print ( 'Reading the histogram ')

    hist_file=basedir + expname + ctime.strftime("%Y%m%d%H%M%S") + '/'+ my_file_type + '/' + '/histogram.grd'
    max_file =basedir + expname + ctime.strftime("%Y%m%d%H%M%S") + '/'+ my_file_type + '/' + '/ensmax.grd'
    min_file =basedir + expname + ctime.strftime("%Y%m%d%H%M%S") + '/'+ my_file_type + '/' + '/ensmin.grd'

    hist=chf.read_histogram(hist_file,max_file,min_file,nx,ny,nbins,ctl_dict,dtypein='i2')

    # hist_properties=analyze_histogram_fun( my_hist , thresholdmin )
   
    my_file=basedir + expname + ctime.strftime("%Y%m%d%H%M%S") + '/'+ my_file_type + '/' + '/moment0001.grd'
    ens_mean=ctlr.read_data_grads(my_file,ctl_dict,masked=False)
    my_file=basedir + expname + ctime.strftime("%Y%m%d%H%M%S") + '/'+ my_file_type + '/' + '/moment0002.grd'
    ens_var=ctlr.read_data_grads(my_file,ctl_dict,masked=False)
    #my_file=basedir + expname + ctime.strftime("%Y%m%d%H%M%S") + '/'+ my_file_type + '/' + '/moment0003.grd'
    #ens_skew=ctlr.read_data_grads(my_file,ctl_dict,masked=False)
    #my_file=basedir + expname + ctime.strftime("%Y%m%d%H%M%S") + '/'+ my_file_type + '/' + '/moment0004.grd'
    #ens_kurt=ctlr.read_data_grads(my_file,ctl_dict,masked=False)
    my_file=basedir + expname + ctime.strftime("%Y%m%d%H%M%S") + '/'+ my_file_type + '/' + '/kldistance.grd'
    ens_kld=ctlr.read_data_grads(my_file,ctl_dict,masked=False)

示例#2
0
        print(ctime)

        print('Reading the histogram ')

        hist_file = basedir + expname + ctime.strftime(
            "%Y%m%d%H%M%S") + '/guesgp/' + '/histogram.grd'
        max_file = basedir + expname + ctime.strftime(
            "%Y%m%d%H%M%S") + '/guesgp/' + '/ensmax.grd'
        min_file = basedir + expname + ctime.strftime(
            "%Y%m%d%H%M%S") + '/guesgp/' + '/ensmin.grd'

        hist_forecast = chf.read_histogram(hist_file,
                                           max_file,
                                           min_file,
                                           nx,
                                           ny,
                                           nbins,
                                           ctl_dict,
                                           dtypein='i2')

        hist_file = basedir + expname + ctime.strftime(
            "%Y%m%d%H%M%S") + '/analgp/' + '/histogram.grd'
        max_file = basedir + expname + ctime.strftime(
            "%Y%m%d%H%M%S") + '/analgp/' + '/ensmax.grd'
        min_file = basedir + expname + ctime.strftime(
            "%Y%m%d%H%M%S") + '/analgp/' + '/ensmin.grd'

        hist_analysis = chf.read_histogram(hist_file,
                                           max_file,
                                           min_file,
                                           nx,