# CMAQ-WRF online

**URL:** <https://forum.cmascenter.org/t/cmaq-wrf-online/1296>\
**Category:** WRF-CMAQ\
**Created:** [February 10, 2020, 1:39pm UTC](https://forum.cmascenter.org/t/cmaq-wrf-online/1296 "2020-02-10T13:39:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![setraseti123](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@setraseti123](https://forum.cmascenter.org/u/setraseti123)\
**Post date:** [February 10, 2020, 1:39pm UTC](https://forum.cmascenter.org/t/cmaq-wrf-online/1296/1 "2020-02-10T13:39:56Z")

</div>

Hello, dear Mr/Mrs,  
I need to run CMAQ-WRF online. However, I am so new in this regard and don’t know how can I do so. I wonder if I should set up CMAQ first and then setup WRF, or there is a package that includes both. Please kindly advise me on how can I have CMAQ-WRF online?  
Best wishes,

---

<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 10, 2020, 2:30pm UTC](https://forum.cmascenter.org/t/cmaq-wrf-online/1296/2 "2020-02-10T14:30:28Z")

</div>

The instructions for how to install CMAQ-WRF is available in this section of the CMAQv5.3.1 User Manual [https://github.com/USEPA/CMAQ/blob/master/DOCS/Users\_Guide/CMAQ\_UG\_ch13\_WRF-CMAQ.md#134-latest-wrf-cmaq-release](https://github.com/USEPA/CMAQ/blob/master/DOCS/Users_Guide/CMAQ_UG_ch13_WRF-CMAQ.md#134-latest-wrf-cmaq-release)  
“Build and run instructions are provided in the top level **readme** file in the tarball”.

My recommendation is to start building this with the intel compiler if you have access to it.

I found the following instructions from the WRF community to be helpful, but I used the latest compilers and model release, rather than sticking to the version numbers used in this tutorial, and note that these instructions use gcc for the compiler.  
[https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation\_tutorial.php](https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php)

There are issues with building WRF-CMAQ using the gcc compiler that are documented by this user:  
[http://albeniz.eng.uci.edu/mediawiki/index.php/WRF-CMAQ\_Two-Way\_Coupled\_Model:\_Building,\_Compiling,\_and\_Running](http://albeniz.eng.uci.edu/mediawiki/index.php/WRF-CMAQ_Two-Way_Coupled_Model:_Building,_Compiling,_and_Running)

They were never able to get gcc to work. Based on that, I recommend compiling using openmpi and intel.

Note: We are about to release new WRF input files that will work with the standard build instructions for compiling the netCDF and I/O API Libraries that are provided for CMAQv5.3.1.

---

<div class="post-metadata">

**Author:** ![setraseti123](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@setraseti123](https://forum.cmascenter.org/u/setraseti123)\
**Post date:** [February 12, 2020, 12:57pm UTC](https://forum.cmascenter.org/t/cmaq-wrf-online/1296/3 "2020-02-12T12:57:30Z")

</div>

Dear Liz,  
Many thanks for your help. However, at the first stage, I started to configure WRF V4.1.1 and got an error regarding the NetCDF path ( please have a look at the attached image

 ![Screenshot 2020-02-12 at 16.02.09](https://canada1.discourse-cdn.com/flex027/uploads/cmas/original/1X/b4ee6b31bb6731aca951b6463ee420c7cecc5960.png) ). I previously had my NetCDF on [/home/seti/setii/files/netcdf/], but then changed this path to [/backup/seti/setii/files/netcdf/] . In [configure.wrf.] I changed home to backup and saved the changes, but once configuring WRF I get the same errors.  
What should I do to address this error, please?  
Many thanks in advance and best wishes,

---

<div class="post-metadata">

**Author:** ![nguyennhathachi](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/nguyennhathachi/32/390_2.png) [@nguyennhathachi](https://forum.cmascenter.org/u/nguyennhathachi)\
**Post date:** [June 12, 2020, 7:34am UTC](https://forum.cmascenter.org/t/cmaq-wrf-online/1296/4 "2020-06-12T07:34:31Z")

</div>

Hi lizadams,  
May I ask questions relating to your post here?  
I follow the step to compile WRF in the link you suggested:  
[https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation\_tutorial.php](https://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php)  
But I would like to use PGI compiler instead. Meaning I need to change the CC, CXX, FC… in these lines:  
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

One thing that I cannot find is what options of FFLAGS and FCFLAGS that I can set? What is the meaning of -m64?

Thanks  
HC

---

<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:** [June 12, 2020, 1:18pm UTC](https://forum.cmascenter.org/t/cmaq-wrf-online/1296/5 "2020-06-12T13:18:15Z")

</div>

I don’t have experience building with PGI  
The table at the bottom of this link “Environment Variable Description Notes” may contain what you need.  
[https://www.unidata.ucar.edu/software/netcdf/docs/building\_netcdf\_fortran.html](https://www.unidata.ucar.edu/software/netcdf/docs/building_netcdf_fortran.html)  
I’m also including a link from the unidata support staff that may help.  
[https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg12741.html](https://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg12741.html)

---

<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:** [June 12, 2020, 5:56pm UTC](https://forum.cmascenter.org/t/cmaq-wrf-online/1296/6 "2020-06-12T17:56:19Z")

</div>

I good start is to look at the flags in the relevant _Makeinclude_ file for the I/O API, in this case probably  
_ioapi/Makeinclude.Linux2\_x86\_64pg_

---

<div class="post-metadata">

**Author:** ![stiphen](https://avatars.discourse-cdn.com/v4/letter/s/f19dbf/32.png) [@stiphen](https://forum.cmascenter.org/u/stiphen)\
**Post date:** [July 11, 2020, 1:46pm UTC](https://forum.cmascenter.org/t/cmaq-wrf-online/1296/7 "2020-07-11T13:46:38Z")

</div>

Hi dear Liza,  
Could you please see received error about this tutorial in my new topic.

> [@Error in Test-data run in WRF-CMAQ 4.1.1 - 5.3.1](https://forum.cmascenter.org/t/error-in-test-data-run-in-wrf-cmaq-4-1-1-5-3-1/1637):
>
> Hi dudes, I compiled WRF-CMAQ (4.11,5.3.1) using the following link and wrf.exe created well. Now I want to run this model for test. When I ran ./run\_twoway\_sf\_Bench\_2016\_12SE1.csh \>& out.txt, I received some error in running model. The rsl.error.000 is attached. Anyone can help me to run this test-data? Thanks CC: [https://forum.cmascenter.org/u/lizadams](https://forum.cmascenter.org/u/lizadams) rsl.error.000: taskid: 0 hostname: stiphen-virtual-machine module\_io\_quilt\_old.F 2931 F Quilting with 1 groups of 0 I/O t…
