Skip to content

Commit

Permalink
critical bugfix of treansforming to radians
Browse files Browse the repository at this point in the history
  • Loading branch information
Datseris committed Apr 14, 2021
1 parent f65167d commit f7cd582
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.nc
Manifest.toml
*.vscode
################################################################################
# DrWatson Project Structure #
################################################################################
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ClimateBase"
uuid = "35604d93-0fb8-4872-9436-495b01d137e2"
authors = ["Datseris <[email protected]>", "Philippe Roy <[email protected]>"]
version = "0.12.0"
version = "0.12.1"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
2 changes: 1 addition & 1 deletion src/core/nc_io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ end

function convert_to_degrees(lonlat, ds)
x = haskey(ds, "clat") ? ds["clat"] : ds["lat"]
if haskey(x.attrib, "units") == "radian" || any(ll -> ll[1] > 2, lonlat)
if haskey(x.attrib, "units") == "radian" || !any(ll -> abs(ll[2]) > π/2, lonlat)
lonlat = [SVector(lo*180/π, la*180/π) for (lo, la) in lonlat]
end
return lonlat
Expand Down

0 comments on commit f7cd582

Please sign in to comment.