Skip to content

Commit

Permalink
Update temp units in NCL_conLev_1.py (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
kafitzgerald authored Feb 21, 2024
1 parent e12a180 commit e1d91b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Gallery/Contours/NCL_conLev_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
decode_times=False)
# Extract slice of the data
temp = ds.TS.isel(time=43).drop_vars(names=['time'])
# Convert from Celsius to Kelvin

# Convert from Kelvin to Celsius and update units
temp.data = temp.data - 273.15
temp.attrs['units'] = 'C'

# Fix the artifact of not-shown-data around 0 and 360-degree longitudes
temp = gv.xr_add_cyclic_longitudes(temp, "lon")
Expand Down

0 comments on commit e1d91b8

Please sign in to comment.