diff --git a/modules/util/gfs_reader.py b/modules/util/gfs_reader.py index 4b733b3f784c9ad459964c0e9360b1b375cb779f..1e4a872fb089d347033ef38652a8390af0c770fd 100644 --- a/modules/util/gfs_reader.py +++ b/modules/util/gfs_reader.py @@ -147,9 +147,9 @@ def get_horz_layer_s(xr_dataset, fld_names, press, lon_range=None, lat_range=Non return sub_fld -def get_time_interpolated_layer(ds_0, ds_1, time_0, time_1, time, fld_name, press, lon_lo, lon_hi, lat_lo, lat_hi): - lyr_0 = get_horz_layer(ds_0, fld_name, press, lon_lo, lon_hi, lat_lo, lat_hi) - lyr_1 = get_horz_layer(ds_1, fld_name, press, lon_lo, lon_hi, lat_lo, lat_hi) +def get_time_interpolated_layer(ds_0, ds_1, time_0, time_1, time, fld_name, press, lon_range=None, lat_range=None): + lyr_0 = get_horz_layer(ds_0, fld_name, press, lon_range=lon_range, lat_range=lat_range) + lyr_1 = get_horz_layer(ds_1, fld_name, press, lon_range=lon_range, lat_range=lat_range) lyr = xr.concat([lyr_0, lyr_1], 'time') lyr = lyr.assign_coords(time=[time_0, time_1]) @@ -161,9 +161,9 @@ def get_time_interpolated_layer(ds_0, ds_1, time_0, time_1, time, fld_name, pres return intrp_lyr -def get_time_interpolated_layer_s(ds_0, ds_1, time_0, time_1, time, fld_name_s, press, lon_lo, lon_hi, lat_lo, lat_hi): - lyr_s_0 = get_horz_layer_s(ds_0, fld_name_s, press, lon_lo, lon_hi, lat_lo, lat_hi) - lyr_s_1 = get_horz_layer_s(ds_1, fld_name_s, press, lon_lo, lon_hi, lat_lo, lat_hi) +def get_time_interpolated_layer_s(ds_0, ds_1, time_0, time_1, time, fld_name_s, press, lon_range=None, lat_range=None): + lyr_s_0 = get_horz_layer_s(ds_0, fld_name_s, press, lon_range=lon_range, lat_range=lat_range) + lyr_s_1 = get_horz_layer_s(ds_1, fld_name_s, press, lon_range=lon_range, lat_range=lat_range) lyr = xr.concat([lyr_s_0, lyr_s_1], 'time') lyr = lyr.assign_coords(time=[time_0, time_1])