Notice: Function acf_get_value was called incorrectly. Advanced Custom Fields PRO - We've detected one or more calls to retrieve ACF field values before ACF has been initialized. This is not supported and can result in malformed or missing data. Learn how to fix this. Please see Debugging in WordPress for more information. (This message was added in version 5.11.1.) in /home/www-data/wpicare/wp-includes/functions.php on line 6121

Notice: Function acf_get_value was called incorrectly. Advanced Custom Fields PRO - We've detected one or more calls to retrieve ACF field values before ACF has been initialized. This is not supported and can result in malformed or missing data. Learn how to fix this. Please see Debugging in WordPress for more information. (This message was added in version 5.11.1.) in /home/www-data/wpicare/wp-includes/functions.php on line 6121

Notice: Function acf_get_value was called incorrectly. Advanced Custom Fields PRO - We've detected one or more calls to retrieve ACF field values before ACF has been initialized. This is not supported and can result in malformed or missing data. Learn how to fix this. Please see Debugging in WordPress for more information. (This message was added in version 5.11.1.) in /home/www-data/wpicare/wp-includes/functions.php on line 6121

Notice: Function acf_get_value was called incorrectly. Advanced Custom Fields PRO - We've detected one or more calls to retrieve ACF field values before ACF has been initialized. This is not supported and can result in malformed or missing data. Learn how to fix this. Please see Debugging in WordPress for more information. (This message was added in version 5.11.1.) in /home/www-data/wpicare/wp-includes/functions.php on line 6121

Notice: Function acf_get_value was called incorrectly. Advanced Custom Fields PRO - We've detected one or more calls to retrieve ACF field values before ACF has been initialized. This is not supported and can result in malformed or missing data. Learn how to fix this. Please see Debugging in WordPress for more information. (This message was added in version 5.11.1.) in /home/www-data/wpicare/wp-includes/functions.php on line 6121

Notice: Function acf_get_value was called incorrectly. Advanced Custom Fields PRO - We've detected one or more calls to retrieve ACF field values before ACF has been initialized. This is not supported and can result in malformed or missing data. Learn how to fix this. Please see Debugging in WordPress for more information. (This message was added in version 5.11.1.) in /home/www-data/wpicare/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the cookie-law-info domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/www-data/wpicare/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-wp-security domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/www-data/wpicare/wp-includes/functions.php on line 6121

Warning: Cannot modify header information - headers already sent by (output started at /home/www-data/wpicare/wp-includes/functions.php:6121) in /home/www-data/wpicare/wp-content-icare/plugins/web-connection-security/controllers/Base.php on line 69

Warning: Cannot modify header information - headers already sent by (output started at /home/www-data/wpicare/wp-includes/functions.php:6121) in /home/www-data/wpicare/wp-content-icare/plugins/web-connection-security/controllers/Base.php on line 70

Warning: Cannot modify header information - headers already sent by (output started at /home/www-data/wpicare/wp-includes/functions.php:6121) in /home/www-data/wpicare/wp-content-icare/plugins/web-connection-security/controllers/Base.php on line 45

Warning: Cannot modify header information - headers already sent by (output started at /home/www-data/wpicare/wp-includes/functions.php:6121) in /home/www-data/wpicare/wp-content-icare/plugins/web-connection-security/controllers/Base.php on line 49

Warning: Cannot modify header information - headers already sent by (output started at /home/www-data/wpicare/wp-includes/functions.php:6121) in /home/www-data/wpicare/wp-content-icare/plugins/web-connection-security/web-connection-security.php on line 27
SODA L3 – Soda

SODA L3

Algorithm Description

This algorithm computes the monthly means of the aerosols and non-opaque (at 333m scale) cloud optical depth retrieved by the SODA 5km products on a 2.5 by 2.5 degrees orthogonal grid. It produces 3 synthesis per month : day orbits only, night orbits only and both. The day/night definition is based on the CALIPSO one.

SODA Level 3 Builder

This is a very basic averaging scheme : an arithmetic mean of observations is computed in each output grid cell. Here is what it is like in pseudo-code :

def get_averaged_dataset(dataset_name, v_files):
    #---------------------------------------------------------------------#
    # projects the pixels of the given files in a plane square grid, computes#
    # the arithmetic mean of the given variable in each cell and return it#
    #---------------------------------------------------------------------#
# set accumulation buffers of size [sz_y, sz_x]. Initialized to zeros
    outgrid_acc = allocate_zeros_array("float", [sz_y, sz_x])
    outgrid_num = allocate_zeros_array("integer", [sz_y, sz_x])
 
    # - accumulate all pixels in the grid cells
    for f in v_files :
        # read vectors of(lat,lon)pixel positions
        v_lat = read_data(f, "Latitude")
        v_lon = read_data(f, "Longitude")
        # number of pixels in file "f"
        npix = v_lat.size()
        # read vector of retrieved data
        v_data = read_data(f, dataset_name)
        fill_value = get_fill_value(f, dataset_name)
        for ipix in range(npix):
            # [i, j] are the indices of the grid cell where falls the pixel
            # (lat, lon)
            i, j = get_igrid(lat, lon)
            data = v_data[ipix]
            if data != fill_value :
                # accumulate in grid cell x and increment number of values
                outgrid_acc[i, j] += data
                outgrid_num[i, j] += 1
            # end if
        # end for
    # end for
 
    # - average the accumulated data
    outdata = allocate_array("float", [sz_y, sz_x])
    for j in range(sz_y):
        for i in range(sz_x):
            if outgrid_num > 0 :
                # compute mean
                outdata[i, j] = outgrid_acc[i, j] / outgrid_num[i, j]
            else :
                # set to fill value
                outdata[i, j] = fill_value
            # end if
        # end for
    # end for
    return outdata
# end def get_averaged_dataset
 
def build_synthesis(year, month, dn_flag):
    #-------------------------------------------------------------------------#
    # build the monthly synthesis of the selected type of orbits              #
    # dn_mode is 'D', 'N' or 'A' and stands for day only, night only or all   #
    #-------------------------------------------------------------------------#
    v_files = get_infiles(year, month, dn_flag)
    outfile_name = get_outfilename(year, month, dn_flag)
    outfile = open(outfile_name, "w")# output HDF file
    for dataset_name in ["Optical_Depth_532_Cloud",
            "Optical_Depth_532_Aerosol",
            "Optical_Depth_1064_Cloud",
            "Optical_Depth_1064_Aerosol"] :
        outdata = get_averaged_dataset(dataset_name, v_files)
        write(outfile, dataset_name, outdata)
    # end for
    close(outfile)
# end def build_synthesis
 
# --- main --- #
for dn_flag in ['D', 'N', 'A'] :
    build_synthesis(year, month, dn_flag)
# end for

Rechercher