File tree Expand file tree Collapse file tree 2 files changed +87
-87
lines changed
Expand file tree Collapse file tree 2 files changed +87
-87
lines changed Original file line number Diff line number Diff line change 33from pathlib import Path
44from typing import Optional
55
6- from attr import Factory , field
6+ import numpy as np
7+ from attr import field
78from attrs import define
8- from xattree import array , child , xattree
9+ from numpy .typing import NDArray
10+ from xattree import array , child , dim , xattree
911
1012__all__ = [
1113 "Component" ,
@@ -58,16 +60,15 @@ class PeriodData:
5860 nstp : int = field (default = 1 )
5961 tsmult : float = field (default = 1.0 )
6062
61- nper : int = field (
63+ nper : int = dim (
64+ coord = "kper" ,
65+ scope = "simulation" ,
6266 default = 1 ,
63- metadata = {
64- "block" : "dimensions" ,
65- "dim" : {"coord" : "kper" , "scope" : "simulation" },
66- },
67+ metadata = {"block" : "dimensions" },
6768 )
68- perioddata : list [PeriodData ] = array (
69+ perioddata : NDArray [np .object_ ] = array (
70+ PeriodData ,
6971 dims = ("nper" ,),
70- default = Factory (list ),
7172 metadata = {"block" : "perioddata" },
7273 )
7374 time_units : Optional [str ] = field (
You can’t perform that action at this time.
0 commit comments