一直头痛于win7下的compaq fortran兼容性问题,安装intel fortran 10.1 + vs2008,接下来遇到了,compaq fortran 安装netcdf库的方法,无法用到intel fortran上去。

    1.需要预编译的netcdf库,官网即可下载4.0.1版本
    2.解压缩在某文件夹,比如D:netcdf
    3.新建fortran项目,加入D:netcdfF90下的文件,netcdf_test.f90
tool-> options     Intel(R) Fortran->Compilers, 点击Libraries,加入如下文件夹:
D:netcdfF90IVFlib
D:netcdflib
点击Includes, 加入如下文件夹:
D:netcdfinclude
D:netcdfF90IVFinclude
4.然后将文件夹
D:netcdf\bin 下的netcdf.dll文件拷贝到新建项目的release或debug文件夹下。
编译运行。
官网上的简单例子:
一个简单算例:
http://www.unidata.ucar.edu/software/netcdf/examples/programs/
!     This is part of the netCDF package.
!     Copyright 2006 University Corporation for Atmospheric Research/Unidata.
!     See COPYRIGHT file for conditions of use.
!     This is a very simple example which writes a 2D array of
!     sample data. To handle this in netCDF we create two shared
!     dimensions, "x" and "y", and a netCDF variable, called "data".
!     This example demonstrates the netCDF Fortran 90 API. This is part
!     of the netCDF tutorial, which can be found at:
!     http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-tutorial
     
!     Full documentation of the netCDF Fortran 90 API can be found at:
!     http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-f90
!     $Id: simple_xy_wr.f90,v 1.7 2006/12/09 18:44:58 russ Exp $
program simple_xy_wr
  use typeSizes
  use netcdf90
  implicit none
  include 'netcdf.inc'
  ! This is the name of the data file we will create.
  character (len = *), parameter :: FILE_NAME = "simple_xy.nc"
  ! We are writing 2D data, a 6 x 12 grid.
  integer, parameter :: NDIMS = 2
  integer, parameter :: NX = 6, NY = 12
  ! When we create netCDF files, variables and dimensions, we get back
  ! an ID for each one.
  integer :: ncid, varid, dimids(NDIMS)
  integer :: x_dimid, y_dimid
 
  ! This is the data array we will write. It will just be filled with
  ! a progression of integers for this example.
  integer :: data_out(NY, NX)
  ! Loop indexes, and error handling.
  integer :: x, y
  ! Create some pretend data. If this wasn't an example program, we
  ! would have some real data to write, for example, model output.
  do x = 1, NX
     do y = 1, NY
        data_out(y, x) = (x - 1) * NY + (y - 1)
     end do
  end do
  ! Always check the return code of every netCDF function call. In
  ! this example program, wrapping netCDF calls with "call check()"
  ! makes sure that any return which is not equal to nf90_noerr (0)
  ! will print a netCDF error message and exit.
  ! Create the netCDF file. The nf90_clobber parameter tells netCDF to
  ! overwrite this file, if it already exists.
  call check( nf90_create(FILE_NAME, NF90_CLOBBER, ncid) )
  ! Define the dimensions. NetCDF will hand back an ID for each.
  call check( nf90_def_dim(ncid, "x", NX, x_dimid) )
  call check( nf90_def_dim(ncid, "y", NY, y_dimid) )
  ! The dimids array is used to pass the IDs of the dimensions of
  ! the variables. Note that in fortran arrays are stored in
  ! column-major format.
  dimids =  (/ y_dimid, x_dimid /)
  ! Define the variable. The type of the variable in this case is
  ! NF90_INT (4-byte integer).
  call check( nf90_def_var(ncid, "data", NF90_INT, dimids, varid) )
  ! End define mode. This tells netCDF we are done defining metadata.
  call check( nf90_enddef(ncid) )
  ! Write the pretend data to the file. Although netCDF supports
  ! reading and writing subsets of data, in this case we write all the
  ! data in one operation.
  call check( nf90_put_var(ncid, varid, data_out) )
  ! Close the file. This frees up any internal netCDF resources
  ! associated with the file, and flushes any buffers.
  call check( nf90_close(ncid) )
  print *, "*** SUCCESS writing example file simple_xy.nc! "
contains
  subroutine check(status)
    integer, intent ( in) :: status
   
    if(status /= nf90_noerr) then
      print *, trim(nf90_strerror(status))
      stop "Stopped"
    end if
  end subroutine check 
end program simple_xy_wr
运行结束,产生simple_xy.nc文件,运行 ncdump simple_xy.nc > simplile_xy.cdl可将.nc文件转换为.cdl文件。 cdl文件可用记事本打开,内容如下:
netcdf simple_xy {
dimensions:
    x = 6 ;
    y = 12 ;
variables:
    int data(x, y) ;
data:
 data =
  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
  12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
  24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
  36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
  60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71 ;
}

Intelnbsp;Fortran安装netcdf库amp;n…相关推荐

  1. mysql netcdf_Linux下用Intel编译器编译安装NetCDF-Fortan库(4.2以后版本)

    本来这个问题真的没必要写的,可是真的困扰我太久%>_ 首先,最权威清晰的安装文档还是官方的: 那这个文档最开始就告诉我们,自NetCDF库4.2版本以后,Fortran的库和C的库就要分开bui ...

  2. 一个脚本完成安装netCDF、NCO、Ncview库

    1 安装Intel编译器.OpenMPI Intel编译器安装的是:parallel_studio_xe_2020_update4_cluster_edition OpenMPI使用Intel 编译器 ...

  3. CentOS安装NETCDF

    比较新的版本的NETCDF是C和Fortran两个库分开编译,并且不需要使用hdf5 需要提前安装好c和fortran的编译器 安装icc和ifort intel网址下载安装包,现在已经有打包好的版本 ...

  4. python怎么安装numpy库-python怎么安装numpy库

    NumPy(Numerical Python) 是 Python 语言的一个扩展程序库,支持大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库. Python官网上的发行版是不包含Num ...

  5. Centos安装GD库

    tar zxvf ncurses-5.6.tar.gz 进入目录 cd ncurses-5.6 生成 makefile文件, 再进一步编译 ./configure --prefix=/usr --wi ...

  6. windows10+Python3.7安装dlib库进行面部标志识别

    dlib 是一个C++库,由戴维斯·金(Davis King) 开发,是用于线程,网络,数值运算,机器学习,计算机视觉和压缩的跨平台软件包,特别强调了极高质量和可移植的代码.dlib的文档也非常出色. ...

  7. 在CentOS 6.3 64bit上安装libunwind库

    libunwind库为基于64位CPU和操作系统的程序提供了基本的堆栈辗转开解功能,32位操作系统不要安装.其中包括用于输出堆栈跟踪的API.用于以编程方式辗转开解堆栈的API以及支持C++异常处理机 ...

  8. Pycharm中如何安装python库

    1首先打开pycharm工具,选择File中的Setting选项,如下图所示 2在打开的setting界面中我们点击python的解释器,你会看到很多导入的第三方库,如下图所示,点击最右边的加号 3在 ...

  9. Python pip安装第三方库的国内镜像

    Python pip 安装第三方库的国内镜像 Windows系统下,一般情况下使用pip在DOS界面安装python第三方库时,经常会遇到超时的问题,导致第三方库无法顺利安装,此时就需要国内镜像源的帮 ...

最新文章

  1. 字节跳动AI Lab 再失大将!大牛王长虎被爆已离职回归学界!
  2. 如何用记事本写java_怎样简单的运用记事本写java程序
  3. python--循环列表中字典元素
  4. 央视曝光:全国第九大电商平台倒了!创始人卷走260亿,1200万人被骗
  5. mysql 千万数据分页_MySQL处理千万级数据查询、分页
  6. HTTP 1.1 协议规范
  7. 简记SqueezeNet
  8. word 产生很多temp 不显示_word表格中文字显示到最下面的时候不自动换页-解决办法...
  9. 10小时,就能吃透Kafka源码?
  10. fopen php 读取_PHP fopen读取url内容
  11. git覆盖覆盖推送_强制“git Push”覆盖远程文件
  12. 软考高级 真题 2017年下半年 信息系统项目管理师 论文
  13. 计算机断网后显示配置0%,电脑断网后自动报警提醒怎么设置
  14. oracle gis费用,MapGIS 10 for Desktop 标准版_Oracle
  15. 《2小时品牌素养》读后感
  16. Oracle动态性能视图学习之v$session_longops
  17. 如何快速获取股票行情接口api的实时行情数据?
  18. 18软工实践-团队现场编程实战(抽奖系统)
  19. Git学习笔记之时光穿梭机
  20. angualr8观察者模式_理解观察者模式——用Angular的httpClient来解释观察者

热门文章

  1. 纯干货!调节血糖的产品阿尔发、育润胰力佳、益力佳配方与功效对比分析
  2. z世代消费力白皮书_Z世代来了!你懂TA们吗?
  3. 廉航特价周期表(1.18更新)
  4. 【Elasticsearch】文本分析 Text analysis (1)
  5. nginx正向代理+反向代理
  6. sklearn学习笔记5:朴素贝叶斯
  7. mac使用Fiddler实现ios抓包
  8. 技术分享:超厚5G天线模块制作工艺研究
  9. c/c++找色功能实现
  10. 开源创新已成为创新国家建设的战略需求——《开源创新:数字化转型与智能化重构》新书发布...