netcdf

Compiling Fortran netCDF programs with all available libraries

那年仲夏 提交于 2020-05-31 10:57:23
问题 first of all I've read this topic but I can't compile my code. Compiling Fortran netCDF programs on Ubuntu I am on UBUNTU 14.04 and compiling a fortran program that uses NetCDF. I have compilation error like this: terrain.f:(.text+0x17efd): undefined reference to 'ncopn_' terrain.f:(.text+0x18111): undefined reference to 'ncopn_' terrain.f:(.text+0x187cc): undefined reference to 'ncclos_' terrain.f:(.text+0x187ea): undefined reference to 'ncclos_' Definitely it says I have not netcdf fortran

How to apply a xarray u_function over NetCDF and return a 2D-array (multiple new variables) to the DataSet

99封情书 提交于 2020-05-29 07:42:43
问题 I am trying to use the xarray apply_ufunc to apply a given function f over all pairs of coordinates (i.e. pixels) in the Dataset. The function f returns a 2D array (NxN matrix) as result. Therefore, the resultant Dataset would have several new variables after the analysis: a total of M new variables. The function f does work just fine. So, the error does not seem to be coming from it. A possible problem may the structure that the 2D array is returning from f . As far as I understand, xarray

Convert netcdf to image

时光怂恿深爱的人放手 提交于 2020-05-25 07:47:25
问题 I have a netcdf file that I would like to convert to an image (joed, png, gif) using a command line tool. Is someone could please help me with the library name and possibly a link to how it is done. Regards David 回答1: Others have mentioned commercial solutions with ArcGIS, IDL and Matlab, but here's one way to do it using Python, using the netCDF4 module to read the netcdf file, and matplotlib to create the image. The netCDF4 module will read both NetCDF3, NetCDF4 files, and also read remote

Extracting values for specific lat long from netcdf

穿精又带淫゛_ 提交于 2020-05-14 09:02:19
问题 I'm trying to read into R a netCDF file. The netcdf chirps-v2.0.1981.days_p05.nc is downloaded from here: ftp://ftp.chg.ucsb.edu/pub/org/chg/products/CHIRPS-2.0/global_daily/netcdf/p05/ This netCDF file describes daily rainfall globally as a function of longitude, latitude and has size of 1.1 GB I also have a set of lon lat dat <- structure(list(locatioID = paste0('ID', 1:16), lon = c(73.73, 86, 73.45, 86.41, 85.36, 81.95, 82.57, 75.66, 82.03, 81.73, 85.66, 85.31, 81.03, 81.70, 87.03, 73.38),

关于基于GDAL库QT软件平台下C++语言开发使用说明

六眼飞鱼酱① 提交于 2020-05-07 21:42:10
背景前提   地理空间数据抽象库(GDAL)是一个用于读取和编写栅格和矢量地理空间数据格式的计算机软件库,由开源地理空间基金会在许可的X / MIT风格免费软件许可下发布。 作为一个库,它为调用应用程序提供了一个抽象数据模型,用于所有支持的格式。 它还可以构建有各种有用的命令行接口实用程序,用于数据转换和处理。 PROJ.4库支持投影和转换。(摘自维基百科)   相关的OGR库(OGR Simple Features Library [2])是GDAL源代码树的一部分,它为简单的特征矢量图形数据提供了类似的功能。(摘自维基百科)   GDAL库在使用前可以进行源码编译,编译环境由用户所要进行后期的开发环境所决定,一般情况下,Windows系统下和Linux系统下所编译出来的GDAL库文件是不一样的,不仅如此,对于C++语言来说,不同编译器下的编译出来的GDAL库文件也是不一样的,例如QT所采用的MinGW编译器和VS的MSVC编译器所编译出来Windows系统下的GDAL库文件不通用(本人亲测,确实如此),所以不同的开发环境,不同的开发平台(IDE),不同的编译器,这都会影响前期的GDAL库源码的编译,再加上GDAL库本身又支持多种扩展库,以及多种语言下的二次编译,不同的用户有不同的扩展需求,所以针对GDAL库的复杂需求,配置不同的编译环境,编译出来的GDAL库文件也是各式各样

GDAL/OGR: 地理空间数据格式转换神器 转载

你离开我真会死。 提交于 2020-05-07 19:40:23
转自https://gmt-china.org/blog/gdal-ogr/ GDAL/OGR: 地理空间数据格式转换神器 GDAL/OGR 是一个地理空间数据的格式转换及处理工具。 简介 官方主页: http://www.gdal.org GDAL/OGR 的核心分成两个部分: GDAL部分可以实现142种光栅/网格数据格式间的互相转换,比如常见的 netCDF、GeoTiff、HDF5、XYZ 等,详见 GDAL光栅格式列表 OGR部分可以实现84种矢量数据格式间的互相转换,比如常见的 Shapefile、GMT、KML、MapInfo、Excel 等,详见 OGR矢量格式列表 安装 Windows 用户 Windows 用户可以通过安装 OSGeo4W 来使用 其提供的 GDAL。安装及使用方式如下: 到 OSGeo4W 官方网站下载 32位 或 64位 安装包 双击=>“Express Desktop Install”=>选择下载地址=>只勾选GDAL=>等待下载安装完成 (有经验的用户也可以选择“Advanced Install”以自定义安装) 安装完成会在桌面生成一个名为OSGeo4W的文件夹,双击文件夹内的快捷链接即可打开一个命令行窗口 命令行窗口中输入 ogr2ogr --version 以确认可以正常使用 如果只是偶尔使用,建议按照如上方式运行;如果是经常使用

mime类型

六月ゝ 毕业季﹏ 提交于 2020-04-24 08:12:32
<?php return array( 'ez' => 'application/andrew-inset', 'hqx' => 'application/mac-binhex40', 'cpt' => 'application/mac-compactpro', 'doc' => 'application/msword', 'bin' => 'application/octet-stream', 'dms' => 'application/octet-stream', 'lha' => 'application/octet-stream', 'lzh' => 'application/octet-stream', 'exe' => 'application/octet-stream', 'class' => 'application/octet-stream', 'so' => 'application/octet-stream', 'dll' => 'application/octet-stream', 'oda' => 'application/oda', 'pdf' => 'application/pdf', 'ai' => 'application/postscript', 'eps' => 'application/postscript', 'ps' =>

[NetCDF][C++] 使用NetCDF 的接口读取数值

。_饼干妹妹 提交于 2020-04-23 03:32:50
在这里介绍的是用NetCDF(c++接口)读取NC文件信息,主要包括NC文件里的维度与变量,我用的VS2015+Qt+NetCDF进行读取的,至于这个环境的配置可以参考我的上一篇文章,在这里我就不介绍环境的配置了。不过你也可用VS+NetCDF进行读取,把结果展示在控制台窗口内,我用Qt的目的是为了将读取结果展示在一个表格控件内。 1.首先读取文件 QString filename = QFileDialog::getOpenFileName(this, "开打文件", ".", "*.nc"); if (filename.isEmpty()) { QMessageBox::information(this, "提示", "文件指针为空"); return; } NcFile dataFile(filename.toStdString(), NcFile::read); 2.读取维度 //维度操作 multimap<string, NcDim> group_dim; group_dim = dataFile.getDims(); multimap<string, NcDim>::iterator it_dim; it_dim = group_dim.begin(); int row_dim = 0; for (; it_dim != group_dim.end(); it_dim+

Calculating ERA5 Daily Total Precipitation using CDO

余生颓废 提交于 2020-04-13 17:02:08
问题 Essentially, this is a repost of this question: https://confluence.ecmwf.int/pages/viewpage.action?pageId=149341027 I have downloaded ERA5 from the CDS. The input file has 24 hourly steps (0, 1, 2, 3, 4,..,23) for each calendar day starting from Jan 1 to Dec 31 of each considered year. ECMWF state here https://confluence.ecmwf.int/display/CKB/ERA5%3A+How+to+calculate+daily+total+precipitation that daily total precipitation must be calculated by accumulating precipitation for e.g. Jan 1, 1979

Calculating ERA5 Daily Total Precipitation using CDO

二次信任 提交于 2020-04-13 17:00:14
问题 Essentially, this is a repost of this question: https://confluence.ecmwf.int/pages/viewpage.action?pageId=149341027 I have downloaded ERA5 from the CDS. The input file has 24 hourly steps (0, 1, 2, 3, 4,..,23) for each calendar day starting from Jan 1 to Dec 31 of each considered year. ECMWF state here https://confluence.ecmwf.int/display/CKB/ERA5%3A+How+to+calculate+daily+total+precipitation that daily total precipitation must be calculated by accumulating precipitation for e.g. Jan 1, 1979