Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • foresee/4C
  • gutsch/4C
2 results
Show changes
Showing
with 1158 additions and 58 deletions
File added
File deleted
File added
File added
No preview for this file type
No preview for this file type
File deleted
No preview for this file type
No preview for this file type
File added
File added
File added
File added
/*++
Copyright 1995 - 1998 Microsoft Corporation
Module Name:
pshpack1.h
Abstract:
This file turns 1 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#if ! (defined(lint) || defined(_lint) || defined(RC_INVOKED))
#if ( _MSC_VER >= 800 ) || defined(_PUSHPOP_SUPPORTED)
#pragma warning(disable:4103)
#if !(defined( MIDL_PASS )) || defined( __midl )
#pragma pack(push)
#endif
#pragma pack(1)
#else
#pragma pack(1)
#endif
#endif // ! (defined(lint) || defined(_lint) || defined(RC_INVOKED))
/*++
Copyright 1995 - 1998 Microsoft Corporation
Module Name:
pshpack4.h
Abstract:
This file turns 4 byte packing of structures on. (That is, it disables
automatic alignment of structure fields.) An include file is needed
because various compilers do this in different ways. For Microsoft
compatible compilers, this files uses the push option to the pack pragma
so that the poppack.h include file can restore the previous packing
reliably.
The file poppack.h is the complement to this file.
--*/
#if ! (defined(lint) || defined(_lint) || defined(RC_INVOKED))
#if ( _MSC_VER >= 800 ) || defined(_PUSHPOP_SUPPORTED)
#pragma warning(disable:4103)
#if !(defined( MIDL_PASS )) || defined( __midl )
#pragma pack(push)
#endif
#pragma pack(4)
#else
#pragma pack(4)
#endif
#endif // ! (defined(lint) || defined(_lint) || defined(RC_INVOKED))
This diff is collapsed.
......@@ -121,7 +121,7 @@ module data_soil
! arrays of given root distribution (defined input)
real, allocatable, save, dimension(:) :: root_fr ! root fraction per soil layer
! dp_rfr ! depth of root fraction / cm
! yearly fine root loss after Rasse et al. 2001
integer :: rdepth_kind ! kind of calculation of root depth
real, allocatable, dimension(:) :: wat_left ! auxiliary variable for coh%watleft to determin annual sum of available water in soil layer boardering on root zone
......@@ -298,15 +298,15 @@ module data_soil_t
! Variables and parameters for soil temperature calculation
integer flag_surf ! calculation of soil surface temperature
! 0 - old version
! 1 - new ersion with explicit surface temperature
integer :: flag_surf = 0 ! calculation of soil surface temperature
! 0 - surface temperature equals temperature of first layer
! 1 - with explicit surface temperature
real temps_surf ! soil surface temperature
real hflux_surf ! soil heat flux at soil surface
real temps_surf ! soil surface temperature
real hflux_surf ! soil heat flux at soil surface
! model parameters
real :: C0 = 0.76, & ! Faltungskoeff.
real :: C0 = 0.76, & ! coefficients for calculation of surface temperature
C1 = 0.05, &
C2 = 0.3
......
......@@ -50,11 +50,12 @@ if (hum .le. 0.) then
else if (hum .gt. 100.) then
hum = 100.
endif
if (press .gt. 0.) then
if (prs(i,j) .gt. 0.) then
press = prs(i,j)
else
press = 1013.
endif
rad = rd(i,j)
wind = wd(i,j)
if (wind .lt. 0.) wind = 0.5
......
......@@ -118,7 +118,8 @@ SUBROUTINE INITIA
! end of declaration section
!******************************************************************************
ncl1 = 60
!ncl1 = 60
ncl1=40
allocate (zheigh(ncl1), zbhd(ncl1), zhbc(ncl1), nz(ncl1))
allocate (smaldc(ncl1), bigdc(ncl1))
print *,' '
......@@ -133,7 +134,7 @@ WRITE(*,'(A)',advance='no') ' ***Make your choice: '
READ *, data_flag
print *,' '
clwdth=2 !set diameter class-class width
clwdth=15 !set diameter class-class width
corr_la=1. !standard value for leaf area correction in stands of high sum of crown projection areas
mixed_tot_ca=0. !sum of crown projection area for mixed stands
pass = 1 !counter for number of passes through calculation loop for mixed stands
......@@ -256,7 +257,7 @@ CASE(1)
IF (datasets=='multi') THEN
select_lines=.false.
fl_num=0
if(infile=='input/hyyti_ini_0616.txt') then
ALLOCATE(ngroups(10000))
numstand= 0
......@@ -291,7 +292,6 @@ if(infile=='input/hyyti_ini_0616.txt') then
iF(baum(i).EQ.22) ngroups(nlines)%taxid=6 ! Larix
iF(baum(i).EQ.23) ngroups(nlines)%taxid=7 ! Pinus strobus
iF(baum(i).EQ.24) ngroups(nlines)%taxid=10 ! Douglasie
IF (dm(i).eq.0) dm(i) = 0.5
IF (mhoe(i).eq.0) mhoe(i) = 1.0
IF (gf(i).eq.0) gf(i) = 0.25
......@@ -310,50 +310,6 @@ if(infile=='input/hyyti_ini_0616.txt') then
3333 CONTINUE
nlines=nlines-1
WRITE(*,*) nlines,'sets of data', numstand, 'sets of stands'
ELSE
IF(select_lines) THEN
READ(listunit,*)nlines_comp
ALLOCATE(locid_comp(nlines_comp))
DO i=1,nlines_comp ! reading list of sites to be initialised
READ(listunit,*) locid_comp(i)
ENDDO ! end reading list of sites to be initialised
ENDIF ! end of reading file with sites to be selected
IF(select_lines) CLOSE(listunit)
CALL assign_DSW
CALL init_plenter_param
READ (inunit,*)nlines
ALLOCATE(ngroups(nlines))
istart=1
READ(inunit,*) ngroups(1)%locid,ngroups(1)%schicht,ngroups(1)%BRAid,ngroups(1)%alter,ngroups(1)%patchsize,ngroups(1)%mhoe,ngroups(1)%dm,ngroups(1)%volume,ngroups(1)%gf
ngroups(1)%patchsize=ngroups(1)%patchsize*10000.
ngroups(1)%baumzahl=0
ngroups(istart)%standsize=ngroups(1)%patchsize
ngroups(1)%taxid=tax_of_BRA_id(ngroups(1)%BRAid)
DO i=2,nlines
READ(inunit,*) ngroups(i)%locid,ngroups(i)%schicht,ngroups(i)%BRAid,ngroups(i)%alter,ngroups(i)%patchsize,ngroups(i)%mhoe,ngroups(i)%dm,ngroups(i)%volume,ngroups(i)%gf
WRITE(*,*) 'set no', i, 'read'
ngroups(i)%baumzahl=0
! the following line maps BRAid 770 to 779, other 'Mehlbeeren', because two
! different numbering systems existed in Brandenburg in the course of time
IF(ngroups(i)%BRAid==770) ngroups(i)%BRAid=779
ngroups(i)%patchsize=ngroups(i)%patchsize*10000.
ngroups(i)%taxid=tax_of_BRA_id(ngroups(i)%BRAid)
IF(ngroups(i)%taxid==6) ngroups(i)%taxid=3
IF(ngroups(i)%taxid==0) THEN
ELSE
ENDIF
IF(ngroups(i)%locid==ngroups(istart)%locid) THEN
ngroups(istart)%standsize=ngroups(istart)%standsize+ngroups(i)%patchsize
ngroups(i)%standsize = ngroups(istart)%standsize
ELSE
istart=i
ngroups(istart)%standsize=ngroups(i)%patchsize
fl_num=fl_num+1
ENDIF
ENDDO ! readin loop for multi data-set
ENDIF ! block for direct DSW data or brb_inv-file structure
CLOSE(inunit)
! read in file headder for description, write into ini-file
cform=1;hlp_lai=0
......@@ -571,6 +527,7 @@ if(infile=='input/hyyti_ini_0616.txt') then
! classification of single values in diameter cohorts
clwdth=1+AINT((bhdmax-bhdmin)/ncl1) !calculation of class widths
! write(4444,*) 'clwdth', clwdth, bhdmax, bhdmin, ncl1
DO i=1,ncl1
nz(i)=0
zbhd(i)=0
......@@ -771,8 +728,9 @@ CASE(6)
g=ngroups(iz)%gf !basal area/ha
gpatch=g*4. !basal area/patch
bz=ngroups(iz)%baumzahl*4. !tree numbre/patch
clwdth=dg/20.
! clwdth=dg/20.
clwdth=dg/5
! selection of uni-height curve: beech, spruce, oak calculation according to Weimann,
! other species of trees after Kuleschis (vergl. Gerold 1990)
IF (taxid==3.OR.taxid==5) THEN
......