Bugfix in randomcontinents
This commit is contained in:
1 parent
ba52a66b20
commit
17573f602d
3 files changed
+5
-5
No files matched your search
+1
-1
@@ -27,7 +27,7 @@ copyright = '2020, Adiv Paradise'
|
||||
author = 'Adiv Paradise'
|
||||
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = '3.0.12a1'
|
||||
release = '3.0.12a2'
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
@@ -79,7 +79,7 @@ def writePGM(name,heightfield):
|
||||
fw.write(filetext)
|
||||
|
||||
def generate(name="Alderaan",continents=7,landfraction=0.29,maxz=10.0,nlats=32,hemispherelongitude=np.nan,
|
||||
topo=False,orthographic=False):
|
||||
ntopo=False,orthographic=False):
|
||||
'''Randomly generate continents up to specified land fraction. Topography optional.
|
||||
|
||||
Generates name_surf_0172.sra, the land mask file, and (if requested)
|
||||
@@ -338,7 +338,7 @@ def generate(name="Alderaan",continents=7,landfraction=0.29,maxz=10.0,nlats=32,h
|
||||
|
||||
dtopo = np.zeros_like(grid)
|
||||
|
||||
if topo:
|
||||
if ntopo:
|
||||
seeds = np.copy(seams)
|
||||
gcratonsx,gcratonsy = np.gradient(cratons[1:-1,1:-1],lts,lns)
|
||||
seams[:] = np.sqrt(gcratonsx**2+gcratonsy**2)
|
||||
@@ -499,7 +499,7 @@ def generate(name="Alderaan",continents=7,landfraction=0.29,maxz=10.0,nlats=32,h
|
||||
|
||||
writePGM(name,hf)
|
||||
|
||||
if topo:
|
||||
if ntopo:
|
||||
return lns,lts,grid,dtopo
|
||||
else:
|
||||
return lnt,lts,grid
|
||||
|
||||
Reference in new issue
Block a user