I have some problems when csh bldit_cctm.csh

Makefile generated
if ( ! 1 ) then
if ( 0 != 0 ) then
if ( -e /data4/sunzhixu/WRF-CMAQ/CMAQv_5.3.3/CCTM/scripts/BLD_CCTM_v533_intel/CCTM_v533.cfg ) then
mv CCTM_v533.cfg.bld /data4/sunzhixu/WRF-CMAQ/CMAQv_5.3.3/CCTM/scripts/BLD_CCTM_v533_intel/CCTM_v533.cfg
if ( 1 ) then
git --version
if ( 0 == 0 ) then
set git_check
endif
if ( 1 ) then
cd /data4/sunzhixu/WRF-CMAQ/CMAQv_5.3.3/CCTM/scripts
set WRF_BLD = BLD_WRFv4.3_CCTM_v533_intel
setenv wrf_path /data4/sunzhixu/WRF-CMAQ/CMAQv_5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel
setenv WRF_CMAQ 1
if ( ! -d BLD_WRFv4.3_CCTM_v533_intel ) then
git clone --branch v4.3 GitHub - wrf-model/WRF: The official repository for the Weather Research and Forecasting (WRF) model ./BLD_WRFv4.3_CCTM_v533_intel
cd /data4/sunzhixu/WRF-CMAQ/CMAQv_5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel
/data4/sunzhixu/WRF-CMAQ/CMAQv_5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel: No such file or directory.

I don’t know what’s going on, can anyone help me
bldit_cctm_twoway.txt (123.7 KB)

Hi bandaoshutiao,

An alternative is to download WRF 4.3 manually (go to WRF web site not through bldit script), build CMAQ with twoway function (in the bldit script, comment out grep WRF from repo portion) and move CMAQ code into WRF structure and rename it to cmaq. 

Cheers,
David

Hi David

Thanks a lot for your help, but I’m still having some issues, when I csh assemble, it says I can’t find the files, but I can be sure that the files exist, i can not understand. orz

(base)[/data4/sunzhixu/WRFCMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/wrfcmaq_twoway_coupler]$ csh assemble 
cp: cannot stat ?.rfcmaq_twoway_coupler/Makefile?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/clean?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/configure?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/Registry/Registry.EM?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/Registry/registry.em_shared_collection?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/arch/Config.pl?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/dyn_em/module_first_rk_step_part1.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/dyn_em/solve_em.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/dyn_nmm/module_PHYSICS_CALLS.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/main/Makefile?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/main/depend.common?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/phys/Makefile?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/phys/module_ra_rrtmg_sw.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/phys/module_radiation_driver.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/phys/module_sf_noahdrv.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/external/makefile?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/Registry/registry.WRF-CMAQ-twoway?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/phys/complex_number_module.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/phys/module_twoway_rrtmg_aero_optical_util.F?. No such file or directory

Hi bandaoshutiao,

Since you have trouble to get the WRF code from the WRF repo by using the bldit_cctm.csh, I suggested to use a manual way. Here are the manual steps:

1. download WRF 4.3
2. type configure as usual
3. insert exit on line 673 of the bldit_cctm.csh script (this will only build the CMAQ portion without going through downloading WRF process which was the step you had trouble)
4. mv the BLD* inside WRF code with the name cmaq
5. setenv wrf_path the_path_where_the_code_is
6. go to your CMAQ clone directory and go into UTIL and you will see wrfcmaq_twoway_coupler subdirectory
7. type wrfcmaq_twoway_coupler/assemble
8. go back to your WRF directory and type compile em_real >& mylog

If you have additional question, please let me know.

Cheers,
David

Hi David

Very grateful for your help,unfortunately, I have some problems with 7.

When i run assemble

(base) [/data4/sunzhixu/WRF-CMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/wrfcmaq_twoway_coupler]$ ./assemble 
cp: cannot stat ?.rfcmaq_twoway_coupler/Makefile?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/clean?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/configure?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/Registry/Registry.EM?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/Registry/registry.em_shared_collection?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/arch/Config.pl?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/dyn_em/module_first_rk_step_part1.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/dyn_em/solve_em.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/dyn_nmm/module_PHYSICS_CALLS.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/main/Makefile?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/main/depend.common?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/phys/Makefile?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/phys/module_ra_rrtmg_sw.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/phys/module_radiation_driver.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/phys/module_sf_noahdrv.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/external/makefile?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/Registry/registry.WRF-CMAQ-twoway?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/phys/complex_number_module.F?. No such file or directory
cp: cannot stat ?.rfcmaq_twoway_coupler/phys/module_twoway_rrtmg_aero_optical_util.F?. No such file or directory


It looks like these files are not found
The screenshot is the path of my file

I am looking forward to your reply

bandaoshutiao

Have you set noglob somewhere? It looks as though the script is taking what should be wild-cards as literals.

Hi cjcoats

noglob ,I have not set this~~

bandaoshutiao

Just for grins, try putting an unset noglob into the script. I would worry that some “helpful” sys-admin has done this, and sabotaged you…

I’m sorry I don’t understand the noglob very well, how can I implement it.

Put unset noglob on the top line of the script?

Hi bandaoshutiao,

You execute assemble in this directory /data4/sunzhixu/WRFCMAQ/CMAQv5.3.3/CCTM/scripts/BLD_WRFv4.3_CCTM_v533_intel/wrfcmaq_twoway_coupler

Please go up one level and then execute this:

./wrfcmaq_twoway_coupler/assemble

Cheers,
David

Hi david

When I do this, there is no reaction at all :sob:

Hi bandaoshutiao,

 If you type "tail -n 20 dyn_em/solve_em.F, do you see "CALL CMAQ_DRIVER"? If you do, you are good to compile your coupled model.

Cheers,
David

Hi David

I got wrf.exe, does this mean that I have completed the compilation and coupling of the entire model?

Hi bandaoshutiao,

Yes you have created the coupled model successfully. 

With this executable, you can do a lot of things: run WRF only, run as CMAQ stand alone mode without forming actual MCIP output, and run the coupled model with or without aerosol feedback. Examine the variable wrf_cmaq_option in the run script to see how to achieve what I have mentioned.

Cheersi,
David

1 Like

Hi David

Thanks a lot for your help, I’ll look into it! ~~
:smiling_face_with_three_hearts:

Hi David

If I want to run as CMAQ stand alone mode without forming actual MCIP output in the coupled model, do I need to turn off the coupled option in bldit and generate a BLD folder with only cctm in CCTM/scipts folder?

Hi bandaoshutiao,

You can use the coupled model to run as a stand-alone CMAQ (Please note that you won't get the exact answer as the standard stand-alone code. The reason is there is one wrf time step difference in the data send to wrfout which will be use for MCIP process, and the data send to CMAQ in the coupled model.) with the following setup in the run script:

-- set  direct_sw_feedback to .false.
-- given wrf time step is X, you need to set wrf_cmaq_freq to Y such that X * Y = 60
-- set wrf_cmaq_option = 2

If you have additional question, please let me know.

Cheers,
David

Hi bandaoshutiao,

By the way, in the WRF-CMAQ coupled model, CMAQ acts as a subroutine inside WRF structure. Hence you won't see CMAQ executable any where. If you do want to create a CMAQ executable, go back to bldit.cctm.csh script and comment out wrf_cmaq couple option and go through regular build process.

Cheers,
David

Hi David

I have a problem, would you mind helping me to solve it.

I encountered an error when running the script (as shown in the screenshot above), I searched for some solutions, modified a place in the script (as shown in the middle picture), but still reported an error (as shown in the bottom picture, But the error is different)
I used Benchmark input and output datasets


!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!

In fact, I have not used WRF, I found some rsl.error.000x files in the output directory, and I seem to see the error in it.
However, shouldn’t I just need to modify the output and input directories to test the benchmark data, so I suspect this might not be a real error.

And,i find a error in my output folder