KMarkert / servir-vic-training

Training materials for the VIC hydrologic model setup developed for the @SERVIR program
GNU General Public License v3.0
36 stars 32 forks source link

Format meteorological forcing files #25

Closed HurriCaneBQL closed 4 years ago

HurriCaneBQL commented 4 years ago

When I run Format meteorological forcing files ($ python format_meteo_forcing.py ../data/input/gis/Nyando_grid.tif ../data/input/forcing/raw/ ../data/input/forcing/ 2005 2013) I get The following error: File "format_meteo_forcing.py", line 166 print'Processing time: {0}'.format(dt) ^ SyntaxError: invalid syntax How to solve this problem?

KMarkert commented 4 years ago

This is a Python2.7 vs Python3 error. If you are using Python3 then the print statement should be wrapped in parentheses like this:print("Processing time: {0}'.format(dt)")

This is a general issue for other scripts as well since I used Python2.7 at the time of writing. If you run into this error again then just update the print statements within the script to be valid Python3 syntax.

HurriCaneBQL commented 4 years ago

Think for your answer ! I have solv this issue

发送自 Windows 10 版邮件应用

发件人: Kel Markert 发送时间: 2020年7月27日 21:31 收件人: KMarkert/servir-vic-training 抄送: HurriCaneBQL; Manual 主题: Re: [KMarkert/servir-vic-training] Format meteorological forcingfiles (#25)

This is a Python2.7 vs Python3 error. If you are using Python3 then the print statement should be wrapped in parentheses like this:print("Processing time: {0}'.format(dt)") This is a general issue for other scripts as well since I used Python2.7 at the time of writing. If you run into this error again then just update the print statements within the script to be valid Python3 syntax. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

KMarkert commented 4 years ago

Great! Glad you were able to resolve it. Let me know if I can help answer any other questions. 🙂