Commit 8ed5f118 authored by Espen Sollum's avatar Espen Sollum
Browse files

Minor cosmetic changes

parent 7e52e2e7
......@@ -21,14 +21,15 @@
!*******************************************************************************
! Include file for calculation of particle trajectories (Program FLEXPART) *
! This file contains ECMWF specific parameters used in FLEXPART *
! Note that module name differs from file name. *
! The makefile selects either this file, or gfs_mod.f90, depending *
! on target. *
! *
! Author: ESO *
! This file contains ECMWF specific parameters used in FLEXPART *
! Note that module name differs from file name. *
! The makefile selects either this file, or gfs_mod.f90, depending *
! on target. *
! *
! 2015 *
! Author: ESO *
! *
! 2015 *
! *
!*******************************************************************************
......@@ -43,10 +44,8 @@ module wind_mod
! integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92 !ECMWF new
integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138 !ECMWF new
integer,parameter :: nxshift=359
! integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138 !test BUG
! integer,parameter :: nxshift=0
!
!*********************************************
! Maximum dimensions of the nested input grids
!*********************************************
......@@ -54,5 +53,15 @@ module wind_mod
integer,parameter :: maxnests=1,nxmaxn=361,nymaxn=181
! integer,parameter :: maxnests=1,nxmaxn=86,nymaxn=31
! nxmax,nymax maximum dimension of wind fields in x and y
! direction, respectively
! nuvzmax,nwzmax maximum dimension of (u,v) and (w) wind fields in z
! direction (for fields on eta levels)
! nzmax maximum dimension of wind fields in z direction
! for the transformed Cartesian coordinates
! nxshift for global grids (in x), the grid can be shifted by
! nxshift grid points, in order to accomodate nested
! grids, and output grids overlapping the domain "boundary"
! nxshift must not be negative; "normal" setting would be 0
end module wind_mod
......@@ -21,14 +21,15 @@
!*******************************************************************************
! Include file for calculation of particle trajectories (Program FLEXPART) *
! This file contains GFS specific parameters used in FLEXPART *
! Note that module name differs from file name. *
! The makefile selects either this file, or ecmwf_mod.f90, depending *
! on target. *
! *
! Author: ESO *
! This file contains GFS specific parameters used in FLEXPART *
! Note that module name differs from file name. *
! The makefile selects either this file, or ecmwf_mod.f90, depending *
! on target. *
! *
! 2015 *
! Author: ESO *
! *
! 2015 *
! *
!*******************************************************************************
......@@ -43,5 +44,20 @@ module wind_mod
integer,parameter :: nxmax=721,nymax=361,nuvzmax=64,nwzmax=64,nzmax=64
integer,parameter :: nxshift=0 ! for GFS or FNL
!*********************************************
! Maximum dimensions of the nested input grids
!*********************************************
integer,parameter :: maxnests=1,nxmaxn=361,nymaxn=181
! nxmax,nymax maximum dimension of wind fields in x and y
! direction, respectively
! nuvzmax,nwzmax maximum dimension of (u,v) and (w) wind fields in z
! direction (for fields on eta levels)
! nzmax maximum dimension of wind fields in z direction
! for the transformed Cartesian coordinates
! nxshift for global grids (in x), the grid can be shifted by
! nxshift grid points, in order to accomodate nested
! grids, and output grids overlapping the domain "boundary"
! nxshift must not be negative; "normal" setting would be 0
end module wind_mod
......@@ -194,10 +194,11 @@ contains
!************************************************************
if (dep_prec==dp) then
mp_cp = MPI_REAL8
if (lroot) write(*,*) 'Using double precision for deposition fields'
! TODO: write info message for serial version as well
if (lroot.and.verbosity>0) write(*,*) 'Using double precision for deposition fields'
else if (dep_prec==sp) then
mp_cp = MPI_REAL4
if (lroot) write(*,*) 'Using single precision for deposition fields'
if (lroot.and.verbosity>0) write(*,*) 'Using single precision for deposition fields'
else
write(*,*) 'ERROR: something went wrong setting MPI real precision'
stop
......
......@@ -27,12 +27,17 @@
! *
! 1997 *
! *
! Last update 15 August 2013 IP *
! Update 15 August 2013 IP *
! *
! ESO 2016: *
! GFS specific parameters moved to gfs_mod.f90 *
! ECMWF specific parameters moved to ecmwf_mod.f90 *
! *
!*******************************************************************************
module par_mod
!************************************************************************
! wind_mod: is gfs_mod.f90 for target gfs, ecmwf_mod.f90 for target ecmwf
!************************************************************************
use wind_mod
......@@ -134,52 +139,16 @@ module par_mod
! Maximum dimensions of the input mother grids
!*********************************************
! nxmax,nymax,nuvzmax,nwzmax,nzmax:
! Moved to ecmwf.f90 (for ECMWF) / gfs.f90 (GFS)
! Moved to ecmwf_mod.f90 (for ECMWF) / gfs_mod.f90 (for GFS)
!integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92 !FNL XF
!integer,parameter :: nxmax=361,nymax=181,nuvzmax=152,nwzmax=152,nzmax=152 !ECMWF new
!integer,parameter :: nxmax=361,nymax=181,nuvzmax=92,nwzmax=92,nzmax=92 !ECMWF
!integer,parameter :: nxmax=721,nymax=361,nuvzmax=64,nwzmax=64,nzmax=64
! integer,parameter :: nxshift=359 ! for ECMWF
!integer,parameter :: nxshift=0 ! for GFS or FNL
integer,parameter :: nconvlevmax = nuvzmax-1
integer,parameter :: na = nconvlevmax+1
! moved to gfs_mod.f90 / ecmwf_mod.f90
!
! nxmax,nymax maximum dimension of wind fields in x and y
! direction, respectively
! nuvzmax,nwzmax maximum dimension of (u,v) and (w) wind fields in z
! direction (for fields on eta levels)
! nzmax maximum dimension of wind fields in z direction
! for the transformed Cartesian coordinates
! nxshift for global grids (in x), the grid can be shifted by
! nxshift grid points, in order to accomodate nested
! grids, and output grids overlapping the domain "boundary"
! nxshift must not be negative; "normal" setting would be 0
! ntracermax maximum number of tracer species in convection
! nconvlevmax maximum number of levels for convection
! na parameter used in Emanuel's convect subroutine
!*********************************************
! Maximum dimensions of the nested input grids
!*********************************************
!integer,parameter :: maxnests=0, nxmaxn=0, nymaxn=0
!integer,parameter :: maxnests=0,nxmaxn=351,nymaxn=351 !ECMWF
!integer,parameter :: maxnests=1, nxmaxn=201, nymaxn=161 ! FNL XF
! maxnests maximum number of nested grids
! nxmaxn,nymaxn maximum dimension of nested wind fields in
! x and y direction, respectively
!*********************************
! Parmaters for GRIB file decoding
!*********************************
......@@ -216,7 +185,7 @@ module par_mod
! Maximum number of particles, species, and similar
!**************************************************
integer,parameter :: maxpart=40000000
integer,parameter :: maxpart=10000
integer,parameter :: maxspec=1
real,parameter :: minmass=0.0001
......
......@@ -227,39 +227,42 @@ subroutine timemanager
if (mp_measure_time.and..not.(lmpreader.and.lmp_use_reader)) call mpif_mtime('getfields',0)
! Two approaches to MPI getfields is implemented:
! Version 1 (lmp_sync=.true.) uses a read-ahead process where send/recv is done
! in sync at start of each new field time interval
!
! Version 2 (lmp_sync=.false.) is for holding three fields in memory. Uses a
! read-ahead process where sending/receiving of the 3rd fields is done in
! the background in parallel with performing computations with fields 1&2
!********************************************************************************
if (lmp_sync.and.lmp_use_reader.and.memstat.gt.0) then
call mpif_gf_send_vars(memstat)
if (numbnests>0) call mpif_gf_send_vars_nest(memstat)
! Version 2 (lmp_sync=.false., see below) is also used whenever 2 new fields are
! Version 2 (lmp_sync=.false.) is also used whenever 2 new fields are
! read (as at first time step), in which case async send/recv is impossible.
else if (.not.lmp_sync.and.lmp_use_reader.and.memstat.ge.32) then
call mpif_gf_send_vars(memstat)
if (numbnests>0) call mpif_gf_send_vars_nest(memstat)
end if
! Version 2 (lmp_sync=.false.) is for holding three fields in memory. Uses a
! read-ahead process where sending/receiving of the 3rd fields is done in
! the background in parallel with performing computations with fields 1&2
!********************************************************************************
if (.not.lmp_sync) then
! READER PROCESS:
! Reader process:
if (memstat.gt.0..and.memstat.lt.32.and.lmp_use_reader.and.lmpreader) then
if (mp_dev_mode) write(*,*) 'Reader process: calling mpif_gf_send_vars_async'
call mpif_gf_send_vars_async(memstat)
end if
! COMPLETION CHECK:
! Completion check:
! Issued at start of each new field period.
if (memstat.ne.0.and.memstat.lt.32.and.lmp_use_reader) then
call mpif_gf_request
end if
! RECVEIVING PROCESS(ES):
! eso TODO: at this point we do not know if clwc/ciwc will be available
! at next time step. Issue receive request anyway, cancel at mpif_gf_request
! Recveiving process(es):
! eso TODO: at this point we do not know if clwc/ciwc will be available
! at next time step. Issue receive request anyway, cancel at mpif_gf_request
if (memstat.gt.0.and.lmp_use_reader.and..not.lmpreader) then
if (mp_dev_mode) write(*,*) 'Receiving process: calling mpif_gf_send_vars_async. PID: ', mp_pid
call mpif_gf_recv_vars_async(memstat)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment