diff --git a/test/ci_tests/ci_result_file.nc b/test/ci_tests/ci_result_file.nc index e15d100..de544e1 100644 Binary files a/test/ci_tests/ci_result_file.nc and b/test/ci_tests/ci_result_file.nc differ diff --git a/test/ci_tests/ci_test_file.nc b/test/ci_tests/ci_test_file.nc index b0f8945..5765888 100644 Binary files a/test/ci_tests/ci_test_file.nc and b/test/ci_tests/ci_test_file.nc differ diff --git a/test/ci_tests/make_test_file.py b/test/ci_tests/make_test_file.py index fcdfac3..0b1bfd0 100644 --- a/test/ci_tests/make_test_file.py +++ b/test/ci_tests/make_test_file.py @@ -146,17 +146,17 @@ def make_result_file(opts): for latlonmeth in LATLON_METHS: if latlonmeth == "xy": # Hardcoded values from other unit tests - lats = [-55, -60, -65] - lons = [25, 30, 35] + lats = [22.0, 25.0, 27.0] + lons = [-90.0, -87.5, -83.75] xy = ll_to_xy(infile, lats[0], lons[0]) add_to_ncfile(outfile, xy, "xy") else: # Hardcoded from other unit tests - i_s = np.asarray([10, 100, 150], int) - 1 - j_s = np.asarray([10, 100, 150], int) - 1 + x_s = np.asarray([10, 50, 90], int) + y_s = np.asarray([10, 50, 90], int) - ll = xy_to_ll(infile, i_s[0], j_s[0]) + ll = xy_to_ll(infile, x_s[0], y_s[0]) add_to_ncfile(outfile, ll, "ll") def main(opts): @@ -166,7 +166,8 @@ def main(opts): if __name__ == "__main__": DEFAULT_FILE = ("/Users/ladwig/Documents/wrf_files/" - "wrf_vortex_multi/wrfout_d02_2005-08-28_12:00:00") + "wrf_vortex_multi/moving_nest/" + "wrfout_d02_2005-08-28_12:00:00") parser = argparse.ArgumentParser(description="Generate conda test files " "for unit testing.") parser.add_argument("-f", "--filename", required=False, diff --git a/test/ci_tests/utests.py b/test/ci_tests/utests.py index a61cf5c..67affd5 100644 --- a/test/ci_tests/utests.py +++ b/test/ci_tests/utests.py @@ -193,8 +193,8 @@ def make_latlon_test(testid, wrf_in, referent, single, multi=False, repeat=3, # same whether there are multiple or single files ref_vals = refnc.variables["xy"][:] # Lats/Lons taken from NCL script, just hard-coding for now - lats = [-55, -60, -65] - lons = [25, 30, 35] + lats = [22.0, 25.0, 27.0] + lons = [-90.0, -87.5, -83.75] xy = ll_to_xy(in_wrfnc, lats[0], lons[0]) @@ -208,10 +208,10 @@ def make_latlon_test(testid, wrf_in, referent, single, multi=False, repeat=3, # i_s, j_s taken from NCL script, just hard-coding for now # NCL uses 1-based indexing for this, so need to subtract 1 - i_s = np.asarray([10, 100, 150], int) - 1 - j_s = np.asarray([10, 100, 150], int) - 1 + x_s = np.asarray([10, 50, 90], int) + y_s = np.asarray([10, 50, 90], int) - ll = xy_to_ll(in_wrfnc, i_s[0], j_s[0]) + ll = xy_to_ll(in_wrfnc, x_s[0], y_s[0]) nt.assert_allclose(to_np(ll), ref_vals) diff --git a/test/utests.py b/test/utests.py index 699d287..613b13e 100644 --- a/test/utests.py +++ b/test/utests.py @@ -32,6 +32,7 @@ def setUpModule(): os.environ["NCARG_ROOT"] = NCARG_ROOT os.environ["NCARG_NCARG"] = os.path.join(NCARG_ROOT, "lib", "ncarg") + os.environ["OMP_NUM_THREADS"] = "4" this_path = os.path.realpath(__file__)