作者ihaveaids ()
看板Fortran
標題[問題] fortran當中使用netcdf
時間Fri Jan 24 17:56:15 2014
我在fortran程式中想寫一些讀取nc檔的程式
簡易程式碼如下
program
use netcdf
implicit none
integer :: year=2007,doy=349,hh=2
integer :: ios
integer :: ncid,state
character(len=128) :: filename = 'flist_storm'
state = nf90_open(trim(file_pwd),nf90_nowrite, ncid)
end program
以上只是開啟的程式 但compile一直沒過 猜測是use netcdf這行
要把netcdf這個 moduleu一起compile
在網路上找了下面這個指令
ifort -c -I/home/mydir/netcdf/include yyyyy.f90 -o yyyyy.x
雖然有跑出執行檔 但是執行時出現
-bash: ./podTec_GlobalMap.x: cannot execute binary file
有確認都是在64位元
想問問大家 fortran compilenetcdf的方法還有其他的嗎
或者我用法哪裡錯誤
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.116.24.15
1F:推 george1224:應該還有oPTION吧。。。跟NCARGF77一樣 01/24 18:46
3F:→ gilocustom:etcdf-f90/Compiling-and-Linking-with-the-NetCDF-Lib 01/24 19:09
4F:→ gilocustom:rary.html 01/24 19:09
5F:→ ihaveaids:一樓大大 那是什麼?? 二樓大大的連結跟我找的一樣 01/25 12:31
6F:→ ihaveaids:但無法執行@@ 01/25 12:31
7F:推 george1224:用Z大下面的那行試看看哩? 01/27 21:31