Skip to content

Commit

Permalink
More document formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bryan-harter committed Feb 19, 2022
1 parent cbd145a commit c2e9c44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cdflib/xarray_to_cdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ def xarray_to_cdf(xarray_dataset, file_name, from_unixtime=False, from_datetime=
>>> os.remove('hello.cdf')
>>> cdflib.xarray_to_cdf(ds, 'hello.cdf')
Example netCDF -> CDF conversion:
Example:
>>> # Import the needed libraries
>>> import cdflib
>>> import xarray as xr
Expand Down Expand Up @@ -577,7 +577,7 @@ def xarray_to_cdf(xarray_dataset, file_name, from_unixtime=False, from_datetime=
>>> if not os.path.exists(fname):
>>> urllib.request.urlretrieve(url, fname)
>>># Load in the dataset, and set VAR_TYPES attributes (the most important attribute as far as this code is concerned)
>>> # Load in the dataset, and set VAR_TYPES attributes (the most important attribute as far as this code is concerned)
>>> goes_r_mag = xr.load_dataset("C:/Work/cdf_test_files/dn_magn-l2-hires_g17_d20211219_v1-0-1.nc")
>>> for var in goes_r_mag:
>>> goes_r_mag[var].attrs['VAR_TYPE'] = 'data'
Expand Down

0 comments on commit c2e9c44

Please sign in to comment.