matlab - 调试旧 Fortran 代码“尝试将 CHARACTER(1) 转换为 INTEGER(4)”
问题描述
我正在使用旧的 Fortran 代码来生成一个使用 NRLMSISE-00 模型用于本科研究项目的大气阻力模型。我没有使用 Fortran 的经验,所以我在 MATLAB 中使用了一个代码,它将针对各种不同的输入情况运行 Fortran 可执行文件。但是,在尝试创建可执行文件时,我遇到了几个错误,如下图所示,旁边是错误的代码段。我意识到我可能需要在错误的代码行中重新定义一些参数或方程,但我不确定如何去做。
我正在尝试在 64 位 Windows 10 系统上的 Cygwin 上使用 gfortran 构建可执行文件。任何和所有的帮助将不胜感激。谢谢!
如果图像在此处不起作用,则来自 Cygwin 的错误消息:
Charles@DESKTOP-0CKR2M1 ~
$ gfortran -std=legacy -o nrlmsise00matlabtoformain04 nrlmsise00matlabtoformain04.for nrlmsise00_sub_mlp.for
nrlmsise00_sub_mlp.for:1671:10:
DATA NAME/'MSIS','E-00'/
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
nrlmsise00_sub_mlp.for:1670:40:
DATA ISDATE/'01-F','EB-0','2 '/,ISTIME/'15:4','9:27'/
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
nrlmsise00_sub_mlp.for:1670:10:
DATA ISDATE/'01-F','EB-0','2 '/,ISTIME/'15:4','9:27'/
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
nrlmsise00_sub_mlp.for:592:49:
V2=VTST7(IYD,SEC,GLAT,GLONG,STL,F107A,F107,AP,2)
1
Warning: Actual argument contains too few elements for dummy argument ‘ap’ (1/7) at (1) [-Wargument-mismatch]
解决方案
推荐阅读
- python - 如何从Windows 10中的图片文件夹中获取所有图像
- c++ - 如何删除 if 语句中未在此范围内声明的错误?我是否正确声明了变量?
- javascript - passport.authenticate 不是函数 / User.findone 不是函数
- flutter - Flutter:如何从右到左对网格布局内容进行排序
- javascript - 如何在 Vuetify 中为激活器属性创建节点?
- lua - 警告:在 PATH 中找不到 Lua 5.3 - 尝试使用 Luarocks 安装 Gumbo 库时
- css - 为什么这个 React/ReactRouter/CSS 转换有时只工作
- javascript - 剃须刀页面 html 选择下拉列表未绑定到模型且 javascript 看不到
- angular - 如何将 HTTP API 中的对象列表映射到字符串列表?
- pandas - 过滤熊猫列