Black+isort, layers, vz in sws_npz
This commit is contained in:
parent
ce3de3f932
commit
934b391e59
5 changed files with 49 additions and 25 deletions
|
@ -1,8 +1,8 @@
|
|||
import argparse
|
||||
import configparser
|
||||
import logging
|
||||
from multiprocessing.pool import ThreadPool
|
||||
import pathlib
|
||||
from multiprocessing.pool import ThreadPool
|
||||
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
@ -36,6 +36,7 @@ var = {
|
|||
"press": rsws.read_scalar,
|
||||
"zk": rsws.read_scalar_lay,
|
||||
"velk": rsws.read_vector_lay,
|
||||
"vz": rsws.read_scalar_lay,
|
||||
}
|
||||
|
||||
inp.mkdir(exist_ok=True)
|
||||
|
@ -43,7 +44,8 @@ with ThreadPool() as pool:
|
|||
log.info("Converting all data")
|
||||
pool.map(
|
||||
lambda x: np.save(
|
||||
inp.joinpath(x[0]), x[1](sws_out.joinpath(x[0]).with_suffix(".dat"))
|
||||
inp.joinpath(x[0]),
|
||||
x[1](sws_out.joinpath(x[0]).with_suffix(".dat")),
|
||||
),
|
||||
var.items(),
|
||||
)
|
||||
|
|
Reference in a new issue