oas_dev/util/var_overview_sql.py
def create_database_and_area_means(database):
    """
    Create a table to hold area means and paths
    :param database:
    :return:
    """
    conn =sqlite3.connect(database)
    sql_create_projects_table = """ CREATE TABLE IF NOT EXISTS Area_means (
                                        var text NOT NULL,
                                        model text NOT NULL,
                                        case_name text NOT NULL,
                                        area text NOT NULL,
                                        type_avg text NOT NULL,
                                        pressure_coords integer,
                                        at_lev integer,
                                        to_lev real,
                                        model_case text NOT NULL,
                                        case_var text NOT NULL,
                                        path_to_data text,
                                        to_lev real,
                                        at_lev real,
                                        avg_over_lev integer,
                                        var_case_model_avgtype_pressure_coords_to_lev text NOT NULL PRIMARY KEY 
                                    ); """#%(mod_tab_name)

        # create a database connection
    if conn is not None:
        # create projects table
        create_table(conn, sql_create_projects_table)
    else:
        print("Error! cannot create the database connection.")
    conn.close()
    return

    Create a table to hold area means and paths
    :param database:
    :return:
    
Create a table to hold area means and paths
Create a table to hold area means and paths
def create_database_and_area_means(database):
    conn =sqlite3.connect(database)
    sql_create_projects_table = """ CREATE TABLE IF NOT EXISTS Area_means (
                                        var text NOT NULL,
                                        model text NOT NULL,
                                        case_name text NOT NULL,
                                        area text NOT NULL,
                                        type_avg text NOT NULL,
                                        pressure_coords integer,
                                        at_lev integer,
                                        to_lev real,
                                        model_case text NOT NULL,
                                        case_var text NOT NULL,
                                        path_to_data text,
                                        to_lev real,
                                        at_lev real,
                                        avg_over_lev integer,
                                        var_case_model_avgtype_pressure_coords_to_lev text NOT NULL PRIMARY KEY 
                                    ); """
    if conn is not None:
        create_table(conn, sql_create_projects_table)
    else:
        print("Error! cannot create the database connection.")
    conn.close()
    return
def create_database_and_area_means ( database ) : conn = sqlite3 . connect ( database ) sql_create_projects_table = """ CREATE TABLE IF NOT EXISTS Area_means (
                                        var text NOT NULL,
                                        model text NOT NULL,
                                        case_name text NOT NULL,
                                        area text NOT NULL,
                                        type_avg text NOT NULL,
                                        pressure_coords integer,
                                        at_lev integer,
                                        to_lev real,
                                        model_case text NOT NULL,
                                        case_var text NOT NULL,
                                        path_to_data text,
                                        to_lev real,
                                        at_lev real,
                                        avg_over_lev integer,
                                        var_case_model_avgtype_pressure_coords_to_lev text NOT NULL PRIMARY KEY 
                                    ); """ if conn is not None : create_table ( conn , sql_create_projects_table ) else : print ( "Error! cannot create the database connection." ) conn . close ( ) return
Create a table to hold area means and paths
Create a table to hold area means and paths
"""
    Create a table to hold area means and paths
    :param database:
    :return:
    """ #%(mod_tab_name) # create a database connection # create projects table
None
database
None