DLESyM / scripts /fake_data.py
zhangrenchao's picture
Publish DLESyM reproduction
bec9cbb verified
Raw
History Blame Contribute Delete
483 Bytes
from pathlib import Path
import sys,numpy as np
R=Path(__file__).resolve().parents[1];sys.path.insert(0,str(R));from model.dlesym import *
c=cfg(R);a=[];s=[];ta=[];ts=[]
for i in range(6):x,y=state(i);u,v=state(i,1);a.append(x);s.append(y);ta.append(u);ts.append(v)
p=R/c['data']['path'];p.parent.mkdir(parents=True,exist_ok=True);np.savez_compressed(p,atmosphere=a,sst=s,target_atmosphere=ta,target_sst=ts,fields=FIELDS,logical_shape=[10,180,360],is_complete_global=False);print(p)