CCTM - dynamic boundary condition

Good morning CMAQ users:

I am trying to run CCTM for multiple days. In the script run_cctm.csh the boundary condition is “reset” after completing the simulation of each day, by directing to the prepared BC file in the loop. Is there an option that I can avoid this “reset”, so that the boundary condition at the beginning of each day will be actually extracted from the concentrations at the end of each previous day.

Best
Huan

Hi Huan,

There is a while loop in the CMAQ script for version 5.2.1 and above that increments the date.

while ($TODAYJ <= $STOP_DAY )  #>Compare dates in terms of YYYYJJJ
   ...code
end  #Loop to the next Simulation Day

Within the above while loop, there is a check to see if the run is a NEW_START

setenv NEW_START TRUE

At line 278 there is an IF ELSE ENDIF statement that checks to see if NEW_START is true or false.

  if ($NEW_START == true || $NEW_START == TRUE ) then
     setenv ICFILE ICON_20160630_bench.nc
     setenv INIT_MEDC_1 notused
     setenv INITIAL_RUN Y #related to restart soil information file
  else
     set ICpath = $OUTDIR
     setenv ICFILE CCTM_CGRID_${RUNID}_${YESTERDAY}.nc
     setenv INIT_MEDC_1 $ICpath/CCTM_MEDIA_CONC_${RUNID}_${YESTERDAY}
     setenv INITIAL_RUN N
  endif

At the end of the first day at line 668, this environment variable is set to false, so that the second day will be considered a “restart”, and so the second day will use the CCTM_CGRID file from the previous day’s run as the initial condition for it’s run.

  #> The next simulation day will, by definition, be a restart
  setenv NEW_START false

Are you able to run the second day successfully? Perhaps you are using an older version of CMAQ?

I prepared BC file before running CCTM and using “profile” option. Thus, it is an time-independent boundary condition. I don’t want the BC file to be reset for each loop.
If that is not possible to be approach, I have to: 1). run BCON of day 1, using “profile” option; 2). run CCTM of day 1; 3). extract boundary condition from CCTM output of day 1; 4). run BCON of day 2, using “m3conc”; 5). run CCTM of day 2…
and I have more than 7 days to simulate

Huan

Hi,

The BC file doesn’t get reset for each loop, only the IC file.

The BC file is set using this line.
#> Boundary conditions
set BCFILE = BCON_${YYYYMMDD}_bench.nc

If you want the script to use the same file for every day of the run, the remove the date stamp.

I prepared BC file with “profile” option, and I realized it is exactly the same, no matter which date I set.

am I able to use the boundary condition extracted from CCTM result of each previous day, instead of the prepared BC file?

@lizadams @Ben_Murphy @mathur.rohit @sergey @foley.kristen @bhutzell @cgnolte @tlspero
Just raise up the question again, hopefully some one, especially the developer team could understand my question this time. I have tried the latest 5.3 version benchmark case, here I just rephrase my question:
There are two ways to prepare boundary condition files, “profile” or “regrid”.
If using profile, it will be the same time-independent file for each date. Therefore, when running CCTM using this type of BCON files, the boundary condition will be reset each day.
If using regrid, it is extracted from every time-step of CTM result (use the file CCTM_CONC_${CTM_APPL}.nc as input of run_bcon.csh). While, it is logically confusing, since we need to have BC file ready before running CTM, but we need to use CTM result to generate BC file. Furthermore, what I found is, (e.g. the benchmark case), I can only use CCTM_CONC file from 20160701 (initial date) run to generate the BC_regrid file for 20160701, then this BC_regrid file could only be use to run CCTM for 20160701 (the exactly same initial date)
I tried to manually modify the date in this BC_regrid file (changed TFLAGS and SDATE accordingly to match emission file and met files), and hope it could be used as BCON for running CTM for 20160702, but it shows:


** Runscript Detected an Error: CGRID file was not written. **
** This indicates that CMAQ was interrupted or an issue **
** exists with writing output. The runscript will now **
** abort rather than proceeding to subsequent days. **


So, how could I use the BC extracted from CCTM result of each day for running the CCTM for the next day?

Thank you for your time
Best
Huan

Use M3Tools program “m3tshift” to create a new file with the new dates&times – see https://cjcoats.github.io/ioapi/M3TSHIFT.html

You cannot use output from a CCTM run for a given grid as input to BCON in REGRID mode to generate boundary conditions for the same grid since the target grid needs to be smaller than the grid from which you are reading the concentrations.

When you run BCON in PROFILE mode, the resulting boundary condition file is time-independent, i.e. it has a TSTEP of 0. You can use that time-independent boundary condition file as input for all days of your CCTM simulation, simply make sure that the run script always points to that file as mentioned by @lizadams in post #4 above.

For example, if the file you generated with BCON in PROFILE mode is named BCON_20160701_bench.nc, always use “set BCFILE = BCON_20160701_bench.nc” in your run script rather than using “BCON_${YYYYMMDD}_bench.nc”

2 Likes

Huan,
Hopefully the earlier responses have helped you get your current script working. However, it sounds like your underlying question is that you do not want time-independent boundary conditions. The profile BCs released with CMAQ are not only static in time, but they are constant across all four borders. For dynamic boundary conditions you would need a simulation over a larger domain that you can extract hourly BC data from for your target domain. This could mean running CMAQ over a larger domain using static profile BCs and then then extracting BCs for your target domain from that simulation. Another alternative would be to extract BCs from output from a global model such as GEOS-Chem or running hemispheric CMAQ for your time period of study. The advantage of doing some sort of nested modeling is that you get spatially and temporally resolved boundary conditions.

Depending on your domain and study period, another option you might want to consider is using seasonally averaged output from hemispheric CMAQ that we have posted for 2016. You can run ICON/BCON on this file to generate BCs for any domain in the Northern hemisphere. These BCs will still be static in time for a given season, but they will capture spatial changes around the boundary of your domain. A tutorial on how to proceed with this approach is available here:

1 Like

@hogrefe.christian @foley.kristen
I am worried about using the static BC will offset my simulation results. It seems that I cannot use BC extracted from CCTM result to run the next day. I will have to find out an alternative way

Thank you for your time
Best
Huan

Hi Huan,
Yes, we do not recommend using profile BCs for anything but model testing. Because BCs can have a significant impact on model estimates, spatially and temporally dynamic BCs can be very important for any research or regulatory modeling simulation. We understand that it can be a very large effort to get BCs for a particular application from global or hemispheric modeling output. We have posted the seasonally averaged HCMAQ output in hopes that this may be one helpful resource for the user community. We hope to provide additional support for generating BCs in future releases.

1 Like