SPECTRE

After running the model, you can compute spectra with the program SPECTRE, that gives the kinetic energy density according to the wavelength or the wave number [Ricard et al., 2013]. The calculation uses a discrete cosinus transform to convert grid-point fields into spectral space ones.

SPECTRE program and its corresponding namelist and function

Executable

Namelist

Function

SPECTRE

SPEC1.nam

Compute spectra after simulation

The following namelists can be used in the SPEC1.nam file :

NAM_CONFIO

NAM_CONFIO content

Fortran name

Fortran type

Default value

CIO_DIR

CHARACTER(LEN=512)

LVERB_OUTLST

LOGICAL

.TRUE.

LVERB_STDOUT

LOGICAL

.FALSE.

LVERB_ALLPRC

LOGICAL

.FALSE.

NGEN_VERB

INTEGER

4

NGEN_ABORT_LEVEL

INTEGER

2

NBUD_VERB

INTEGER

4

NBUD_ABORT_LEVEL

INTEGER

2

NIO_VERB

INTEGER

4

NIO_ABORT_LEVEL

INTEGER

2

LIO_COMPRESS

LOGICAL

.TRUE.

CIO_COMPRESS_ALGO

CHARACTER(LEN=10)

‘ZSTD’

NIO_COMPRESS_LEVEL

INTEGER

4

LDIAG_REDUCE_FLOAT_PRECISION

LOGICAL

.FALSE.

LIO_ALLOW_REDUCED_PRECISION_BACKUP

LOGICAL

.FALSE.

LIO_ALLOW_NO_BACKUP

LOGICAL

.FALSE.

LIO_NO_WRITE

LOGICAL

.FALSE.

NFILE_NUM_MAX

INTEGER

999

Warning

  • If a file is not found in the netCDF fileformat, Meso-NH will check if it exists in the LFI format and use it if found. This could be useful if you need to mix the reading of different files with different fileformats.

  • CIO_DIR : directory used to write outputs, backups and diachronic files (current directory by default). It can be overridden by CBAK_DIR for backups and diachronic files and by COUT_DIR for outputs.

  • LVERB_OUTLST : flag to write application messages in OUTPUT_LISTINGn files (in current directory, n is for the current model)

  • LVERB_STDOUT : flag to write application messages on the standard output

  • NGEN_VERB : set the verbosity level for generic messages

    • 0 : no messages

    • 1 : fatal messages

    • 2 : error messages (and lower values)

    • 3 : warning messages (and lower values)

    • 4 : info messages (and lower values)

    • 5 : debug messages (and lower values)

  • NGEN_ABORT_LEVEL : set the minimum level of generic message to abort the application (same levels as for NGEN_VERB)

  • NBUD_VERB : set the verbosity level for budget messages (same levels as for NGEN_VERB)

  • NBUD_ABORT_LEVEL : set the minimum level of budget message to abort the application (same levels as for NGEN_VERB)

  • NIO_VERB : set the verbosity level for IO messages (same levels as for NGEN_VERB)

  • NIO_ABORT_LEVEL : set the minimum level of IO message to abort the application (same levels as for NGEN_VERB)

Warning

Not all messages use this infrastructure. Therefore, some of them are not affected by these options.

  • LIO_COMPRESS : enable lossless compression of data for all files. This can have a negative impact on performance. This option takes precedence over their equivalent NAM_BACKUP and NAM_OUTPUT namelists.

  • CIO_COMPRESS_ALGO: set the compression algorithm (only for files in netCDF format, not for LFI format). The allowed values are ‘ZSTD’ (for Zstandard compression,default value), ‘DEFLATE’ (for zlib compression) or ‘NONE’. This option takes precedence over their equivalent in NAM_BACKUP and NAM_OUTPUT namelists (only if LIO_COMPRESS=.TRUE. which is the default). If set to ‘NONE’, all compression will be disabled (that stands also for lossy compression).

  • LOUT_COMPRESS_LEVEL : set the compression level. The value must be in the 0 to 9 interval (0 for no compression, 9 for maximum compression). This option takes precedence over their equivalent in NAM_BACKUP and NAM_OUTPUT namelists (only if LIO_COMPRESS=.TRUE. which is the default).

  • LDIAG_REDUCE_FLOAT_PRECISION : force writing of floating points numbers in single precision for diagnostic files (written by the DIAG program)

  • LIO_ALLOW_REDUCED_PRECISION_BACKUP : flag to allow writing of backup files with a reduced precision as well as reading of reduced precision files and files written with Meso-NH compiled with a lower precision for integers or reals (ie MNH_INT=4 and MNH_REAL=4).

  • LIO_ALLOW_NO_BACKUP : allow to have no valid backup time (useful for some tests)

  • LIO_NO_WRITE : disable file writes (useful for benchs)

  • NFILE_NUM_MAX : maximum number for numbered files (mainly backup and output files). If less than 1000, the numbers will be on 3 digits. From 1000, they will be on the number of digits of NFILE_NUM_MAX (5 if NFILE_NUM_MAX=12345).

NAM_CONFZ

NAM_CONFZ content

Fortran name

Fortran type

Default value

NZ_VERB

INTEGER

0

NZ_PROC

INTEGER

0

NB_PROCIO_R

INTEGER

1

NB_PROCIO_W

INTEGER

1

MPI_BUFFER_SIZE

INTEGER

40

LMNH_MPI_BSEND

LOGICAL

.TRUE.

LMNH_MPI_ALLTOALLV_REMAP

LOGICAL

.FALSE.

NZ_SPLITTING

INTEGER

10

NPMAX_T1DFLAT_R

INTEGER

130

  • NZ_VERB: level of message for NZ solver and I/O

  • NZ_PROC: number of processes to use in the Z splitting. The default value (0) yields an automatic calculation of the number.

  • NB_PROCIO_R: number of processes to use for parallel I/O when reading file. The default value (1) yields a reading from 1 file only. If more than 1 file, the 3D field are written as several 2D slices.

  • NB_PROCIO_W: Number of processes to use for parallel I/O when writing file. The default value (1) yields a writing into 1 file only. If more than 1 file, the 3D field are written as several 2D slices.

  • MPI_BUFFER_SIZE: default size for MPI_BSEND buffer in \(10^6\) bytes. MPI_BUFFER_SIZE corresponds approximately to the size of the domain, that is, \(NX*NY*NZ\) for I/O in 1 file, and \(NX*NY\) for I/O in N 2D-slice files.

  • LMNH_MPI_BSEND: during HALO exchange and FFT transposition, switch to use bufferized either MPI_BSEND routine or asynchrone MPI_ISEND routine. Depending on the computer and size of the problem, one or the other option could run faster. MPI_ISEND also uses less memory so MPI_BUFFER_SIZE should be decreased.

  • LMNH_MPI_ALLTOALLV_REMAP:

    • FALSE: FFT remap with send/recv <=> NZ_SPLITTING=10

    • TRUE: FFT remap with mpi_alltoallv <=> NZ_SPLITTING=14 (BG/MPICH optimization)

  • NZ_SPLITTING: setting by namelist for debugging by expert user only. The non-expert user will use LMNH_MPI_ALLTOALLV_REMAP=T/F only: IZ=1=flat_inv; IZ=2=flat_invz; IZ=1+2=the two; +8=P1/P2.

  • NPMAX_T1DFLAT_R: setting to determine the size of the memory buffer allocated for the GPU version of Meso-NH to store real fields. The total buffer size is this setting multiplied by the number of mesh points. This buffer is used to remove allocations and deallocations that are very costly on GPUs. This value can be increased when needed (if too small, an error will be raised at runtime), but it should not be too large to avoid wasting memory.

NAM_SPECTRE_FILE

NAM_SPECTRE_FILE content

Fortran name

Fortran type

Default value

YINIFILE

ARRAY(CHARACTER(LEN=128))

CTYPEFILE

CHARACTER(LEN=6)

‘MESONH’

YOUTFILE

ARRAY(CHARACTER(LEN=128))

LSTAT

LOGICAL

.FALSE.

  • YINIFILE : name of the input synchronous backup file.

  • CTYPEFILE : type of the input file (‘AROME ‘, ‘MESONH’)

  • YOUTFILE : prefix of the output file.

    • If the user does specify this name, the output file will be named YOUTFILE_U, YOUTFILE_V ….

    • If the user does NOT specify this name, the output file will be named spectra_YINIFILE_U, spectra_YINIFILE_V ….

  • LSTAT : flag to have some statistiques on fields if .TRUE.

NAM_SPECTRE

NAM_SPECTRE content

Fortran name

Fortran type

Default value

LSPECTRE_U

LOGICAL

.FALSE.

LSPECTRE_V

LOGICAL

.FALSE.

LSPECTRE_W

LOGICAL

.FALSE.

LSPECTRE_TH

LOGICAL

.FALSE.

LSPECTRE_RV

LOGICAL

.FALSE.

LSPECTRE_LSU

LOGICAL

.FALSE.

LSPECTRE_LSV

LOGICAL

.FALSE.

LSPECTRE_LSW

LOGICAL

.FALSE.

LSPECTRE_LSTH

LOGICAL

.FALSE.

LSPECTRE_LSRV

LOGICAL

.FALSE.

LSMOOTH

LOGICAL

.FALSE.

  • LSPECTRE_U : flag to compute spectrum of U component

  • LSPECTRE_V : flag to compute spectrum of V component

  • LSPECTRE_W : flag to compute spectrum of W

  • LSPECTRE_TH : flag to compute spectrum of Theta

  • LSPECTRE_RV : flag to compute spectrum of vapor mixing ratio

  • LSPECTRE_LSU : flag to compute spectrum of large scale U component

  • LSPECTRE_LSV : flag to compute spectrum of large scale V component

  • LSPECTRE_LSW : flag to compute spectrum of large scale W

  • LSPECTRE_LSTH : flag to compute spectrum of large scale Theta

  • LSPECTRE_LSRV : flag to compute spectrum of large scale vapor mixing ratio

  • LSMOOTH : flag to smooth the results

NAM_ZOOM_SPECTRE

NAM_ZOOM_SPECTRE content

Fortran name

Fortran type

Default value

LZOOM

LOGICAL

.FALSE.

NXDEB

INTEGER

NYDEB

INTEGER

NITOT

INTEGER

NJTOT

INTEGER

  • LZOOM : flag to make a zoom on the file domain

  • NXDEB : first point I index, left to and out of the wanted domain

  • NYDEB : first point J index, under and out of the wanted domain

  • NITOT : number of grid points in I direction. It must be equal to \(2^m \times 3^n \times 5^p\) with \((m,n,p) \ge 0\).

  • NJTOT : number of grid points in J direction. It must be equal to \(2^m \times 3^n \times 5^p\) with \((m,n,p) \ge 0\).

NAM_DOMAIN_AROME

This namelist is only available for CTYPEFILE=’AROME’. It contains the caracteristics of the domain arome in the input file.

NAM_DOMAIN_AROME content

Fortran name

Fortran type

Default value

NI

INTEGER

750

NJ

INTEGER

720

NK

INTEGER

60

XDELTAX

INTEGER

2500

XDELTAY

INTEGER

2500

  • NI : number of points to read in I direction

  • NJ : number of points to read in J direction

  • NK : number of vertical levels to read

  • XDELTAX : gridsize of arome file in I direction (m)

  • XDELTAY : gridsize of arome file in J direction (m)