# Two-way coupled WRF-CMAQ process?

**URL:** <https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776>\
**Category:** CMAQ\
**Created:** [June 22, 2019, 4:11am UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776 "2019-06-22T04:11:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gc13141112](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/gc13141112/32/78_2.png) [@gc13141112](https://forum.cmascenter.org/u/gc13141112)\
**Post date:** [June 22, 2019, 4:11am UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/1 "2019-06-22T04:11:13Z")

</div>

I am learning and running two-way coupled model, I can successfully run two-way coupled model with these setting (a. DO\_SW\_CAL = T, DO\_LW\_CAL = F; b. DO\_SW\_CAL = F, DO\_LW\_CAL = T; c.DO\_SW\_CAL = F, DO\_LW\_CAL = F), but can’t run with the setting (DO\_SW\_CAL = T, DO\_LW\_CAL = T) and have no errors. The attachment is configuration file. Can you tell me how to address this? Thanks in advance for your help!

[neigae\_20190620\_sw\_lw.csv](https://forum.cmascenter.org/uploads/short-url/wMYudqJdwZYqnbE4VXHwXYwm7kS.csv) (39.5 KB)

---

<div class="post-metadata">

**Author:** ![wong.david-c](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wong.david-c](https://forum.cmascenter.org/u/wong.david-c)\
**Post date:** [June 28, 2019, 2:08pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/2 "2019-06-28T14:08:03Z")

</div>

Hi gc13141112,

```
 Thanks for your interest in the WRF-CMAQ two-way coupled model. We did not fully tested the long wave option (LW_CAL) so it is not officially supported. Unfortunately the model crashed when LW_CAL and SW_CAL were both on. Were you using the test dataset? Anyway I will take a look of the code.

```

Cheers,  
David

---

<div class="post-metadata">

**Author:** ![gc13141112](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.cmascenter.org/gc13141112/32/78_2.png) [@gc13141112](https://forum.cmascenter.org/u/gc13141112)\
**Post date:** [June 28, 2019, 3:14pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/3 "2019-06-28T15:14:02Z")

</div>

Hi David,  
Thank you for your reply. In the twoway/phys folder, I can’t find twoway longwave code that looks like module\_twoway\_ra\_rrtmg\_lw.F. Also I can’t find any code related to the twoway CAM scheme. Please advise!

```
                                                                                                                Chao
```

---

<div class="post-metadata">

**Author:** ![esm](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@esm](https://forum.cmascenter.org/u/esm)\
**Post date:** [September 3, 2019, 9:27am UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/4 "2019-09-03T09:27:25Z")

</div>

Hi  
I want to benchmark and run WRF-CMAQ TWO-WAY,but I don’t know how to do it? Could you guide me, please?  
Thank you

---

<div class="post-metadata">

**Author:** ![wong.david-c](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wong.david-c](https://forum.cmascenter.org/u/wong.david-c)\
**Post date:** [September 3, 2019, 1:05pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/5 "2019-09-03T13:05:31Z")

</div>

Hi Ensiyeh,

Please download the required WRF-CMAQ model tarball which includes a step-by-step instruction to build the WRF-CMAQ two-way coupled model.

---

<div class="post-metadata">

**Author:** ![esm](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@esm](https://forum.cmascenter.org/u/esm)\
**Post date:** [September 3, 2019, 1:10pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/6 "2019-09-03T13:10:19Z")

</div>

Hi David

Thank you for your response. I built WRF-CMAQ two-way model, but I don’t know how to benchmark it and how to run it? Could you guide me, please?  
Thank you

---

<div class="post-metadata">

**Author:** ![wong.david-c](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wong.david-c](https://forum.cmascenter.org/u/wong.david-c)\
**Post date:** [September 3, 2019, 1:23pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/7 "2019-09-03T13:23:13Z")

</div>

Hi Ensiyeh,

I assume you are using the latest version WRF 4.1.1 and CMAQ 5.3 coupled model. You can download a one-day test dataset and a run script.

---

<div class="post-metadata">

**Author:** ![esm](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@esm](https://forum.cmascenter.org/u/esm)\
**Post date:** [September 3, 2019, 1:34pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/8 "2019-09-03T13:34:24Z")

</div>

Hi David,

I built my model with WRF 3.8 and CMAQ 5.2. I downloaded WRFv38-CMAQv5.2-benchmark; But I don’t know how to benchmark and run this model. I know how to run CMAQ only. Could you guide me, please? Is there any user guidelines for running it?  
Thank you

---

<div class="post-metadata">

**Author:** ![foley.kristen](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@foley.kristen](https://forum.cmascenter.org/u/foley.kristen)\
**Post date:** [September 3, 2019, 1:46pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/9 "2019-09-03T13:46:15Z")

</div>

Hi Ensiyeh,  
Please consider moving to the latest WRF-CMAQ release which uses WRFv4.1.1 and CMAQv5.3. A tarball with build and run scripts and a README file with instructions is available here (Google Drive): [https://drive.google.com/drive/folders/1ru64xxZeRcE5buQ9fygV9jUHAQ9aDnL7](https://drive.google.com/drive/folders/1ru64xxZeRcE5buQ9fygV9jUHAQ9aDnL7)

One day benchmark input and output datasets are available to download from here (Google Drive): [https://drive.google.com/drive/folders/1apg7\_LXU4Kpzx5EZgdc07Q3UTTpL-jah](https://drive.google.com/drive/folders/1apg7_LXU4Kpzx5EZgdc07Q3UTTpL-jah)

The tarball and benchmark input data are also available from the EPA anonymous ftp server: ftp://newftp.epa.gov/exposure/CMAQ/V5\_3/WRF-CMAQ\_Coupled\_Model/  
The benchmark output data is not there yet but will be uploaded sometime next week.

---

<div class="post-metadata">

**Author:** ![esm](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@esm](https://forum.cmascenter.org/u/esm)\
**Post date:** [September 3, 2019, 1:54pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/10 "2019-09-03T13:54:05Z")

</div>

Hi

Thank you. I download them. I can’t open 3rd link. Is that right?

---

<div class="post-metadata">

**Author:** ![wong.david-c](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wong.david-c](https://forum.cmascenter.org/u/wong.david-c)\
**Post date:** [September 3, 2019, 1:57pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/11 "2019-09-03T13:57:28Z")

</div>

Hi Ensiyeh,

If you have run CMAQ before, you can submit WRf-CMAQ job script the same way. The only thing you need to do is to modify the input, output, and source code paths in the run script.

---

<div class="post-metadata">

**Author:** ![foley.kristen](https://avatars.discourse-cdn.com/v4/letter/f/d9b06d/32.png) [@foley.kristen](https://forum.cmascenter.org/u/foley.kristen)\
**Post date:** [September 3, 2019, 2:09pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/12 "2019-09-03T14:09:33Z")

</div>

The third link is correct and should be a publicly available link but perhaps it is being blocked by your system admin because it is anonymous ftp (not secure). The files on the ftp server are the same as what is posted on the Google Drive. If you were able to download them from the Google Drive folder, you do not need the third link. We provided this option for users that are unable to access Google Drive.

---

<div class="post-metadata">

**Author:** ![esm](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@esm](https://forum.cmascenter.org/u/esm)\
**Post date:** [September 3, 2019, 3:09pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/13 "2019-09-03T15:09:51Z")

</div>

Hi David,

Thank you. You mean I must just modify a scripts? Which script? I see just a scrip in twoway/scripts  
Where I must put the inputs file?

---

<div class="post-metadata">

**Author:** ![wong.david-c](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wong.david-c](https://forum.cmascenter.org/u/wong.david-c)\
**Post date:** [September 3, 2019, 3:38pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/14 "2019-09-03T15:38:11Z")

</div>

Hi Ensiyeh,

When you unzip twoway.tar.gz, there is a run script in twoway/script. You can unzip the dataset and put it anywhere your want.

---

<div class="post-metadata">

**Author:** ![esm](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@esm](https://forum.cmascenter.org/u/esm)\
**Post date:** [September 4, 2019, 2:48pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/15 "2019-09-04T14:48:31Z")

</div>

Hi David,

Thank you for your answer. I want to benchmark my model. I ran “twoway\_model\_run\_script” and it gives me this:

mpirun -r ssh -np 8 wrf.exe  
mpirun: Command not found.  
0.0u 0.0s 0:00.00 0.0% 0+0k 0+0io 0pf+0w  
date +Completed WRF at %m/%d/%y %H:%M:%S%n  
Completed WRF at 09/04/19 18:57:52  
mv: No match.  
if ( F == T ) then  
biogon: Undefined variable.

The log file is:  
[New Text Document.txt](https://forum.cmascenter.org/uploads/short-url/uR3sYJVvbUqIYL5tVOs6VMRKNPL.txt) (19.4 KB)

There are another problems,too. Could you please check my logfile?  
Could you guide me, please?  
Thank you

---

<div class="post-metadata">

**Author:** ![wong.david-c](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wong.david-c](https://forum.cmascenter.org/u/wong.david-c)\
**Post date:** [September 4, 2019, 3:46pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/16 "2019-09-04T15:46:10Z")

</div>

Hi Ensiyeh,

According to the script, there is no biogon variable in the script. Please send me your script.

---

<div class="post-metadata">

**Author:** ![esm](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@esm](https://forum.cmascenter.org/u/esm)\
**Post date:** [September 4, 2019, 3:53pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/17 "2019-09-04T15:53:37Z")

</div>

Hi David,

I don’t have access to the script that I modified, but I use this script:

[New Text Document.txt](https://forum.cmascenter.org/uploads/short-url/vQu2kexc2JZvNStJUCWipeMcGe4.txt) (38.7 KB)

---

<div class="post-metadata">

**Author:** ![wong.david-c](https://avatars.discourse-cdn.com/v4/letter/w/bcef8e/32.png) [@wong.david-c](https://forum.cmascenter.org/u/wong.david-c)\
**Post date:** [September 4, 2019, 5:13pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/18 "2019-09-04T17:13:31Z")

</div>

Hi Ensiyeh,

```
 Replace line 886:

    if ( $biogon ) then

```

with this line

if ( $CTM\_BIOGEMIS == ‘Y’ ) then

---

<div class="post-metadata">

**Author:** ![esm](https://avatars.discourse-cdn.com/v4/letter/e/f08c70/32.png) [@esm](https://forum.cmascenter.org/u/esm)\
**Post date:** [September 5, 2019, 12:49pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/19 "2019-09-05T12:49:11Z")

</div>

Hi David,

Thank you for your answer. I did it but I couldn’t run it. Could you guide me, please?  
The log file is:

set NPROCS = 8  
set start\_year = 2013  
set end\_year = 2013  
set start\_month = 8  
set end\_month = 8  
set start\_day = 1  
set end\_day = 1  
set cycle = 0  
set firstday = 20130728  
set STTIME = 0  
set NSTEPS = 240000  
set TSTEP = 010000  
set version = 3852  
set MECH = cb6r3\_ae6\_aq  
set resolution = 12km  
setenv NZ 35  
set ROOT\_DIR = /home/ensiyeh/online  
set WRF\_DIR = /home/ensiyeh/online/WRFV38  
set INPDIR = /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input  
set OMIpath = /home/ensiyeh/online/WRFV38/cmaq  
set OUTPUT\_ROOT = /home/ensiyeh/online  
set NMLpath = /home/ensiyeh/online/WRFV38/cmaq  
set NMLpath2 = /home/ensiyeh/online/WRFV38/cmaq  
set NUM\_LAND\_USE\_TYPE = 40  
set cont\_from\_spinup\_run = T  
set radt = 20  
setenv RUN\_CMAQ\_DRIVER T  
setenv DO\_SW\_CAL T  
setenv DO\_LW\_CAL F  
setenv WRF\_CMAQ\_FREQ 5  
setenv CREATE\_PHYSICAL\_FILE F  
setenv FILE\_TIME\_STEP 10000  
setenv WRF\_COL\_DIM 251  
setenv WRF\_ROW\_DIM 185  
setenv WRF\_LAY\_DIM 36  
setenv CMAQ\_COL\_DIM 236  
setenv CMAQ\_ROW\_DIM 170  
setenv TWOWAY\_DELTA\_X 7  
setenv TWOWAY\_DELTA\_Y 7  
setenv WRF\_LC\_REF\_LAT 40.0  
setenv CTM\_TURN\_ON\_PV N  
setenv SD\_TIME\_SERIES F  
setenv SD\_SCOL 241  
setenv SD\_ECOL 248  
setenv SD\_SROW 160  
setenv SD\_EROW 169  
setenv SD\_CONC\_SPCS NO2 NO O3 NO3 CO ASO4J ASO4I ANH4J ANH4I ANO3J  
ANO3I AORGAJ AORGAI AORGPAJ AORGPAI AORGBJ AORGBI AECJ AECI A25J A25I  
ACORS ASEAS ASOIL  
setenv AVG\_CONC\_SPCS ALL  
setenv CONC\_SPCS  
setenv CONC\_BLEV\_ELEV 1 35  
setenv ACONC\_BLEV\_ELEV 1 1  
setenv CTM\_PROCAN N  
setenv PA\_BCOL\_ECOL 30 100  
setenv PA\_BROW\_EROW 10 50  
setenv PA\_BLEV\_ELEV 1 5  
setenv CTM\_MAXSYNC 300  
setenv CTM\_MINSYNC 90  
setenv SIGMA\_SYNC\_TOP 0.7  
setenv CTM\_ADV\_CFL 0.95  
setenv AVG\_FILE\_ENDTIME Y  
setenv CTM\_CKSUM Y  
setenv CTM\_WB\_DUST N  
setenv CTM\_ERODE\_AGLAND N  
setenv CTM\_WBDUST\_BELD BELD3  
setenv CTM\_LTNG\_NO N  
setenv CTM\_WVEL N  
setenv KZMIN Y  
setenv CTM\_ILDEPV Y  
setenv CTM\_MOSAIC N  
setenv CTM\_ABFLUX N  
setenv CTM\_HGBIDI N  
setenv CTM\_SFC\_HONO N  
setenv CTM\_PING N  
setenv CTM\_PT3DEMIS Y  
setenv CTM\_FST N  
setenv CTM\_BIOGEMIS N  
setenv PX\_VERSION Y  
setenv BIOSW\_YN N  
setenv SUMMER\_YN N  
setenv AVG\_FILE\_ENDTIME N  
setenv CTM\_GRAV\_SETL Y  
setenv CORESHELL\_OPTICS N  
setenv MIE\_OPTICS N  
setenv LTNGPARAM N  
setenv LTNG\_ASSIM\_FLAG N  
setenv CTM\_ZERO\_PCSOA N  
setenv IOAPI\_LOG\_WRITE F  
setenv FL\_ERR\_STOP F  
setenv IOAPI\_OFFSET\_64 Y  
setenv CTM\_EMISCHK N  
setenv PROMPTFLAG F  
setenv CLD\_DIAG N  
setenv CTM\_PMDIAG Y  
setenv CTM\_APMDIAG Y  
setenv CTM\_AVISDIAG Y  
setenv CTM\_PHOTDIAG N  
setenv CTM\_SSEMDIAG N  
setenv CTM\_DUSTEM\_DIAG N  
setenv CTM\_DEPV\_FILE N  
setenv B3GTS\_DIAG N  
setenv APT\_DIAG N  
setenv PT3DDIAG N  
setenv PT3DFRAC N  
setenv LTNGDIAG N  
setenv VDIFF\_DIAG\_FILE N  
setenv CTM\_AOD N  
setenv CTM\_MGEMDIAG N  
setenv REP\_LAYER\_MIN -1  
setenv MPI\_SM\_POOL 16000  
setenv MP\_EAGER\_LIMIT 65536  
setenv MP\_SINGLE\_THREAD yes  
setenv MP\_STDOUTMODE ordered  
setenv MP\_LABELIO yes  
setenv MP\_SHARED\_MEMORY yes  
setenv MP\_ADAPTER\_USE shared  
setenv MP\_CPU\_USE multiple  
setenv MP\_CSS\_INTERRUPT yes  
set OCEANfile = ssmask.4BEARPEX2.ncf  
set OMIfile = OMI\_1979\_to\_2015.dat  
set OPTICSfile = PHOT\_OPTICS.dat  
set CSQYfile = CSQY\_DATA\_cb6r3\_ae6\_aq  
set ICFILE = ICON.2013213.4BEARPEX2.2013ej\_v6\_13i.ncf  
set BCFILE = BCON.2013213.4BEARPEX2.2013ej\_v6\_13i.ncf  
setenv RUNID v3852  
set ICpath = /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/icbc  
set BCpath = /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/icbc  
set EMISpath = /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis  
set IN\_PTpath = /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis/inln\_point  
set IN\_LTpath = /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/lightning  
set METpath = /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/met\_wrf  
set LUpath = /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/land  
set SZpath = /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/land  
if ( ( T == T ) || ( F == T ) ) then  
setenv CMAQ\_WRF\_FEEDBACK T  
else  
set rad\_scheme = _rrtmg\_20  
if ( T == T ) then  
if ( F == T ) then  
set feedback = sf  
endif  
else  
set call\_ratio = 5\_1  
set output\_direct\_name = output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013  
set EXEC = CCTM  
set year = 2013  
@ pre\_year = 2013 - 1  
@ cur\_year = 2013  
@ yr = 2013  
@ start\_hour = 0 / 10000  
@ end\_hour = ( 0 + 23 ) % 24  
@ cur\_year = 2013 - 1  
while ( 2012 \< 2013 )  
@ cur\_year++  
if ( ( 2013 % 4 ) != 0 ) then  
set leap\_year\_cur\_year = 0  
else if ( ( 2013 % 400 ) == 0 ) then  
if ( 0 ) then  
set numday\_cur\_year = ( 31 28 31 30 31 30 31 31 30 31 30 31 )  
if ( ( 2012 % 4 ) != 0 ) then  
if ( ( 2012 % 400 ) == 0 ) then  
if ( ( 2012 % 100 ) == 0 ) then  
set leap\_year\_pre\_year = 1  
endif  
endif  
if ( 2013 == 2013 ) then  
@ cur\_day\_j = 0  
@ temp\_month = 1  
while ( 1 \< 8 )  
@ cur\_day\_j = 0 + 31  
@ temp\_month++  
end  
while ( 2 \< 8 )  
@ cur\_day\_j = 31 + 28  
@ temp\_month++  
end  
while ( 3 \< 8 )  
@ cur\_day\_j = 59 + 31  
@ temp\_month++  
end  
while ( 4 \< 8 )  
@ cur\_day\_j = 90 + 30  
@ temp\_month++  
end  
while ( 5 \< 8 )  
@ cur\_day\_j = 120 + 31  
@ temp\_month++  
end  
while ( 6 \< 8 )  
@ cur\_day\_j = 151 + 30  
@ temp\_month++  
end  
while ( 7 \< 8 )  
@ cur\_day\_j = 181 + 31  
@ temp\_month++  
end  
while ( 8 \< 8 )  
@ cur\_day\_j = 212 + 1  
@ pre\_day\_j = 213 - 1  
else  
if ( 213 == 1 ) then  
if ( 2013 == 2013 ) then  
@ cur\_month = 8  
else  
if ( 2013 == 2013 ) then  
@ cur\_end\_month = 8  
else  
@ cur\_month = 8 - 1  
while ( 7 \< 8 )  
@ cur\_month++  
@ cur\_day = 0  
@ cur\_month\_end\_day = 31  
if ( ( 2013 == 2013 ) && ( 8 == 8 ) ) then  
@ cur\_day = 1 - 1  
endif  
if ( ( 2013 == 2013 ) && ( 8 == 8 ) ) then  
@ cur\_month\_end\_day = 1  
endif  
while ( 0 \< 1 )  
@ cur\_day++  
set loc\_pre\_year = 2013  
if ( 1 == 1 ) then  
@ pre\_month = 8 - 1  
if ( 7 == 0 ) then  
set yest = 31  
set yesterday = `printf "%d%2.2d%2.2d\n" $loc_pre_year $pre_month $yest`  
printf %d%2.2d%2.2d\n 2013 7 31  
else  
set today = `printf "%d%2.2d%2.2d\n" $cur_year $cur_month $cur_day`  
printf %d%2.2d%2.2d\n 2013 8 1  
set YYYYMMDD = 20130801  
set G\_DAY = 20130801  
set today\_j = `printf "%d%3.3d\n" $cur_year $cur_day_j`  
printf %d%3.3d\n 2013 213  
set yesterday\_j = `printf "%d%3.3d\n" $loc_pre_year $pre_day_j`  
printf %d%3.3d\n 2013 212  
set wrf\_tstep = 20  
setenv CTM\_APPL v3852\_20130801  
setenv CTM\_APPL\_yesterday v3852\_20130731  
if ( ! -d /home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013 ) then  
set use\_profile\_init = 0  
if ( 20130801 == 20130728 ) then  
if ( T == T ) then  
setenv FEEDBACK\_RSTFLAG .false.  
set cont\_from\_spinup\_run = F  
set use\_profile\_init = 1  
else  
setenv WRF\_RSTFLAG .true.  
setenv pxlsm\_smois\_init 0  
endif  
mkdir /home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/20130801  
mkdir: cannot create directory  
‘/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/20130801’:  
File exists  
set STDATE = 2013213  
set APPL = 20130801  
setenv GRIDDESC  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/GRIDDESC  
setenv GRID\_NAME WRF\_CMAQ\_2WAY  
set DISP = delete  
set OUTDIR = /home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013  
set YEAR = 2013  
set MONTH = `printf "%2.2d\n" $cur_month`  
printf %2.2d\n 8  
set day = 1  
set EMISDATE = `printf "%4d%2.2d%2.2d\n" ${YEAR} $cur_month $cur_day`  
printf %4d%2.2d%2.2d\n 2013 8 1  
if ( 1 ) then  
setenv INITIAL\_RUN Y  
else  
set test = `ls CTM_LOG_???.${APPL}`  
ls: No match.  
if ( != ) then  
if ( N == Y ) then  
if ( N == Y ) then  
if ( N == Y ) then  
if ( N == Y ) then  
setenv CSQY\_DATA /home/ensiyeh/online/WRFV38/cmaq/CSQY\_DATA\_cb6r3\_ae6\_aq  
if ( ! ( -e /home/ensiyeh/online/WRFV38/cmaq/CSQY\_DATA\_cb6r3\_ae6\_aq ) ) then  
setenv OCEAN\_1 /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/land/ssmask.4BEARPEX2.ncf  
setenv EMISfile emis\_mole\_all\_20130801\_4BEARPEX2\_cmaq\_cb05e51\_2013ej\_v6\_13i.ncf  
setenv EMIS\_1 /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis/emis\_mole\_all\_20130801\_4BEARPEX2\_cmaq\_cb05e51\_2013ej\_v6\_13i.ncf  
if ( Y == Y || Y == T ) then  
setenv NPTGRPS 5  
set iday = `grep ^$STDATE $INPDIR/mergedates.2013.txt`  
grep ^2013213 /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/mergedates.2013.txt  
setenv STK\_GRPS\_01  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis/inln\_point/stack\_groups\_ptnonipm\_12US1\_2013ej\_v6\_13i.ncf  
setenv STK\_EMIS\_01  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis/inln\_point/inln\_mole\_ptnonipm\_20130806\_12US1\_cmaq\_cb05e51\_2013ej\_v6\_13i.ncf  
setenv STK\_GRPS\_02  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis/inln\_point/stack\_groups\_othpt\_12US1\_2013ej\_v6\_13i.ncf  
setenv STK\_EMIS\_02  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis/inln\_point/inln\_mole\_othpt\_20130806\_12US1\_cmaq\_cb05e51\_2013ej\_v6\_13i.ncf  
setenv STK\_GRPS\_03  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis/inln\_point/stack\_groups\_ptegu\_12US1\_2013ej\_v6\_13i.ncf  
setenv STK\_EMIS\_03  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis/inln\_point/inln\_mole\_ptegu\_20130801\_12US1\_cmaq\_cb05e51\_2013ej\_v6\_13i.ncf  
setenv STK\_GRPS\_04  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis/inln\_point/stack\_groups\_pt\_oilgas\_12US1\_2013ej\_v6\_13i.ncf  
setenv STK\_EMIS\_04  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis/inln\_point/inln\_mole\_pt\_oilgas\_20130806\_12US1\_cmaq\_cb05e51\_2013ej\_v6\_13i.ncf  
setenv STK\_GRPS\_05  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis/inln\_point/stack\_groups\_ptfire\_20130801\_12US1\_2013ej\_v6\_13i.ncf  
setenv STK\_EMIS\_05  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/emis/inln\_point/inln\_mole\_ptfire\_20130801\_12US1\_cmaq\_cb05e51\_2013ej\_v6\_13i.ncf  
unset echo  
setenv LAYP\_STDATE 2013213  
setenv LAYP\_STTIME 0  
setenv LAYP\_NSTEPS 240000  
endif  
setenv S\_CGRID /home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_CGRID\_v3852_[20130801.nc](http://20130801.nc)  
setenv CTM\_CONC\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_CONC\_v3852\_20130801.nc  
-v  
setenv A\_CONC\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_ACONC\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv MEDIA\_CONC  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_MEDIA\_CONC\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_DRY\_DEP\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_DRYDEP\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_DEPV\_DIAG  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_DEPV\_v3852\_20130801.nc  
-v  
setenv CTM\_PT3D\_DIAG  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_PT3D\_v3852\_20130801.nc  
-v  
setenv B3GTS\_S /home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_B3GTS\_S\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv SOILOUT /home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_SOILOUT\_v3852\_[20130801.nc](http://20130801.nc)  
setenv CTM\_WET\_DEP\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_WETDEP1\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_WET\_DEP\_2  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_WETDEP2\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_VIS\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_PMVIS\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_AVIS\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_APMVIS\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_PMDIAG\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_PMDIAG\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_APMDIAG\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_APMDIAG\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_RJ\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_PHOTDIAG1\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_RJ\_2  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_PHOTDIAG2\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_SSEMIS\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/[CCTM\_SSEMIS.v3852\_20130801.nc](http://CCTM_SSEMIS.v3852_20130801.nc)  
-v  
setenv CTM\_DUST\_EMIS\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/[CCTM\_DUSTEMIS.v3852\_20130801.nc](http://CCTM_DUSTEMIS.v3852_20130801.nc)  
-v  
setenv CTM\_IPR\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_PA\_1\_v3852\_20130801.nc  
-v  
setenv CTM\_IPR\_2  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_PA\_2\_v3852\_20130801.nc  
-v  
setenv CTM\_IPR\_3  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_PA\_3\_v3852\_20130801.nc  
-v  
setenv CTM\_IRR\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_IRR\_1\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_IRR\_2  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_IRR\_2\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_IRR\_3  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_IRR\_3\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_DRY\_DEP\_MOS  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_DDMOS\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_DRY\_DEP\_FST  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_DDFST\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_DEPV\_MOS  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_DEPVFST\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_DEPV\_FST  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_DEPVMOS\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_VDIFF\_DIAG  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_VDIFF\_DIAG\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_VSED\_DIAG  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_VSED\_DIAG\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_AOD\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_AOD\_DIAG\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_LTNGDIAG\_1  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_LTNGHRLY\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv CTM\_LTNGDIAG\_2  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/CCTM\_LTNGCOL\_v3852\_[20130801.nc](http://20130801.nc)  
-v  
setenv FLOOR\_FILE  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/FLOOR\_v3852\_20130801.txt  
setenv LAYER\_FILE MET\_CRO\_3D  
setenv GRID\_DOT\_2D BUFFERED  
setenv GRID\_CRO\_2D BUFFERED  
setenv MET\_CRO\_2D BUFFERED  
setenv MET\_DOT\_3D BUFFERED  
setenv MET\_CRO\_3D BUFFERED  
@ n = 0  
while ( 0 \< 8 )  
set name = `printf "_%3.3d\n" $n`  
printf \_%3.3d\n 0  
setenv feed\_back\_000 BUFFERED  
@ n++  
end  
while ( 1 \< 8 )  
set name = `printf "_%3.3d\n" $n`  
printf \_%3.3d\n 1  
setenv feed\_back\_001 BUFFERED  
@ n++  
end  
while ( 2 \< 8 )  
set name = `printf "_%3.3d\n" $n`  
printf \_%3.3d\n 2  
setenv feed\_back\_002 BUFFERED  
@ n++  
end  
while ( 3 \< 8 )  
set name = `printf "_%3.3d\n" $n`  
printf \_%3.3d\n 3  
setenv feed\_back\_003 BUFFERED  
@ n++  
end  
while ( 4 \< 8 )  
set name = `printf "_%3.3d\n" $n`  
printf \_%3.3d\n 4  
setenv feed\_back\_004 BUFFERED  
@ n++  
end  
while ( 5 \< 8 )  
set name = `printf "_%3.3d\n" $n`  
printf \_%3.3d\n 5  
setenv feed\_back\_005 BUFFERED  
@ n++  
end  
while ( 6 \< 8 )  
set name = `printf "_%3.3d\n" $n`  
printf \_%3.3d\n 6  
setenv feed\_back\_006 BUFFERED  
@ n++  
end  
while ( 7 \< 8 )  
set name = `printf "_%3.3d\n" $n`  
printf \_%3.3d\n 7  
setenv feed\_back\_007 BUFFERED  
@ n++  
end  
while ( 8 \< 8 )  
setenv PGRID\_DOT\_2D  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/GRID\_DOT\_2D20130801  
-v  
setenv PGRID\_CRO\_2D  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/GRID\_CRO\_2D20130801  
-v  
setenv PMET\_CRO\_2D  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/MET\_CRO\_2D20130801  
-v  
setenv PMET\_DOT\_3D  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/MET\_DOT\_2D20130801  
-v  
setenv PMET\_CRO\_3D  
/home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013/MET\_CRO\_3D20130801  
-v  
if ( F == T ) then  
setenv CTM\_STDATE 2013213  
setenv CTM\_STTIME 0  
setenv CTM\_RUNLEN 240000  
setenv CTM\_TSTEP 010000  
setenv CTM\_PROGNAME CCTM  
setenv INIT\_GASC\_1  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/icbc/ICON.2013213.4BEARPEX2.2013ej\_v6\_13i.ncf  
setenv INIT\_AERO\_1  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/icbc/ICON.2013213.4BEARPEX2.2013ej\_v6\_13i.ncf  
setenv INIT\_NONR\_1  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/icbc/ICON.2013213.4BEARPEX2.2013ej\_v6\_13i.ncf  
setenv INIT\_TRAC\_1  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/icbc/ICON.2013213.4BEARPEX2.2013ej\_v6\_13i.ncf  
setenv BNDY\_GASC\_1  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/icbc/BCON.2013213.4BEARPEX2.2013ej\_v6\_13i.ncf  
setenv BNDY\_AERO\_1  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/icbc/BCON.2013213.4BEARPEX2.2013ej\_v6\_13i.ncf  
setenv BNDY\_NONR\_1  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/icbc/BCON.2013213.4BEARPEX2.2013ej\_v6\_13i.ncf  
setenv BNDY\_TRAC\_1  
/home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/icbc/BCON.2013213.4BEARPEX2.2013ej\_v6\_13i.ncf  
setenv OMI /home/ensiyeh/online/WRFV38/cmaq/OMI\_1979\_to\_2015.dat  
setenv OPTICS\_DATA /home/ensiyeh/online/WRFV38/cmaq/PHOT\_OPTICS.dat  
cd /home/ensiyeh/online/output\_12km\_sf\_rrtmg\_20\_5\_1\_v3852\_2013  
ln -s /home/ensiyeh/online/WRFV38/cmaq/GC\_cb6r3\_ae6\_aq.nml gc\_matrix\_nml  
ln: failed to create symbolic link ‘gc\_matrix\_nml’: File exists  
ln -s /home/ensiyeh/online/WRFV38/cmaq/AE\_cb6r3\_ae6\_aq.nml ae\_matrix\_nml  
ln: failed to create symbolic link ‘ae\_matrix\_nml’: File exists  
ln -s /home/ensiyeh/online/WRFV38/cmaq/NR\_cb6r3\_ae6\_aq.nml nr\_matrix\_nml  
ln: failed to create symbolic link ‘nr\_matrix\_nml’: File exists  
ln -s /home/ensiyeh/online/WRFV38/cmaq/Species\_Table\_TR\_0.nml tr\_matrix\_nml  
ln: failed to create symbolic link ‘tr\_matrix\_nml’: File exists  
if ( -f namelist.input ) rm -f namelist.input  
rm -f namelist.input  
cat  
rm -f wrfbdy\_d01 wrffdda\_d01 wrfsfdda\_d01 wrfinput\_d01 wrflowinp\_d01  
ln -s /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/met\_wrf/wrfbdy\_d01 wrfbdy\_d01  
ln -s /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/met\_wrf/wrffdda\_d01 wrffdda\_d01  
ln -s /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/met\_wrf/wrfsfdda\_d01  
wrfsfdda\_d01  
if ( .true. == .false. ) then  
ln -s /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/met\_wrf/wrfrst\_d01\_2013-08-01\_00:00:00  
wrfrst\_d01\_2013-08-01\_00:00:00  
ln: failed to create symbolic link ‘wrfrst\_d01\_2013-08-01\_00:00:00’: File exists  
endif  
ln -s /home/ensiyeh/online/wrf\_38\_cmaq\_52\_input/met\_wrf/wrflowinp\_d01  
wrflowinp\_d01  
if ( -f wrf.exe ) rm -f wrf.exe  
rm -f wrf.exe  
if ( -f ETAMPNEW\_DATA ) rm -f ETAMPNEW\_DATA  
rm -f ETAMPNEW\_DATA  
if ( -f GENPARM.TBL ) rm -f GENPARM.TBL  
rm -f GENPARM.TBL  
if ( -f landFilenames ) rm -f landFilenames  
rm -f landFilenames  
if ( -f LANDUSE.TBL ) rm -f LANDUSE.TBL  
rm -f LANDUSE.TBL  
if ( -f RRTM\_DATA ) rm -f RRTM\_DATA  
rm -f RRTM\_DATA  
if ( -f SOILPARM.TBL ) rm -f SOILPARM.TBL  
rm -f SOILPARM.TBL  
if ( -f tr49t67 ) rm -f tr49t67  
rm -f tr49t67  
if ( -f tr49t85 ) rm -f tr49t85  
rm -f tr49t85  
if ( -f tr67t85 ) rm -f tr67t85  
rm -f tr67t85  
if ( -f VEGPARM.TBL ) rm -f VEGPARM.TBL  
rm -f VEGPARM.TBL  
ln -s /home/ensiyeh/online/WRFV38/main/wrf.exe wrf.exe  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/ETAMPNEW\_DATA ETAMPNEW\_DATA  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/GENPARM.TBL GENPARM.TBL  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/landFilenames landFilenames  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/LANDUSE.TBL LANDUSE.TBL  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/RRTM\_DATA RRTM\_DATA  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/RRTMG\_SW\_DATA RRTMG\_SW\_DATA  
ln: failed to create symbolic link ‘RRTMG\_SW\_DATA’: File exists  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/RRTMG\_LW\_DATA RRTMG\_LW\_DATA  
ln: failed to create symbolic link ‘RRTMG\_LW\_DATA’: File exists  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/SOILPARM.TBL SOILPARM.TBL  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/tr49t67 tr49t67  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/tr49t85 tr49t85  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/tr67t85 tr67t85  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/VEGPARM.TBL VEGPARM.TBL  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/ozone\_plev.formatted  
ozone\_plev.formatted  
ln: failed to create symbolic link ‘ozone\_plev.formatted’: File exists  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/ozone\_lat.formatted  
ozone\_lat.formatted  
ln: failed to create symbolic link ‘ozone\_lat.formatted’: File exists  
ln -s /home/ensiyeh/online/WRFV38/test/em\_real/ozone.formatted ozone.formatted  
ln: failed to create symbolic link ‘ozone.formatted’: File exists  
date +Started wrf.exe at %m/%d/%y %H:%M:%S  
Started wrf.exe at 09/05/19 17:21:34  
set MPI = /home/ensiyeh/WRF-CMAQ/CMAQ-OFFLINE/CMAQ-5.2/lib/x86\_64/intel/mpich/bin  
set MPIRUN = /home/ensiyeh/WRF-CMAQ/CMAQ-OFFLINE/CMAQ-5.2/lib/x86\_64/intel/mpich/bin/mpirun  
mpirun -np 8 /home/ensiyeh/online/WRFV38/main/wrf.exe  
mpirun: Command not found.  
0.0u 0.0s 0:00.00 0.0% 0+0k 0+0io 0pf+0w  
date +Completed WRF at %m/%d/%y %H:%M:%S%n  
Completed WRF at 09/05/19 17:21:34

mv: No match.  
if ( F == T ) then  
if ( N == M-bM^@M^XYM-bM^@M^Y ) then  
@ cur\_day\_j++  
@ pre\_day\_j++  
if ( 213 \> 214 ) then  
end  
while ( 1 \< 1 )  
end  
while ( 8 \< 8 )  
@ pre\_year++  
end  
while ( 2013 \< 2013 )

Thank you

---

<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:** [September 5, 2019, 5:20pm UTC](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776/20 "2019-09-05T17:20:02Z")

</div>

You have an issue because the script cannot find the location or path of the mpirun command.  
Try the following command

```auto
which mpirun

```

If you get the message “no mpirun in (…)”  
then you need to set up your mpi environment  
If you are running on a server that has Environment Modules use the following command to find out what modules are available:  
Modules let you load predefined environments, and in this case they’re used to load different MPI and compiler environments.

```auto
module avail

```

If there is a module for openmpi and gcc such as the following module: openmpi\_4.0.1/gcc\_9.1.0 you can load that module using the following:

```auto
module load openmpi_4.0.1/gcc_9.1.0

```

If you do not have access to a server that allows you to load modules to configure your environment, then you will need to install openmpi or intel mpi and then once that is installed add the path to your mpirun command to your PATH.  
You can try to follow these instructions:

> **[Install\_OpenMPI\_en.pdf](https://lsi.ugr.es/jmantas/pdp/ayuda/datos/instalaciones/Install_OpenMPI_en.pdf)**
>
> 533.64 KB

[Next page](https://forum.cmascenter.org/t/two-way-coupled-wrf-cmaq-process/776.md?page=2)
