En raison du déménagement des baies serveurs, les services gitlab.irstea.fr et mattermost.irstea.fr seront interrompus le samedi 2 octobre 2021 au matin. Ils devraient revenir à la normale dans la journée.

Unverified Commit 03034438 authored by Julien Veyssier's avatar Julien Veyssier
Browse files

step4 checked ok, adjust progress


Signed-off-by: default avatarJulien Veyssier <eneiluj@posteo.net>
parent edcb8eda
......@@ -506,7 +506,7 @@ def main(parms_file, nbProc, generator=False):
if not generator:
iterable3 = tqdm(
total=6,
total=8,
initial=0,
desc='Creating hru.par and hru.shp %s' % (pad('', 5)),
unit='phase',
......@@ -600,6 +600,11 @@ def main(parms_file, nbProc, generator=False):
header_unit += '\t' + ranges['elevation'][2]
sql += ',elevation'
if not generator:
iterable3.update(1)
else:
yield 83
if parms.get('layer_overlay', 'slope') == 'x':
slope_mult = 'slope_mult'
slope_labeled='slope_labeled'
......@@ -628,6 +633,11 @@ def main(parms_file, nbProc, generator=False):
header_unit += '\t' + ranges['slope'][2]
sql += ',slope'
if not generator:
iterable3.update(1)
else:
yield 85
if (parms.get('layer_overlay', 'aspect')) == 'x':
grass.run_command('r.statistics', base='hrus', cover='aspect_rcl', method='mode', output='aspect_md', overwrite='True')
grass.run_command('r.mapcalc', expression='aspect_mj=if((aspect_rcl==@aspect_md),aspect,null())', overwrite='True')
......@@ -647,7 +657,7 @@ def main(parms_file, nbProc, generator=False):
if not generator:
iterable3.update(1)
else:
yield 85
yield 90
grass.run_command('db.execute', sql='ALTER TABLE hrus_c_pnt ADD x DOUBLE PRECISION')
grass.run_command('db.execute', sql='ALTER TABLE hrus_c_pnt ADD y DOUBLE PRECISION')
......@@ -718,7 +728,7 @@ def main(parms_file, nbProc, generator=False):
if not generator:
iterable3.update(1)
else:
yield 90
yield 95
grass.run_command('db.execute', sql='ALTER TABLE hrus_c_pnt ADD to_poly INTEGER')
grass.run_command('db.execute', sql='ALTER TABLE hrus_c_pnt ADD to_reach INTEGER')
......@@ -754,7 +764,7 @@ def main(parms_file, nbProc, generator=False):
if not generator:
iterable3.update(1)
else:
yield 95
yield 98
# Save files
grass.run_command('v.db.connect', flags='o', table='hrus_c_pnt', map='hrus_v_cat2', key='cat', overwrite='True')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment