Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
460e36c
Adding glacier code to NHM. Riparian code is made in duplicate execut…
ashleymedin Jun 21, 2019
c0f2c54
Rest of merge modules.
ashleymedin Jun 22, 2019
759e319
Makefiles
ashleymedin Jun 22, 2019
1221ebe
git ignore
ashleymedin Jun 22, 2019
9ec1487
makelist
ashleymedin Jun 22, 2019
212e858
Merge branch 'develop' of https://github.com/ashleymedin/prms into de…
ashleymedin Jun 22, 2019
8224c27
don't track makelist
ashleymedin Jun 22, 2019
5524a83
debugging merge
ashleymedin Jun 22, 2019
84b1a0f
makelist back in
ashleymedin Jun 22, 2019
995c611
fix .gitignore
ashleymedin Jun 22, 2019
e55b0a4
fixed makefile
ashleymedin Jun 22, 2019
57a9f9c
getting rid of some bugs
ashleymedin Jun 24, 2019
16d8499
routing bug fixes in merge
ashleymedin Jun 24, 2019
371e594
fixed merged riparian bugs
ashleymedin Jun 24, 2019
4096fd9
fix merged streamtemp and glacr_melt errors (without glaciers in params)
ashleymedin Jun 26, 2019
cccc439
fixed merged glacr_melt bugs
ashleymedin Jun 26, 2019
c2f33da
fixed snow density issue when change from melting snow to glacier und…
ashleymedin Jun 27, 2019
dfff6bf
changed glacier delineation to read the way the weasel makes it
ashleymedin Jun 28, 2019
fa2aefa
Fixed some flag bugs and added logic in snowcomp wether we want to ze…
ashleymedin Jul 9, 2019
2b4601f
Looking at glacrcov_area and snowcov_area. New code doesn't lose as m…
ashleymedin Jul 10, 2019
72c8093
Now assuming seg_length includes length of sloped line not 2-D length
ashleymedin Jul 12, 2019
d1cf075
Changing somethings for CFGI
ashleymedin Jul 30, 2019
2ec9cb1
clean up makefile
ashleymedin Jul 30, 2019
ad3dd35
New CFGI modified for depth and energy budget
ashleymedin Jul 30, 2019
810f312
Separating out riparian and permafrost into own folder.
ashleymedin Aug 6, 2019
11b6c6c
separating out riparian and permafrost files for Makefile purposes
ashleymedin Aug 6, 2019
61d58fc
Merge commit 'bf4da2c757e0abe034f36eced427899a3965561c' into develop
ashleymedin Aug 19, 2019
6d01ac8
bug fixing in bank storage and riparian
ashleymedin Aug 21, 2019
2036070
updating makefile and readme
ashleymedin Aug 21, 2019
5e91f7e
fixed bug in makefile
ashleymedin Aug 21, 2019
c445910
Working on stream temp slow down bug
markstro-usgs Aug 23, 2019
213ed39
not finished.
markstro-usgs Aug 23, 2019
73efd3c
Compiles and runs
markstro-usgs Aug 26, 2019
f0e0d23
Upstream connections now being determined correctly.
markstro-usgs Aug 26, 2019
240bf41
makefile stuff
ashleymedin Aug 28, 2019
ffe33ca
Merge commit '8c41fdb12fe275f5ec851fe22bd05a45bcbc2a47' into develop
ashleymedin Aug 28, 2019
48821de
updating readme and some parameter descriptions
ashleymedin Sep 3, 2019
3529586
Regan's changes
markstro-usgs Sep 10, 2019
36d2a47
fixing some options/flags
ashleymedin Sep 13, 2019
379a493
Merge commit '3529586400018df4529297f1325a92e3d973a0d1' into develop
ashleymedin Sep 13, 2019
5763d41
Regan's version cut out glaciers so I put them back in
ashleymedin Sep 13, 2019
d5131f8
Putting dunnian and hortonian flow in riparian areas and fixing some …
ashleymedin Sep 14, 2019
8cec633
Seg_slope and seg_length were in stream temp and in routing. moved to…
ashleymedin Sep 14, 2019
bbd92da
using depression parameters for some of the riparian
ashleymedin Sep 14, 2019
ff162b3
part of last commit
ashleymedin Sep 14, 2019
7dec9fc
changing some inconsistencies in riparian and cfgi found when doing w…
ashleymedin Sep 20, 2019
6a77e8f
fixing some files to agree with documentation
ashleymedin Oct 2, 2019
fda486b
fixing definitions of variables and parameters
ashleymedin Oct 2, 2019
a284e2c
fixing definitions
ashleymedin Oct 2, 2019
d8df5c9
Changing files to agree with documentation, adding some variables to …
ashleymedin Oct 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.o
*.mod
*.a
prms/prms
prms/prms
40 changes: 35 additions & 5 deletions Makefile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,52 @@
#
# Top-level makefile for the PRMS
#
#-------------------------------------------------------------------
# $Id: Makefile
#-------------------------------------------------------------------

include ./makelist

#
# Standard Targets for Users
#

all: standard
all: prmsglrip prmsgl

standard:
prmsglrip:
# Create lib directory, if necessary
@if [ ! -d $(MMFDIR) ] ; then \
mkdir $(MMFDIR) ; \
echo Created directory $(MMFDIR) ; \
fi
# Create bin directory, if necessary
@if [ ! -d $(BINDIR) ] ; then \
mkdir $(BINDIR) ; \
echo Created directory $(BINDIR) ; \
fi
cd $(MMFDIR); $(MAKE);
cd $(MIZU); $(MAKE);
cd $(MIZUDIR); $(MAKE);
cd $(PRMSRDIR); $(MAKE);

prmsgl:
# Create lib directory, if necessary
@if [ ! -d $(MMFDIR) ] ; then \
mkdir $(MMFDIR) ; \
echo Created directory $(MMFDIR) ; \
fi
# Create bin directory, if necessary
@if [ ! -d $(BINDIR) ] ; then \
mkdir $(BINDIR) ; \
echo Created directory $(BINDIR) ; \
fi
cd $(MMFDIR); $(MAKE);
cd $(MIZUDIR); $(MAKE);
cd $(PRMSDIR); $(MAKE);


clean:
cd $(MMFDIR); $(MAKE) clean;
cd $(MIZU); $(MAKE); clean;
cd $(MIZUDIR); $(MAKE) clean;
cd $(PRMSDIR); $(MAKE) clean;

cd $(PRMSRDIR); $(MAKE) clean;
$(RM) $(BINDIR)/prms*
112 changes: 112 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,114 @@
# prms
Precipitation Runoff Modeling System
This fork makes two executables when doing 'make'. The executable /bin/prms will have capabilities of turning on the glacier_flag, the stream_temp_flag, the frozen_flag (that uses the old CFGI with no frozen depth just binary frozen state), and using the strmflow_module muskingum, muskingum_mann, or mizuroute. The executable /bin/prmsrip will have capabilities of turning on the glacier_flag, the stream_temp_flag, the frozen_flag (that uses the new CFGImod with frozen depth), the ripst_flag, and using the strmflow_module muskingum, muskingum_mann, or mizuroute.



Glacier params, calculate:

abl_elev_range-- from RGI == Randolph Glacier Inventory and modify, /Roland has code
glacier_frac_init-- from RGI /Roland has code
glrette_frac_init-- from RGI, fraction of HRU that is small glacier and not delineated into special glacier HRU /Roland has code
hru_length--geometric map tools/Roland has code
hru_width--geometric map tools/Roland has code
tohru--from glacier HRU delineation/Roland has code
(Note, some standard PRMS params change on glaciers, like hru_type =4 on all possible to be glacierized HRUs). Roland's code figured out all this



Glacier params, defaults, could calibrate some of these (I did in the Copper paper):

albedo_coef
albedo_ice
glacr_freeh2o_cap
glacr_layer
glacrva_coef-- will go away if update code with Delta h area change and then might add some
glacrva_exp-- will go away if update code with Delta h area change and then might add some
max_gldepth
stor_firn
stor_ice
stor_snow



Routing params calculate:

mann_n-- can be from slope if nothing better, that is the method in CONUS and then we calibrate
seg_slope-- DEM
Muskingum: seg_depth-- from regression models or? I got it from a paper in CONUS
Dynamic: seg_width-- from regression models or NARwidth of ? I got it from a paper in CONUS for the streams smaller than 30 m wide, big is NARwidths
seg_length-- DEM? needs to be length including the vertical drop
(does not use K_coef)



Frozen ground params, defaults, can calibrate to permafrost probability maps:

cfgi_decay -- calibrate this maybe
cfgi_thrshld-- calibrate this definitely
porosity_hru-- soils data porosity
soil_depth-- Unified North American Soil Map? STATSGO?
soil_den --Unified North American Soil Map? STATSGO?



Riparian needs all the new routing params (besides seg_length) and:
calculate:

porosity_seg-- soils data porosity
ripst_areafr_max-- riparian area data gives fraction of HRU riparian
specyield_seg-- might be data on this somewhere, haven't got it for CONUS yet but default is perhaps close enough
transmiss_seg-- soils data transmissivity



Riparian defaults, most of these have no good reason to calibrate:

bankfinite_hru
bankst_head_init
ripst_et_coef
ripst_frac_init
tr_ratio
bank_height_fac -- calibrate this or at least think about what want, it's 20 right now



Stream Temp calculate:

seg_elev-- DEM
seg_lat-- DEM
width_m-- relate to seg_width somehow?



Stream Temp, I'd leave these at defaults ... ask Markstrom:

albedo
alte
altw
azrh
gw_tau
lat_temp_adj
maxiter_sntemp
melt_temp
ss_tau
vce
vcw
vdemn
vdemx
vdwmn
vdwmx
vdwmx
vhe
vhw
voe
vow
width_alpha



Calving glacier params calculate:
NOTE: currently this isn't going to get put in so you can ignore (there are calving parameters needed for MWBMglacier now)

ocean_depth -- offshore DEM at end of calving front, current idea is to set up offshore HRUs that contain the glacier tongue area and have properties
(these glaciers will have tohrus that then will be possible to tell that the upstream glacier part feeds a calving front, as long as tongue calculated to float)
43 changes: 25 additions & 18 deletions makelist
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,62 @@
#-------------------------------------------------------------------
#-------------------------------------------------------------------

MMFDIR = ./mmf
PRMSDIR = ./prms
BINDIR = ../bin
MMFLIB = .$(MMFDIR)/libmmf.a
F_MASTER = /Users/amedin/Research/NHM_dev
MMFDIR = $(F_MASTER)/mmf
MIZUDIR = $(F_MASTER)/mizu
LIBDIR = $(F_MASTER)/lib
PRMSDIR = $(F_MASTER)/prms
PRMSRDIR = $(F_MASTER)/prmsRip
BINDIR = $(F_MASTER)/bin
MMFLIB = $(LIBDIR)/libmmf.a
MIZULIB = $(LIBDIR)/libmizu.a
INCMIZU = -I$(MIZUDIR)/include

#########################################################
# Configure tags for each system
##########################################################
ARC = LINUX
ARC = UNIX
#ARC = LINUX
#ARC = WINDOWS

#OPTLEVEL = -g
OPTLEVEL = -O -Bstatic
#for gfortran
#LDFLAGS =$(OPTLEVEL)
LDFLAGS =$(OPTLEVEL)
#for ifort
LDFLAGS =$(OPTLEVEL) -nofor_main
#LDFLAGS =$(OPTLEVEL) -nofor_main
MFLAGS = -ffree-line-length-none

##########################################################
# Define the Fortran compile flags
##########################################################
#for gfortran
#FFLAGS= $(OPTLEVEL) -fbounds-check -fno-second-underscore -Wall
FFLAGS= $(OPTLEVEL) -fbounds-check -Wall -fno-second-underscore $(MFLAGS)
#FFLAGS= $(OPTLEVEL) -fno-second-underscore
FC = gfortran
#for ifort
#FFLAGS= $(OPTLEVEL) -warn all -fltconsistency
FFLAGS= $(OPTLEVEL) -fp-model source
#FC = gfortran
FC = ifort
#FFLAGS= $(OPTLEVEL) -fp-model source
#FC = ifort

##########################################################
# Define the C compile flags
# -D_UF defines UNIX naming conventions for mixed language compilation.
##########################################################
CFLAGS = $(OPTLEVEL) -D$(ARC) -D_UF -Wall
CFLAGS = $(OPTLEVEL) -D$(ARC) -D_UF -I /usr/include
#for gfortran
#CC = gcc
CC = gcc
#for ifort
CC = icc
#CC = icc

##########################################################
# Define the libraries
##########################################################
#for gfortran
#MATHLIB = -lm
#GCLIB = -lgfortran -lgcc $(MATHLIB)
MATHLIB = -lm
GCLIB = -L/opt/local/lib -lgfortran -lgcc_s.1 -L/usr/lib
#for ifort
MATHLIB =
GCLIB =
#GCLIB = -lgfortran -lgcc $(MATHLIB)
FLIBS = $(GCLIB)

##########################################################
Expand Down
2 changes: 1 addition & 1 deletion prms/call_modules.f90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ MODULE PRMS_MODULE
CHARACTER(LEN=68), PARAMETER :: &
& EQULS = '===================================================================='
CHARACTER(LEN=12), PARAMETER :: MODNAME = 'call_modules'
CHARACTER(LEN=24), PARAMETER :: PRMS_VERSION = 'Version 5.0.1 06/20/2019'
CHARACTER(LEN=24), PARAMETER :: PRMS_VERSION = 'Version 5.1.0 RC'
CHARACTER(LEN=8), SAVE :: Process
CHARACTER(LEN=80), SAVE :: PRMS_versn
INTEGER, SAVE :: Model, Process_flag, Call_cascade, Ncascade, Ncascdgw
Expand Down
6 changes: 3 additions & 3 deletions prms/climateflow.f90
Original file line number Diff line number Diff line change
Expand Up @@ -542,17 +542,17 @@ INTEGER FUNCTION climateflow_decl()
IF ( Glacier_flag==1 .OR. Model==99 ) THEN
ALLOCATE ( Glacier_frac(Nhru) )
IF ( declvar(MODNAME, 'glacier_frac', 'nhru', Nhru, 'real', &
'Fraction of glaciation (0=none; 1=100%)', &
'Fraction of glaciation (0=none; 1=100%) in glacier-capable HRU', &
'decimal fraction', Glacier_frac)/=0 ) CALL read_error(3, 'glacier_frac')

ALLOCATE ( Glrette_frac(Nhru) )
IF ( declvar(MODNAME, 'glrette_frac', 'nhru', Nhru, 'real', &
'Fraction of snow field (too small for glacier dynamics)', &
'Fraction of glacierette (too small for glacier dynamics)', &
'decimal fraction', Glrette_frac)/=0 ) CALL read_error(3, 'glrette_frac')

ALLOCATE ( Alt_above_ela(Nhru) )
IF ( declvar(MODNAME, 'alt_above_ela', 'nhru', Nhru, 'real', &
'Altitude above equilibrium line altitude (ELA)', &
'Altitude HRU is above equilibrium line altitude (ELA), negative value indicates HRU below ELA', &
'elev_units', Alt_above_ela)/=0 ) CALL read_error(3, 'alt_above_ela')
ENDIF

Expand Down
Loading