Changeset 77778f8 in flexpart.git


Ignore:
Timestamp:
Jun 13, 2018, 1:43:58 PM (5 weeks ago)
Author:
pesei <petra seibert at univie ac at>
Branches:
dev, univie
Children:
1a8fbee
Parents:
505a96e
Message:

Introduce changelog.txt, update version string, make makefile more useful for use outside NILU, improve error msg in readcomma$

Location:
src
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • src/FLEXPART.f90

    ra9cf4b1 r77778f8  
    8686  ! FLEXPART version string
    8787  flexversion_major = '10' ! Major version number, also used for species file names
    88   flexversion='Version '//trim(flexversion_major)//'.2beta (2017-08-01)'
     88  flexversion='Version '//trim(flexversion_major)//'.3beta (2018-06-08)'
    8989  verbosity=0
    9090
  • src/makefile

    ra9cf4b1 r77778f8  
    11SHELL = /bin/bash
    22################################################################################
     3#   
     4#  LICENSE
     5#   Valid-License-Identifier:   GPL-3.0-or-later
     6#   License text: https://spdx.org/licenses/GPL-3.0-or-later.html#licenseText
     7#
    38#  DESCRIPTION
    49#    Makefile for FLEXPART. Standard (serial) and parallel (MPI) version
     
    712#    possible ("make -j")
    813#
    9 #    At NILU we have installed gcc-4.9.1 and libraries under user /homevip/flexpart
    10 #    ("ROOT_DIR")
    11 #    To use gfortran version 4.9, add "gcc=4.9" to the make command, e.g.
     14#   
     15#    The makefile is prepared for the environment at NILU.
     16#    There, gcc-4.9.1 and libraries are installed under user /homevip/flexpart
     17#    NILU users can compile with gfortran version 4.9 by addin "gcc=4.9" to the make command, e.g.
    1218#       'make -j ecmwf gcc=4.9',
    13 #    also set environment variable LD_LIBRARY_PATH to point to compiler libraries
     19#    You also set environment variable LD_LIBRARY_PATH to point to compiler libraries
     20#
     21#    Other users will have to edit the
    1422#
    1523#    Makefile was modified to produce unified executable for both ECMWF and GFS meteo data formats
     
    2331#  USAGE
    2432#    Compile serial FLEXPART
    25 #      make [-j] serial
     33#      make [-j] [serial] [ncf=yes}
    2634#
    2735#    Compile parallel FLEXPART
    28 #      make [-j] mpi
     36#      make [-j] mpi [ncf=yes}
    2937#     
    3038#    Compile for debugging parallel FLEXPART
    31 #      make [-j] mpi-dbg
    32 #
    33 #  NETCDF OUTPUT
    34 #    To add support for output in netCDF format, append `ncf=yes` to the
    35 #    `make` command
     39#      make [-j] mpi-dbg [ncf=yes}
     40#
     41#    ncf=yes adds support for output in netCDF format. Requires netCDF libs to be installed.
     42#
     43#  AUTHORS
     44#    NILU people, Petra Seibert (PS), 2018
     45#
     46#  VERSION and CHANGES
     47#    v1.0 as found in git branch dev on flexpart.eu, 2018-06-08
     48#    v1.1 PS, make the file more useful for non-NILU users
    3649#
    3750################################################################################
     
    5063FLEXPART-SERIAL = FLEXPART
    5164
    52 
    53 ifeq ($(gcc), 4.9)
    54 # Compiled libraries under user ~flexpart, gfortran v4.9
     65ifneq ($(gcc), 4.9)
     66# make sure that all paths correspond to your system
     67        F90       = gfortran
     68        MPIF90    = mpifort
     69
     70        INCPATH1  = /usr/include       
     71        INCPATH2  = /usr/include
     72        LIBPATH1  = /usr/lib
     73else
     74# NILU: Compiled libraries under user ~flexpart, gfortran v4.9
     75        ROOT_DIR = /homevip/flexpart/
    5576        ROOT_DIR = /homevip/flexpart/
    5677
     
    6182        INCPATH2  = ${ROOT_DIR}/include
    6283        LIBPATH1 = ${ROOT_DIR}/lib
    63 else
    64 # Compiled libraries under user ~flexpart, gfortran v5.4
    65         ROOT_DIR = /homevip/flexpart/
    66 
    67         F90       = /usr/bin/gfortran
    68         MPIF90    = /usr/bin/mpifort
    69 
    70         INCPATH1  = ${ROOT_DIR}/gcc-5.4.0/include       
    71         INCPATH2  = /usr/include
    72         LIBPATH1 = ${ROOT_DIR}/gcc-5.4.0/lib
    7384endif
    7485
     
    8394
    8495
    85 # path to gributils used to detect meteodata format
     96#add path to gributils to default searchpath of make
    8697VPATH = gributils/
    8798
     
    92103
    93104## LIBRARIES
    94 #LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper -lnetcdff
    95105LIBS = -lgrib_api_f90 -lgrib_api -lm -ljasper $(NCOPT)
    96106
    97 FFLAGS   = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -g -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER)  #-Warray-bounds -fcheck=all # -march=native
    98 
    99 DBGFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV_DBG) -g3 -ggdb3 -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV_DBG) $(NCOPT) -fbacktrace   -Wall  -fdump-core $(FUSER)  #  -ffpe-trap=invalid,overflow,denormal,underflow,zero  -Warray-bounds -fcheck=all
     107#FFLAGS   = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER)  #-Warray-bounds -fcheck=all # -march=native
     108FFLAGS   = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV) -cpp -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV) $(NCOPT) $(FUSER)  # -fcheck=all -fbacktrace -march=native
     109
     110# Explanation of unusual gfortran options
     111# -fmessage-length=0: do not wrap around compiler messages at col 72
     112# -flto=jobserver: use GNU make's job server mode to determine the number of parallel jobs. This is useful when the Makefile calling GCC is already executing in parallel. (+ in front of $(FC) further down also needed for parallel compiling).
     113
     114DBGFLAGS = -I$(INCPATH1) -I$(INCPATH2) -O$(O_LEV_DBG) -g3 -ggdb3 -cpp -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -fmessage-length=0 -flto=jobserver -O$(O_LEV_DBG) $(NCOPT) -fbacktrace   -Wall  -fdump-core $(FUSER)  #  -ffpe-trap=invalid,overflow,denormal,underflow,zero   -fcheck=all
    100115
    101116LDFLAGS  = $(FFLAGS) -L$(LIBPATH1) -Wl,-rpath,$(LIBPATH1) $(LIBS) #-L$(LIBPATH2)
  • src/readcommand.f90

    r20963b1 r77778f8  
    2929  !                                                                            *
    3030  !     18 May 1996                                                            *
    31   !     HSO, 1 July 2014                                                       *
    32   !     Added optional namelist input                                          *
     31  !     Unknown, unknown: various                                              *
     32  !     HSO, 1 July 2014: Added optional namelist input                        *
     33  !     Unknown, unknown: various                                              *
     34  !     Petra Seibert, 2018-06-08: improve error msgs                          *
    3335  !                                                                            *
    3436  !*****************************************************************************
     
    153155  ! Namelist input first: try to read as namelist file
    154156  !**************************************************************************
    155   open(unitcommand,file=path(1)(1:length(1))//'COMMAND',status='old',form='formatted',err=999)
     157  open(unitcommand,file=path(1)(1:length(1))//'COMMAND',status='old', &
     158    form='formatted',err=999)
    156159
    157160  ! try namelist input (default)
     
    248251  ! write command file in namelist format to output directory if requested
    249252  if (nmlout.and.lroot) then
    250     open(unitcommand,file=path(2)(1:length(2))//'COMMAND.namelist',err=1000)
     253    open(unitcommand,file=path(2)(1:length(2))//'COMMAND.namelist',err=998)
    251254    write(unitcommand,nml=command)
    252255    close(unitcommand)
     
    635638    ideltas=nint((edate-bdate)*86400.)
    636639  else
    637     write(*,*) ' #### FLEXPART MODEL ERROR! DIRECTION IN      #### '
    638     write(*,*) ' #### FILE "COMMAND" MUST BE EITHER -1 OR 1.  #### '
     640    write(*,*) ' #### FLEXPART MODEL ERROR! DIRECTION IN'
     641    write(*,*) ' #### FILE "COMMAND" MUST BE EITHER -1 OR 1.'
    639642    stop
    640643  endif
     
    642645  return
    643646
    644 999   write(*,*) ' #### FLEXPART MODEL ERROR! FILE "COMMAND"    #### '
    645   write(*,*) ' #### CANNOT BE OPENED IN THE DIRECTORY       #### '
    646   write(*,'(a)') path(1)(1:length(1))
    647   stop
    648 
    649 1000   write(*,*) ' #### FLEXPART MODEL ERROR! FILE "COMMAND"    #### '
    650   write(*,*) ' #### CANNOT BE OPENED IN THE DIRECTORY       #### '
    651   write(*,'(a)') path(2)(1:length(2))
    652   stop
     647998 write(*,900) ' #### FLEXPART MODEL ERROR! FILE "COMMAND.namelist"'
     648  write(*,900)   ' #### CANNOT WRITE TO '// &
     649    path(2)(1:length(2))//'COMMAND.namelist'
     650  stop 'stopped in readcommand'
     651999 write(*,900) ' #### FLEXPART MODEL ERROR! FILE "COMMAND"'
     652  write(*,900)   ' #### CANNOT OPEN '//path(1)(1:length(1))//'COMMAND'
     653  stop 'stopped in readcommand'
     654900 format (a)
    653655end subroutine readcommand
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG