Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused variables #49

Merged
merged 26 commits into from
May 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a57fbf3
removed unused variables from var_derive.f90
bartnijssen May 1, 2015
536fda8
Removed unused variables in calcHeight() in var_derive.f90
bartnijssen May 1, 2015
015cdbc
Removed unused variables from iceImpede and simplified call
bartnijssen May 1, 2015
2ed19cb
Removed unused local variable enthTempSoil
bartnijssen May 1, 2015
c415ee1
Removed unused variable charData
bartnijssen May 1, 2015
00cafea
Removed unused variables from read_icond.f90
bartnijssen May 1, 2015
80324a0
removed unused variable from read_force.f90
bartnijssen May 1, 2015
1ca38e6
Removed unused variables from multi_driver.f90
bartnijssen May 1, 2015
df91536
Removed unused variables from snowAlbedo.f90
bartnijssen May 1, 2015
18921e0
Removed unused variables from canopySnow.f90
bartnijssen May 1, 2015
fe236a6
Removed unused variables from tempAdjust.f90
bartnijssen May 1, 2015
fe5d750
Removed unused variables from snwCompact.f90
bartnijssen May 1, 2015
0521748
Removed unused variables from layerMerge.f90
bartnijssen May 1, 2015
dfc8cf5
Removed unused variables from layerDivide.f90
bartnijssen May 1, 2015
48bf0ec
Removed unused variables from vegPhenlgy.f90
bartnijssen May 1, 2015
23beb05
Removed unused variables and commented out code from diagn_evar.f90
bartnijssen May 1, 2015
aa01fe4
Removed unused variables from groundwatr.f90
bartnijssen May 1, 2015
f37b409
Removed unused variables from vegSWavRad.f90
bartnijssen May 2, 2015
d2a41d7
Removed unused variables from vegNrgFlux.f90
bartnijssen May 2, 2015
c463aaa
Removed unused imports from ssdNrgFlux.f90
bartnijssen May 3, 2015
f1121cd
Removed unused module variable from vegLiqFlux.f90
bartnijssen May 14, 2015
63bd0a9
Removed unused module variable from snowLiqFlx.f90
bartnijssen May 14, 2015
e308042
Removed unused module variable from soilLiqFlx.f90
bartnijssen May 14, 2015
e2e56fe
Removed unused module variable from modelwrite.f90
bartnijssen May 14, 2015
207ed83
Revert "Removed unused module variable from modelwrite.f90"
bartnijssen May 14, 2015
7cf8c1a
Removed unused module variable from modelwrite.f90
bartnijssen May 14, 2015
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
13 changes: 1 addition & 12 deletions build/source/driver/multi_driver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ program multi_driver
USE snow_fileManager,only:OUTPUT_PATH,OUTPUT_PREFIX ! define output file
USE snow_fileManager,only:LOCALPARAM_INFO,BASINPARAM_INFO ! files defining the default values and constraints for model parameters
USE data_struc,only:doJacobian ! flag to compute the Jacobian
USE data_struc,only:forcFileInfo ! information on forcing data file
USE data_struc,only:localParFallback ! local column default parameters
USE data_struc,only:basinParFallback ! basin-average default parameters
USE data_struc,only:mpar_meta,bpar_meta ! metadata for local column and basin-average model parameters
USE data_struc,only:data_step,numtim ! length of data step (s) and number of time steps
USE data_struc,only:numtim ! number of time steps
USE data_struc,only:time_data,time_hru,refTime ! time and reference time
USE data_struc,only:forc_data,forc_hru ! model forcing data
USE data_struc,only:type_data,type_hru ! classification of veg, soils etc.
Expand Down Expand Up @@ -114,7 +113,6 @@ program multi_driver
integer(i4b) :: nHRU ! number of hydrologic response units
integer(i4b) :: iStep=0 ! index of model time step
integer(i4b) :: jStep=0 ! index of model output
integer(i4b) :: iMonth ! index of the current month
! define the re-start file
logical(lgt) :: printRestart ! flag to print a re-start file
integer(i4b),parameter :: ixRestart_im=1001 ! named variable to print a re-start file once per month
Expand All @@ -140,27 +138,18 @@ program multi_driver
real(dp),allocatable :: dt_init(:) ! used to initialize the length of the sub-step for each HRU
real(dp),pointer :: totalArea=>null() ! total basin area (m2)
! exfiltration
real(dp) :: totalStorage ! total water in the soil column (m)
real(dp) :: availStorage ! water required to bring the entire soil column to saturation (m)
real(dp) :: totalInflow ! total inflow to the soil column from upstream HRUs (m s-1)
real(dp),parameter :: supersatScale=0.001_dp ! scaling factor for the logistic function (-)
real(dp),parameter :: xMatch = 0.99999_dp ! point where x-value and function value match (-)
real(dp),parameter :: safety = 0.01_dp ! safety factor to ensure logistic function is less than 1
real(dp),parameter :: fSmall = epsilon(xMatch) ! smallest possible value to test
real(dp) :: supersatThresh ! threshold in super-saturation function (-)
real(dp) :: exfilMin ! minimum fraction of storage filled for exfiltration to occur (-)
real(dp) :: expFunc ! exponential function used as part of the flux calculation (-)
real(dp) :: logFunc ! logistic smoothing function (-)
real(dp) :: fracCap ! fraction of storage filled with liquid water and ice (-)
real(dp) :: exfiltration ! exfiltration (m3/s)
real(dp),allocatable :: upArea(:) ! area upslope of each HRU
! general local variables
real(dp) :: fracHRU ! fractional area of a given HRU (-)
real(dp),allocatable :: zSoilReverseSign(:) ! height at bottom of each soil layer, negative downwards (m)
real(dp),dimension(12) :: greenVegFrac_monthly ! fraction of green vegetation in each month (0-1)
real(dp),parameter :: doubleMissing=-9999._dp ! missing value
integer(i4b) :: iSoil ! index of soil layer
integer(i4b) :: ixIce ! index of bottom-most ice layer
! error control
integer(i4b) :: err=0 ! error code
character(len=1024) :: message='' ! error message
Expand Down
21 changes: 0 additions & 21 deletions build/source/engine/canopySnow.f90
Original file line number Diff line number Diff line change
Expand Up @@ -73,31 +73,10 @@ subroutine canopySnow(&
! output: error control
integer(i4b),intent(out) :: err ! error code
character(*),intent(out) :: message ! error message
! -------------------------------------------------------------------------------------------------------------------------------
! variables in the data structures
! input: model decisions
integer(i4b) :: ixSnowInterception ! choice of option to determine maximum snow interception capacity
! input: model forcing data
real(dp) :: scalarAirtemp ! air temperature (K)
! input: model parameters
real(dp) :: refInterceptCapSnow ! reference canopy interception capacity for snow per unit leaf area (kg m-2)
real(dp) :: ratioDrip2Unloading ! ratio of canopy drip to snow unloading (-)
real(dp) :: snowUnloadingCoeff ! time constant for unloading of snow from the forest canopy (s-1)
! input: diagnostic variables
real(dp) :: scalarSnowfall ! computed snowfall rate (kg m-2 s-1)
real(dp) :: scalarNewSnowDensity ! density of new snow (kg m-3)
real(dp) :: scalarCanopyLiqDrainage ! liquid drainage from the vegetation canopy (kg m-2 s-1)
! input-output: state variables
real(dp) :: scalarCanopyIce ! mass of ice on the vegetation canopy (kg m-2)
! output: diagnostic variables
real(dp) :: scalarThroughfallSnow ! snow that reaches the ground without ever touching the canopy (kg m-2 s-1)
real(dp) :: scalarCanopySnowUnloading ! unloading of snow from the vegetion canopy (kg m-2 s-1)
! ------------------------------------------------------------------------------------------------
! local variables
real(dp),parameter :: valueMissing=-9999._dp ! missing value
integer(i4b) :: iter ! iteration index
integer(i4b),parameter :: maxiter=50 ! maximum number of iterations
integer(i4b) :: itry ! index of loop used for testing
real(dp) :: unloading_melt ! unloading associated with canopy drip (kg m-2 s-1)
real(dp) :: airtemp_degC ! value of air temperature in degrees Celcius
real(dp) :: leafScaleFactor ! scaling factor for interception based on temperature (-)
Expand Down
1 change: 0 additions & 1 deletion build/source/engine/convE2Temp.f90
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ function temp2ethpy(Tk,BulkDenWater,fc_param)
real(dp) :: temp2ethpy ! return value of the function, total specific enthalpy (J m-3)
! declare local variables
real(dp) :: frac_liq ! fraction of liquid water
real(dp) :: enthTempSoil ! temperature component of specific enthalpy for dry soil (J kg-1)
real(dp) :: enthTempWater ! temperature component of specific enthalpy for total water (liquid and ice) (J kg-1)
real(dp) :: enthMass ! mass component of specific enthalpy (J kg-1)
! NOTE: this function assumes the freezing curve for snow ... it needs modification to use vanGenuchten functions for soil
Expand Down
35 changes: 0 additions & 35 deletions build/source/engine/diagn_evar.f90
Original file line number Diff line number Diff line change
Expand Up @@ -92,33 +92,6 @@ subroutine diagn_evar(&
! output: error control
integer(i4b),intent(out) :: err ! error code
character(*),intent(out) :: message ! error message
! --------------------------------------------------------------------------------------------------------------------------------------
! variables in the data structures
! input: state variables
real(dp) :: scalarCanopyIce ! mass of ice on the vegetation canopy (kg m-2)
real(dp) :: scalarCanopyLiquid ! mass of liquid water on the vegetation canopy (kg m-2)
real(dp),dimension(nLayers) :: mLayerVolFracIce ! volumetric fraction of ice in each layer (-)
real(dp),dimension(nLayers) :: mLayerVolFracLiq ! volumetric fraction of liquid water in each layer (-)
! input: coordinate variables
integer(i4b),dimension(nLayers) :: layerType ! type of the layer (snow or soil)
real(dp),dimension(nLayers) :: mLayerHeight ! height of the layer mid-point (top of soil = 0)
real(dp),dimension(0:nLayers) :: iLayerHeight ! height of the layer interface (top of soil = 0)
! input: model parameters
real(dp) :: specificHeatVeg ! specific heat of vegetation (J kg-1 K-1)
real(dp) :: maxMassVegetation ! maximum mass of vegetation (full foliage) (kg m-2)
real(dp) :: iden_soil ! intrinsic density of soil (kg m-3)
real(dp) :: thCond_soil ! thermal conductivity of soil (W m-1 K-1)
real(dp) :: theta_sat ! soil porosity (-)
real(dp) :: frac_sand ! fraction of sand (-)
real(dp) :: frac_silt ! fraction of silt (-)
real(dp) :: frac_clay ! fraction of clay (-)
! output: diagnostic variables
real(dp) :: scalarBulkVolHeatCapVeg ! bulk volumetric heat capacity of vegetation (J m-3 K-1)
real(dp),dimension(nLayers) :: mLayerVolHtCapBulk ! volumetric heat capacity in each layer (J m-3 K-1)
real(dp),dimension(nLayers) :: mLayerThermalC ! thermal conductivity at the mid-point of each layer (W m-1 K-1)
real(dp),dimension(0:nLayers) :: iLayerThermalC ! thermal conductivity at the interface of each layer (W m-1 K-1)
real(dp),dimension(nLayers) :: mLayerVolFracAir ! volumetric fraction of air in each layer (-)
! --------------------------------------------------------------------------------------------------------------------------------
! --------------------------------------------------------------------------------------------------------------------------------
! local variables
character(LEN=256) :: cmessage ! error message of downwind routine
Expand All @@ -127,8 +100,6 @@ subroutine diagn_evar(&
real(dp) :: TCp ! thermal conductivity above the layer interface (W m-1 K-1)
real(dp) :: zdn ! height difference between interface and lower value (m)
real(dp) :: zdp ! height difference between interface and upper value (m)
real(dp) :: lambda_wet ! thermal conductivity of the wet material
!real(dp) :: kerstenNum ! the Kersten number (-), defining weight applied to conductivity of the wet medium
real(dp) :: bulkden_soil ! bulk density of soil (kg m-3)
real(dp) :: lambda_drysoil ! thermal conductivity of dry soil (W m-1)
real(dp) :: lambda_wetsoil ! thermal conductivity of wet soil (W m-1)
Expand Down Expand Up @@ -244,12 +215,6 @@ subroutine diagn_evar(&
! iLayer, mLayerVolFracIce(iLayer), mLayerVolFracLiq(iLayer), mLayerThermalC(iLayer)

endif
! compute the thermal conductivity of the wet material (W m-1)
!lambda_wet = lambda_wetsoil**(1._dp - theta_sat) * lambda_water**theta_sat * lambda_ice**(theta_sat - mLayerVolFracLiq(iLayer))
! compute the Kersten number (-)
!kerstenNum = log10( (mLayerVolFracIce(iLayer) + mLayerVolFracLiq(iLayer))/theta_sat ) + 1._dp
! ...and, compute the thermal conductivity
!mLayerThermalC(iLayer) = kerstenNum*lambda_wet + (1._dp - kerstenNum)*lambda_drysoil
! * snow
case(ix_snow)
call tcond_snow(mLayerVolFracIce(iLayer)*iden_ice,mLayerThermalC(iLayer),err,cmessage)
Expand Down
1 change: 0 additions & 1 deletion build/source/engine/ffile_info.f90
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ subroutine ffile_info(nHRU,err,message)
character(*),intent(out) :: message ! error message
! define local variables
character(LEN=1024),allocatable :: dataLines(:) ! vector of lines of information (non-comment lines)
character(LEN=1024),allocatable :: charData(:) ! vector of information (words) for a given line of information
integer(i4b),parameter :: imiss = -999 ! missing data
character(len=256) :: cmessage ! error message for downwind routine
character(LEN=256) :: infile ! input filename
Expand Down
Loading