Changeset 2308 for palm/trunk/SCRIPTS/palm_gf_files/palm_gf_exec.py
- Timestamp:
- Jul 10, 2017 12:15:43 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palm_gf_files/palm_gf_exec.py
r2116 r2308 6 6 c.execute("DROP TABLE IF EXISTS grid_current") 7 7 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)")9 8 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)") 10 9 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)") … … 56 55 57 56 print(spectr, type(spectr)) 58 results = open(".palm_gf_results", "w")59 57 print(poisfft, switch, tempterton, mlt_grid, spectr) 60 58 … … 177 175 178 176 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")182 177 c.execute("""INSERT OR REPLACE INTO grid_current(nx, ny, nz, npex, npey, npxnpy, np, ngpts) VALUES (?, ?, ?, ?, ?, ?, ?, ?)""", 183 178 (nx, ny, nz, npex, npey, npxnpy, (npex * npey), (nx*ny*nz))) 184 #print(npxnpy) 185 186 nz += 1 179 180 nz += 11 187 181 nz = nz_min 188 182 ny += 1 … … 198 192 199 193 200 results.close()201 194 conn.commit() 202 195 c.close()
Note: See TracChangeset
for help on using the changeset viewer.