MCIP support to WRFv4.2.1

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

1 Like

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?

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

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

Hi Megan,
Please find the ncdump file output attached.
1.txt (67.6 KB)
Best,
Ryan

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

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)

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

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

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

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!

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.

4 Likes

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