def available_experiments(self): try: with _fetch_url(self._set_curl(self._Curl)) as self._fdata: self._avail = len( re.findall('id="checkbox_experiment_id_', self._fdata)) print("\nCurrently ", self._avail, " experiments has outputs!\n") for zz in range(self._avail): self._holder.append( self._fdata.split('checkbox_experiment_id_')[ zz + 2].split('" name="')[0]) print("Available experiments: \n\n") return self._holder except: self._Curl = _choose_server() with _fetch_url(self._set_curl(self._Curl)) as self._fdata: self._avail = len( re.findall('id="checkbox_experiment_id_', self._fdata)) print("\nCurrently ", self._avail, " experiments has outputs!\n") for zz in range(self._avail): self._holder.append( self._fdata.split('checkbox_experiment_id_')[ zz + 2].split('" name="')[0]) print("Available experiments: \n\n") return self._holder
def all_experiments(self): with _fetch_url(self._set_curl(self._ETurl)) as self._fdata: self._total = len(re.findall('<tr><td>', self._fdata)) print("\nCMIP6 has ", self._total, " experiments in total!\n") for zz in range(self._total): self._holder.append( self._fdata.split('<tr><td>')[zz + 1].split('</td>\\n')[0]) print("List of all CMIP6 experiments: \n\n") return self._holder
def var_stdName(self): try: with _fetch_url(self._set_curl(self._Curl)) as self._fdata: self._avail = len( re.findall('id="checkbox_cf_standard_name_', self._fdata)) print("\nCurrently ", self._avail, " variables has outputs!\n") for zz in range(self._avail): self._holder.append( self._fdata.split('checkbox_cf_standard_name_')[ zz + 2].split('" name="')[0]) print("Available variables: \n\n") return self._holder except: self._Curl = _choose_server() with _fetch_url(self._set_curl(self._Curl)) as self._fdata: self._avail = len( re.findall('id="checkbox_cf_standard_name_', self._fdata)) print("\nCurrently ", self._avail, " variables has outputs!\n") for zz in range(self._avail): self._holder.append( self._fdata.split('checkbox_cf_standard_name_')[ zz + 2].split('" name="')[0]) print("Available frequencies: \n\n") return self._holder