Commit 7ca158e9 authored by Joe Melton's avatar Joe Melton
Browse files

Merge branch 'preReleaseV2' of gitlab.science.gc.ca:CanESM/CLASSIC into preReleaseV2

parents 2d23f1d9 89fa076a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -758,7 +758,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT  = src documentation tools configuraionFiles
INPUT  = src documentation tools configurationFiles

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+4 −4
Original line number Diff line number Diff line
@@ -110,9 +110,9 @@ ifeq ($(mode), parallel_intel)
	# MPI wrapper to the default parallel Fortran compiler, which will be Intel after the SSM packages are loaded.
	COMPILER = mpif90
        # Fortran Flags.
	FFLAGS = -DPARALLEL -Dwithout_agcm_ $(R8) -O2 -mp1 -xCORE-AVX512 -align array64byte -static-intel -static-libgcc -traceback -module $(ODIR)
	FFLAGS = -DPARALLEL -Dwithout_agcm_ $(R8) -O2 -mp1 -xCORE-AVX512 -align array64byte -no-wrap-margin -static-intel -static-libgcc -traceback -module $(ODIR)
	ifeq ($(debug), on)
		FFLAGS = -DPARALLEL -Dwithout_agcm_ $(R8) -g -O0 -init=snan,arrays -static-intel -static-libgcc -traceback -fpe0 -module $(ODIR)
		FFLAGS = -DPARALLEL -Dwithout_agcm_ $(R8) -g -O0 -init=snan,arrays -no-wrap-margin -static-intel -static-libgcc -traceback -fpe0 -module $(ODIR)
	endif
        # Library Flags.
	LFLAGS = -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl
@@ -123,9 +123,9 @@ else ifeq ($(mode), serial_intel)
	#     . ssmuse-sh -x /fs/ssm/main/opt/hdf5-netcdf4/serial/static/inteloneapi-2022.1.2/01
	COMPILER = ifort
	# Fortran Flags.
	FFLAGS = -Dwithout_agcm_ $(R8) -g -O2 -mp1 -xCORE-AVX512 -align array64byte -static-intel -static-libgcc -traceback -module $(ODIR)
	FFLAGS = -Dwithout_agcm_ $(R8) -g -O2 -mp1 -xCORE-AVX512 -align array64byte -no-wrap-margin -static-intel -static-libgcc -traceback -module $(ODIR)
	ifeq ($(debug), on)
		FFLAGS = -Dwithout_agcm_ $(R8) -g -O0 -init=snan,arrays -static-intel -static-libgcc -traceback -fpe0 -module $(ODIR)
		FFLAGS = -Dwithout_agcm_ $(R8) -g -O0 -init=snan,arrays -no-wrap-margin -static-intel -static-libgcc -traceback -fpe0 -module $(ODIR)
	endif
	# Library Flags.
	LFLAGS = -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl
+3 −2
Original line number Diff line number Diff line
@@ -85,8 +85,9 @@
                            ! useTracer -> '13C' [Not implemented yet] means the tracer is 13C and will then call a 13C fractionation scheme. 
        tracerCO2file = ''  ! Tracer CO2 file, this file needs to be 
                            ! correctly chosen for the useTracer option. It uses the transientCO2 and fixedYearCO2 switches to determine how it is read in.
        tracertimeAdjust = 0 ,! This adjusts the read in year for the tracer. E.g. if you start your run in year 1900 for readMetStartYear
                            ! and tracertimeAdjust -> -1000 then it will read in year 900 from the tracerCO2file. Default is 0.
        tracertimeAdjust = 0 ,  ! This adjusts the read in year for the tracer. Default is 0.
                                ! E.g. if you start your run in year 1900 for readMetStartYear
                                ! and tracertimeAdjust -> -1000 then it will read in year 900 from the tracerCO2file. 

    !CO2 switches:
        transientCO2 = .false. , ! Read in time varying CO2 concentration from CO2File or if set to false then use only the year of fixedYearCO2 value
+1 −0
Original line number Diff line number Diff line
@@ -149,6 +149,7 @@ module classicParams
  integer, parameter :: ilg = nlat * nmos  !< nlat x nmos
  integer, parameter :: ignd = 20          !< Number of soil layers, set in the code
  integer, parameter :: nbs = 4         !< Number of modelled shortwave radiation wavelength bands COMBAK Can be read in from the init file when I have the new snow albedo scheme fully implemented. Leave here for now.
  integer :: cell                       !< grid cell number currently being processed
#else
  integer :: nlat      !< Size of latitude dimension when coupled to CanESM.
  integer :: nmos      !< Number of mosaic tiles, set in the code
+14 −1
Original line number Diff line number Diff line
@@ -11,10 +11,20 @@ subroutine errorHandler (name, n) ! based on xit
  !     * n>=0 is for a normal end. the line is dashed.
  !     * n<0 is for an abnormal end. the line is dotted.
  !   
  !     * For CLASSIC offline, the routine "abandonCell" is called.
  !     * For CLASSIC offline, calling the routine "abandonCell" is preferable
  !       as it outputs the grid coordinates of the problem cell. 
  !       However, that would mean passing in "class_rot" via all routines
  !       that call errorHandler. 
  !
  !       Instead, a simpler method is to output the process number (i.e. the MPI rank 
  !       if running in parallel) that encountered the problem, along with the 
  !       grid cell number it was processing. These can be cross-referenced against 
  !       other output messages to obtain the grid coordinates of the problem grid cell.
  !
  !     * In coupled mode, the termination is handled via the routine "xit".

#if defined without_agcm_
  use classicParams, only : rank, cell
  use generalUtils, only : run_model
#endif

@@ -44,6 +54,8 @@ subroutine errorHandler (name, n) ! based on xit
  !!
#if defined without_agcm_
  length = len_trim(name)
  ! Output the process and cell number that encountered the error. 
  write(6,6000) dash(1:8), 'process',rank,'cell',cell 
  if (n >= 0) write(6,6010) dash(1:8), name(1:length), dash(1:81-length),n
  if (n < 0)  write(6,6010) star(1:8), name(1:length), star(1:81-length),n
  run_model = .false.
@@ -59,5 +71,6 @@ subroutine errorHandler (name, n) ! based on xit
#endif
  !
  !---------------------------------------------------------------------
  6000 format('0',a,'  END  ',a,1x,i8,10x,a,i8)
  6010 format('0',a,'  END  ',a,1x,a,i8)
end subroutine errorHandler
Loading