From 8c136d12f8ca251f6a8a727f90a910200130d126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Am=C3=A9lie=20Bouchat?= Date: Tue, 9 Jul 2019 13:07:07 -0400 Subject: [PATCH 1/3] Initialize revp stresses to previous time step --- cicecore/cicedynB/dynamics/ice_dyn_shared.F90 | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/cicecore/cicedynB/dynamics/ice_dyn_shared.F90 b/cicecore/cicedynB/dynamics/ice_dyn_shared.F90 index 4c479171e..8360e9c97 100644 --- a/cicecore/cicedynB/dynamics/ice_dyn_shared.F90 +++ b/cicecore/cicedynB/dynamics/ice_dyn_shared.F90 @@ -503,7 +503,7 @@ subroutine dyn_prep2 (nx_block, ny_block, & taubx (i,j) = c0 tauby (i,j) = c0 - if (revp==1) then ! revised evp + if (icetmask(i,j)==0) then stressp_1 (i,j) = c0 stressp_2 (i,j) = c0 stressp_3 (i,j) = c0 @@ -516,20 +516,7 @@ subroutine dyn_prep2 (nx_block, ny_block, & stress12_2(i,j) = c0 stress12_3(i,j) = c0 stress12_4(i,j) = c0 - else if (icetmask(i,j)==0) then ! classic evp - stressp_1 (i,j) = c0 - stressp_2 (i,j) = c0 - stressp_3 (i,j) = c0 - stressp_4 (i,j) = c0 - stressm_1 (i,j) = c0 - stressm_2 (i,j) = c0 - stressm_3 (i,j) = c0 - stressm_4 (i,j) = c0 - stress12_1(i,j) = c0 - stress12_2(i,j) = c0 - stress12_3(i,j) = c0 - stress12_4(i,j) = c0 - endif ! revp + endif enddo ! i enddo ! j From d0246cc05284d92186fcc9aa81d5610689c88651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Am=C3=A9lie=20Bouchat?= Date: Mon, 5 Aug 2019 16:09:09 +0000 Subject: [PATCH 2/3] Add machine files for brooks --- configuration/scripts/cice.batch.csh | 8 ++ configuration/scripts/cice.launch.csh | 12 +++ .../scripts/machines/Macros.brooks_intel | 78 +++++++++++++++++++ .../scripts/machines/env.brooks_intel | 25 ++++++ 4 files changed, 123 insertions(+) create mode 100644 configuration/scripts/machines/Macros.brooks_intel create mode 100644 configuration/scripts/machines/env.brooks_intel diff --git a/configuration/scripts/cice.batch.csh b/configuration/scripts/cice.batch.csh index 0417c43a3..c1eb4bf72 100755 --- a/configuration/scripts/cice.batch.csh +++ b/configuration/scripts/cice.batch.csh @@ -165,6 +165,14 @@ cat >> ${jobfile} << EOFB #SBATCH --qos=standby EOFB +else if (${ICE_MACHINE} =~ brooks*) then +cat >> ${jobfile} << EOFB +#PBS -N ${ICE_CASENAME} +#PBS -j oe +#PBS -l select=${nnodes}:ncpus=${corespernode}:mpiprocs=${taskpernodelimit}:ompthreads=${nthrds} +#PBS -l walltime=${batchtime} +EOFB + else if (${ICE_MACHINE} =~ theia*) then cat >> ${jobfile} << EOFB #SBATCH -J ${ICE_CASENAME} diff --git a/configuration/scripts/cice.launch.csh b/configuration/scripts/cice.launch.csh index ce328f2a6..77e237683 100755 --- a/configuration/scripts/cice.launch.csh +++ b/configuration/scripts/cice.launch.csh @@ -153,6 +153,18 @@ mpirun -np ${ntasks} ./cice >&! \$ICE_RUNLOG_FILE EOFR endif +#======= +else if (${ICE_MACHINE} =~ brooks*) then +if (${ICE_COMMDIR} =~ serial*) then +cat >> ${jobfile} << EOFR +./cice >&! \$ICE_RUNLOG_FILE +EOFR +else +cat >> ${jobfile} << EOFR +aprun -n ${ntasks} -N ${taskpernodelimit} -d ${nthrds} ./cice >&! \$ICE_RUNLOG_FILE +EOFR +endif + #======= else if (${ICE_MACHINE} =~ theia*) then cat >> ${jobfile} << EOFR diff --git a/configuration/scripts/machines/Macros.brooks_intel b/configuration/scripts/machines/Macros.brooks_intel new file mode 100644 index 000000000..5bd725143 --- /dev/null +++ b/configuration/scripts/machines/Macros.brooks_intel @@ -0,0 +1,78 @@ +#============================================================================== +# Makefile macros for ECCC brooks +#============================================================================== +# For use with intel compiler +#============================================================================== + +CPP := fpp +CPPDEFS := -DFORTRANUNDERSCORE ${ICE_CPPDEFS} +CFLAGS := -c -O2 -fp-model precise +#-xHost + +FIXEDFLAGS := -132 +FREEFLAGS := -FR +FFLAGS := -fp-model source -convert big_endian -assume byterecl -ftz -traceback -diag-disable 5140 +#-xHost +FFLAGS_NOOPT:= -O0 + +ifeq ($(ICE_BLDDEBUG), true) + FFLAGS += -O0 -g -check -fpe0 -ftrapuv -fp-model except -check noarg_temp_created +# -heap-arrays 1024 +else + FFLAGS += -O2 +endif + +SCC := cc +SFC := ftn +MPICC := cc +MPIFC := ftn + +ifeq ($(ICE_COMMDIR), mpi) + FC := $(MPIFC) + CC := $(MPICC) +else + FC := $(SFC) + CC := $(SCC) +endif +LD:= $(FC) + +#NETCDF_PATH := /fs/ssm/hpco/tmp/eccc/201402/04/intel-2016.1.150/ubuntu-14.04-amd64-64/ + +PIO_CONFIG_OPTS:= --enable-filesystem-hints=gpfs + +#PNETCDF_PATH := $(PNETCDF) +#PNETCDF_PATH := /glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/lib + +INCLDIR := $(INCLDIR) + +LIB_NETCDF := $(NETCDF_PATH)/lib +LIB_PNETCDF := $(PNETCDF_PATH)/lib +LIB_MPI := $(IMPILIBDIR) + +#SLIBS := -L$(LIB_NETCDF) -lnetcdff -lnetcdf -L$(LIB_PNETCDF) -lpnetcdf -lgptl +#SLIBS := -L$(LIB_NETCDF) -lnetcdff -lnetcdf + +ifeq ($(ICE_IOTYPE), netcdf) + INCLDIR += $(shell nf-config --fflags) + SLIBS := $(shell nf-config --flibs) +endif + + +ifeq ($(ICE_THREADED), true) + LDFLAGS += -qopenmp + CFLAGS += -qopenmp + FFLAGS += -qopenmp +endif + +### if using parallel I/O, load all 3 libraries. PIO must be first! +ifeq ($(IO_TYPE), pio) + PIO_PATH:=/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/lib + INCLDIR += -I/glade/u/apps/ch/opt/pio/2.2/mpt/2.15f/intel/17.0.1/include + SLIBS := $(SLIBS) -L$(PIO_PATH) -lpiof + + CPPDEFS := $(CPPDEFS) -Dncdf +endif + +ifeq ($(IO_TYPE), netcdf) + CPPDEFS := $(CPPDEFS) -Dncdf +endif diff --git a/configuration/scripts/machines/env.brooks_intel b/configuration/scripts/machines/env.brooks_intel new file mode 100644 index 000000000..a2e915aaa --- /dev/null +++ b/configuration/scripts/machines/env.brooks_intel @@ -0,0 +1,25 @@ +#!/bin/csh -f + +source /opt/modules/default/init/csh +module load PrgEnv-intel # Intel compiler +module load cray-mpich # MPI (Cray MPICH) +module load cray-netcdf # NetCDF +module load cray-hdf5 # HDF5 + +setenv ICE_MACHINE_ENVNAME brooks +setenv ICE_MACHINE_COMPILER intel +setenv ICE_MACHINE_MAKE make +setenv ICE_MACHINE_WKDIR ~/data/brooks/cice/runs +setenv ICE_MACHINE_INPUTDATA /home/ords/cmdd/cmde/phb001/ +setenv ICE_MACHINE_BASELINE ~/data/brooks/cice/baselines +setenv ICE_MACHINE_SUBMIT "qsub" +setenv ICE_MACHINE_TPNODE 36 +setenv ICE_MACHINE_ACCT P0000000 +setenv ICE_MACHINE_QUEUE "development" +setenv ICE_MACHINE_BLDTHRDS 4 +setenv ICE_MACHINE_QSTAT "qstat " + +if (-e ~/.cice_proj) then + set account_name = `head -1 ~/.cice_proj` + setenv CICE_ACCT ${account_name} +endif From f6bab6eab309481c9c8cd3df08b94c0b64451940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Am=C3=A9lie=20Bouchat?= Date: Wed, 7 Aug 2019 18:12:56 +0000 Subject: [PATCH 3/3] Modify the documentation about stress initialization in revised evp --- doc/source/science_guide/sg_dynamics.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/science_guide/sg_dynamics.rst b/doc/source/science_guide/sg_dynamics.rst index c219efb44..8117fd58d 100644 --- a/doc/source/science_guide/sg_dynamics.rst +++ b/doc/source/science_guide/sg_dynamics.rst @@ -557,7 +557,7 @@ Introducing another numerical parameter :math:`\alpha=2T \Delta t_e ^{-1}` :cite where as opposed to the classic EVP, the second term in each equation is at iteration :math:`k` :cite:`Bouillon13`. Also, as opposed to the classic EVP, :math:`\Delta t_e` times the number of subcycles (or iterations) does not need to be equal to the advective time step :math:`\Delta t`. -A last difference between the classic EVP and the revised approach is that the latter one initializes the stresses to 0 at the beginning of each time step, -while the classic EVP approach uses the previous time level value. The revised EVP is activated by setting the namelist parameter `revised\_evp` = true. +Finally, as with the classic EVP approach, the stresses are initialized using the previous time level values. +The revised EVP is activated by setting the namelist parameter `revised\_evp` = true. In the code :math:`\alpha = arlx` and :math:`\beta = brlx`. The values of :math:`arlx` and :math:`brlx` can be set in the namelist. It is recommended to use large values of these parameters and to set :math:`arlx=brlx` :cite:`Kimmritz15`.