Assess products

How to Assess your products

You can assess your product by following this chapter, or by submitting your product using this submission form and then going to the online assessment tools.

You will learn here how to use SIN’XS assessment tool. The command to use this script is sinxs. Ex: sinxs --cfgfile config_test_sinxs.cfg --monthly True gets all the attributes from the configuration file and overwrite monthly to True.

In this chapter we will focus on how to call sinxs with a configuration file using the option --cfgfile. To add parameters or use only parameters in command line, please refer to the help using the -h option for more information.

We can distinguish 4 sections in the configuration file:

  1. Header : common part of the execution

  2. filters : filters applied to the products

  3. product_main : part relative to the main product

  4. product_slave : part relative to the slave product

2. Filters

The filters allows you to select a subset of the original dataset. Here is the list of possible options that can be provided after [[filters]]: polygon, start and end. For more information, please refer to the Filters chapter.

3. Product_main

To specify the main product, 2 attributes can be provided after [product_main]:

  • title : Product description title, appearing in the titles of plots.

  • path : path refers to the location of the product file(s) to be assessed. It may include an asterisk * to designate multiple folders or files for selection. If the variable of interest var is not present in the product, the library will attempt the conversion.

  • product_var : Variable to use in the product file(s).

  • path_convert_with : path_convert_with refers to the location of the product file(s), which helps convert the product into the specified var variable. Like path, it can incorporate an asterisk * when several folders or files need to be selected.

  • convert_with_var : Variable to use in the conversion product file(s).

3. Product_slave

This section closely resembles the previous product_main section, the main distinction is the selection of the nearest dates of this product that corresponds to the dates in product_main.

Example

Example of configuration file:

plot = MAP_DIFFERENCE, MAP, BOXPLOT, SCATTER, HISTOGRAM, HISTOGRAM_DIFFERENCE
var = radar_freeboard_ku
output_folder = ../outputs/
monthly = False
north = True

[filters]
    polygon = [0,80], [60, 80], [60, 85], [0, 85]
    start = 2015-01
    end = 2018-06

[product_main]
    title = SAMOSA
    path = ../database/NH/SIT-E2a_satellital_observations_ku-band/Ku_CryoSat-2/LEGOS/SAMOSA/*/*.nc
    product_var = radar_freeboard_ku

[product_slave]
    title = TFMRA50
    path = ../database/NH/SIT-E2a_satellital_observations_ku-band/Ku_CryoSat-2/LEGOS/TFMRA50/*/*.nc
    product_var = radar_freeboard_ku

Example of configuration file with conversion, in the event that the MAP is requested, it will also create an uncertainty map:

plot = MAP_DIFFERENCE, MAP, BOXPLOT, SCATTER, HISTOGRAM, HISTOGRAM_DIFFERENCE
var = sea_ice_thickness
output_folder = ../outputs/
monthly = False
north = True

[filters]
    polygon = [0,80], [60, 80], [60, 85], [0, 85]
    start = 2015-01
    end = 2018-06

[product_main]
    title = ASD-SAMOSA
    path = ../database/NH/SD-2_satellite_observations/LEGOS/ASD/*/*.nc
    product_var = snow_thickness
    path_convert_with = ../database/NH/SIT-E2a_satellital_observations_ku-band/Ku_CryoSat-2/LEGOS/SAMOSA/*/*.nc
    convert_with_var = radar_freeboard_ku

[product_slave]
    title = ASD-TFMRA50
    path = ../database/NH/SD-2_satellite_observations/LEGOS/ASD/*/*.nc
    product_var = snow_thickness
    path_convert_with = ../database/NH/SIT-E2a_satellital_observations_ku-band/Ku_CryoSat-2/LEGOS/TFMRA50/*/*.nc
    convert_with_var = radar_freeboard_ku

The conversion log is presented below, displaying the conversion equation and the associated uncertainty equation:

2024-01-25 17:15:52,426 - INFO - sinxs.tools.assess - Main product - ASD-SAMOSA
2024-01-25 17:15:53,357 - INFO - sinxs.tools.misc - snow_thickness
2024-01-25 17:15:53,357 - INFO - sinxs.tools.misc - sd
2024-01-25 17:15:53,357 - INFO - sinxs.tools.read - Conversion needed
2024-01-25 17:15:53,362 - INFO - sinxs.tools.misc - snow_thickness
2024-01-25 17:15:53,362 - INFO - sinxs.tools.misc - sd
2024-01-25 17:15:54,551 - INFO - sinxs.tools.misc - radar_freeboard_ku
2024-01-25 17:15:54,551 - INFO - sinxs.tools.misc - fbku
2024-01-25 17:15:54,554 - INFO - sinxs.tools.convert - Converting sd with fbku to sit
2024-01-25 17:15:54,639 - INFO - sinxs.tools.convert - sit = -fbku*rho_w/(rho_i - rho_w) + sd*(-rho_s/(rho_i - rho_w) - rho_w*snow_penetration_ku*(rho_s*ulaby + 1)**1.5/(rho_i - rho_w) + rho_w/(rho_i - rho_w))
2024-01-25 17:15:54,649 - INFO - sinxs.tools.convert - Uncertainty :
2024-01-25 17:15:54,686 - INFO - sinxs.tools.convert - np.sqrt(
  (rho_w_uncertainty * -fbku*rho_w/(rho_i - rho_w)**2 - fbku/(rho_i - rho_w) + sd*(-rho_s/(rho_i - rho_w)**2 - rho_w*snow_penetration_ku*(rho_s*ulaby + 1)**1.5/(rho_i - rho_w)**2 + rho_w/(rho_i - rho_w)**2 - snow_penetration_ku*(rho_s*ulaby + 1)**1.5/(rho_i - rho_w) + 1/(rho_i - rho_w)))**2
+ (rho_i_uncertainty * fbku*rho_w/(rho_i - rho_w)**2 + sd*(rho_s/(rho_i - rho_w)**2 + rho_w*snow_penetration_ku*(rho_s*ulaby + 1)**1.5/(rho_i - rho_w)**2 - rho_w/(rho_i - rho_w)**2))**2
+ (rho_s_uncertainty * sd*(-1.5*rho_w*snow_penetration_ku*ulaby*(rho_s*ulaby + 1)**0.5/(rho_i - rho_w) - 1/(rho_i - rho_w)))**2
+ (ulaby_uncertainty * -1.5*rho_s*rho_w*sd*snow_penetration_ku*(rho_s*ulaby + 1)**0.5/(rho_i - rho_w))**2
+ (snow_penetration_ku_uncertainty * -rho_w*sd*(rho_s*ulaby + 1)**1.5/(rho_i - rho_w))**2
+ (sd_uncertainty * -rho_s/(rho_i - rho_w) - rho_w*snow_penetration_ku*(rho_s*ulaby + 1)**1.5/(rho_i - rho_w) + rho_w/(rho_i - rho_w))**2
+ (fbku_uncertainty * -rho_w/(rho_i - rho_w))**2
)
2024-01-25 17:15:54,709 - INFO - sinxs.tools.assess - Slave product - ASD-TFMRA50
2024-01-25 17:15:55,669 - INFO - sinxs.tools.misc - snow_thickness
2024-01-25 17:15:55,670 - INFO - sinxs.tools.misc - sd
2024-01-25 17:15:55,670 - INFO - sinxs.tools.read - Conversion needed
2024-01-25 17:15:55,674 - INFO - sinxs.tools.misc - snow_thickness
2024-01-25 17:15:55,674 - INFO - sinxs.tools.misc - sd
2024-01-25 17:15:56,933 - INFO - sinxs.tools.misc - radar_freeboard_ku
2024-01-25 17:15:56,933 - INFO - sinxs.tools.misc - fbku
2024-01-25 17:15:56,935 - INFO - sinxs.tools.convert - Converting sd with fbku to sit
2024-01-25 17:15:56,970 - INFO - sinxs.tools.convert - sit = -fbku*rho_w/(rho_i - rho_w) + sd*(-rho_s/(rho_i - rho_w) - rho_w*snow_penetration_ku*(rho_s*ulaby + 1)**1.5/(rho_i - rho_w) + rho_w/(rho_i - rho_w))
2024-01-25 17:15:56,976 - INFO - sinxs.tools.convert - Uncertainty :
2024-01-25 17:15:56,986 - INFO - sinxs.tools.convert - np.sqrt(
  (rho_w_uncertainty * -fbku*rho_w/(rho_i - rho_w)**2 - fbku/(rho_i - rho_w) + sd*(-rho_s/(rho_i - rho_w)**2 - rho_w*snow_penetration_ku*(rho_s*ulaby + 1)**1.5/(rho_i - rho_w)**2 + rho_w/(rho_i - rho_w)**2 - snow_penetration_ku*(rho_s*ulaby + 1)**1.5/(rho_i - rho_w) + 1/(rho_i - rho_w)))**2
+ (rho_i_uncertainty * fbku*rho_w/(rho_i - rho_w)**2 + sd*(rho_s/(rho_i - rho_w)**2 + rho_w*snow_penetration_ku*(rho_s*ulaby + 1)**1.5/(rho_i - rho_w)**2 - rho_w/(rho_i - rho_w)**2))**2
+ (rho_s_uncertainty * sd*(-1.5*rho_w*snow_penetration_ku*ulaby*(rho_s*ulaby + 1)**0.5/(rho_i - rho_w) - 1/(rho_i - rho_w)))**2
+ (ulaby_uncertainty * -1.5*rho_s*rho_w*sd*snow_penetration_ku*(rho_s*ulaby + 1)**0.5/(rho_i - rho_w))**2
+ (snow_penetration_ku_uncertainty * -rho_w*sd*(rho_s*ulaby + 1)**1.5/(rho_i - rho_w))**2
+ (sd_uncertainty * -rho_s/(rho_i - rho_w) - rho_w*snow_penetration_ku*(rho_s*ulaby + 1)**1.5/(rho_i - rho_w) + rho_w/(rho_i - rho_w))**2
+ (fbku_uncertainty * -rho_w/(rho_i - rho_w))**2
)