# Error opening wrf netcdf file

**URL:** <https://forum.cmascenter.org/t/error-opening-wrf-netcdf-file/4991>\
**Category:** MCIP\
**Created:** [June 11, 2024, 4:44pm UTC](https://forum.cmascenter.org/t/error-opening-wrf-netcdf-file/4991 "2024-06-11T16:44:23Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![tlspero](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tlspero](https://forum.cmascenter.org/u/tlspero)\
**Post date:** [June 13, 2024, 5:20pm UTC](https://forum.cmascenter.org/t/error-opening-wrf-netcdf-file/4991/21 "2024-06-13T17:20:57Z")

</div>

Thank you, @KSSM!

You mentioned netCDF Classic is installed on your machine. While I’m trying to help research this with you–and to explicitly test “file size” on your case and in your computing environment–I would like you to try to subset your WRF file to only contain data for one day…just to see if we can get past this issue. [If this does not work, I have one more theory.]

If you have netCDF Operators (“nco”) installed on your machine, please create a subset WRF file using the command:

ncks -d Time,0,24 wrfout\_d03 wrfout\_test.nc

That command will copy the data for the first 25 hours from your wrfout file into a smaller test file called “wrfout\_test.nc”. After you create that file, please try to run MCIP on that file instead of on the 33 Gb WRF file. I just want to eliminate “file size” from the possible sources of your error.

Thank you!  
Tanya

---

<div class="post-metadata">

**Author:** ![cgnolte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/cgnolte/32/53_2.png) [@cgnolte](https://forum.cmascenter.org/u/cgnolte)\
**Post date:** [June 13, 2024, 5:23pm UTC](https://forum.cmascenter.org/t/error-opening-wrf-netcdf-file/4991/22 "2024-06-13T17:23:00Z")

</div>

> I noticed that the Netcdf variable in MCIP points to the use of netCDF classic. When I run a command to display it in the terminal, the command is executed but does not return any information.

I do not understand what you mean here. Is the version of netCDF that is compiled with MCIP different from the version you used when you ran ncdump above? If so, try running ncdump using the version of netCDF version compiled with MCIP. You need to use a version of netCDF compiled with [large file support](https://docs.unidata.ucar.edu/netcdf-c/current/faq.html#What-is-Large-File-Support).

---

<div class="post-metadata">

**Author:** ![KSSM](https://avatars.discourse-cdn.com/v4/letter/k/5daacb/32.png) [@KSSM](https://forum.cmascenter.org/u/KSSM)\
**Post date:** [June 13, 2024, 6:07pm UTC](https://forum.cmascenter.org/t/error-opening-wrf-netcdf-file/4991/23 "2024-06-13T18:07:40Z")

</div>

@cgnolte so let me try to clarify… Look at this excerpt from the exports.csh file  
export NETCDF\_LIB\_DIR=/opt/share/netcdf/netcdf-c-4.7.0\_intel2023\_classic/lib  
export NETCDF\_INCL\_DIR=/opt/share/netcdf/netcdf-c-4.7.0\_intel2023\_classic/include  
export NETCDFF\_LIB\_DIR=/opt/share/netcdf/netcdf-fortran-4.6.0\_nc-4.7.  
0\_intel2023\_classic/lib  
export NETCDFF\_INCL\_DIR=/opt/share/netcdf/netcdf-fortran-4.6.0\_nc-4.7.0\_intel2023\_classic/include

And the results obtained by executing these commands  
[katty.santos@login0 src]$ echo $NETCDF

[katty.santos@login0 src]$ echo $NETCDF\_LIB

[katty.santos@login0 src]$ echo $NETCDF\_INC  
**“Is the version of netCDF that is compiled with MCIP different from the version you used when you ran ncdump above?”**  
The version of netCDF for the wrfout file is NetCDF-4 and as shown above, the version compiled with MCIP is classic, but I converted the wrfout file to the same format but it didn’t work.  
Makefile MCIP snippet

# Intel Fortran

FC = ifort  
NETCDF=/opt/share/netcdf/netcdf-c-4.7.0\_intel2023\_classic  
IOAPI\_ROOT = /opt/share/ioapi/ioapi-3.2-20200828

---

<div class="post-metadata">

**Author:** ![KSSM](https://avatars.discourse-cdn.com/v4/letter/k/5daacb/32.png) [@KSSM](https://forum.cmascenter.org/u/KSSM)\
**Post date:** [June 13, 2024, 6:15pm UTC](https://forum.cmascenter.org/t/error-opening-wrf-netcdf-file/4991/24 "2024-06-13T18:15:44Z")

</div>

@tlspero I don’t have netCDF Operators(“nco”) installed.  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/2X/6/6ae54361ee0884e8a0bed2e36174555829138931.png)

---

<div class="post-metadata">

**Author:** ![wenxing](https://avatars.discourse-cdn.com/v4/letter/w/b4bc9f/32.png) [@wenxing](https://forum.cmascenter.org/u/wenxing)\
**Post date:** [February 3, 2025, 1:13am UTC](https://forum.cmascenter.org/t/error-opening-wrf-netcdf-file/4991/25 "2025-02-03T01:13:29Z")

</div>

Hello, I have encountered this problem as well. Have you found a solution?

---

<div class="post-metadata">

**Author:** ![tlspero](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@tlspero](https://forum.cmascenter.org/u/tlspero)\
**Post date:** [February 3, 2025, 12:58pm UTC](https://forum.cmascenter.org/t/error-opening-wrf-netcdf-file/4991/26 "2025-02-03T12:58:11Z")

</div>

Hi @wenxing!

Please consider opening a new thread here with your specific issue. I would like to be able to focus on what you are seeing, in case there is a different cause for your problem. When you open that thread, please indicate the versions of MCIP, netCDF, I/O API, and Fortran compiler that you are using. Please also include a clip of the error message.

Thank you.  
Tanya

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [February 4, 2025, 2:33pm UTC](https://forum.cmascenter.org/t/error-opening-wrf-netcdf-file/4991/27 "2025-02-04T14:33:35Z")

</div>

Closed on February 4, 2025, 2:33pm UTC



[Previous page](https://forum.cmascenter.org/t/error-opening-wrf-netcdf-file/4991.md?page=1)
