issue_comments: 460600500
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-460600500 | https://api.github.com/repos/pydata/xarray/issues/2547 | 460600500 | MDEyOklzc3VlQ29tbWVudDQ2MDYwMDUwMA== | 21049064 | 2019-02-05T11:15:01Z | 2019-02-05T11:15:01Z | NONE | Sorry for the silence! I got pulled away to another project. Unfortunately I wasn't able to finish completing the task in xarray but I found that the easiest way around the problem was to use a combination of two functions: ```python def change_missing_vals_to_9999f(ds, variable): """ Change the missing values from np.nan to -9999.0f""" arr = ds[variable].values
def change_missing_data_values(filename): """ change the values INSIDE the .nc file to -9999.0f """ assert ( filename.split(".")[-1] == "nc" ), "This function only works with .nc files. Filename: {}".format(filename) print(" Processing {} ").format(filename)
``` and then another function using the
RUN HERE: ``` @click.command() @click.argument("filename", type=str) def main(filename): """ Run the two commands a) change the Values INSIDE the .nc file [python, numpy, xarray] b) change the associated METADATA for the .nc file headers [nco] """ change_missing_data_values(filename) change_nc_FillValue(filename)
``` |
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
377947810 |