Skip to content

Commit

Permalink
Changes made by M Longo, R Knox, A Swann, and N Levine
Browse files Browse the repository at this point in the history
BRAMS
- Several bug fixes in static control for Grell cumulus' parameterization
- Added option QI for dynamic control, which is just an average between 
     Arakawa-Schubert and Kain-Fritsch.

ED
Drought phenology:
- Changes in the order in which plants burn carbon in drought phenology.
     If phenology_status = -1, then they first lose leaves, not storage. 
     If phenology_status=0 or 1, then they burn storage before they start
     losing living tissues.
- Maximum light photosynthesis is done using the top cohort that has 
     leaves, not the top cohort that is resolvable. They are synonyms 
     when IBRANCH_THERMO is 0, but not when it is 1 or 2.

Mortality:
- Use the log of population density when we apply mortality rates 
     (dN/dt = -m*N, so the linear form is d lnN/dt = -m). 
- Added mortality due to disturbance as a 5th mortality rate in cpatch%mort.
     This is never applied to the cohorts, it is for diagnostics only.
- Reverted the density-dependent mortality rate coefficients back to 
     Moorcroft et al. (2001) numbers. Sapwood cannot be depleted when 
     plants go to negative carbon balance, which is in line with 
     Moorcroft et al. (2001).
- DDMORT_CONST: new variable in ED2IN. If it is 1, then density-dependent
     mortality rate is the ED default (CBR = CB/CB_lightMax). If it is 
     zero, CBR = CB/CB_smoistMax, and any number between 0 and 1 will do
     a weighted average. 
- IDDMORT_SCHEME. 0 is the default ED, 1 means that carbon balance is 
     offset by storage (to give more chances for drought deciduous)

New diagnostic variables:
- cpatch%recruit_status, to make comparison with census data easier. 
     0 means that the cohort is still small, 1 means new recruit 
     (first time with DBH > 10cm), and 2 means established (2nd+ time with
     DBH > 10cm). 
- Saved the change in log of DBH/AGB/BA, which is more comparable to 
     Condit et al. (2006) growth rates.

Big leaf:
- Added biomass init. option for big leaf ED so we can use biometric data. 
- Replaced dbh_crit by dbh_bigleaf when we run bigleaf, which makes AGB and
     LAI closer to obs. 
- Photosynthetic parameters re-tuned for big leaf agains Manaus data
*** Big-leaf ED now looks good (bug free) for the tropics and gives 
reasonable results when run with either iallom=1 or iallom=2 without fire***

Soil:
- Small changes in ISOILBC. 0 (bedrock) and 1 (free vertical drainage) are 
     the exact same options. 2 became "lateral" drainage (which is just
     free drainage reduced by a slope coefficient, defined by SLDRAIN). 
     3 is the aquifer. I removed "super drainage" and the field capacity 
     options since they were just old tests. 
- "New" decomposition scheme, which is actually based on the original ED-1.0
     formulation. I used the shape of ED-1.0 functions but wrote a 
     exponential based one to sqrt of negative numbers. The new scheme 
     works with DECOMP_SCHEME=2, other options stayed the same.
- For DECOMP_SCHEME=2 only, I changed the turnover rate of slow carbon, 
     which was non-sense (100.2 /yr). I switched by 0.2/yr, which is more
     typical of the slow pools from CENTURY model. The decay rates were 
     renamed from K1, K2, K3 to something more intuitive (decay_rate_fsc,
     decay_rate_stsc, decay_rate_ssc)
- New diagnostic variable: heterotrophic respiration from CWD. The 
     instantaneous value already existed, now it saves all the dmean, 
     qmean, avg stuff. 

Other:
- Added a new fire model that is entirely independent of soil moisture, 
     the threshold is given by accumulated water deficit (INCLUDE_FIRE=3). 
- Small correction in selective logging, there was a bogus 0.5 factor due to
     a mistake in the derivation. Also changed the weight for plants so it 
     related to basal area (this should only affect simulations using 
     SimAmazonia2, which has information about logged area, but no target biomass).
  • Loading branch information
LevineLab committed Sep 4, 2012
2 parents 457dce8 + 0be7a65 commit 8fdf0d7
Show file tree
Hide file tree
Showing 194 changed files with 31,395 additions and 7,351 deletions.
4,809 changes: 4,809 additions & 0 deletions .bzrignore

Large diffs are not rendered by default.

278 changes: 174 additions & 104 deletions BRAMS/Template/RAMSIN

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions BRAMS/Template/callopenmpi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#module add hpc/hdf5-intel

#------------------------------- CHANGE YOUR SETTINGS HERE. -------------------------------#
here=`pwd` # Folder to start the run
brams=${here}'/edbrams' # Executable
here='thispath' # Folder to start the run
brams=${here}'/edbrams' # Executable
logfile=${here}'/out.out' # Log file
errfile=${here}'/out.err' # MPI error file
mpirun='mpirun'
Expand Down
12 changes: 7 additions & 5 deletions BRAMS/Template/orun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ numcore=60 # Number of cores



#----- Getting the number of nodes from prompt if given... --------------------------------#

#----- Get the number of nodes from prompt if given... ------------------------------------#
if [ 'x'${1} != 'x' ]
then
numcore=${1}
Expand All @@ -30,7 +31,8 @@ fi


#------------------------------------------------------------------------------------------#
# Define the number of hosts. This is to avoid dumping 8 jobs on moorcrofth... #
# Check whether to spread cores to as few nodes as possible or go for first come first #
# serve... #
#------------------------------------------------------------------------------------------#
if [ ${nodespread} == 'yes' ]
then
Expand Down Expand Up @@ -72,7 +74,7 @@ fi



#----- Erasing old logfiles and joblogs ---------------------------------------------------#
#----- Erase old logfiles and joblogs -----------------------------------------------------#
if [ -s ${joblog} ]
then
rm -fv ${joblog}
Expand All @@ -82,7 +84,7 @@ fi



#----- Checking whether this is a MAKEVFILE/MAKESFC run or an actual run ------------------#
#----- Check whether this is a MAKEVFILE/MAKESFC run or an actual run ---------------------#
makevfile=`grep "'MAKEVFILE'," ${namelist} | wc -l`
makesfc=`grep "'MAKESFC'," ${namelist} | wc -l`
preponly=`expr ${makevfile} + ${makesfc}`
Expand All @@ -109,7 +111,7 @@ fi



#----- Changing the output filename to change for different processors --------------------#
#----- Change the output filename to change for different processors. ---------------------#
if [ ${numcore} -lt 10 ]
then
joblog=`dirname ${joblog}`'/00'${numcore}'_'`basename ${joblog}`
Expand Down
9 changes: 8 additions & 1 deletion BRAMS/Template/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
here=`pwd` # Local disk
moi=`whoami` # User name
diskthere='/n/moorcroftfs2' # Output directory
queue='camd' # Queue to be used
queue='moorcroft_6100b' # Queue to be used
whena='01-01-2008 00:00' # Initial time for simulation
whenz='01-01-2009 00:00' # Final time for simulation
isfcl=5 # 1 = LEAF-3 run, 5 = ED-2.2 run
Expand Down Expand Up @@ -158,6 +158,13 @@ sed -i s@thisjob@${thissim}@g ${here}/orun.sh
#------------------------------------------------------------------------------------------#


#----- Replace some flags in callopenmpi.sh. ----------------------------------------------#
sed -i s@thispath@${here}@g ${here}/callopenmpi.sh
sed -i s@thisqueue@${queue}@g ${here}/callopenmpi.sh
sed -i s@thisjob@${thissim}@g ${here}/callopenmpi.sh
#------------------------------------------------------------------------------------------#


#----- Replace some flags in purge.sh -----------------------------------------------------#
sed -i s@myoutpath@${there}@g ${here}/purge.sh
#------------------------------------------------------------------------------------------#
Expand Down
25 changes: 13 additions & 12 deletions BRAMS/Template/tothere/rpost/1eachtime-sigma.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@
#------------------------------------------------------------------------------------------#
# CHANGE LOG #
#------------------------------------------------------------------------------------------#
ramspost='/n/moorcroftfs2/mlongo/EDBRAMS/coupled/monotonic-test/rpost/ramspost_6.2' # Name of executable file
tmpfolder='/n/moorcroftfs2/mlongo/EDBRAMS/coupled/monotonic-test/rpost/.temp' # Name of a timestrrary folder
nice='' # Command to "nice" the job. Put nothing if you don't want
# to be nice
runoutput='/n/moorcroftfs2/mlongo/EDBRAMS/coupled/monotonic-test/rpost/ramspost.out' # Name of a renewable output file
compression='none' # Kind of compression:(Z, bz2, zip, gz, or none)
title='EDBRAMS-1.4' # Title to appear in the header
# (no practical relevance)
deleteintctl='y' # Delete intermediate ctl [y/N]
# (a template will be provided)
outshell='y'
shellout='/n/moorcroftfs2/mlongo/EDBRAMS/coupled/monotonic-test/rpost/serial_out.out' # File for 1eachtime-sigma.sh output
ramspost='myoutpath/rpost/ramspost_6.2' # Name of executable file
tmpfolder='myoutpath/rpost/.temp' # Name of a timestrrary folder
nice='' # Command to "nice" the job. Put nothing
# if you don't want to be nice
runoutput='myoutpath/rpost/ramspost.out' # Name of a renewable output file
compression='none' # Kind of compression:
# (Z, bz2, zip, gz, or none)
title='EDBRAMS-1.4' # Title to appear in the header
# (no practical relevance)
deleteintctl='y' # Delete intermediate ctl [y/N]
# (a template will be provided)
outshell='y' # Create an output file for shell
shellout='myoutpath/rpost/serial_out.out' # File for 1eachtime-sigma.sh output

#------------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------------#
Expand Down
2 changes: 1 addition & 1 deletion BRAMS/build/bin/2ndcomp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ rm -fv decomp_coms.o decomp_coms.mod
rm -fv detailed_coms.o detailed_coms.mod
rm -fv disturb_coms.o disturb_coms.mod
rm -fv disturbance.o disturbance.mod
rm -fv ed_bare_restart.o ed_bare_restart.mod
rm -fv ed_bigleaf_init.o ed_bigleaf_init.mod
rm -fv ed_filelist.o ed_filelist.mod
rm -fv ed_grid.o ed_grid.mod
rm -fv ed_init.o ed_init.mod
Expand Down
6 changes: 4 additions & 2 deletions BRAMS/build/bin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ FPP_COMMAND = $(F_COMP) -c -DUSE_INTERF=$(USE_INTERF) -DUSENC=$(USENC) -D$(CMAC
CXX_COMMAND = $(C_COMP) -c $(C_OPTS) -D$(CMACH) $(INCLUDES) $(PAR_DEFS)

#----- Define archive and executable names. -----------------------------------------------#
EXE=$(BASE)/edbrams-$(OPT)
LIBMODEL=$(BASE)/edbrams-$(OPT).a
# EXE=$(BASE)/edbrams-$(OPT)
# LIBMODEL=$(BASE)/edbrams-$(OPT).a
EXE=$(BASE)/edbrams-opt
LIBMODEL=$(BASE)/edbrams-opt.a

include objects.mk

Expand Down
32 changes: 17 additions & 15 deletions BRAMS/build/bin/dependency.mk
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ shcu_vars_const.o: conv_coms.mod grid_dims.mod
souza_cupar_driver.o: conv_coms.mod mem_basic.mod mem_cuparm.mod mem_grid.mod
souza_cupar_driver.o: mem_micro.mod mem_scratch.mod mem_tend.mod mem_turb.mod
souza_cupar_driver.o: node_mod.mod shcu_vars_const.mod therm_lib.mod
~grell_cupar_static.o: grid_dims.mod mem_ensemble.mod mem_scratch_grell.mod
~grell_cupar_static.o: rconstants.mod therm_lib.mod
edcp_driver.o: consts_coms.mod ed_misc_coms.mod ed_node_coms.mod
edcp_driver.o: ed_state_vars.mod ed_work_vars.mod grid_coms.mod io_params.mod
edcp_driver.o: leaf_coms.mod mem_edcp.mod mem_grid.mod mem_leaf.mod
Expand Down Expand Up @@ -447,14 +445,14 @@ bdf2_solver.o: consts_coms.mod ed_misc_coms.mod ed_state_vars.mod
bdf2_solver.o: ed_therm_lib.mod grid_coms.mod rk4_coms.mod soil_coms.mod
bdf2_solver.o: therm_lib8.mod
canopy_struct_dynamics.o: allometry.mod canopy_air_coms.mod
canopy_struct_dynamics.o: canopy_layer_coms.mod consts_coms.mod
canopy_struct_dynamics.o: canopy_layer_coms.mod consts_coms.mod ed_misc_coms.mod
canopy_struct_dynamics.o: ed_state_vars.mod grid_coms.mod met_driver_coms.mod
canopy_struct_dynamics.o: pft_coms.mod phenology_coms.mod physiology_coms.mod
canopy_struct_dynamics.o: rk4_coms.mod soil_coms.mod therm_lib.mod
disturbance.o: allometry.mod consts_coms.mod decomp_coms.mod disturb_coms.mod
disturbance.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod
disturbance.o: ed_therm_lib.mod fuse_fiss_utils.mod grid_coms.mod
disturbance.o: mem_polygons.mod pft_coms.mod phenology_aux.mod
disturbance.o: mem_polygons.mod mortality.mod pft_coms.mod phenology_aux.mod
disturbance.o: phenology_coms.mod
euler_driver.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod
euler_driver.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod
Expand All @@ -466,13 +464,14 @@ events.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod
events.o: fuse_fiss_utils.mod grid_coms.mod pft_coms.mod therm_lib.mod
farq_leuning.o: c34constants.mod consts_coms.mod pft_coms.mod phenology_coms.mod
farq_leuning.o: physiology_coms.mod rk4_coms.mod therm_lib8.mod
fire.o: allometry.mod consts_coms.mod disturb_coms.mod ed_misc_coms.mod
fire.o: ed_state_vars.mod grid_coms.mod soil_coms.mod
forestry.o: allometry.mod disturb_coms.mod disturbance_utils.mod ed_max_dims.mod
fire.o: consts_coms.mod disturb_coms.mod ed_misc_coms.mod ed_state_vars.mod
fire.o: grid_coms.mod soil_coms.mod
forestry.o: disturb_coms.mod disturbance_utils.mod ed_max_dims.mod
forestry.o: ed_misc_coms.mod ed_state_vars.mod fuse_fiss_utils.mod grid_coms.mod
growth_balive.o: allometry.mod consts_coms.mod decomp_coms.mod ed_max_dims.mod
growth_balive.o: ed_misc_coms.mod ed_state_vars.mod ed_therm_lib.mod
growth_balive.o: grid_coms.mod mortality.mod pft_coms.mod physiology_coms.mod
growth_balive.o: fuse_fiss_utils.mod grid_coms.mod mortality.mod pft_coms.mod
growth_balive.o: phenology_coms.mod physiology_coms.mod
heun_driver.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod
heun_driver.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod
heun_driver.o: hydrology_coms.mod met_driver_coms.mod rk4_coms.mod
Expand All @@ -499,7 +498,7 @@ phenology_driv.o: phenology_coms.mod soil_coms.mod
photosyn_driv.o: allometry.mod consts_coms.mod ed_max_dims.mod ed_misc_coms.mod
photosyn_driv.o: ed_state_vars.mod farq_leuning.mod met_driver_coms.mod
photosyn_driv.o: pft_coms.mod phenology_coms.mod physiology_coms.mod
photosyn_driv.o: soil_coms.mod
photosyn_driv.o: soil_coms.mod therm_lib.mod
radiate_driver.o: allometry.mod canopy_layer_coms.mod canopy_radiation_coms.mod
radiate_driver.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod
radiate_driver.o: ed_state_vars.mod grid_coms.mod soil_coms.mod
Expand All @@ -526,13 +525,17 @@ soil_respiration.o: consts_coms.mod decomp_coms.mod ed_state_vars.mod
soil_respiration.o: farq_leuning.mod pft_coms.mod physiology_coms.mod
soil_respiration.o: rk4_coms.mod soil_coms.mod
structural_growth.o: allometry.mod consts_coms.mod decomp_coms.mod
structural_growth.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod
structural_growth.o: ed_therm_lib.mod pft_coms.mod
structural_growth.o: detailed_coms.mod ed_max_dims.mod ed_misc_coms.mod
structural_growth.o: ed_state_vars.mod ed_therm_lib.mod pft_coms.mod
structural_growth.o: physiology_coms.mod
twostream_rad.o: canopy_radiation_coms.mod consts_coms.mod ed_max_dims.mod
twostream_rad.o: rk4_coms.mod
vegetation_dynamics.o: consts_coms.mod disturbance_utils.mod ed_misc_coms.mod
vegetation_dynamics.o: ed_state_vars.mod fuse_fiss_utils.mod grid_coms.mod
vegetation_dynamics.o: growth_balive.mod mem_polygons.mod
ed_bigleaf_init.o: allometry.mod consts_coms.mod ed_max_dims.mod
ed_bigleaf_init.o: ed_misc_coms.mod ed_node_coms.mod ed_state_vars.mod
ed_bigleaf_init.o: fuse_fiss_utils.mod pft_coms.mod
ed_init.o: consts_coms.mod ed_max_dims.mod ed_misc_coms.mod ed_node_coms.mod
ed_init.o: ed_state_vars.mod ed_work_vars.mod grid_coms.mod mem_polygons.mod
ed_init.o: phenology_coms.mod phenology_startup.mod rk4_coms.mod soil_coms.mod
Expand Down Expand Up @@ -649,10 +652,9 @@ budget_utils.o: therm_lib.mod
dateutils.o: consts_coms.mod
ed_filelist.o: ed_max_dims.mod
ed_grid.o: consts_coms.mod ed_max_dims.mod ed_node_coms.mod grid_coms.mod
ed_therm_lib.o: allometry.mod canopy_air_coms.mod consts_coms.mod
ed_therm_lib.o: ed_max_dims.mod ed_misc_coms.mod ed_state_vars.mod grid_coms.mod
ed_therm_lib.o: pft_coms.mod rk4_coms.mod soil_coms.mod therm_lib.mod
ed_therm_lib.o: therm_lib8.mod
ed_therm_lib.o: canopy_air_coms.mod consts_coms.mod ed_max_dims.mod
ed_therm_lib.o: ed_misc_coms.mod ed_state_vars.mod grid_coms.mod pft_coms.mod
ed_therm_lib.o: rk4_coms.mod soil_coms.mod therm_lib.mod therm_lib8.mod
fatal_error.o: ed_node_coms.mod
fuse_fiss_utils.o: allometry.mod canopy_layer_coms.mod decomp_coms.mod
fuse_fiss_utils.o: disturb_coms.mod ed_max_dims.mod ed_misc_coms.mod
Expand Down
9 changes: 4 additions & 5 deletions BRAMS/build/bin/include.mk.opt.odyssey
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ HDF4_LIBS=-lmfhdf -ldf -lz -ljpeg
# library files. Make sure you include the zlib.a location too.
USE_HDF5=1
HDF5_INCS=
HDF5_LIBS=-lhdf5_fortran -lhdf5 -lhdf5_hl -lz -l,
HDF5_LIBS=-lhdf5_fortran -lhdf5 -lhdf5_hl -lz -lm
#HDF5_INCS=
#HDF5_LIBS=-L/n/sw/hdf5-1.8.5_intel-11.1.072/ -lhdf5 -lm -lhdf5_fortran -lhdf5 -lhdf5_hl -lz
# MPI_Wtime. ---------------------------------------------------
Expand Down Expand Up @@ -301,11 +301,10 @@ ifeq ($(KIND_COMP),D)
endif
ifeq ($(KIND_COMP),E)
USE_INTERF=1
F_OPTS= -FR -O3 -recursive -traceback -assume byterecl -static -axP \
-openmp
F_OPTS= -FR -O3 -recursive -unroll -traceback
C_OPTS= -O3 -DLITTLE -traceback
LOADER_OPTS= -FR -O3 -traceback -assume byterecl -unroll -axP -openmp
C_LOADER_OPTS=-v -traceback
LOADER_OPTS= -FR -O3 -unroll -traceback
C_LOADER_OPTS=-v
#---------------------------------------------------------------------------------------#
endif
#------------------------------------------------------------------------------------------#
Expand Down
1 change: 1 addition & 0 deletions BRAMS/build/bin/objects.mk
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ OBJ_MODEL = \
decomp_coms.o \
disturb_coms.o \
disturbance.o \
ed_bigleaf_init.o \
ed_filelist.o \
ed_grid.o \
ed_init_full_history.o \
Expand Down
5 changes: 5 additions & 0 deletions BRAMS/build/bin/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,11 @@ disturbance.o : $(ED_DYNAMICS)/disturbance.f90
$(F90_COMMAND) $(<F:.f90=.f90)
rm -f $(<F:.f90=.f90)

ed_bigleaf_init.o : $(ED_INIT)/ed_bigleaf_init.f90
cp -f $< $(<F:.f90=.f90)
$(F90_COMMAND) $(<F:.f90=.f90)
rm -f $(<F:.f90=.f90)

ed_driver.o : $(ED_DRIVER)/ed_driver.f90
cp -f $< $(<F:.f90=.f90)
$(F90_COMMAND) $(<F:.f90=.f90)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ rm -fv decomp_coms.?90 decomp_coms.o decomp_coms.mod
rm -fv detailed_coms.?90 detailed_coms.o detailed_coms.mod
rm -fv disturb_coms.?90 disturb_coms.o disturb_coms.mod
rm -fv disturbance.?90 disturbance.o disturbance.mod
rm -fv ed_bare_restart.?90 ed_bare_restart.o ed_bare_restart.mod
rm -fv ed_bigleaf_init.?90 ed_bigleaf_init.o ed_bigleaf_init.mod
rm -fv ed_filelist.?90 ed_filelist.o ed_filelist.mod
rm -fv ed_grid.?90 ed_grid.o ed_grid.mod
rm -fv ed_init.?90 ed_init.o ed_init.mod
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 8fdf0d7

Please sign in to comment.