Skip to content

Commit

Permalink
Changes in documentation and compiler settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco de Bruine committed Apr 28, 2020
1 parent e61fddc commit baeab65
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 4 deletions.
54 changes: 53 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,50 @@
Changes in DALES
================

Version 4.3 - 2020
------------------

This version introduces a library interface to DALES, defined in `daleslib.f90.` With this interface,
DALES can be used with the [OMUSE](https://omuse.readthedocs.io/en/latest/) framework, which provides
a Python interface to DALES. Another new feature is the support of iterative Poisson solvers, see
the [Wiki](https://github.com/dalesteam/dales/wiki/Iterative-Poisson-solver)


### Improvements

* Add a namelist option lsync in NAMNETCDFSTATS to synchronize netCDF output files after writing
* Iterative Poisson solver support with the HYPRE library (by J. Attema).
* Don't overwrite ascii output files on warm start. Commit 25fae048
* Warn when moduser routines are invoked from a case, when a custom moduser.f90 has not been compiled in. Commit ae148a3bd3
* Allow advection schemes 5th and 6th with non-uniform grid again, add experimental kappa scheme (77) with better non-uniform grid support. Commit 4ab9a7571b
* Add missing rho in divergence diagnostic, show reason for dt limit. Commit da3a32f951b5
* Add qsat field for statistics, and statistics for accumulated surface rain flux in simpleice2. Commit 6036c1a93b
* Add a library interface to DALES, to enable interfacing with OMUSE. Commits 6e0e39f2, 9f91f2d, 4b97aca, 640977e


### Optimization

* modpois: don't exchange the pwp field, ghost cells in it are not needed. Commit c7f72b1b
* If lcoriol is .false., skip coriolis calculations. Commit c343772
* advec_5th: move i,j loops inside if k. Advection calls ~3 times faster. Commit 0badd3a124
* Asynchronous MPI halo exchanges. E,W in parallel, then N,S. By J. Attema. Commits a54b9f8e, 6951323, 0c08a262


### Bugs fixed

* radiation and restarts : https://github.com/dalesteam/dales/issues/40
* modsimpleice2 and initialization order, https://github.com/dalesteam/dales/issues/49 . Commit be3f9711bb6
* timedependent forcings, finding the correct interval for interpolation with time dependent surface variables. https://github.com/dalesteam/dales/issues/48 . Commit d6f2225
* modbudget: remove extra factor rhobf in calculation of sbtke average. From S. de Roode.
* modbudget: add if(myid==0) around netcdf profile writing. Commit b7afc418c5
* Fix ibas_prf=3 initialization when zf(k) is exactly 11000 (1st value in the lapse rate table).
[Issue #41](https://github.com/dalesteam/dales/issues/41), Commit ee6230bc00
* modradstat: handle sign conventions of different radiation schemes (S. de Roode). Commit f43012
* radiation: initialize {sw,lw}{Up,Down}_slice arrays before rrtmg calls, since the calls are not always performed (S. de Roode). Commit d4e979de7d
* netCDF staistics: fix for determining the index where writing is resumed at warm start.
[Issue #42](https://github.com/dalesteam/dales/issues/42), Commit 8ff2cced3
* Fix closing of crosssection netcdf files. Commit e72701e08

Version 4.2 - 2019-06-05
------------------------

Expand Down Expand Up @@ -151,7 +195,11 @@ According to Chiel, microHH does the same.

* Don't do halo exchange of the m-fields
The m-fields ghost cells are seldom needed. Saves maybe 1 % for a
<<<<<<< HEAD
single process run, and a large amount of MPI cvommunication in a multi-process run.
=======
single process run, and a large amount of MPI communication in a multi-process run.
>>>>>>> to4.3_Fredrik
This was tried but reverted since it interfered with chemistry, which *does* use the m-field halos.
(Commit 0c2cf59)

Expand All @@ -176,4 +224,8 @@ Handle chemicals sv fields. Add namelist options, maybe a vector for all sv - ac

* Merged netCDF writing. It is tedious to stitch together the separate netCDF files produced - one file per MPI task. There are scripts in the Dales repository, but they are from the time of slab parallelization and only stitch in one direction. Consider the parallel netCDF API where many MPI tasks can write together into a single file.

* Synchronize netCDF files periodically. When switching to compressed netCDF v4, the files can be unreadable while DALES is running or after DALES crashes or is stopped in the middle of the run.
<<<<<<< HEAD
* Synchronize netCDF files periodically. When switching to compressed netCDF v4, the files can be unreadable while DALES is running or after DALES crashes or is stopped in the middle of the run.
=======
* Synchronize netCDF files periodically. When switching to compressed netCDF v4, the files can be unreadable while DALES is running or after DALES crashes or is stopped in the middle of the run.
>>>>>>> to4.3_Fredrik
37 changes: 35 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,21 @@ elseif("$ENV{SYST}" STREQUAL "ECMWF-intel")
set(CMAKE_Fortran_FLAGS "-r8 -ftz -extend_source" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-g -traceback -O3 -xHost" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-traceback -fpe1 -O0 -g -check all" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "ECMWF-gnu")
set(CMAKE_Fortran_COMPILER "ftn")
set(CMAKE_Fortran_FLAGS "-finit-real=nan -W -Wall -fdefault-real-8 -ffree-line-length-none" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -Ofast -march=native -g -fbacktrace" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-fbounds-check -fbacktrace -fno-f2c -O0 -g -ffpe-trap=invalid,zero,overflow" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "gnu-fast")
set(CMAKE_Fortran_COMPILER "mpif90")
set(CMAKE_Fortran_FLAGS "-finit-real=nan -W -Wall -fdefault-real-8 -ffree-line-length-none" CACHE STRING "")
set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -Ofast -march=native -g -fbacktrace" CACHE STRING "")
set (CMAKE_Fortran_FLAGS_DEBUG "-fbounds-check -fbacktrace -fno-f2c -O0 -g -ffpe-trap=invalid,zero,overflow" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "lisa-intel")
set(CMAKE_Fortran_COMPILER "mpiifort")
set(CMAKE_Fortran_FLAGS "-r8 -ftz -extend_source" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-g -traceback -O3 -xHost" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-traceback -fpe1 -O0 -g -check all" CACHE STRING "")
else()
set(CMAKE_Fortran_COMPILER "mpif90")
set(CMAKE_Fortran_FLAGS "-finit-real=nan -fdefault-real-8 -ffree-line-length-none " CACHE STRING "")
Expand All @@ -58,14 +68,21 @@ PROJECT(DALES Fortran)
cmake_minimum_required(VERSION 2.6)
set(VERSION_MAJOR "4")
set(VERSION_MINOR "2")
set(VERSION_PATCH "0")
set(VERSION_PATCH "1")

# use nf-config to find paths to netcdf. Broken on Fedora due to module path missing.
execute_process(COMMAND nf-config --prefix OUTPUT_VARIABLE NFCONFIG_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND nf-config --includedir OUTPUT_VARIABLE NFCONFIG_INCLUDE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
# execute_process(COMMAND nf-config --flibs OUTPUT_VARIABLE NFCONFIG_FORTRAN_LIB OUTPUT_STRIP_TRAILING_WHITESPACE)
# not used at the moment - not just a path but several compiler flags

### If necessary, resort to BASH-methods to find netcdf-directory
EXEC_PROGRAM(${CMAKE_CURRENT_SOURCE_DIR}/findnetcdf OUTPUT_VARIABLE ADDMODULEPATH)

### Find NetCDF files
FIND_PATH(NETCDF_INCLUDE_DIR netcdf.mod NETCDF.mod
PATHS
${NFCONFIG_INCLUDE_DIR}
$ENV{SARA_NETCDF_INCLUDE}
$ENV{SURFSARA_NETCDF_INCLUDE}
$ENV{NETCDF_INCLUDE}
Expand All @@ -92,6 +109,7 @@ FIND_LIBRARY(NETCDF_C_LIB netcdf

FIND_LIBRARY(NETCDF_FORTRAN_LIB netcdff
PATHS
${NFCONFIG_PREFIX}/lib
$ENV{SARA_NETCDF_LIB}
$ENV{SURFSARA_NETCDF_LIB}
$ENV{NETCDF_LIB}
Expand All @@ -104,6 +122,18 @@ FIND_LIBRARY(NETCDF_FORTRAN_LIB netcdff
DOC "NetCDF Fortran library"
)

FIND_LIBRARY(HYPRE_LIB libHYPRE.a
PATHS
$ENV{HYPRE_LIB}
${ADDMODULEPATH}/lib
${ADDMODULEPATH}/lib64
/usr/lib
/usr/lib64
$ENV{HOME}/lib
$ENV{HOME}/lib64
DOC "Iterative solver library"
)

if(NETCDF_INCLUDE_DIR)
include_directories(${NETCDF_INCLUDE_DIR})
else(NETCDF_INCLUDE_DIR)
Expand All @@ -113,7 +143,7 @@ endif(NETCDF_INCLUDE_DIR)
if(NETCDF_C_LIB)
set(NETCDF_LIBS ${NETCDF_C_LIB})
else(NETCDF_C_LIB)
MESSAGE(STATUS "WARNING: No NETCDF bindings are found.")
MESSAGE(STATUS "WARNING: No NETCDF C bindings are found - may be OK.")
endif(NETCDF_C_LIB)

if(NETCDF_FORTRAN_LIB)
Expand All @@ -122,6 +152,9 @@ else(NETCDF_FORTRAN_LIB)
MESSAGE(STATUS "WARNING: No Fortran NETCDF bindings are found.")
endif(NETCDF_FORTRAN_LIB)

### Iterative solver (HYPRE)
OPTION(USE_HYPRE "Also build iterative solver (optional, needs HYPRE)" OFF)

### Documentation
INCLUDE(FindDoxygen)
if(DOXYGEN)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The following documents are included in the DALES repository (but are not fully
* [User manual](https://github.com/dalesteam/dales/blob/master/utils/doc/input/dales-manual.pdf)
* Documentation of the configuration options [Namoptions.pdf](https://github.com/dalesteam/dales/blob/master/utils/doc/input/Namoptions.pdf)
* [readme.pdf](https://github.com/dalesteam/dales/blob/master/utils/doc/input/readme.pdf)
* [INSTALL](https://github.com/dalesteam/dales/blob/master/INSTALL) contains installation instructions
* [INSTALL.md](https://github.com/dalesteam/dales/blob/master/INSTALL.md) contains installation instructions
* The [DALES Wiki](https://github.com/dalesteam/dales/wiki/) contains [Installation instructions](https://github.com/dalesteam/dales/wiki/Installation-notes) for various systems and notes for [visualizing and processing](https://github.com/dalesteam/dales/wiki/Visualizing-and-processing-output) the model output

## License
Expand Down

0 comments on commit baeab65

Please sign in to comment.