Skip to content

Commit

Permalink
mo_constants: move 'YearMonths' entirly to mo_constants
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Nov 30, 2020
1 parent c5c894e commit 8557c35
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 24 deletions.
9 changes: 5 additions & 4 deletions src/MPR/mo_mpr_startup.f90
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ MODULE mo_mpr_startup

! Modifications:
! Luis Samaniego Mar 2008 - fully distributed multilayer
! Rohini Kumar Oct 2010 - matrix to vector version
! - openmp parallelization
! Rohini Kumar Oct 2010 - matrix to vector version
! - openmp parallelization
! - routing level 11
! Luis Samaniego Jul 2012 - removal of IMSL dependencies
! Luis Samaniego Dec 2012 - modular version
Expand Down Expand Up @@ -288,7 +288,7 @@ subroutine L0_variable_init(iDomain)

integer(i4) :: i, j, k, nH, i_sort, i_sortpost

! STEPS ::
! STEPS ::


!--------------------------------------------------------
Expand Down Expand Up @@ -401,7 +401,8 @@ end subroutine L0_variable_init
subroutine init_eff_params(ncells1)

use mo_append, only : append
use mo_common_constants, only : P1_InitStateFluxes, YearMonths_i4
use mo_constants, only : YearMonths_i4
use mo_common_constants, only : P1_InitStateFluxes
use mo_common_variables, only : nLCoverScene
use mo_mpr_global_variables, only : L1_HarSamCoeff, L1_PrieTayAlpha, L1_aeroResist, L1_alpha, L1_degDay, &
L1_degDayInc, L1_degDayMax, L1_degDayNoPre, L1_fAsp, L1_fRoots, L1_fSealed, &
Expand Down
6 changes: 3 additions & 3 deletions src/MPR/mo_read_lut.f90
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ end subroutine read_geoformation_lut

subroutine read_lai_lut(filename, fileunit, nLAI, LAIIDlist, LAI)

use mo_common_constants, only : YearMonths
use mo_constants, only : YearMonths_i4

implicit none

Expand Down Expand Up @@ -184,11 +184,11 @@ subroutine read_lai_lut(filename, fileunit, nLAI, LAIIDlist, LAI)

! allocate arrays
allocate(LAIIDList(nLAI))
allocate(LAI(nLAI, int(YearMonths, i4)))
allocate(LAI(nLAI, YearMonths_i4))

! read data
do i = 1, nLAI
read(fileunit, *) LAIIDList(i), dummy, (LAI(i, j), j = 1, int(YearMonths, i4))
read(fileunit, *) LAIIDList(i), dummy, (LAI(i, j), j = 1, YearMonths_i4)
end do

close(fileunit)
Expand Down
3 changes: 2 additions & 1 deletion src/MPR/mo_read_wrapper.f90
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ MODULE mo_read_wrapper
subroutine read_data(LAIPer)

use mo_append, only : append, paste
use mo_common_constants, only : YearMonths_i4, nodata_dp, nodata_i4
use mo_constants, only : YearMonths_i4
use mo_common_constants, only : nodata_dp, nodata_i4
use mo_common_read_data, only : read_dem, read_lcover
use mo_common_variables, only : Grid, dirCommonFiles, dirMorpho, &
global_parameters, level0, domainMeta, period, processMatrix
Expand Down
4 changes: 0 additions & 4 deletions src/common/mo_common_constants.f90
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ MODULE mo_common_constants
integer(i4), public, parameter :: maxNoDomains = 50_i4 ! maximum number of allowed domains
integer(i4), public, parameter :: maxNLcovers = 50_i4 ! maximum number of allowed LCover scenes

! temporal
real(dp), public, parameter :: YearMonths = 12.0_dp ! months per year
integer(i4), public, parameter :: YearMonths_i4 = 12 ! months per year

character(64), public, parameter :: soilHorizonsVarName = "L1_SoilHorizons"
character(64), public, parameter :: landCoverPeriodsVarName = "L1_LandCoverPeriods"
character(64), public, parameter :: LAIVarName = "L1_LAITimesteps"
Expand Down
1 change: 1 addition & 0 deletions src/lib/mo_constants.f90
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ module mo_constants
real(dp), public, parameter :: secday_dp = 86400.0_dp ! secday [s]
real(dp), public, parameter :: DayHours = 24.0_dp ! hours per day
real(dp), public, parameter :: YearMonths = 12.0_dp ! months per year
integer(i4), public, parameter :: YearMonths_i4 = 12_i4 ! months per year
real(dp), public, parameter :: YearDays = 365.0_dp ! days in a year
real(dp), public, parameter :: DaySecs = 86400.0_dp ! sec in a day
real(dp), public, parameter :: HourSecs = 3600.0_dp ! seconds per hour
Expand Down
24 changes: 12 additions & 12 deletions src/mHM/mo_global_variables.f90
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ MODULE mo_global_variables
! Robert Schweppe, Dec 2017 - merged duplicated variables with mrm into common variables

USE mo_kind, ONLY : i4, dp
USE mo_constants, ONLY : YearMonths_i4
USE mo_mhm_constants, ONLY : nOutFlxState
USE mo_optimization_types, ONLY : optidata
USE mo_common_constants, ONLY : YearMonths
use mo_common_variables, only : Grid

IMPLICIT NONE
Expand Down Expand Up @@ -168,17 +168,17 @@ MODULE mo_global_variables
! for temporal disaggregation
! -------------------------------------------------------------------
! dim1 = number of months in a year
real(dp), public, dimension(int(YearMonths, i4)) :: evap_coeff ! [-] Evap. coef. for free-water surfaces
real(dp), public, dimension(int(YearMonths, i4)) :: fday_prec ! [-] Day ratio precipitation < 1
real(dp), public, dimension(int(YearMonths, i4)) :: fnight_prec ! [-] Night ratio precipitation < 1
real(dp), public, dimension(int(YearMonths, i4)) :: fday_pet ! [-] Day ratio PET < 1
real(dp), public, dimension(int(YearMonths, i4)) :: fnight_pet ! [-] Night ratio PET < 1
real(dp), public, dimension(int(YearMonths, i4)) :: fday_temp ! [-] Day factor mean temp
real(dp), public, dimension(int(YearMonths, i4)) :: fnight_temp ! [-] Night factor mean temp
real(dp), public, dimension(int(YearMonths, i4)) :: fday_ssrd ! [-] Day factor short-wave rad.
real(dp), public, dimension(int(YearMonths, i4)) :: fnight_ssrd ! [-] Night factor short-wave rad.
real(dp), public, dimension(int(YearMonths, i4)) :: fday_strd ! [-] Day factor long-wave rad.
real(dp), public, dimension(int(YearMonths, i4)) :: fnight_strd ! [-] Night factor long-wave rad.
real(dp), public, dimension(YearMonths_i4) :: evap_coeff ! [-] Evap. coef. for free-water surfaces
real(dp), public, dimension(YearMonths_i4) :: fday_prec ! [-] Day ratio precipitation < 1
real(dp), public, dimension(YearMonths_i4) :: fnight_prec ! [-] Night ratio precipitation < 1
real(dp), public, dimension(YearMonths_i4) :: fday_pet ! [-] Day ratio PET < 1
real(dp), public, dimension(YearMonths_i4) :: fnight_pet ! [-] Night ratio PET < 1
real(dp), public, dimension(YearMonths_i4) :: fday_temp ! [-] Day factor mean temp
real(dp), public, dimension(YearMonths_i4) :: fnight_temp ! [-] Night factor mean temp
real(dp), public, dimension(YearMonths_i4) :: fday_ssrd ! [-] Day factor short-wave rad.
real(dp), public, dimension(YearMonths_i4) :: fnight_ssrd ! [-] Night factor short-wave rad.
real(dp), public, dimension(YearMonths_i4) :: fday_strd ! [-] Day factor long-wave rad.
real(dp), public, dimension(YearMonths_i4) :: fnight_strd ! [-] Night factor long-wave rad.

! -------------------------------------------------------------------
! AUXILIARY VARIABLES
Expand Down

0 comments on commit 8557c35

Please sign in to comment.