# MCIP support to WRFv4.2.1

**URL:** <https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042>\
**Category:** MCIP\
**Created:** [January 30, 2021, 8:38pm UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042 "2021-01-30T20:38:04Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@Ryan](https://forum.cmascenter.org/u/Ryan)\
**Post date:** [January 30, 2021, 8:38pm UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/1 "2021-01-30T20:38:04Z")

</div>

Dear all,  
May I ask whether any available support on the MCIP version that can process the output from WRFv4.2.1? As far as I know, the latest MCIP release only supports WRFv4.0+, am I right? If it is the case, may I ask whether I can easily change some source code of MCIP for making the head files of WRFout changed to WRFv3.9.1 although it is originally from WRFv4.2.1? I tried to use CDO to change the global attribute to WRF3.9.1 whereas it doesn’t work.  
Any comments are highly appreciated!

With regards,  
Ryan

---

<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:** [February 1, 2021, 3:07pm UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/2 "2021-02-01T15:07:46Z")

</div>

Ryan,  
You should not need to edit the global attributes of WRF in that manner.  
What specific version of MCIP are you using? If you are getting an error message, what is that message?

---

<div class="post-metadata">

**Author:** ![Ryan](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@Ryan](https://forum.cmascenter.org/u/Ryan)\
**Post date:** [February 1, 2021, 7:21pm UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/3 "2021-02-01T19:21:35Z")

</div>

Dear Chris,  
I am using the newest MCIP version 5.1 which incorporated in the CMAQv5.3.2 release. The error message indicated thta the wrfout files are unsupported versions of WRF output.  
Do you have any suggestions? I am quite sure that this is WRF output rather than WRF-Chem output (I turn off the chem\_opt when compiling the WRFv4.2.1).

Best,  
Ryan

---

<div class="post-metadata">

**Author:** ![mmallard](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mmallard](https://forum.cmascenter.org/u/mmallard)\
**Post date:** [February 1, 2021, 8:25pm UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/4 "2021-02-01T20:25:53Z")

</div>

Hi Ryan,  
Could you give some more info about the file that you’re trying to use as input?  
Please run the command:  
ncdump -h FILENAME \> outputfile.txt  
on your file and post the output file here.

Megan

---

<div class="post-metadata">

**Author:** ![Ryan](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@Ryan](https://forum.cmascenter.org/u/Ryan)\
**Post date:** [February 1, 2021, 8:45pm UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/5 "2021-02-01T20:45:24Z")

</div>

Hi Megan,  
Please find the ncdump file output attached.  
[1.txt](https://forum.cmascenter.org/uploads/short-url/tKmnd6nAh0YvVocX3Zjowuu30OC.txt) (67.6 KB)  
Best,  
Ryan

---

<div class="post-metadata">

**Author:** ![mmallard](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mmallard](https://forum.cmascenter.org/u/mmallard)\
**Post date:** [February 1, 2021, 9:51pm UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/6 "2021-02-01T21:51:44Z")

</div>

I see. Thanks for sending that along. I don’t spot anything odd about your wrfout file, and I believe wrfouts from v 4.2.1 should be supported. For clarity, could you post the exact error message you’re seeing?

Megan

---

<div class="post-metadata">

**Author:** ![Ryan](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@Ryan](https://forum.cmascenter.org/u/Ryan)\
**Post date:** [February 1, 2021, 9:57pm UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/7 "2021-02-01T21:57:23Z")

</div>

Hi Megan,  
Thanks for taking time looking at it. The following is the reported error by MCIPv5.1:

```
              US EPA COMMUNITY MULTISCALE AIR QUALITY MODEL
                METEOROLOGY-CHEMISTRY INTERFACE PROCESSOR

                       MCIP V5.1 FROZEN 11/21/2019

```

==============================================================================

* * *

\*\*\* SUBROUTINE: SETUP  
\*\*\* ERROR OPENING WRF NETCDF FILE  
\*\*\* FILE = /GFPS8p/xyyang/wk/downsc/outdata/out/wrfout\_d03\_2004-03-21\_00:00:00  
\*\*\* NCF: NetCDF: Unknown file format

* * *

```
 *** ERROR ABORT in subroutine SETUP
 ABNORMAL TERMINATION IN SETUP
 Date and time 0:00:00 March 22, 2004 (2004082:000000)
```

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [February 1, 2021, 10:00pm UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/8 "2021-02-01T22:00:42Z")

</div>

This sounds as though you may be feeding a netCDF-HDF file into a model linked with netCDF-classic libraries…

---

<div class="post-metadata">

**Author:** ![Ryan](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@Ryan](https://forum.cmascenter.org/u/Ryan)\
**Post date:** [February 1, 2021, 10:04pm UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/9 "2021-02-01T22:04:20Z")

</div>

Dear staff,  
Could you please provide more details? Do you mean the netcdf lib for compiling WRF is the key issue governing this error?  
Thanks!

With regards,  
Ryan

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [February 1, 2021, 10:06pm UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/10 "2021-02-01T22:06:14Z")

</div>

Try making sure you use the same netCDF libraries for WRF and MCIP…

---

<div class="post-metadata">

**Author:** ![Ryan](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@Ryan](https://forum.cmascenter.org/u/Ryan)\
**Post date:** [February 1, 2021, 10:07pm UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/11 "2021-02-01T22:07:51Z")

</div>

Oh… I got it！！This wrfout file is generated by my colleague who might use gcc compiled netcdf whereas I use the MCIP compiled by Intel Fortran… I will check this issue right now!  
Thanks a lot for your help!

---

<div class="post-metadata">

**Author:** ![hogrefe.christian](https://avatars.discourse-cdn.com/v4/letter/h/74df32/32.png) [@hogrefe.christian](https://forum.cmascenter.org/u/hogrefe.christian)\
**Post date:** [February 2, 2021, 1:48am UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/12 "2021-02-02T01:48:41Z")

</div>

As @cjcoats noted, it’s probably not so much the compiler as whether or not netcdf4 support was enabled when building the respective netcdf libraries. If the netcdf library used to compile WRF had netcdf4 support enabled, the wrfout files probably use the netcdf4 data format. If so, and if the netcdf library linked in when compiling MCIP did not enable netcdf4 support, these wrfout files would not be readable by that MCIP executable.

If this is the case, to solve the issue, either rebuild your copy of netcdf with netcdf4 support and then rebuiled i/o api and MCIP, or have your colleague convert the wrfout files back to “netCDF classic format” or “netCDF 64-bit format” by using his version of nccopy to do so, e.g. nccopy -k nc3 infile outfile or nccopy -k nc6 infile outfile - see the man pages for nccopy for further details.

To determine the data format of your wrfout files, use ncdump -k wrfout, the result will be `classic', `64-bit offset’,`netCDF-4', or `netCDF-4 classic model’. Only the first two will be readable by any executable compiled with a netcdf library that did not have netcdf4 support enabled.

---

<div class="post-metadata">

**Author:** ![Ryan](https://avatars.discourse-cdn.com/v4/letter/r/a8b319/32.png) [@Ryan](https://forum.cmascenter.org/u/Ryan)\
**Post date:** [February 2, 2021, 2:03am UTC](https://forum.cmascenter.org/t/mcip-support-to-wrfv4-2-1/2042/13 "2021-02-02T02:03:57Z")

</div>

Hi Christian,  
Thanks for the additional clarification. I will try to use the ncocopy as you suggested.  
I really appreciate your kind help and continuous support.

With regards,  
Ryan
