@@ -175,6 +175,10 @@ def _checkInputs(self):
175
175
# Check that level_lr is >= 0
176
176
# check that level_hr is <=self.max_level
177
177
178
+ # For convenience, the turbines should not be zero-indexed
179
+ if self .wts [0 ]['name' ] != 'T1' :
180
+ print (f"--- WARNING: Recommended turbine numbering should start at 1. Currently it is zero-indexed." )
181
+
178
182
179
183
# Flags of given/calculated spatial resolution for warning/error printing purposes
180
184
self .given_ds_hr = False
@@ -652,7 +656,7 @@ def write_sampling_params(self, out=None, overwrite=False):
652
656
sampling_labels_lr_str = " " .join (str (item ) for item in self .sampling_labels_lr )
653
657
sampling_labels_hr_str = " " .join (str (item ) for item in self .sampling_labels_hr )
654
658
s += f"#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨#\n "
655
- s += f"# POST-Processing #\n "
659
+ s += f"# POST-PROCESSING #\n "
656
660
s += f"#.......................................#\n "
657
661
s += f"# Sampling info generated by AMRWindSamplingCreation.py on { self .curr_datetime } \n "
658
662
s += f"incflo.post_processing = { self .postproc_name_lr } { self .postproc_name_hr } # averaging\n \n \n "
@@ -667,19 +671,19 @@ def write_sampling_params(self, out=None, overwrite=False):
667
671
zoffsets_lr_str = " " .join (str (item ) for item in self .zoffsets_lr )
668
672
669
673
s += f"# Low sampling grid spacing = { self .ds_lr } m\n "
670
- s += f"{ self .postproc_name_lr } .Low.type = PlaneSampler\n "
671
- s += f"{ self .postproc_name_lr } .Low.num_points = { self .nx_lr } { self .ny_lr } \n "
672
- s += f"{ self .postproc_name_lr } .Low.origin = { self .xlow_lr :.4f} { self .ylow_lr :.4f} { self .zlow_lr :.4f} \n " # Round the float output
673
- s += f"{ self .postproc_name_lr } .Low.axis1 = { self .xdist_lr :.4f} 0.0 0.0\n " # Assume: axis1 oriented parallel to AMR-Wind x-axis
674
- s += f"{ self .postproc_name_lr } .Low.axis2 = 0.0 { self .ydist_lr :.4f} 0.0\n " # Assume: axis2 oriented parallel to AMR-Wind y-axis
675
- s += f"{ self .postproc_name_lr } .Low.normal = 0.0 0.0 1.0\n "
676
- s += f"{ self .postproc_name_lr } .Low.offsets = { zoffsets_lr_str } \n \n \n "
674
+ s += f"{ self .postproc_name_lr } .Low.type = PlaneSampler\n "
675
+ s += f"{ self .postproc_name_lr } .Low.num_points = { self .nx_lr } { self .ny_lr } \n "
676
+ s += f"{ self .postproc_name_lr } .Low.origin = { self .xlow_lr :.4f} { self .ylow_lr :.4f} { self .zlow_lr :.4f} \n " # Round the float output
677
+ s += f"{ self .postproc_name_lr } .Low.axis1 = { self .xdist_lr :.4f} 0.0 0.0\n " # Assume: axis1 oriented parallel to AMR-Wind x-axis
678
+ s += f"{ self .postproc_name_lr } .Low.axis2 = 0.0 { self .ydist_lr :.4f} 0.0\n " # Assume: axis2 oriented parallel to AMR-Wind y-axis
679
+ s += f"{ self .postproc_name_lr } .Low.offset_vector = 0.0 0.0 1.0\n "
680
+ s += f"{ self .postproc_name_lr } .Low.offsets = { zoffsets_lr_str } \n \n \n "
677
681
678
682
s += f"# ---- High-res sampling parameters ----\n "
679
- s += f"{ self .postproc_name_hr } .output_format = netcdf\n "
680
- s += f"{ self .postproc_name_hr } .output_frequency = { self .output_frequency_hr } \n "
681
- s += f"{ self .postproc_name_hr } .fields = velocity # temperature tke\n "
682
- s += f"{ self .postproc_name_hr } .labels = { sampling_labels_hr_str } \n "
683
+ s += f"{ self .postproc_name_hr } .output_format = netcdf\n "
684
+ s += f"{ self .postproc_name_hr } .output_frequency = { self .output_frequency_hr } \n "
685
+ s += f"{ self .postproc_name_hr } .fields = velocity # temperature tke\n "
686
+ s += f"{ self .postproc_name_hr } .labels = { sampling_labels_hr_str } \n "
683
687
684
688
# Write out high resolution sampling plane info
685
689
for turbkey in self .hr_domains :
@@ -704,13 +708,13 @@ def write_sampling_params(self, out=None, overwrite=False):
704
708
zoffsets_hr_str = " " .join (str (item ) for item in zoffsets_hr )
705
709
706
710
s += f"\n # Turbine { wt_name } with base at (x,y,z) = ({ wt_x :.4f} , { wt_y :.4f} , { wt_z :.4f} ), with hh = { wt_h } , D = { wt_D } , grid spacing = { self .ds_hr } m\n "
707
- s += f"{ self .postproc_name_hr } .{ sampling_name } .type = PlaneSampler\n "
708
- s += f"{ self .postproc_name_hr } .{ sampling_name } .num_points = { nx_hr } { ny_hr } \n "
709
- s += f"{ self .postproc_name_hr } .{ sampling_name } .origin = { xlow_hr :.4f} { ylow_hr :.4f} { zlow_hr :.4f} \n " # Round the float output
710
- s += f"{ self .postproc_name_hr } .{ sampling_name } .axis1 = { xdist_hr :.4f} 0.0 0.0\n " # Assume: axis1 oriented parallel to AMR-Wind x-axis
711
- s += f"{ self .postproc_name_hr } .{ sampling_name } .axis2 = 0.0 { ydist_hr :.4f} 0.0\n " # Assume: axis2 oriented parallel to AMR-Wind y-axis
712
- s += f"{ self .postproc_name_hr } .{ sampling_name } .normal = 0.0 0.0 1.0\n "
713
- s += f"{ self .postproc_name_hr } .{ sampling_name } .offsets = { zoffsets_hr_str } \n "
711
+ s += f"{ self .postproc_name_hr } .{ sampling_name } .type = PlaneSampler\n "
712
+ s += f"{ self .postproc_name_hr } .{ sampling_name } .num_points = { nx_hr } { ny_hr } \n "
713
+ s += f"{ self .postproc_name_hr } .{ sampling_name } .origin = { xlow_hr :.4f} { ylow_hr :.4f} { zlow_hr :.4f} \n " # Round the float output
714
+ s += f"{ self .postproc_name_hr } .{ sampling_name } .axis1 = { xdist_hr :.4f} 0.0 0.0\n " # Assume: axis1 oriented parallel to AMR-Wind x-axis
715
+ s += f"{ self .postproc_name_hr } .{ sampling_name } .axis2 = 0.0 { ydist_hr :.4f} 0.0\n " # Assume: axis2 oriented parallel to AMR-Wind y-axis
716
+ s += f"{ self .postproc_name_hr } .{ sampling_name } .offset_vector = 0.0 0.0 1.0\n "
717
+ s += f"{ self .postproc_name_hr } .{ sampling_name } .offsets = { zoffsets_hr_str } \n "
714
718
715
719
716
720
if out is None :
0 commit comments