名称为1;间距要指责?
我正在调试一些Fortran代码。我应该注意我不熟悉Fortran(代码是我正在为另一个项目修改的其他人)。基本上,这是模拟的化学反应率列表。
我在实施中遇到麻烦的速率如下:
if (CHEMJ(1,J).EQ.'HNO3'.AND.CHEMJ(2,J).EQ.'OH') THEN
A(J,I) = 2.4E-14*EXP(460./T(I))+6.5E-34 *exp(1335./T(I)) *
((1+6.5E-34) * EXP(-1335./T(I))/2.7E-17 *EXP(2199./T(I)))
endif
但是,这一直触发以下错误:
285 | A(J,I) = 2.4E-14*EXP(460./T(I))+6.5E-34 *
| 1
Error: Invalid character in name at (1)
我不确定为什么460。被读取为无效,尽管我猜这与代码有关环绕。我尝试添加AN&,但这似乎也没有帮助。由于这是旧版代码,因此我无法轻松地将文件从.f更改为.f90,因此我坚持处理较旧的包裹风格。
有什么想法如何解决这个特定的错误?
I'm debugging some Fortran code. I should note I'm not familiar with Fortran (the code was someone else's that I'm modifying for a different project). It's basically a list of chemical reaction rates for a simulation.
The rate I'm having trouble implementing is as follows:
if (CHEMJ(1,J).EQ.'HNO3'.AND.CHEMJ(2,J).EQ.'OH') THEN
A(J,I) = 2.4E-14*EXP(460./T(I))+6.5E-34 *exp(1335./T(I)) *
((1+6.5E-34) * EXP(-1335./T(I))/2.7E-17 *EXP(2199./T(I)))
endif
However, this keeps triggering the following error:
285 | A(J,I) = 2.4E-14*EXP(460./T(I))+6.5E-34 *
| 1
Error: Invalid character in name at (1)
I'm not sure why 460. is being read as invalid, though I'm guessing it has something to do with the fact the code wraps around. I've tried adding an &, but that didn't seem to help, either. Since this is legacy code, I can't easily change the file from .f to .f90, so I'm stuck with dealing with the older style of wrap-around.
Any ideas how to fix this particular bug?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论