Skip to content

Commit

Permalink
remove UserWarning by importing as ms and then converting to ns
Browse files Browse the repository at this point in the history
  • Loading branch information
AugustinMortier committed Nov 10, 2023
1 parent ebed0ca commit 4947524
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aprofiles/cli/utils/json_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def add_to_map(fn, base_dir, yyyy, mm, dd, mapname):

# calculate the max extinction and determine the scene for each hour of the day
# need to convert time (from int to datetime) in order to use the resample method from xarray
ds = ds.assign_coords(time = ds.time.data.astype("datetime64[ms]"))
ds["time"]= ds.time.data.astype("datetime64[ms]").astype("datetime64[ns]")

# in order to prevent some monotony issue, sort by time
ds = ds.sortby('time')
Expand Down

0 comments on commit 4947524

Please sign in to comment.