I svn updated ROMS today. Now I am encountering an error during compilation, which I have never seen before. My guess is that it's related to the recent yaml update.
Errors are reported from multiple lines in yaml_parser.f. I believe the error firstly appear at line 208:
TYPE, PUBLIC :: yaml_Svec ! string structure
character (len=:), allocatable :: value ! scalar value
TYPE (yaml_Svec), allocatable :: vector(:) ! recursive vector
END TYPE yaml_Svec ! values
# export USE_MPI=on # distributed-memory parallelism
# export USE_MPIF90=on # compile with mpif90 script
#export which_MPI=intel # compile with mpiifort library
#export which_MPI=mpich # compile with MPICH library
#export which_MPI=mpich2 # compile with MPICH2 library
#export which_MPI=mvapich2 # compile with MVAPICH2 library
# export which_MPI=openmpi # compile with OpenMPI library
#export USE_OpenMP=on # shared-memory parallelism
# export FORT=ifort
export FORT=gfortran
#export FORT=pgi
export USE_DEBUG=off # use Fortran debugging flags
export USE_LARGE=on # activate 64-bit compilation
# ROMS I/O choices and combinations. A more complete description of the
# available options can be found in the wiki (https://myroms.org/wiki/IO).
# Most users will want to enable at least USE_NETCDF4 because that will
# instruct the ROMS build system to use nf-config to determine the
# necessary libraries and paths to link into the ROMS executable.
export USE_NETCDF4=on # compile with NetCDF-4 library
#export USE_PARALLEL_IO=on # Parallel I/O with NetCDF-4/HDF5
#export USE_PIO=on # Parallel I/O with PIO library
#export USE_SCORPIO=on # Parallel I/O with SCORPIO library
# If any of the coupling component use the HDF5 Fortran API for primary
# I/O, we need to compile the main driver with the HDF5 library.
#export USE_HDF5=on # compile with HDF5 library
Well, you have posted two bizarre errors messages due to compilation. It seems to us that you are using a very old gfortran compiler. Also, your NetCDF library is old. We are using NetCDF version 4.7.4. I think that you may need to update your compilers. If you have access to ifort, try to compile with it to see if you get the same errors.
Thank you for the suggestion. Now I have updated gfortran and NetCDF and I can successfully compile the model. However, when I was running it, there was still an error from yaml
./romsG < roms_upwelling.in > roms_upwelling_003.log
At line 693 of file yaml_parser.f90
Fortran runtime error: Substring out of bounds: upper bound (538976288) of 'kstring' exceeds string length (17)
Error termination. Backtrace:
#0 0x7f4e361cdd21 in ???
#1 0x7f4e361ce869 in ???
#2 0x7f4e361ceee6 in ???
#3 0x5617d7bb8710 in __yaml_parser_mod_MOD_yaml_tree_extract
at /home/PROJECT_DIR/upwelling_003/Build_romsG/yaml_parser.f90:693
#4 0x5617d7b6dc93 in __yaml_parser_mod_MOD_yaml_get_s_struc
at /home/PROJECT_DIR/upwelling_003/Build_romsG/yaml_parser.f90:1945
#5 0x5617d7aace14 in __get_metadata_mod_MOD_io_metadata
at /home/PROJECT_DIR/upwelling_003/Build_romsG/get_metadata.f90:886
#6 0x5617d8268c94 in __mod_ncparam_MOD_initialize_ncparam
at /home/PROJECT_DIR/upwelling_003/Build_romsG/mod_ncparam.f90:1141
#7 0x5617d7bf8314 in read_phypar_
at /home/PROJECT_DIR/upwelling_003/Build_romsG/read_phypar.f90:233
#8 0x5617d737263a in __inp_par_mod_MOD_inp_par
at /home/PROJECT_DIR/upwelling_003/Build_romsG/inp_par.f90:85
#9 0x5617d5a3614c in __roms_kernel_mod_MOD_roms_initialize
at /home/PROJECT_DIR/upwelling_003/Build_romsG/roms_kernel.f90:86
#10 0x5617d5a31ce2 in myroms
at /home/PROJECT_DIR/upwelling_003/Build_romsG/master.f90:75
#11 0x5617d5a32510 in main
at /home/PROJECT_DIR/upwelling_003/Build_romsG/master.f90:50
This an a issue with the gfortran compiler. I already took care of this issue. See the following track ticket. It seems that you are ignoring track ROMS updates.