爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2400|回复: 10

MEGAN 安装运行小问题记录

[复制链接]
发表于 2023-10-13 14:05:24 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
本帖最后由 helibucks9 于 2023-10-13 14:20 编辑

最近开始学习MEGAN,编译安装了2.1版本(https://bai.ess.uci.edu/megan/data-and-code/megan21)。在用官网测试数据(https://drive.google.com/file/d/0B53BwxgQlv_3eWNpWE1BcUlQX2s/view?resourcekey=0-1fPkid-E3641ac5kMH9L9w)运行的时候,使用run.txt2ioapi.v210.csh脚本将csv转nc时总给我报错Segmentation fault........看log文件发现是与时间有关的错误。


找了一晚上原因,终于知道了是官网安装包里MEGANv2.10/src/TXT2IOAPI文件夹下的两个.f文件有点小问题,分别是cnvt_lai.F和cnvt_pft.F。要分别把脚本中第160行的CALL NEXTIME(0,ITIME, TSTEP3D)改为CALL NEXTIME( IDATE, ITIME, TSTEP3D )。

具体解释见:https://forum.cmascenter.org/t/issue-with-megan-v2-0/1351/2

另外想请问各位大佬,在MEGAN手册里写到的运行MEGAN2.1的最后一步,将ioapi结果转为CAMx低层排放文件的run.ioapi2uam.csh脚本在哪里能找到啊,提前感谢大家!!!!



密码修改失败请联系微信:mofangbao
 楼主| 发表于 2023-10-13 15:19:06 | 显示全部楼层
好的没事了。还是没找到,自己写了。
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2023-10-17 22:13:10 | 显示全部楼层
lznb 同样的错误被折磨一晚上
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2023-12-9 21:20:18 | 显示全部楼层
楼主nb,真的是神!!!
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2024-1-25 21:46:22 | 显示全部楼层
helibucks9 发表于 2023-10-13 15:19
好的没事了。还是没找到,自己写了。

楼主,请问这个run.ioapi2uam.csh脚本是必须要有的吗?还是说针对某些研究必须要用?方便交流交流关于这个脚本的问题吗?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

 楼主| 发表于 2024-2-29 13:39:58 | 显示全部楼层
2160409394 发表于 2024-1-25 21:46
楼主,请问这个run.ioapi2uam.csh脚本是必须要有的吗?还是说针对某些研究必须要用?方便交流交流关于这 ...

不是必须的,这个脚本的目的是把MEGAN结果转化为CAMx可以读取的排放文件的格式。如果你后期用CAMx的话就可以用这个脚本转换格式,不用CAMx的话就不用管了
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2024-2-29 16:06:15 | 显示全部楼层
好的,谢谢,我用的CMAQ
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2024-3-4 13:26:26 | 显示全部楼层
太厉害了这个方法!解决了大问题
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2024-4-3 14:13:20 | 显示全部楼层
小白求问楼主MEGAN输入文件MGNMET文件里的MET文件是怎么做出来的呀?
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

发表于 2024-4-3 15:23:01 | 显示全部楼层
楼主好,我的MEGAN卡在了./make_all_programs.scr编译上,有很多的error,我在*.64bit文件中加了-qopenmp,但是还是会有报错,目前具体报错内容如下:
  1. megvea.f(76): error #5102: Cannot open include file 'PARMS3.EXT'
  2.       INCLUDE 'PARMS3.EXT'   ! I/O API parameters
  3. --------------^
  4. megvea.f(77): error #5102: Cannot open include file 'IODECL3.EXT'
  5.       INCLUDE 'IODECL3.EXT'  ! I/O API function declarations
  6. --------------^
  7. megvea.f(78): error #5102: Cannot open include file 'FDESC3.EXT'
  8.       INCLUDE 'FDESC3.EXT'   ! I/O API file desc. data structures
  9. --------------^
  10. megvea.f(204): error #6404: This name does not have a type, and must have an explicit type.   [INIT3]
  11.       LOGDEV = INIT3()
  12. ---------------^
  13. megvea.f(252): error #6404: This name does not have a type, and must have an explicit type.   [GDTYP3D]
  14.       IF( .NOT. DSCGRID( GDNAM, CNAME, GDTYP3D,
  15. ---------------------------------------^
  16. megvea.f(253): error #6404: This name does not have a type, and must have an explicit type.   [P_ALP3D]
  17.      &              P_ALP3D, P_BET3D, P_GAM3D, XCENT3D, YCENT3D,
  18. --------------------^
  19. megvea.f(253): error #6404: This name does not have a type, and must have an explicit type.   [P_BET3D]
  20.      &              P_ALP3D, P_BET3D, P_GAM3D, XCENT3D, YCENT3D,
  21. -----------------------------^
  22. megvea.f(253): error #6404: This name does not have a type, and must have an explicit type.   [P_GAM3D]
  23.      &              P_ALP3D, P_BET3D, P_GAM3D, XCENT3D, YCENT3D,
  24. --------------------------------------^
  25. megvea.f(253): error #6404: This name does not have a type, and must have an explicit type.   [XCENT3D]
  26.      &              P_ALP3D, P_BET3D, P_GAM3D, XCENT3D, YCENT3D,
  27. -----------------------------------------------^
  28. megvea.f(253): error #6404: This name does not have a type, and must have an explicit type.   [YCENT3D]
  29.      &              P_ALP3D, P_BET3D, P_GAM3D, XCENT3D, YCENT3D,
  30. --------------------------------------------------------^
  31. megvea.f(254): error #6404: This name does not have a type, and must have an explicit type.   [XORIG3D]
  32.      &              XORIG3D, YORIG3D, XCELL3D, YCELL3D,
  33. --------------------^
  34. megvea.f(254): error #6404: This name does not have a type, and must have an explicit type.   [YORIG3D]
  35.      &              XORIG3D, YORIG3D, XCELL3D, YCELL3D,
  36. -----------------------------^
  37. megvea.f(254): error #6404: This name does not have a type, and must have an explicit type.   [XCELL3D]
  38.      &              XORIG3D, YORIG3D, XCELL3D, YCELL3D,
  39. --------------------------------------^
  40. megvea.f(254): error #6404: This name does not have a type, and must have an explicit type.   [YCELL3D]
  41.      &              XORIG3D, YORIG3D, XCELL3D, YCELL3D,
  42. -----------------------------------------------^
  43. megvea.f(255): error #6404: This name does not have a type, and must have an explicit type.   [NCOLS3D]
  44.      &              NCOLS3D, NROWS3D, NTHIK3D ) ) THEN
  45. --------------------^
  46. megvea.f(255): error #6404: This name does not have a type, and must have an explicit type.   [NROWS3D]
  47.      &              NCOLS3D, NROWS3D, NTHIK3D ) ) THEN
  48. -----------------------------^
  49. megvea.f(255): error #6404: This name does not have a type, and must have an explicit type.   [NTHIK3D]
  50.      &              NCOLS3D, NROWS3D, NTHIK3D ) ) THEN
  51. --------------------------------------^
  52. megvea.f(265): error #6404: This name does not have a type, and must have an explicit type.   [OPEN3]
  53.       IF ( .NOT. OPEN3( LAIS46, FSREAD3, PROGNAME ) ) THEN
  54. -----------------^
  55. megvea.f(271): error #6404: This name does not have a type, and must have an explicit type.   [FILCHK3]
  56.       IF ( .NOT. FILCHK3 ( LAIS46,
  57. -----------------^
  58. megvea.f(276): error #6404: This name does not have a type, and must have an explicit type.   [DESC3]
  59.       IF ( .NOT. DESC3( LAIS46 ) ) THEN
  60. -----------------^
  61. megvea.f(281): error #6404: This name does not have a type, and must have an explicit type.   [MXREC3D]
  62.       MXLAI = MXREC3D
  63. --------------^
  64. megvea.f(389): error #6404: This name does not have a type, and must have an explicit type.   [TSTEP3D]
  65.       TSTEP = TSTEP3D
  66. --------------^
  67. megvea.f(403): error #6404: This name does not have a type, and must have an explicit type.   [CHECK3]
  68.       IF ( .NOT. CHECK3( CANMET, 'SunleafTK', IDATE, ITIME ) ) THEN
  69. -----------------^
  70. megvea.f(415): error #6404: This name does not have a type, and must have an explicit type.   [SDATE3D]
  71.       SDATE3D = SDATE                ! From run-script
  72. ------^
  73. megvea.f(416): error #6404: This name does not have a type, and must have an explicit type.   [STIME3D]
  74.       STIME3D = STIME                ! From run-script
  75. ------^
  76. megvea.f(419): error #6404: This name does not have a type, and must have an explicit type.   [NLAYS3D]
  77.       NLAYS3D = 1
  78. ------^
  79. megvea.f(420): error #6404: This name does not have a type, and must have an explicit type.   [NVARS3D]
  80.       NVARS3D = 20
  81. ------^
  82. megvea.f(423): error #6410: This name has not been declared as an array or a function.   [VNAME3D]
  83.          VNAME3D(S) = TRIM( MGN_SPC( S ) )
  84. ---------^
  85. megvea.f(423): error #6303: The assignment operation or the binary expression operation is invalid for the data types of the two operands.   [TRIM]
  86.          VNAME3D(S) = TRIM( MGN_SPC( S ) )
  87. ----------------------^
  88. megvea.f(424): error #6410: This name has not been declared as an array or a function.   [VDESC3D]
  89.          VDESC3D(s) = 'Environmental activity factor for '//
  90. ---------^
  91. megvea.f(1094): catastrophic error: Too many errors, exiting
  92. compilation aborted for megvea.f (code 1)
  93. make: *** [megvea.o] 错误 1
复制代码
密码修改失败请联系微信:mofangbao
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表