Two-way coupled model compile

Hi there,

I am trying to install the WRF-CMAQ two-way coupled model and am using the latest version WRFv4.3-CMAQv5.3.3. But when I try to comile WRF-CMAQ with the commond (./bldit_cctm.csh intel) and some errors occured in twoway_aqprep.F90(1686) and twoway_feedback.F90 as follows:

twoway_aqprep.F90(1686): error #6460: This is not a field name that is defined in the encompassing structure.   [PREV_RAINNC]
  metcro2d_data_wrf (:,:,13) =  (grid%rainnc(sc:ec, sr:er) - grid%prev_rainnc(sc:ec,sr:er)) * 0.1  ! RNA = SUM(RN), in cm
------------------------------------------------------------------^
twoway_aqprep.F90(1686): error #6158: The structure-name is invalid or is missing.   [GRID]
  metcro2d_data_wrf (:,:,13) =  (grid%rainnc(sc:ec, sr:er) - grid%prev_rainnc(sc:ec,sr:er)) * 0.1  ! RNA = SUM(RN), in cm
-------------------------------------------------------------^
twoway_aqprep.F90(1688): error #6460: This is not a field name that is defined in the encompassing structure.   [PREV_RAINC]
     metcro2d_data_wrf (:,:,14) = (grid%rainc (sc:ec, sr:er) - grid%prev_rainc(sc:ec,sr:er)) * 0.1   ! RCA = SUM(RC), in cm
--------------------------------------------------------------------^
compilation aborted for twoway_aqprep.F90 (code 1)
0.13user 0.17system 0:00.34elapsed 88%CPU (0avgtext+0avgdata 39444maxresident)k
0inputs+560outputs (0major+38559minor)pagefaults 0swaps
make[2]: [twoway_aqprep.o] Error 1 (ignored)
time mpif90 -f90=ifort -c -c -FR -O3 -I /home/gaochao/model/software/wrfcmaq/533/debug/ioapi-3.2-20200828/Linux2_x86_64ifort/ -I /home/gaochao/model/software/wrfcmaq/533/debug/ioapi-3.2-20200828/Linux2_x86_64ifort/ioapi/fixed_src -I ../frame -I ../share -I ../phys -I ../main -I ../dyn_em -I ../external/esmf_time_f90 -I. -Disam -Dtwoway -Dparallel -Dm3dry_opt -DSUBST_BARRIER=SE_BARRIER -DSUBST_GLOBAL_MAX=SE_GLOBAL_MAX -DSUBST_GLOBAL_MIN=SE_GLOBAL_MIN -DSUBST_GLOBAL_MIN_DATA=SE_GLOBAL_MIN_DATA -DSUBST_GLOBAL_TO_LOCAL_COORD=SE_GLOBAL_TO_LOCAL_COORD -DSUBST_GLOBAL_SUM=SE_GLOBAL_SUM -DSUBST_GLOBAL_LOGICAL=SE_GLOBAL_LOGICAL -DSUBST_LOOP_INDEX=SE_LOOP_INDEX -DSUBST_SUBGRID_INDEX=SE_SUBGRID_INDEX -DSUBST_HI_LO_BND_PE=SE_HI_LO_BND_PE -DSUBST_SUM_CHK=SE_SUM_CHK -DSUBST_SE_INIT=SE_INIT -DSUBST_INIT_ARRAY=SE_INIT_ARRAY -DSUBST_COMM=SE_COMM -DSUBST_MY_REGION=SE_MY_REGION -DSUBST_SLICE=SE_SLICE -DSUBST_GATHER=SE_GATHER -DSUBST_DATA_COPY=SE_DATA_COPY -DSUBST_IN_SYN=SE_IN_SYN -DSUBST_PE_COMM=\"./PE_COMM.EXT\" -DSUBST_CONST=\"./CONST.EXT\" -DSUBST_FILES_ID=\"./FILES_CTM.EXT\" -DSUBST_EMISPRM=\"./EMISPRM.EXT\" -DSUBST_MPI=\"mpif.h\" twoway_aqprep_util.F90
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
0.24user 0.17system 0:00.45elapsed 90%CPU (0avgtext+0avgdata 50608maxresident)k
0inputs+560outputs (0major+42043minor)pagefaults 0swaps
time mpif90 -f90=ifort -c -c -FR -O3 -I /home/gaochao/model/software/wrfcmaq/533/debug/ioapi-3.2-20200828/Linux2_x86_64ifort/ -I /home/gaochao/model/software/wrfcmaq/533/debug/ioapi-3.2-20200828/Linux2_x86_64ifort/ioapi/fixed_src -I ../frame -I ../share -I ../phys -I ../main -I ../dyn_em -I ../external/esmf_time_f90 -I. -Disam -Dtwoway -Dparallel -Dm3dry_opt -DSUBST_BARRIER=SE_BARRIER -DSUBST_GLOBAL_MAX=SE_GLOBAL_MAX -DSUBST_GLOBAL_MIN=SE_GLOBAL_MIN -DSUBST_GLOBAL_MIN_DATA=SE_GLOBAL_MIN_DATA -DSUBST_GLOBAL_TO_LOCAL_COORD=SE_GLOBAL_TO_LOCAL_COORD -DSUBST_GLOBAL_SUM=SE_GLOBAL_SUM -DSUBST_GLOBAL_LOGICAL=SE_GLOBAL_LOGICAL -DSUBST_LOOP_INDEX=SE_LOOP_INDEX -DSUBST_SUBGRID_INDEX=SE_SUBGRID_INDEX -DSUBST_HI_LO_BND_PE=SE_HI_LO_BND_PE -DSUBST_SUM_CHK=SE_SUM_CHK -DSUBST_SE_INIT=SE_INIT -DSUBST_INIT_ARRAY=SE_INIT_ARRAY -DSUBST_COMM=SE_COMM -DSUBST_MY_REGION=SE_MY_REGION -DSUBST_SLICE=SE_SLICE -DSUBST_GATHER=SE_GATHER -DSUBST_DATA_COPY=SE_DATA_COPY -DSUBST_IN_SYN=SE_IN_SYN -DSUBST_PE_COMM=\"./PE_COMM.EXT\" -DSUBST_CONST=\"./CONST.EXT\" -DSUBST_FILES_ID=\"./FILES_CTM.EXT\" -DSUBST_EMISPRM=\"./EMISPRM.EXT\" -DSUBST_MPI=\"mpif.h\" twoway_feedback.F90
ifort: command line warning #10006: ignoring unknown option '-f90=ifort'
twoway_feedback.F90(571): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_WS_I]
           grid%mass_ws_i(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,1)
----------------^
twoway_feedback.F90(571): error #6158: The structure-name is invalid or is missing.   [GRID]
           grid%mass_ws_i(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,1)
-----------^
twoway_feedback.F90(572): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_WS_J]
           grid%mass_ws_j(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,2)
----------------^
twoway_feedback.F90(573): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_WS_K]
           grid%mass_ws_k(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,3)
----------------^
twoway_feedback.F90(574): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_IN_I]
           grid%mass_in_i(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,4)
----------------^
twoway_feedback.F90(575): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_IN_J]
           grid%mass_in_j(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,5)
----------------^
twoway_feedback.F90(576): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_IN_K]
           grid%mass_in_k(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,6)
----------------^
twoway_feedback.F90(577): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_EC_I]
           grid%mass_ec_i(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,7)
----------------^
twoway_feedback.F90(578): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_EC_J]
           grid%mass_ec_j(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,8)
----------------^
twoway_feedback.F90(579): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_EC_K]
           grid%mass_ec_k(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,9)
----------------^
twoway_feedback.F90(580): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_SS_I]
           grid%mass_ss_i(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,10)
----------------^
twoway_feedback.F90(581): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_SS_J]
           grid%mass_ss_j(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,11)
----------------^
twoway_feedback.F90(582): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_SS_K]
           grid%mass_ss_k(c, l, r)  = feedback_data_wrf(c-sc+1,r-sr+1,l,12)
----------------^
twoway_feedback.F90(583): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_H2O_I]
           grid%mass_h2o_i(c, l, r) = feedback_data_wrf(c-sc+1,r-sr+1,l,13)
----------------^
twoway_feedback.F90(584): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_H2O_J]
           grid%mass_h2o_j(c, l, r) = feedback_data_wrf(c-sc+1,r-sr+1,l,14)
----------------^
twoway_feedback.F90(585): error #6460: This is not a field name that is defined in the encompassing structure.   [MASS_H2O_K]
           grid%mass_h2o_k(c, l, r) = feedback_data_wrf(c-sc+1,r-sr+1,l,15)
----------------^
twoway_feedback.F90(586): error #6460: This is not a field name that is defined in the encompassing structure.   [DGN_I]
           grid%dgn_i(c, l, r)      = feedback_data_wrf(c-sc+1,r-sr+1,l,16)
----------------^
twoway_feedback.F90(587): error #6460: This is not a field name that is defined in the encompassing structure.   [DGN_J]
           grid%dgn_j(c, l, r)      = feedback_data_wrf(c-sc+1,r-sr+1,l,17)
----------------^
twoway_feedback.F90(588): error #6460: This is not a field name that is defined in the encompassing structure.   [DGN_K]
           grid%dgn_k(c, l, r)      = feedback_data_wrf(c-sc+1,r-sr+1,l,18)
----------------^
twoway_feedback.F90(589): error #6460: This is not a field name that is defined in the encompassing structure.   [SIG_I]
           grid%sig_i(c, l, r)      = feedback_data_wrf(c-sc+1,r-sr+1,l,19)
----------------^
twoway_feedback.F90(590): error #6460: This is not a field name that is defined in the encompassing structure.   [SIG_J]
           grid%sig_j(c, l, r)      = feedback_data_wrf(c-sc+1,r-sr+1,l,20)
----------------^
twoway_feedback.F90(591): error #6460: This is not a field name that is defined in the encompassing structure.   [SIG_K]
           grid%sig_k(c, l, r)      = feedback_data_wrf(c-sc+1,r-sr+1,l,21)
----------------^
twoway_feedback.F90(592): error #6460: This is not a field name that is defined in the encompassing structure.   [OZONE]
           grid%ozone(c, l, r)      = feedback_data_wrf(c-sc+1,r-sr+1,l,22)
----------------^
twoway_feedback.F90(607): error #6911: The syntax of this substring is invalid.   [MASS_WS_I]
  grid%mass_ws_i(:,nlays3d+1,:) = grid%mass_ws_i(:,nlays3d,:)
-------^
compilation aborted for twoway_feedback.F90 (code 1)

log.txt (1.5 MB)

Hi gc13141112,

It seems to me that you did not build the coupled model correctly. If you go into Registry directory, issue this command "grep -i prev_rainc *" and you don't see anything, it confirms you did not build the coupled model correctly. If you don't have to use WRF v4.3, please download the latest WRF v4.4 and following the following steps to build the coupled model (much simpler):

 -- download WRF V44
 -- download CMAQ V5.3.3
 -- build CMAQ with build_twoway turns on
 -- move the built CMAQ code, BLD* into WRF direction with the name cmaq
 -- setenv WRF_CMAQ 1
 -- setenv IOAPI /home/wdx/lib/x86_64/gcc-9.1/ioapi_3.2   (this is an example for gcc)
 -- setenv WRFIO_NCD_LARGE_FILE_SUPPORT 1
 -- configure
 -- compile em_real

The first setenv must be there when you compile or recompile code and the other 2 setenv lines must be there before typing configure.

If you have additional question, please let me know.

Cheers,
David

Thank you. According to your suggestions, I have installed WRF v4.4-CMAQ v5.3.3.