Ignore:
Timestamp:
Jul 10, 2017 12:15:43 PM (7 years ago)
Author:
gronemeier
Message:

new version of palm_gf (bugfixes, changes and new options)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palm_gf_files/palm_gf_exec.py

    r2116 r2308  
    66    c.execute("DROP TABLE IF EXISTS grid_current")
    77    c.execute("DROP TABLE IF EXISTS grid_limits")
    8     #c.execute("CREATE TABLE IF NOT EXISTS grid_current(np INT, npex INT, npey INT, nx INT, ny INT, nz INT)")
    98    c.execute("CREATE TABLE IF NOT EXISTS grid_current(nx INT, ny INT, nz INT, npex INT, npey INT, npxnpy FLOAT, np INT, ngpts INT)")
    109    c.execute("CREATE TABLE IF NOT EXISTS grid_limits(nx INT, ny INT, nz INT, npex INT, npey INT, npxnpy FLOAT, np INT, ngpts INT)")
     
    5655
    5756    print(spectr, type(spectr))
    58     results = open(".palm_gf_results", "w")
    5957    print(poisfft, switch, tempterton, mlt_grid, spectr)
    6058
     
    177175
    178176                            npxnpy = format(float(npex)/float(npey), '.2f')
    179                             results.write(
    180                                 str(" npex: ") + str(npex) + str(" npey: ") + str(npey) + str(" nx: ") + str(nx) + str(
    181                                     " ny: ") + str(ny) + str(" nz: ") + str(nz) + "\n")
    182177                            c.execute("""INSERT OR REPLACE INTO grid_current(nx, ny, nz, npex, npey, npxnpy, np, ngpts) VALUES (?, ?, ?, ?, ?, ?, ?, ?)""",
    183178                            (nx, ny, nz, npex, npey, npxnpy, (npex * npey), (nx*ny*nz)))
    184                             #print(npxnpy)
    185 
    186                             nz += 1
     179
     180                            nz += 11
    187181                        nz = nz_min
    188182                        ny += 1
     
    198192
    199193
    200     results.close()
    201194    conn.commit()
    202195    c.close()
Note: See TracChangeset for help on using the changeset viewer.