<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def CreateAllStaticECMWFFiles(in_catchment, catchment_river_id, rapid_output_folder, rapid_connect_file, file_geodatabase=None ):
 """ This creates all of the ECMWF grid weight tables using an area weighted method based on Esri's RAPID_Toolbox. Parameters in_catchment: str Path to the Catchment shapefile. catchment_river_id: str The name of the field with the river ID (Ex. 'DrainLnID' or 'LINKNO'). rapid_output_folder: str The path to the folder where all of the RAPID output will be generated. rapid_connect_file: str The path to the RAPID connectivity file. file_geodatabase: str, optional Path to the file geodatabase. If you use this option, in_drainage_line is the name of the stream network feature class. (WARNING: Not always stable with GDAL.) Example:: from RAPIDpy.gis.workflow import CreateAllStaticECMWFFiles CreateAllStaticECMWFFiles( in_catchment="/path/to/catchment.shp", catchment_river_id="DrainLnID", rapid_output_folder="/path/to/rapid/output", rapid_connect_file="/path/to/rapid_connect.csv", ) """

    lsm_grid_folder = \
        os.path.join(os.path.dirname(os.path.realpath(__file__)), 'lsm_grids')

    # create from ECMWF high reslution grid
    ecmwf_t1279_grid_file = \
        os.path.join(lsm_grid_folder, 'runoff_ecmwf_t1279_grid.nc')
    weight_ecmwf_t1279_file = \
        os.path.join(rapid_output_folder, 'weight_ecmwf_t1279.csv')
    CreateWeightTableECMWF(ecmwf_t1279_grid_file,
                           in_catchment,
                           catchment_river_id,
                           rapid_connect_file,
                           weight_ecmwf_t1279_file,
                           file_geodatabase=file_geodatabase)

    # create from ECMWF low reslution grid
    ecmwf_tco639_grid_file = \
        os.path.join(lsm_grid_folder, 'runoff_ecmwf_tco639_grid.nc')
    weight_ecmwf_tco639_file = \
        os.path.join(rapid_output_folder, 'weight_ecmwf_tco639.csv')
    CreateWeightTableECMWF(ecmwf_tco639_grid_file,
                           in_catchment,
                           catchment_river_id,
                           rapid_connect_file,
                           weight_ecmwf_tco639_file,
                           file_geodatabase=file_geodatabase)

    # create from ERA Interim grid
    era_t511_grid_file = \
        os.path.join(lsm_grid_folder, 'runoff_era_t511_grid.nc')
    weight_era_t511_file = \
        os.path.join(rapid_output_folder, 'weight_era_t511.csv')
    CreateWeightTableECMWF(era_t511_grid_file,
                           in_catchment,
                           catchment_river_id,
                           rapid_connect_file,
                           weight_era_t511_file,
                           file_geodatabase=file_geodatabase)