issue_comments: 436400765
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/pydata/xarray/issues/2547#issuecomment-436400765 | https://api.github.com/repos/pydata/xarray/issues/2547 | 436400765 | MDEyOklzc3VlQ29tbWVudDQzNjQwMDc2NQ== | 21049064 | 2018-11-06T20:40:20Z | 2018-11-06T20:41:25Z | NONE | Data: netcdf_files.zip Code below: ```python import numpy as np import pandas as pd import xarray as xr from shutil import copyfile import os data_dir = "./" filename = "Rg_dummy.nc" get the datetime rangetimes = pd.date_range("2000-01-01", "2000-12-31", name="time") var = "Rg" copyfile(filename, "temp.nc") ds = xr.open_dataset("temp.nc") print("Temporary Data read to Python") FORWARD FILL FROM THE ORIGINAL DATA to new timestepsds.reindex({"time":times}) ds.ffill("time") ds.to_netcdf(filename, format="NETCDF3_CLASSIC")print(filename, "Written!")remove temporary fileos.remove(data_dir+"temp.nc") print("Temporary Data Removed") del ds ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
377947810 |