SPAREICE
- class typhon.retrieval.spareice.SPAREICE(file=None, collocator=None, processes=10, verbose=0, sea_mask_file=None, elevation_file=None)[source]
Retrieval of IWP from passive radiometers
Examples: .. code-block:: python
import pandas as pd from typhon.retrieval import SPAREICE
# Create a SPARE-ICE object with the standard weights spareice = SPAREICE()
# Print the required input fields print(spareice.inputs)
# If you want to know the input fields for the each component, IWP # regressor and ice cloud classifier, you can get them like this: print(spareice.iwp.inputs) # Inputs from IWP regressor print(spareice.ice_cloud.inputs) # Inputs from ice cloud classifier
# If you have yur own input data, you can use
retrieve()
to run # SPARE-ICE on it. data = pd.DataFrame(…) retrieved = spareice.retrieve(data)# If your data directly comes from collocations between MHS and AVHRR, # you can use :
convert_collocated_data()
to make it SPARE-ICE # compatible. collocations = Collocator().collocate(mhs_data, avhrr_data, …) standardized_data = self.standardize_collocations(collocations) retrieved = spareice.retrieve(standardized_data)- __init__(file=None, collocator=None, processes=10, verbose=0, sea_mask_file=None, elevation_file=None)[source]
Initialize a SPAREICE object
- Parameters:
file – A JSON file with the coefficients of SPAREICE. If not given, the standard configuration will be loaded.
collocator – SPARE-ICE requires a collocator when it should be generated from filesets. You can pass your own
Collocator
object here if you want.processes – Number of processes to parallelize the training or collocation search. 10 is the default. Best value depends on your machine.
verbose (int) – Control
GridSearchCV
verbosity. The higher thevalue
printed. (the more debug messages are)
Methods
__init__
([file, collocator, processes, ...])Initialize a SPAREICE object
load
(filename)Load SPARE-ICE from a json file
report
(output_dir, experiment, data)Test the performance of SPARE-ICE and plot it
retrieve
(data[, as_log10])Retrieve SPARE-ICE for the input variables
retrieve_from_collocations
(inputs, output[, ...])Retrieve SPARE-ICE from collocations between MHS and AVHRR
save
(filename)Save SPARE-ICE to a json file
score
(data)Calculate the score of SPARE-ICE on testing data
standardize_collocations
(data[, fields, ...])Convert collocation fields to standard SPARE-ICE fields.
train
(data[, iwp_inputs, ice_cloud_inputs, ...])Train SPARE-ICE with data
Attributes
ice_cloud
Return the ice cloud classifier of SPARE-ICE
inputs
Return the input fields of the current configuration
iwp
Return the IWP regressor of SPARE-ICE