@@ -3763,10 +3763,6 @@ def writeGridfile(self, filename):
3763
3763
if hasattr (self .equilibrium , "psi_bdry_gfile" ):
3764
3764
f .write ("psi_bdry_gfile" , self .equilibrium .psi_bdry_gfile )
3765
3765
3766
- if hasattr (self .equilibrium , "closed_wallarray" ):
3767
- f .write ("closed_wall_R" , self .equilibrium .closed_wallarray [:, 0 ])
3768
- f .write ("closed_wall_Z" , self .equilibrium .closed_wallarray [:, 1 ])
3769
-
3770
3766
# write the 2d fields
3771
3767
for name in self .fields_to_output :
3772
3768
self .writeArray (name , self .__dict__ [name ], f )
@@ -3930,6 +3926,24 @@ def writeGridfile(self, filename):
3930
3926
# Field-aligned coordinates
3931
3927
f .write_file_attribute ("parallel_transform" , "identity" )
3932
3928
3929
+ if hasattr (self .equilibrium , "closed_wallarray" ):
3930
+ # Hack the "bout_type" for these variables to avoid creating a 't'
3931
+ # dimension in the grid file.
3932
+ f .write (
3933
+ "closed_wall_R" ,
3934
+ BoutArray (
3935
+ self .equilibrium .closed_wallarray [:, 0 ],
3936
+ attributes = {"bout_type" : "ArrayX" },
3937
+ ),
3938
+ )
3939
+ f .write (
3940
+ "closed_wall_Z" ,
3941
+ BoutArray (
3942
+ self .equilibrium .closed_wallarray [:, 1 ],
3943
+ attributes = {"bout_type" : "ArrayX" },
3944
+ ),
3945
+ )
3946
+
3933
3947
# Save hypnotoad_inputs as a variable rather than an attribute because they
3934
3948
# are long and attributes are printed by 'ncdump -h' or by ncdump when
3935
3949
# looking at a different variable, which would be inconvenient. It is not
0 commit comments