Exemplo n.º 1
0
 def __init__(self, data_source, var, start_time, end_time, lon1, lon2, lat1, lat2, pres1, pres2, months,
              env_var_source1, env_var1, bin_min1, bin_max1, bin_n1, env_var_plev1,
              env_var_source2, env_var2, bin_min2, bin_max2, bin_n2, env_var_plev2, output_dir, displayOpt):
     self.data_source = data_source		# for e.g. "NCAR_cam5" or "nasa_airs", etc
     self.var = var				# CMIP5 variable names, e.g. 'ta', 'hus', 'clt'
     self.lon1 = lon1			# longitude range, min, units = deg
     self.lon2 = lon2			# longitude range, max, units = deg
     self.lat1 = lat1			# latitude range, min, units = deg
     self.lat2 = lat2			# latitude range, max, units = deg
     self.pres1 = pres1			# pressure level 1 for pressure range 
     self.pres2 = pres2			# pressure level 2 for pressure range 
     self.months = months			# month index to specify season, e.g. 6,7,8 for boreal summer
     self.env_var_source1 = env_var_source1	# first large scale environmental variable data source, e.g. "NCAR_cam5"
     self.env_var1 = env_var1		# first large scale environmental variable CMIP5 name, e.g. 'ts', 'tos'
     self.bin_min1 = bin_min1		# min value of bin boundary for sorting first large scale env var
     self.bin_max1 = bin_max1		# max value of bin boundary for sorting first large scale env var
     self.bin_n1 = bin_n1			# number of bins to be used for the first large scale variable
     self.env_var_plev1 = env_var_plev1	# pressure level for env var if it is 3-d
     self.env_var_source2 = env_var_source2	# first large scale environmental variable data source, e.g. "NCAR_cam5"
     self.env_var2 = env_var2		# first large scale environmental variable CMIP5 name, e.g. 'ts', 'tos'
     self.bin_min2 = bin_min2		# min value of bin boundary for sorting first large scale env var
     self.bin_max2 = bin_max2		# max value of bin boundary for sorting first large scale env var
     self.bin_n2 = bin_n2			# number of bins to be used for the first large scale variable
     self.env_var_plev2 = env_var_plev2	# pressure level for env var if it is 3-d
     self.output_dir = output_dir		# output directory for figure and data file
     self.displayOpt = displayOpt		# display option, if in binary, the last 3 bits = [z y x]
     availableTimeBnds1 = correctTimeBounds2('2', data_source.replace("_", "/"), var, env_var_source1.replace("_", "/"), env_var1, start_time, end_time)
     availableTimeBnds2 = correctTimeBounds2('2', data_source.replace("_", "/"), var, env_var_source2.replace("_", "/"), env_var2, start_time, end_time)
     self.start_time = str(max(int(availableTimeBnds1[0]), int(availableTimeBnds2[0])));
     self.end_time = str(min(int(availableTimeBnds1[1]), int(availableTimeBnds2[1])));
Exemplo n.º 2
0
    def __init__(self, 
model1, var1, pres1,
model2, var2, pres2,
laggedTime, start_time, end_time, lonS, lonE, latS, latE, 
#months, 
output_dir):

        self.model1 = model1
        self.var1 = var1
        self.pres1 = pres1
        self.model2 = model2
        self.var2 = var2
        self.pres2 = pres2
        self.laggedTime = laggedTime
        self.start_time = start_time
        self.end_time = end_time
        self.lon1 = lonS
        self.lon2 = lonE
        self.lat1 = latS
        self.lat2 = latE
        #self.months = months

        self.output_dir = output_dir

        availableTimeBnds = correctTimeBounds2('2', 
          model1.replace("_", "/"), var1, model2.replace("_", "/"), 
          var2, start_time, end_time)
        self.start_time = availableTimeBnds[0]
        self.end_time = availableTimeBnds[1]
Exemplo n.º 3
0
    def __init__(self, model1, var1, pres1, model2, var2, pres2, start_time,
                 end_time, lonS, lonE, latS, latE, nSample, output_dir,
                 isDiffPlot):

        self.model1 = model1
        self.var1 = var1
        self.pres1 = pres1
        self.model2 = model2
        self.var2 = var2
        self.pres2 = pres2
        self.start_time = start_time
        self.end_time = end_time
        self.lon1 = lonS
        self.lon2 = lonE
        self.lat1 = latS
        self.lat2 = latE
        self.nSample = nSample

        self.output_dir = output_dir
        self.isDiffPlot = isDiffPlot

        availableTimeBnds = correctTimeBounds2('2', model1.replace("_",
                                                                   "/"), var1,
                                               model2.replace("_", "/"), var2,
                                               start_time, end_time)
        self.start_time = availableTimeBnds[0]
        self.end_time = availableTimeBnds[1]
 def __init__(self, data_source, var, start_time, end_time, lon1, lon2,
              lat1, lat2, pres1, pres2, months, env_var_source, env_var,
              bin_min, bin_max, bin_n, env_var_plev, output_dir,
              displayOpt):
     self.data_source = data_source  # for e.g. "NCAR_cam5" or "nasa_airs", etc
     self.var = var  # CMIP5 variable names, e.g. 'ta', 'hus', 'clt'
     self.lon1 = lon1  # longitude range, min, units = deg
     self.lon2 = lon2  # longitude range, max, units = deg
     self.lat1 = lat1  # latitude range, min, units = deg
     self.lat2 = lat2  # latitude range, max, units = deg
     self.pres1 = pres1  # pressure level 1 for pressure range
     self.pres2 = pres2  # pressure level 2 for pressure range
     self.months = months  # month index to specify season, e.g. 6,7,8 for boreal summer
     self.env_var_source = env_var_source  # large scale environmental variable data source, e.g. "NCAR_cam5"
     self.env_var = env_var  # large scale environmental variable CMIP5 name, e.g. 'ts', 'tos'
     self.bin_min = bin_min  # min value of bin boundary for sorting large scale env var
     self.bin_max = bin_max  # max value of bin boundary for sorting large scale env var
     self.bin_n = bin_n  # number of bins to be used
     self.env_var_plev = env_var_plev  # pressure level for env var if it is 3-d
     self.output_dir = output_dir  # output directory for figure and data file
     self.displayOpt = displayOpt  # display option, if in binary, the last 3 bits = [z y x]
     availableTimeBnds = correctTimeBounds2(
         '2', data_source.replace("_", "/"), var,
         env_var_source.replace("_", "/"), env_var, start_time, end_time)
     self.start_time = availableTimeBnds[0]
     self.end_time = availableTimeBnds[1]
Exemplo n.º 5
0
    def __init__(self, 
model1, var1, pres1,
model2, var2, pres2,
start_time, end_time, lonS, lonE, latS, latE, nSample, output_dir, isDiffPlot):

        self.model1 = model1
        self.var1 = var1
        self.pres1 = pres1
        self.model2 = model2
        self.var2 = var2
        self.pres2 = pres2
        self.start_time = start_time
        self.end_time = end_time
        self.lon1 = lonS
        self.lon2 = lonE
        self.lat1 = latS
        self.lat2 = latE
        self.nSample = nSample

        self.output_dir = output_dir
        self.isDiffPlot = isDiffPlot

        availableTimeBnds = correctTimeBounds2('2', model1.replace("_", "/"), var1, model2.replace("_", "/"), var2, start_time, end_time)
        self.start_time = availableTimeBnds[0]
        self.end_time = availableTimeBnds[1]
Exemplo n.º 6
0
 def __init__(self, data_source, var, start_time, end_time, lon1, lon2,
              lat1, lat2, pres1, pres2, months, env_var_source1, env_var1,
              bin_min1, bin_max1, bin_n1, env_var_plev1, env_var_source2,
              env_var2, bin_min2, bin_max2, bin_n2, env_var_plev2,
              output_dir, displayOpt):
     self.data_source = data_source  # for e.g. "NCAR_cam5" or "nasa_airs", etc
     self.var = var  # CMIP5 variable names, e.g. 'ta', 'hus', 'clt'
     self.lon1 = lon1  # longitude range, min, units = deg
     self.lon2 = lon2  # longitude range, max, units = deg
     self.lat1 = lat1  # latitude range, min, units = deg
     self.lat2 = lat2  # latitude range, max, units = deg
     self.pres1 = pres1  # pressure level 1 for pressure range
     self.pres2 = pres2  # pressure level 2 for pressure range
     self.months = months  # month index to specify season, e.g. 6,7,8 for boreal summer
     self.env_var_source1 = env_var_source1  # first large scale environmental variable data source, e.g. "NCAR_cam5"
     self.env_var1 = env_var1  # first large scale environmental variable CMIP5 name, e.g. 'ts', 'tos'
     self.bin_min1 = bin_min1  # min value of bin boundary for sorting first large scale env var
     self.bin_max1 = bin_max1  # max value of bin boundary for sorting first large scale env var
     self.bin_n1 = bin_n1  # number of bins to be used for the first large scale variable
     self.env_var_plev1 = env_var_plev1  # pressure level for env var if it is 3-d
     self.env_var_source2 = env_var_source2  # first large scale environmental variable data source, e.g. "NCAR_cam5"
     self.env_var2 = env_var2  # first large scale environmental variable CMIP5 name, e.g. 'ts', 'tos'
     self.bin_min2 = bin_min2  # min value of bin boundary for sorting first large scale env var
     self.bin_max2 = bin_max2  # max value of bin boundary for sorting first large scale env var
     self.bin_n2 = bin_n2  # number of bins to be used for the first large scale variable
     self.env_var_plev2 = env_var_plev2  # pressure level for env var if it is 3-d
     self.output_dir = output_dir  # output directory for figure and data file
     self.displayOpt = displayOpt  # display option, if in binary, the last 3 bits = [z y x]
     availableTimeBnds1 = correctTimeBounds2(
         '2', data_source.replace("_", "/"), var,
         env_var_source1.replace("_", "/"), env_var1, start_time, end_time)
     availableTimeBnds2 = correctTimeBounds2(
         '2', data_source.replace("_", "/"), var,
         env_var_source2.replace("_", "/"), env_var2, start_time, end_time)
     self.start_time = str(
         max(int(availableTimeBnds1[0]), int(availableTimeBnds2[0])))
     self.end_time = str(
         min(int(availableTimeBnds1[1]), int(availableTimeBnds2[1])))
Exemplo n.º 7
0
    def __init__(
            self,
            model1,
            var1,
            pres1,
            model2,
            var2,
            pres2,
            laggedTime,
            start_time,
            end_time,
            lonS,
            lonE,
            latS,
            latE,
            #months,
            output_dir):

        self.model1 = model1
        self.var1 = var1
        self.pres1 = pres1
        self.model2 = model2
        self.var2 = var2
        self.pres2 = pres2
        self.laggedTime = laggedTime
        self.start_time = start_time
        self.end_time = end_time
        self.lon1 = lonS
        self.lon2 = lonE
        self.lat1 = latS
        self.lat2 = latE
        #self.months = months

        self.output_dir = output_dir

        availableTimeBnds = correctTimeBounds2('2', model1.replace("_",
                                                                   "/"), var1,
                                               model2.replace("_", "/"), var2,
                                               start_time, end_time)
        self.start_time = availableTimeBnds[0]
        self.end_time = availableTimeBnds[1]
Exemplo n.º 8
0
 def __init__(self, data_source, var, start_time, end_time, lon1, lon2, lat1, lat2, pres1, pres2, months, env_var_source, env_var, bin_min, bin_max, bin_n, env_var_plev, output_dir, displayOpt):
     self.data_source = data_source		# for e.g. "NCAR_cam5" or "nasa_airs", etc
     self.var = var				# CMIP5 variable names, e.g. 'ta', 'hus', 'clt'
     self.lon1 = lon1			# longitude range, min, units = deg
     self.lon2 = lon2			# longitude range, max, units = deg
     self.lat1 = lat1			# latitude range, min, units = deg
     self.lat2 = lat2			# latitude range, max, units = deg
     self.pres1 = pres1			# pressure level 1 for pressure range 
     self.pres2 = pres2			# pressure level 2 for pressure range 
     self.months = months			# month index to specify season, e.g. 6,7,8 for boreal summer
     self.env_var_source = env_var_source	# large scale environmental variable data source, e.g. "NCAR_cam5"
     self.env_var = env_var			# large scale environmental variable CMIP5 name, e.g. 'ts', 'tos'
     self.bin_min = bin_min			# min value of bin boundary for sorting large scale env var
     self.bin_max = bin_max			# max value of bin boundary for sorting large scale env var
     self.bin_n = bin_n			# number of bins to be used
     self.env_var_plev = env_var_plev	# pressure level for env var if it is 3-d
     self.output_dir = output_dir		# output directory for figure and data file
     self.displayOpt = displayOpt		# display option, if in binary, the last 3 bits = [z y x]
     availableTimeBnds = correctTimeBounds2('2', data_source.replace("_", "/"), var, env_var_source.replace("_", "/"), env_var, start_time, end_time)
     self.start_time = availableTimeBnds[0]
     self.end_time = availableTimeBnds[1]