Skip to content
Snippets Groups Projects
Commit cc1fe809 authored by POLCHER Jan's avatar POLCHER Jan :bicyclist_tone4:
Browse files

Correction of a small error on the resolution calculation.

parent 37bee8aa
No related branches found
No related tags found
No related merge requests found
......@@ -187,10 +187,14 @@ class HydroGrid :
return indices, polylist
def resolution(self,i,j) :
if i+1 >= self.iim or j+1 >= self.jjm :
inx=i-1; jnx=j-1
if i+1 >= iim :
inx=i-1
else :
inx=i+1; jnx=j+1
inx=i+1
if j+1 >= jjm :
jnx=j-1
else :
jnx=j+1
dlon = np.radians(np.abs(self.lon[j,i]-self.lon[j,inx]))
alon = np.cos(np.radians(self.lat[j,i]))**2*(np.sin(dlon/2))**2
clon = 2*np.arctan2(np.sqrt(alon), np.sqrt(1-alon))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment