@@ -92,15 +92,16 @@ def clim_evol(plname, xrange=False, show=True):
9292
9393 esinv = ecc * np .sin (longp ) * np .sin (obl * np .pi / 180.0 )
9494
95- lats = np .unique (body .Latitude )
95+ lats = np .unique (body .Latitude . value )
9696 nlats = len (lats )
9797 ntimes = len (body .Time )
98+ time = body .Time .value
9899
99100 # plot temperature
100- temp = np .reshape (body .TempLat , (ntimes , nlats ))
101+ temp = np .reshape (body .TempLat . value , (ntimes , nlats ))
101102 ax1 = plt .subplot (5 , 1 , 1 )
102103
103- c = plt .contourf (body . Time , lats , temp .T , cmap = "plasma" )
104+ c = plt .contourf (time , lats , temp .T , cmap = "plasma" )
104105 plt .ylabel (r"Latitude [$^\circ$]" , fontsize = 10 )
105106 plt .title (r"Surface Temp [$^{\circ}$C]" , fontsize = 12 )
106107 plt .ylim (- 90 , 90 )
@@ -116,9 +117,9 @@ def clim_evol(plname, xrange=False, show=True):
116117 plt .setp (cbar .ax .yaxis .get_ticklabels (), fontsize = 9 )
117118
118119 # plot albedo
119- alb = np .reshape (body .AlbedoLat , (ntimes , nlats ))
120+ alb = np .reshape (body .AlbedoLat . value , (ntimes , nlats ))
120121 ax2 = plt .subplot (5 , 1 , 3 )
121- c = plt .contourf (body . Time , lats , alb .T , cmap = "Blues_r" )
122+ c = plt .contourf (time , lats , alb .T , cmap = "Blues_r" )
122123 plt .ylabel (r"Latitude [$^\circ$]" , fontsize = 10 )
123124 plt .title ("Albedo [TOA]" , fontsize = 12 )
124125 plt .ylim (- 90 , 90 )
@@ -130,9 +131,9 @@ def clim_evol(plname, xrange=False, show=True):
130131 plt .setp (cbar .ax .yaxis .get_ticklabels (), fontsize = 9 )
131132
132133 # plot ice height
133- ice = np .reshape (body .IceHeight , (ntimes , nlats ))
134+ ice = np .reshape (body .IceHeight . value , (ntimes , nlats ))
134135 ax3 = plt .subplot (5 , 1 , 4 )
135- c = plt .contourf (body . Time , lats , ice .T , cmap = "Blues_r" )
136+ c = plt .contourf (time , lats , ice .T , cmap = "Blues_r" )
136137 plt .ylabel (r"Latitude [$^\circ$]" , fontsize = 10 )
137138 plt .title ("Ice sheet height [m]" , fontsize = 12 )
138139 plt .ylim (- 90 , 90 )
@@ -144,9 +145,9 @@ def clim_evol(plname, xrange=False, show=True):
144145 plt .setp (cbar .ax .yaxis .get_ticklabels (), fontsize = 9 )
145146
146147 # plot bedrock
147- brock = np .reshape (body .BedrockH , (ntimes , nlats ))
148+ brock = np .reshape (body .BedrockH . value , (ntimes , nlats ))
148149 ax4 = plt .subplot (5 , 1 , 5 )
149- c = plt .contourf (body . Time , lats , brock .T , cmap = "Reds_r" )
150+ c = plt .contourf (time , lats , brock .T , cmap = "Reds_r" )
150151 plt .ylabel (r"Latitude [$^\circ$]" , fontsize = 10 )
151152 plt .title ("Bedrock height [m]" , fontsize = 12 )
152153 plt .ylim (- 90 , 90 )
@@ -159,9 +160,9 @@ def clim_evol(plname, xrange=False, show=True):
159160 plt .setp (cbar .ax .yaxis .get_ticklabels (), fontsize = 9 )
160161
161162 # plot insolation
162- insol = np .reshape (body .AnnInsol , (ntimes , nlats ))
163+ insol = np .reshape (body .AnnInsol . value , (ntimes , nlats ))
163164 ax5 = plt .subplot (5 , 1 , 2 )
164- c = plt .contourf (body . Time , lats , insol .T , cmap = "plasma" )
165+ c = plt .contourf (time , lats , insol .T , cmap = "plasma" )
165166 plt .ylabel (r"Latitude [$^\circ$]" , fontsize = 10 )
166167 plt .title (r"Annual average insolation [W/m$^2$]" , fontsize = 12 )
167168 plt .ylim (- 90 , 90 )
@@ -201,7 +202,6 @@ def seasonal_maps(time, show=True):
201202
202203 check = 0
203204 for f in glob .glob (str (path / "SeasonalClimateFiles" / "*.DailyInsol.*" )):
204-
205205 f1 = f .split ("." )
206206
207207 if len (f1 ) == 4 :
@@ -249,7 +249,7 @@ def seasonal_maps(time, show=True):
249249 if p == len (output .bodies ) - 1 and ctmp == 0 :
250250 raise Exception ("Planet %s not found" % plname )
251251
252- lats = np .unique (body .Latitude )
252+ lats = np .unique (body .Latitude . value )
253253 try :
254254 obl = body .Obliquity [np .where (body .Time == time )[0 ]]
255255 except :
0 commit comments