Skip to content

Commit

Permalink
Merge branch '4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Huug Ouwersloot committed Jun 5, 2019
2 parents 9c8217c + d4c6301 commit 474c41c
Show file tree
Hide file tree
Showing 99 changed files with 4,181 additions and 2,230 deletions.
24 changes: 22 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,29 @@ elseif("$ENV{SYST}" STREQUAL "HYDRA")
set(CMAKE_Fortran_FLAGS "-r8 -ftz -extend_source" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-traceback -fpe1 -O0 -g -check all" CACHE STRING "")
else()
elseif("$ENV{SYST}" STREQUAL "FEDORA")
set(CMAKE_Fortran_COMPILER "mpif90")
set(CMAKE_Fortran_FLAGS "-finit-real=nan -fdefault-real-8 -ffree-line-length-none -I /usr/lib64/gfortran/modules/mpich/" CACHE STRING "")
set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -O3" 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 "ECMWF")
set(CMAKE_Fortran_COMPILER "ftn")
set(CMAKE_Fortran_FLAGS "-s real64" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_RELEASE "-O3" CACHE STRING "")
set(CMAKE_Fortran_FLAGS_DEBUG "-g -R b -K trap=fp" CACHE STRING "")
elseif("$ENV{SYST}" STREQUAL "ECMWF-intel")
set(CMAKE_Fortran_COMPILER "ftn")
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 "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 "")
else()
set(CMAKE_Fortran_COMPILER "mpif90")
set(CMAKE_Fortran_FLAGS "-finit-real=nan -fdefault-real-8 -ffree-line-length-none " CACHE STRING "")
set (CMAKE_Fortran_FLAGS_RELEASE "-funroll-all-loops -fno-f2c -O3" CACHE STRING "")
set (CMAKE_Fortran_FLAGS_DEBUG "-fbounds-check -fbacktrace -fno-f2c -O0 -g -ffpe-trap=invalid,zero,overflow" CACHE STRING "")
endif()
Expand All @@ -37,7 +57,7 @@ endif()
PROJECT(DALES Fortran)
cmake_minimum_required(VERSION 2.6)
set(VERSION_MAJOR "4")
set(VERSION_MINOR "1")
set(VERSION_MINOR "2")
set(VERSION_PATCH "0")

### If necessary, resort to BASH-methods to find netcdf-directory
Expand Down
10 changes: 2 additions & 8 deletions cases/arm_brown/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd00h01m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 50400
trestart = 7200
dtmax = 10
Expand Down Expand Up @@ -54,14 +54,8 @@ iadv_thl = 2
iadv_qt = 2
iadv_sv = 2
/
&SUBGRID
&NAMSUBGRID
ldelta = .false.
cm = 0.12
cn = 0.76
ch1 = 1.
ch2 = 2.
ce1 = 0.19
ce2 = 0.51
/
&NAMBUDGET
lbudget = .true.
Expand Down
10 changes: 2 additions & 8 deletions cases/arm_unstable/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd00h01m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 50400
trestart = 7200
dtmax = 10
Expand Down Expand Up @@ -54,14 +54,8 @@ iadv_thl = 2
iadv_qt = 2
iadv_sv = 2
/
&SUBGRID
&NAMSUBGRID
ldelta = .false.
cm = 0.12
cn = 0.76
ch1 = 1.
ch2 = 2.
ce1 = 0.19
ce2 = 0.51
/
&NAMBUDGET
lbudget = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/atex/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd06h00m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 28800.0
trestart = 3600
ladaptive = .true.
Expand Down
10 changes: 2 additions & 8 deletions cases/bomex/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd08h00m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 28800
trestart = 3600
ladaptive = .true.
Expand Down Expand Up @@ -53,14 +53,8 @@ iadv_thl = 2
iadv_qt = 2
iadv_sv = 2
/
&SUBGRID
&NAMSUBGRID
ldelta = .false.
cm = 0.12
cn = 0.76
ch1 = 1.
ch2 = 2.
ce1 = 0.19
ce2 = 0.51
/
&NAMBUDGET
lbudget = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/cblstrong/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd03h00m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 14400
trestart = 3600
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/cblweak/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd03h00m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 14400
trestart = 3600
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/dycoms_rf02/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd01h00m002.999'
startfile = 'initd001h00mx000y000.001'
runtime = 21600
trestart = 10800
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/example/input/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd00h01m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 7200
trestart = 3600
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/example/input/namoptions.lsm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd00h01m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 7200
trestart = 3600
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/example/input/namoptions.lsmrad
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd00h01m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 7200
trestart = 3600
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/example/inputwindnoneq/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd03h00m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 260000
trestart = 3600
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/example/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd00h01m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 7200
trestart = 3600
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/example/namoptions.lsm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd00h01m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 7200
trestart = 3600
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/example/namoptions.lsmrad
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd00h01m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 7200
trestart = 3600
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/fog/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd00h01m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 36000
trestart = 3600
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/gabls1/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd04h00m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 32400
trestart = 3600
irandom = 43
Expand Down
2 changes: 1 addition & 1 deletion cases/hireslapse/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initdlatest000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 10800
trestart = 3600
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/neutral/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd40h00m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 180000
trestart = 36000
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/rico/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd00h01m000.000'
startfile = 'initd001h00mx000y000.001'
runtime = 86400
trestart = 3600
ladaptive = .true.
Expand Down
2 changes: 1 addition & 1 deletion cases/smoke/namoptions.001
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
&RUN
iexpnr = 001
lwarmstart = .false.
startfile = 'initd00h00m000.001'
startfile = 'initd001h00mx000y000.001'
runtime = 10800
trestart = 3600
ladaptive = .true.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/addon/modgenstat.f90 → src/addon/modgenstat.old
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ subroutine do_genstat
qls = 0.0 ! hj: no liquid water at the surface
tsurf = thls*exnh(1)+(rlv/cp)*qls
qsat = qts - qls
if (qls==0) then
if (qls < eps1) then !TH: Should always be the case at the surface
c1 = 1.+(rv/rd-1)*qts
c2 = (rv/rd-1)
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ end subroutine initheterostats

subroutine heterostats

use modglobal, only : rk3step,ntimee,dt_lim,timee
use modglobal, only : rk3step,dt_lim,timee
implicit none

if (.not. lheterostats) return
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/addon/modnetcdfstats.f90
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ end subroutine initnetcdfstats

subroutine netcdfstats

use modglobal, only : rk3step,ntimee
use modglobal, only : rk3step
implicit none

if (.not. lnetcdf) return
Expand Down
8 changes: 4 additions & 4 deletions src/addon/modnudge.f90 → src/addon/modnudge.old
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ subroutine initnudge
t = 0
open (ifinput,file='nudge.inp.'//cexpnr)

do while (timenudge(t) < tres*real(runtime+btime))
do while (timenudge(t) < tres*real(runtime))
t = t + 1
chmess1 = "#"
ierr = 1 ! not zero
Expand Down Expand Up @@ -136,7 +136,7 @@ end subroutine initnudge
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

subroutine nudge
use modglobal, only : rtimee,i1,j1,k1,rk3step,kmax,rdt
use modglobal, only : timee,i1,j1,k1,rk3step,kmax,rdt
use modfields, only : up,vp,wp,thlp, qtp,u0av,v0av,qt0av,thl0av
use modmpi, only : myid
implicit none
Expand All @@ -146,13 +146,13 @@ subroutine nudge

if (.not.(lnudge)) return
! if (rk3step/=3) return
if (rtimee==0) return
if (timee==0) return

t=1
do while(rtimee>timenudge(t))
t=t+1
end do
if (rtimee/=timenudge(1)) then
if (rtimee>timenudge(1)) then
t=t-1
end if

Expand Down
2 changes: 1 addition & 1 deletion src/addon/modparticles.f90
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ module modparticles
subroutine initparticles
use modmpi, only : myid,my_real,mpierr,comm3d,mpi_integer,mpi_logical,nprocs
use modglobal,only : ifnamopt,fname_options,ifinput,dtmax,cexpnr,&
dx,dy,dzf,zh,kmax,k1,iexpnr,runtime,timee,ysize,dt_lim,btime,rtimee,tres
dx,dy,dzf,zh,kmax,k1,iexpnr,timee,ysize,dt_lim,btime,rtimee,tres

implicit none

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 6 additions & 7 deletions src/addon/modtimestat.f90 → src/addon/modtimestat.old
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ subroutine inittimestat

namelist/NAMTIMESTAT/ & !< namelist
dtav,ltimestat,blh_thres,iblh_meth,iblh_var,blh_nsamp,blh_thres !! namelist contents
!!bla
!!dibla


dtav=dtav_glob
if(myid==0)then
Expand Down Expand Up @@ -217,7 +216,7 @@ end subroutine inittimestat
!>Run timestat. Calculate and write the statistics
subroutine timestat

use modglobal, only : i1,j1,kmax,zf,dzf,cu,cv,rv,rd,&
use modglobal, only : i1,j1,kmax,zf,dzf,cu,cv,rv,rd,eps1,&
ijtot,timee,rtimee,dt_lim,rk3step,cexpnr,ifoutput
!
use modfields, only : um,vm,wm,e12m,ql0,u0av,v0av,rhof
Expand Down Expand Up @@ -498,13 +497,13 @@ subroutine timestat
if (lnetcdf) then
vars( 1) = rtimee
vars( 2) = cc
if (vars(2)==0) vars(2) = nc_fillvalue
if (vars(2)<eps1) vars(2) = nc_fillvalue
vars( 3) = zbaseav
if (vars(3)==0) vars(3) = nc_fillvalue
if (vars(3)<eps1) vars(3) = nc_fillvalue
vars( 4) = ztopav
if (vars(4)==0) vars(4) = nc_fillvalue
if (vars(4)<eps1) vars(4) = nc_fillvalue
vars( 5) = ztopmax
if (vars(5)==0) vars(5) = nc_fillvalue
if (vars(5)<eps1) vars(5) = nc_fillvalue
vars( 6) = zi
vars( 7) = we
vars( 8) = qlintav
Expand Down
Loading

0 comments on commit 474c41c

Please sign in to comment.