Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

wrfinput NetCDF: HDF error

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.

lslrsgis

Member
Dear WRF community,

After running real.exe, wrfinput_d01, wrfinput_d02 files are successfully generated. They can be read by Panoply and NCL scripts. However, it fails to open these files by ncview, errors prompted as follows:

lsl@lsl-Vostro-3668:~/Downloads/GLASS_RESAMPLE_SUBSET$ ncview wrfinput_d01
Ncview 2.1.8 David W. Pierce 8 March 2017
http://meteora.ucsd.edu:80/~pierce/ncview_home_page.html
Copyright (C) 1993 through 2015, David W. Pierce
Ncview comes with ABSOLUTELY NO WARRANTY; for details type `ncview -w'.
This is free software licensed under the Gnu General Public License version 3; type `ncview -c' for redistribution details.

netcdf_fi_get_data: error on nc_get_vara_float call
cdfid=65536 variable=XLONG
start, count:
[0]: 0 1
[1]: 0 62
[2]: 0 91
NetCDF: HDF error

I am not sure this is a fault relative to HDF? Any indication is appreciated.
 

Attachments

  • wrfinput_d01.txt
    6.5 MB · Views: 57
I can use ncview to look at your data without any problem. I don't think this is an issue related to HDF. Can you reinstall ncview, then try again?
 
Ming Chen said:
I can use ncview to look at your data without any problem. I don't think this is an issue related to HDF. Can you reinstall ncview, then try again?

Thanks. You are right, it is due to my ncview or netcdf related configuration.

I reinstalled ncview, however, the error still exist, I can not open wrfinput as previous. However, when I tried to ncview this file on my laptop (another PC with Ubuntu System, and ncview installed), it works.

The ncview installed on this destop PC can not open wrfinput correctly, but can open netcdf files downloaded from websites or generated by NCL scripts. I guess that it either due to ncview software installation, or my netcdf configuration.

lsl@lsl-Vostro-3668:~/Downloads$ sudo apt-get remove ncview
[sudo] password for lsl:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
ncview
0 upgraded, 0 newly installed, 1 to remove and 288 not upgraded.
After this operation, 2,287 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 246639 files and directories currently installed.)
Removing ncview (2.1.8+ds-1build1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
lsl@lsl-Vostro-3668:~/Downloads$ sudo apt-get install ncview
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
ncview
0 upgraded, 1 newly installed, 0 to remove and 288 not upgraded.
Need to get 0 B/433 kB of archives.
After this operation, 2,287 kB of additional disk space will be used.
Selecting previously unselected package ncview.
(Reading database ... 246626 files and directories currently installed.)
Preparing to unpack .../ncview_2.1.8+ds-1build1_amd64.deb ...
Unpacking ncview (2.1.8+ds-1build1) ...
Setting up ncview (2.1.8+ds-1build1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
lsl@lsl-Vostro-3668:~/Downloads$ ncview wrfinput_d01
Ncview 2.1.8 David W. Pierce 8 March 2017
http://meteora.ucsd.edu:80/~pierce/ncview_home_page.html
Copyright (C) 1993 through 2015, David W. Pierce
Ncview comes with ABSOLUTELY NO WARRANTY; for details type `ncview -w'.
This is free software licensed under the Gnu General Public License version 3; type `ncview -c' for redistribution details.

netcdf_fi_get_data: error on nc_get_vara_float call
cdfid=65536 variable=XLONG
start, count:
[0]: 0 1
[1]: 0 62
[2]: 0 91
NetCDF: HDF error
 
Can you try to reinstall netCDF library following the steps below:
setenv DIR path_to_directory/Build_WRF/LIBRARIES
setenv CC gcc
setenv CXX g++
setenv FC gfortran
setenv FCFLAGS -m64
setenv F77 gfortran
setenv FFLAGS -m64

tar xzvf netcdf-4.1.3.tar.gz #or just .tar if no .gz present
cd netcdf-4.1.3
./configure --prefix=$DIR/netcdf --disable-dap \
--disable-netcdf-4 --disable-shared
make
make install
setenv PATH $DIR/netcdf/bin:$PATH
setenv NETCDF $DIR/netcdf

Hope this can fix your problem.
 
Top