CMAQ ICON/BCON runtime error

Hi,
I’m running CMAQ v5.3.2. The ICON/BCON running for ‘profile’ type was good, but it went wrong with ‘regrid’ mode. I recompiled it in debug version and got error message as follows:

forrtl: severe (408): fort: (3): Subscript #1 of the array VGDESC has value -9999 which is less than the lower bound of 1

Image              PC                Routine            Line        Source             
ICON_v532.exe      000000000055513F  Unknown               Unknown  Unknown
ICON_v532.exe      0000000000434D1E  m3_vinterp_               259  m3_vinterp.F
ICON_v532.exe      000000000042FB00  m3_icout_                 456  m3_icout.F
ICON_v532.exe      0000000000426557  m3_inic_                  304  m3_driver.F
ICON_v532.exe      000000000040FEF0  MAIN__                    142  icon.F
ICON_v532.exe      000000000040DDE2  Unknown               Unknown  Unknown
libc-2.17.so       00002BA7D6AB6505  __libc_start_main     Unknown  Unknown
ICON_v532.exe      000000000040DCE9  Unknown               Unknown  Unknown

I checked the files that ICON/BCON required and found that the values of these files for VGTYP (value of array VGDESC) are -9999 instead of 1-7 according to correspounding fortran scripts required. All the files generated by MCIP didn’t contain the correct value of VGTYP. Meanwhile i also received warnings in running MCIP: WARNING: Vertical grid/coordinate type: -9999 "MISSING" in file "MET_CRO_3D"

So i was wondering if i had any mistakes in setting MCIP run scripts or the output of wrf contained not vertical grid type. If so, how can I confirm the vertical grip type values in wrfout files?

I really appreciate your help!
Chen

MCIP and downstream CMAQ programs like ICON, BCON, and CCTM use VGTYP=-9999 to indicate the hybrid vertical coordinate system used as default in WRF starting with WRF version 4 (or thereabouts). The ICON and BCON handling of this VGTYP=-9999 indicator was updated in CMAQv5.3.3, so we recommend that you update your code to this latest version. For additional details, please see the relevant section of the CMAQv5.3.3 release notes.

Hi, I updated CMAQ to v5.3.3 and ran through mcip to generate corresponding files for ICON/BCON.
However this time i encoutered warnings and errors as follows:

` >>—>> WARNING in subroutine M3_VINTERP:INTERP3
Size error for ZH from MET_CRO_3D_CRS–REQ: 46689 ACT: 653646
M3WARN: DTBUF 0:00:00 Jan. 1, 2018 (2018001:000000)

 *** ERROR ABORT in subroutine M3_VINTERP
 Could not read layer heights from file MET_CRO_3D_CRS
 Date and time  0:00:00   Jan. 1, 2018    (2018001:000000)` 

Do you have any suggestions or solutions to this problem. I really appreciate it!

This looks like a grid-mixup between the MET_CRO_3D_CRS and the BCON run: check whether the grid descriptions from the file header (do the command ncdump -h $MET_CRO_3D_CRS) and from the BCON run are the same.

Hi,

I’ve checked the METCRO3D files used for ICON/BCON, and there were ZH and PRES data. The values of ZH seemed to be fine. I have no idea what does the warning ‘size error for ZH’ mean.
Which fortran scripts in ICON/BCON should i check for errors besides M3_VINTERP.F

On the other hand, I’m using same file for MET_CRO_3D_CRS and MET_CRO_3D_FIN. Meanwhile the CONC file is also generated by these MCIP files. I’m wondering why i’m receiving message The COORD.EXT and CTM vertical grid types are different. Vertical interpolation using ZH from the MET_CRO_3D files. And how should i check the vertical grid type for these files?

Thanks!

I’m using same file for MET_CRO_3D_CRS and MET_CRO_3D_FIN

This does not work.

Among other things, the grid-dimensions for the CRS and FIN grids are different, and INTERP3 is complaining of a dimension-mismatch between what;'s on the file and what it expects (preventing further errors on your part)…

Maybe have a look at how to characterize horizontal grids? See https://www.cmascenter.org/ioapi/documentation/all_versions/html/GRIDS.html#horiz

To add to @cjcoats’ comment, could you please elaborate on what you are trying to do? The intended use of BCON and ICON in “regrid” mode is to take model output from a larger domain (typically but not necessarily with a coarser grid spacing) to prepare initial and boundary conditions for a smaller domain (typically but not necessarily with a finer grid spacing).

For this to work, BCON needs a) the coarse grid concentration file (CTM_CONC_1), b) the coarse grid meteorological file (typically from MCIP) containing ZH and PRES data (MET_CRO_3D_CRS), and c) the fine grid MCIP METBDY3D file defining the boundary of the fine grid, also containing ZH and PRES (MET_BDY_3D_FIN). [as an aside, CTM_CONC_1 and MET_CRO_3D_CRS can point to the same file if that file contains both concentrations and the required meteorological fields ZH and PRES]. The requirements for ICON are the same, except that c) needs to be the fine grid MCIP meteorological file defining the fine grid and containing ZH and PRES (MET_CRO_3D_FIN).

My research domain was a 27km resolution grid nested with a 9km grid. I ran CMAQ with profiled ICON/BCON to obtain concentration file for the coarse grid of 27km. And was testing nested (regrid) ICON/BCON for the finer grid of 9km.

So currently I have a coarser grid concentration file (CTM_CONC_1_27km) and also the MCIP files (MET_CRO_3D and MET_BDY_3D) for 27km grid. Meanwhile, MET_CRO_3D_FIN file was generated from MCIP using wrfout files for 9km resolution grid.

I’ve checked the headers of MET_CRO_3D_CRS file and ICON/BCON output files (unfinished). Global attributes defining grid dimension were the same. So I was wondering what could cause the mismatch between them. I’m attaching the headers of the two files in following txts.
ICON_regrid.txt (80.3 KB)
METCRO3D.txt (11.0 KB)

Besides, the only difference is that my CTM_CONC_1 file had 1 layer output (NLAYS=1). Could it be this causing errors?

Thanks!

Thanks for the additional information. A few thoughts:

  • In the ICON run script used to generated the (unfinished) regridded ICON file for which you posted the header, are you sure that you specified the 9km METCRO3D file from MCIP rather than the 27km METCRO3D file from MCIP as MET_CRO_3D_FIN? The ICON header shows the same grid information as for the coarse 27 km domain defined in the METCRO3.txt file you posted. If you previously tried to run ICON with the 27 km METCRO3D file as MET_CRO_3D_FIN and then changed the run script to point to the 9 km METCRO3D file, make sure to delete the incomplete ICON file prior to rerunning.

  • Yes, your CTM_CONC_1 file for the coarse domain absolutely needs to span the entire vertical extent of your intended fine domain. In order for ICON and BCON to compute boundary and initial conditions for all layers of the fine domain, 3D information needs to be available from the coarse domain.

  • Please post your ICON and BCON run scripts if you continue to encounter issues after checking and addressing the points above.

It worked! I span the vertical domain of CTM_CONC_1 to whole layers, which is equivalent to MET_CRO_3D files and BCON/ICON finished successfully. Also I looked up ioapi documentations from cmascenter which described the how INTERP3() function works.
https://www.cmascenter.org/ioapi/documentation/all_versions/html/AA.html#ioapi
It requires the grid size of CTM_CONC_1 (NROWSNCOLSNLAYS) to be consistent with MET_CRO_3D_CRS, which in my case it is not, causing size errors.

Thanks for the replies and advices from both of you! I really appreciate it.