Error when running BCON process of CMAQ v5.3

I want to create Boundary Conditions from BCON profile but have some errors as follows:
Boundary Concentrations from an input BC profile file.
BCs do not vary with time.
Value for BC_PROFILE: ‘/public/model/couple/phd/cmaq/CMAQ-master/PREP/bcon/scripts/BLD_BCON_v53_intel/avprofile_cb6r3m_ae7_kmtbr_hemi2016_v53beta2_m3dry_col051_row068.csv’
Value for BC_PROFILE: ‘/public/model/couple/phd/cmaq/CMAQ-master/PREP/bcon/scripts/BLD_BCON_v53_intel/avprofile_cb6r3m_ae7_kmtbr_hemi2016_v53beta2_m3dry_col051_row068.csv’
Linear vertical interpolation used
*** Error in `/public/model/couple/phd/cmaq/CMAQ-master/PREP/bcon/scripts/BLD_BCON_v53_intel/BCON_v53.exe’: free(): invalid next size (normal): 0x000000000171aa90 ***

I had addressed this question and I comment this:
C Get the layer mid-point heights
VNAME = 'ZH’out
IF ( .NOT. READ3( MET_CRO_3D_FIN, VNAME, ALLAYS3, JDATE, JTIME,
& ZH_OUT ) ) THEN
MSG = 'Could not read layer heights form file ’ // MET_CRO_3D_FIN
CALL M3ERR ( PNAME, JDATE, JTIME, MSG, .TRUE. )
END IF
But these can process in IC program, I don’t know why. Can someone out there explain this? Thanks in advance!

Damm even I am having a similar kind of issue, I have searched all over the

internet and even have posted on number of threads on different forum, no

solution seems to work. I am really frustrated, can anyone of you here help

me resolve this issue, I am very much tired now.

Can you please provide additional details on what you are trying to do. It looks like you are trying to run BCON in profile mode, correct? What year/domain are you trying to create BCs for? Have you tried running in debug mode to see if that provides more information on the issue.

Still waiting for someone to reply to me

Been 11 days still no reply from any community member

Regards, 9apps
cartoon hd

@johnsmith101, please be more specific as to what you are trying to do, the steps you have taken, and the error messages you are getting.

I am also facing some issues with running BCON with CMAQ version 5.3. When I set the “profile” mode using the “avprofile_cb6r3m_ae7_kmtbr_hemi2016_v53beta2_m3dry_col051_row068.csv” file, I am getting a segmentation fault. (The file says that was set up with 44 layers, and my case has 23 - however ICON processor has run successfully with the avprofile_cb6r3m_ae7_kmtbr_hemi2016_v53beta2_m3dry_col051_row068.csv file from the ICON folder)

model BCON_v53.exe;

repo /opt/wrf_cmaq/cmaq/CMAQ_5.3/PREP/bcon/src;

lib_base /opt/wrf_cmaq/cmaq/CMAQ_5.3/lib/x86_64/gcc;

lib_1 ioapi/lib;

lib_2 ioapi/include_files;

lib_4 ioapi/lib;

cpp_flags “”;

f_compiler mpifort;

fstd “-O3 -funroll-loops -finit-character=32 -Wtabs -Wsurprising -march=native -ftree-vectorize -ftree-loop-if-convert -finline-limit=512”;

dbg “-Wall -O0 -g -fcheck=all -ffpe-trap=invalid,zero,overflow -fbacktrace”;

f_flags “-ffixed-form -ffixed-line-length-132 -funroll-loops -finit-character=32”;

f90_flags “-ffree-form -ffree-line-length-none -funroll-loops -finit-character=32”;

link_flags “-fopenmp”;

ioapi “-lioapi”;

netcdf "-lnetcdf ";

netcdff “-lnetcdff”;

// project repository location: /opt/wrf_cmaq/cmaq/CMAQ_5.3/PREP/bcon/src

// required common
Module common;

// options are m3conc
Module m3conc;

// options are profile
Module profile;

setenv GRID_NAME Salvador
setenv GRIDDESC /scratch/ykaore/novo/wet/aqm/katty-cmaq/…/mcip_d03/GRIDDESC
setenv IOAPI_ISPH 20
setenv IOAPI_LOG_WRITE F
setenv IOAPI_OFFSET_64 YES
setenv EXECUTION_ID BCON_v53.exe
setenv BCON_TYPE echo $BCTYPE | tr "[A-Z]" "[a-z]"
tr [A-Z] [a-z]
echo profile
set OUTDIR = /scratch/ykaore/novo/wet/aqm/katty-cmaq/v53_bcon
set DATE = 2015-06-22
set YYYYJJJ = date -ud "${DATE}" +%Y%j
date -ud 2015-06-22 +%Y%j
set YYMMDD = date -ud "${DATE}" +%y%m%d
date -ud 2015-06-22 +%y%m%d
set YYYYMMDD = date -ud "${DATE}" +%Y%m%d
date -ud 2015-06-22 +%Y%m%d
if ( profile == profile ) then
setenv BC_PROFILE /opt/wrf_cmaq/cmaq/CMAQ_5.3/PREP/bcon/scripts/BLD_BCON_v53_gcc/…/…/src/profile/avprofile_cb6r3m_ae7_kmtbr_hemi2016_v53beta2_m3dry_col051_row068.csv
setenv MET_BDY_3D_FIN /scratch/ykaore/novo/wet/aqm/katty-cmaq/…/mcip_d03/METCRO3D_d03.nc
setenv BNDY_CONC_1 /scratch/ykaore/novo/wet/aqm/katty-cmaq/v53_bcon/BCON_v53_Salvador_profile_20150622 -v
endif
if ( ! -d /scratch/ykaore/novo/wet/aqm/katty-cmaq/v53_bcon ) mkdir -p /scratch/ykaore/novo/wet/aqm/katty-cmaq/v53_bcon
ls -l /opt/wrf_cmaq/cmaq/CMAQ_5.3/PREP/bcon/scripts/BLD_BCON_v53_gcc/BCON_v53.exe
-rwxrwxr-x 1 silvano bull 6608192 Oct 16 09:28 /opt/wrf_cmaq/cmaq/CMAQ_5.3/PREP/bcon/scripts/BLD_BCON_v53_gcc/BCON_v53.exe
size /opt/wrf_cmaq/cmaq/CMAQ_5.3/PREP/bcon/scripts/BLD_BCON_v53_gcc/BCON_v53.exe
text data bss dec hex filename
2580384 3714872 6466176 12761432 c2b958 /opt/wrf_cmaq/cmaq/CMAQ_5.3/PREP/bcon/scripts/BLD_BCON_v53_gcc/BCON_v53.exe
unlimit
limit
cputime unlimited
filesize unlimited
datasize unlimited
stacksize unlimited
coredumpsize unlimited
memoryuse unlimited
vmemoryuse unlimited
descriptors 4096
memorylocked unlimited
maxproc 767488
maxlocks unlimited
maxsignal 767488
maxmessage 819200
maxnice 0
maxrtprio 0
maxrttime unlimited
/opt/wrf_cmaq/cmaq/CMAQ_5.3/PREP/bcon/scripts/BLD_BCON_v53_gcc/BCON_v53.exe

 This program uses the EPA-AREAL/MCNC-EnvPgms/BAMS Models-3
 I/O Applications Programming Interface, [I/O API] which is
 built on top of the netCDF I/O library (Copyright 1993, 1996
 University Corporation for Atmospheric Research/Unidata
 Program) and the PVM parallel-programming library (from
 Oak Ridge National Laboratory).
 Copyright (C) 1992-2002 MCNC,
 (C) 1992-2013 Carlie J. Coats, Jr.,
 (C) 2003-2012 Baron Advanced Meteorological Systems, LLC, and
 (C) 2014-2016 UNC Institute for the Environment.
 Released under the GNU LGPL  License, version 2.1.  See URL

     https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html

 for conditions of use.

 ioapi-3.2: $Id: init3.F90 78 2018-01-26 21:27:04Z coats $
 Version with PARMS3.EXT/PARAMETER::MXVARS3= 2048
 netCDF version 4.4.1.1 of Oct 15 2019 16:41:36 $


 EXECUTION_ID: BCON_v53.exe
 Value for BCON_TYPE:  'profile'
 Value for BCON_TYPE:  'profile'
 Value for GRID_NAME:  'Salvador'
 Value for GRID_NAME:  'Salvador'

 File "GRIDDESC" opened for input on unit:  99
 /scratch/ykaore/novo/wet/aqm/katty-cmaq/../mcip_d03/GRIDDESC

 Value for IOAPI_CHECK_HEADERS not defined;returning default:   FALSE

 "MET_BDY_3D_FIN" opened as OLD:READ-ONLY
 File name "/scratch/ykaore/novo/wet/aqm/katty-cmaq/../mcip_d03/METCRO3D_d03.nc"
 File type GRDDED3
 Execution ID "mcip"
 Grid name "Salvador_CROSS"
 Dimensions: 130 rows, 130 cols, 22 lays, 17 vbles
 NetCDF ID:     65536  opened as READONLY
 Starting date and time  2015173:010000 (1:00:00   June 22, 2015)
 Timestep                          010000 (1:00:00 hh:mm:ss)
 Maximum current record number       798

###############################################################################

Input file section

###############################################################################

 Boundary Concentrations from an input BC profile file.
 BCs do not vary with time.
 Value for BC_PROFILE:  '/opt/wrf_cmaq/cmaq/CMAQ_5.3/PREP/bcon/scripts/BLD_BCON_v53_gcc/../../src/profile/avprofile_cb6r3m_ae7_kmtbr_hemi2016_v53beta2_m3dry_col051_row068.csv'
 Value for BC_PROFILE:  '/opt/wrf_cmaq/cmaq/CMAQ_5.3/PREP/bcon/scripts/BLD_BCON_v53_gcc/../../src/profile/avprofile_cb6r3m_ae7_kmtbr_hemi2016_v53beta2_m3dry_col051_row068.csv'
 Linear vertical interpolation used

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x2B351E725697
#1 0x2B351E725CDE
#2 0x2B351F60526F
#3 0x5928BC in swapn4b at ncx.c:?
#4 0x59CFE0 in ncx_getn_float_float
#5 0x5AE95B in getNCvx_float_float at putget.c:?
#6 0x5B51AD in readNCv at putget.c:?
#7 0x5B737C in NC3_get_vara
#8 0x589C91 in NC_get_vara
#9 0x58AFCC in nc_get_vara_float
#10 0x58534A in nf_get_vara_real_
#11 0x44427F in rdvars_
#12 0x537CFA in rdgrdded_
#13 0x43431B in read3_
#14 0x41C61C in prof_vinterp_
#15 0x41A840 in prof_bcout_
#16 0x41C047 in prof_inbndy_
#17 0x403A44 in MAIN__ at bcon.F:?
Segmentation fault (core dumped)
0.007u 0.055s 0:00.12 41.6% 0+0k 0+29952io 0pf+0w
exit ( )