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 5573 additions and 14 deletions
This diff is collapsed.
/*++ BUILD Version: 0001 Increment this if a change has global effects
Copyright (c) 1985-1997, Microsoft Corporation
Module Name:
windows.h
Abstract:
Master include file for Windows applications.
Modified with WC_STATIC by F. Suckow 04.08.2011
--*/
#ifndef _WINDOWS_
#define _WINDOWS_
#ifndef WINVER
#define WINVER 0x0400
#else
#if defined(_WIN32_WINNT) && (WINVER < 0x0400) && (_WIN32_WINNT > 0x0400)
#error WINVER setting conflicts with _WIN32_WINNT setting
#endif
#endif
#ifndef WC_STATIC
#define WC_STATIC "Static"
#endif
#if(WINVER >= 0x0500)
#pragma message ("")
#pragma message ("NOTE: WINVER has been defined as 0x0500 or greater which enables")
#pragma message ("Windows NT 5.0 and Windows 98 features. When these headers were released,")
#pragma message ("Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.")
#pragma message ("")
#pragma message ("For this release when WINVER is defined as 0x0500 or greater, you can only")
#pragma message ("build beta or test applications. To build a retail application,")
#pragma message ("set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk")
#pragma message ("to see if retail Windows NT 5.0 or Windows 98 headers are available.")
#pragma message ("")
#pragma message ("See the SDK release notes for more information.")
#pragma message ("")
#endif
#ifndef _INC_WINDOWS
#define _INC_WINDOWS
#if defined (_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* If defined, the following flags inhibit definition
* of the indicated items.
*
* NOGDICAPMASKS - CC_*, LC_*, PC_*, CP_*, TC_*, RC_
* NOVIRTUALKEYCODES - VK_*
* NOWINMESSAGES - WM_*, EM_*, LB_*, CB_*
* NOWINSTYLES - WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_*
* NOSYSMETRICS - SM_*
* NOMENUS - MF_*
* NOICONS - IDI_*
* NOKEYSTATES - MK_*
* NOSYSCOMMANDS - SC_*
* NORASTEROPS - Binary and Tertiary raster ops
* NOSHOWWINDOW - SW_*
* OEMRESOURCE - OEM Resource values
* NOATOM - Atom Manager routines
* NOCLIPBOARD - Clipboard routines
* NOCOLOR - Screen colors
* NOCTLMGR - Control and Dialog routines
* NODRAWTEXT - DrawText() and DT_*
* NOGDI - All GDI defines and routines
* NOKERNEL - All KERNEL defines and routines
* NOUSER - All USER defines and routines
* NONLS - All NLS defines and routines
* NOMB - MB_* and MessageBox()
* NOMEMMGR - GMEM_*, LMEM_*, GHND, LHND, associated routines
* NOMETAFILE - typedef METAFILEPICT
* NOMINMAX - Macros min(a,b) and max(a,b)
* NOMSG - typedef MSG and associated routines
* NOOPENFILE - OpenFile(), OemToAnsi, AnsiToOem, and OF_*
* NOSCROLL - SB_* and scrolling routines
* NOSERVICE - All Service Controller routines, SERVICE_ equates, etc.
* NOSOUND - Sound driver routines
* NOTEXTMETRIC - typedef TEXTMETRIC and associated routines
* NOWH - SetWindowsHook and WH_*
* NOWINOFFSETS - GWL_*, GCL_*, associated routines
* NOCOMM - COMM driver routines
* NOKANJI - Kanji support stuff.
* NOHELP - Help engine interface.
* NOPROFILER - Profiler interface.
* NODEFERWINDOWPOS - DeferWindowPos routines
* NOMCX - Modem Configuration Extensions
*/
#if defined(RC_INVOKED) && !defined(NOWINRES)
#include <winresrc.h>
#else
#if defined(RC_INVOKED)
/* Turn off a bunch of stuff to ensure that RC files compile OK. */
#define NOATOM
#define NOGDI
#define NOGDICAPMASKS
#define NOMETAFILE
#define NOMINMAX
#define NOMSG
#define NOOPENFILE
#define NORASTEROPS
#define NOSCROLL
#define NOSOUND
#define NOSYSMETRICS
#define NOTEXTMETRIC
#define NOWH
#define NOCOMM
#define NOKANJI
#define NOCRYPT
#define NOMCX
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_MIPS_) && !defined(_X86_) && defined(_M_IX86)
#define _X86_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_MRX000)
#define _MIPS_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_ALPHA)
#define _ALPHA_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_PPC)
#define _PPC_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_M68K)
#define _68K_
#endif
#if !defined(_68K_) && !defined(_MPPC_) && !defined(_PPC_) && !defined(_ALPHA_) && !defined(_X86_) && !defined(_MIPS_) && defined(_M_MPPC)
#define _MPPC_
#endif
#ifndef _MAC
#if defined(_68K_) || defined(_MPPC_)
#define _MAC
#endif
#endif
#ifndef RC_INVOKED
#if ( _MSC_VER >= 800 )
#pragma warning(disable:4001)
#pragma warning(disable:4201)
#pragma warning(disable:4214)
#pragma warning(disable:4514)
#endif
#include <excpt.h>
#include <stdarg.h>
#endif /* RC_INVOKED */
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#ifdef _MAC
DECLARE_HANDLE(HKEY);
typedef HKEY *PHKEY;
#endif
#if !defined(_MAC) || defined(_WIN32NLS)
#include <winnls.h>
#endif
#ifndef _MAC
#include <wincon.h>
#include <winver.h>
#endif
#if !defined(_MAC) || defined(_WIN32REG)
#include <winreg.h>
#endif
#ifndef _MAC
#include <winnetwk.h>
#endif
#ifndef WIN32_LEAN_AND_MEAN
#include <cderr.h>
#include <dde.h>
#include <ddeml.h>
#include <dlgs.h>
#ifndef _MAC
#include <lzexpand.h>
#include <mmsystem.h>
#include <nb30.h>
#include <rpc.h>
#endif
#include <shellapi.h>
#ifndef _MAC
#include <winperf.h>
#if(_WIN32_WINNT >= 0x0400)
#include <winsock2.h>
#include <mswsock.h>
#else
#include <winsock.h>
#endif /* _WIN32_WINNT >= 0x0400 */
#endif
#ifndef NOCRYPT
#include <wincrypt.h>
#endif
#ifndef NOGDI
#include <commdlg.h>
#ifndef _MAC
#include <winspool.h>
#ifdef INC_OLE1
#include <ole.h>
#else
#include <ole2.h>
#endif /* !INC_OLE1 */
#endif /* !MAC */
#endif /* !NOGDI */
#endif /* WIN32_LEAN_AND_MEAN */
#ifdef _MAC
#include <winwlm.h>
#endif
#ifdef INC_OLE2
#include <ole2.h>
#endif /* INC_OLE2 */
#ifndef _MAC
#ifndef NOSERVICE
#include <winsvc.h>
#endif
#if(WINVER >= 0x0400)
#ifndef NOMCX
#include <mcx.h>
#endif /* NOMCX */
#ifndef NOIME
#include <imm.h>
#endif
#endif /* WINVER >= 0x0400 */
#endif
#ifndef RC_INVOKED
#if ( _MSC_VER >= 800 )
#pragma warning(default:4001)
#pragma warning(default:4201)
#pragma warning(default:4214)
/* Leave 4514 disabled. It's a stupid warning anyway. */
#endif
#endif /* RC_INVOKED */
#endif /* RC_INVOKED */
#endif /* _INC_WINDOWS */
#endif /* _WINDOWS_ */
!*****************************************************************!
!* *!
!* 4C (FORESEE) Simulation Model *!
!* main program for 4C *!
!* Unix/Linux Version *!
!* *!
!* *!
!* data module data_clas for forest type classification wclas *!
!* *!
!* Copyright (C) 1996-2018 *!
!* Potsdam Institute for Climate Impact Reserach (PIK) *!
!* Authors and contributors see AUTHOR file *!
!* This file is part of 4C and is licensed under BSD-2-Clause *!
!* See LICENSE file or under: *!
!* See LICENSE file or under *!
!* http://www.https://opensource.org/licenses/BSD-2-Clause *!
!* Contact: *!
!* https://gitlab.pik-potsdam.de/foresee/4C *!
!* *!
!*****************************************************************!
PROGRAM foresee
USE data_simul
actDir = ''
CALL prepare_global
CALL sim_control
module data_clas
END PROGRAM foresee
real, allocatable, dimension(:) :: bpart
real lhpar, nhpar, alhpar, alnpar
end module data_clas
!*****************************************************************!
!* *!
!* 4C (FORESEE) Simulation Model *!
!* *!
!* climate data modules *!
!* *!
!* containes: *!
!* DATA_CLIMATE *!
!* DATA_EVAPO *!
!* DATA_INTER *!
!* DATA_DEPO *!
!* *!
!* Copyright (C) 1996-2018 *!
!* Potsdam Institute for Climate Impact Reserach (PIK) *!
!* Authors and contributors see AUTHOR file *!
!* This file is part of 4C and is licensed under BSD-2-Clause *!
!* See LICENSE file or under *!
!* http://www.https://opensource.org/licenses/BSD-2-Clause *!
!* Contact: *!
!* https://gitlab.pik-potsdam.de/foresee/4C *!
!* *!
!*****************************************************************!
module data_climate
! flag defines structure of climate data file
integer :: flag_climtyp = 0
integer :: i_exit ! day number of first missing data record
integer,allocatable,save,dimension(:) :: recs,yy
integer,allocatable,save,dimension(:,:) :: dd,mm
real,allocatable,save,dimension(:,:) :: tp,hm,prc,prs,rd,wd, tx, tn,vp, sdu,bw, sde
real,allocatable,save,dimension(:) :: tpmean
real :: airtemp = -99., & ! air temperature (°C)
airtemp_1 = -99., & ! air temperature of previous day (°C)
airtemp_2 = -99., & ! air temperature of two days before (°C)
airtemp_max = -99., & ! maximum air temperature (°C)
airtemp_min = -99., & ! minimum air temperature (°C)
hum = -99., & ! humidity (%)
prec = -99., & ! precipitation (mm)
press = -99., & ! pressure (hPa)
rad = -99., & ! solar radiation(J/cm2)
rad_max = -99., & ! maximal solar radiation(J/cm2)
wind = -99., & ! wind velocity (m/s)
rnet_tot = -99., & ! total net radiation(J/cm2)
avg_incl , & ! average sun inclination [degrees]
beta , & ! average sun inclination [radians]
dlength = -99., & ! day length == Photoperiode (h)
dptemp = -99., & ! dew point temperature
co2 = -99. ! atmospheric CO2 content (mol/mol)
integer :: flag_vegper = 0 ! indicates vegetation period described by temeprature > 10°C
integer :: flag_tveg = 0
integer :: iday_vegper = 0
! cumulative and mean values per year
real :: med_air ! yearly mean air temperature
real :: med_air_ms ! average temperature May - September
real :: med_air_mj ! avarage temperature May - July
real :: sum_prec ! yearly precipitation sum
real :: sum_prec_ms ! precipitation sum May - September
real :: sum_prec_mj ! precipitation sum may - July
real :: med_air_wm ! average temperature of the warmest month
real :: med_air_cm ! average temperature of the coldest month
real :: med_rad
real :: med_rad1 ! annual mean of daily solar radiation of the first year of simulation
real :: med_wind
real :: gdday ! annual growing degree day
! values per month
real, dimension(12) :: temp_mon ! mean monthly average air temperature (°C)
real, dimension(12) :: prec_mon ! mean monthly precipitation sum (mm)
real, dimension(12) :: rad_mon ! mean monthly average of daily radiation (J/cm2)
real, dimension(12) :: hum_mon ! mean monthly average daily relative humidity (%)
real :: aet_dec ! sum of AET of last december (mm)
real :: temp_dec ! mean average air temperature of last december (°C)
real :: prec_dec ! precipitation sum of last december (mm)
real :: rad_dec ! mean average of daily radiation of last december (J/cm2)
real :: hum_dec ! mean average of daily relative humidity of last december (%)
! values per week
real, dimension(53) :: temp_week ! mean monthly average air temperature (°C)
real, dimension(53) :: prec_week ! mean monthly precipitation sum (mm)
! for calculation of long-term monthly means
real, dimension(12) :: tempmean_mo ! long-term monthly means
real, dimension(12) :: tempmean_mo_a ! annual monthly means
integer :: days_summer = -99, & ! number of summer days (Tmax > 25°C)
days_hot = -99, & ! number of hot days (Tmax > 30°C)
days_ice = -99, & ! number of ice days (Tmax < 0°C)
days_dry = -99, & ! number of days without precipitation
days_hrain = -99, & ! number of days with heavy rain (> 10mm)
days_snow = -99, & ! number of days with snow (4C simulation)
days_rain = -99, & ! number of days with rain > 0.1 mm
days_rain_mj = -99, & ! number of days with rain > 0.1 mm May - July
days_wof = -99 ! number of days without frost Tmin > 0°C
! total mean values
real :: med_air_all ! overall yearly mean air temperature
real :: sum_prec_all ! overall mean yearly precipitation sum
real :: med_rad_all ! overall mean annual radiation
real :: gdday_all ! overlall mean annual growing degree day
! monthly climate indices
real :: ind_cout_mo ! monthly index Coutange
real :: ind_wiss_mo ! monthly index v. Wissmann
real :: ind_arid_mo ! monthly Index UNEP
real :: cwb_mo ! monthly climate water balance
! annual climate indices
real :: ind_arid_an ! annual aridity index UNEP
real :: cwb_an ! annual climate water balance
real :: ind_lang_an ! annual climate index acc. Linsser/Lang
real :: ind_cout_an ! annual index Coutange
real :: ind_wiss_an ! annual index v. Wissmann
real :: ind_mart_an ! annual index Martonne
real :: ind_mart_vp ! annual index martonne vegetation period (May- Sept.)
real :: ind_emb ! annual index Emberger
real :: ind_weck ! annual index Weck
real :: ind_reich ! annual index Reichel
real :: con_gor ! annual continentality index Gorczynski
real :: con_cur ! annual continentality index Currey
real :: con_con ! annual continentality index Conrad
real :: ind_bud ! annual dryness index Budyko
real :: ind_shc ! annual index Seljaninov
real :: cwb_an_m ! mean annual climate water balance of simulation period
! mean annual climate inidces of the simulation period
real :: ind_arid_an_m ! annual aridity index UNEP
real :: ind_lang_an_m ! annual climate index acc. Linsser/Lang
real :: ind_cout_an_m ! annual index Coutange
real :: ind_wiss_an_m ! annual index v. Wissmann
real :: ind_mart_an_m ! annual index Martonne
real :: ind_mart_vp_m ! annual index martonne vegetation perio (May- Sept.)
real :: ind_emb_m ! annual index Emberger
real :: ind_weck_m ! annual index Weck
real :: ind_reich_m ! annual index Reichel
real :: con_gor_m ! annual continentality index Gorczynski
real :: con_cur_m ! annual continentality index Currey
real :: con_con_m ! annual continentality index Conrad
real :: ind_bud_m ! annual dryness index Budyko
real :: ind_shc_m ! annual index Seljaninov
! values for evaluation of npp module
real,allocatable,save,dimension(:) :: tempfield
real,allocatable,save,dimension(:) :: globfield
real,allocatable,save,dimension(:) :: dayfield
real, dimension(5) :: clim_waterb = 0. ! climatic water balance (fire_risk)
! Mauna Loa CO2 time series, annual means
REAL :: year_CO2 = 2016
REAL :: Mauna_Loa_CO2(1959:2016) ! time series of annual mean CO2 measured at Mauna Loa, Hawaii
Real :: RCP_2p6(1765:2300)
Real :: RCP_6p0(1765:2150)
DATA Mauna_Loa_CO2 /0.00031598, 0.00031691, 0.00031765, 0.00031845, 0.00031899, &
0.00031952, 0.00032003, 0.00032137, 0.00032218, 0.00032305, &
0.00032462, 0.00032568, 0.00032632, 0.00032746, 0.00032968, &
0.00033025, 0.00033115, 0.00033215, 0.0003339, 0.0003355, &
0.00033685, 0.00033869, 0.00033993, 0.00034113, 0.00034278, &
0.00034442, 0.0003459, 0.00034715, 0.00034893, 0.00035148, &
0.00035291, 0.00035419, 0.00035559, 0.00035637, 0.00035704, &
0.00035888, 0.00036088, 0.00036264, 0.00036376, 0.00036663, &
0.00036831, 0.00036948, 0.00037102, 0.0003731, 0.00037564, &
0.00037738, 0.00037975, 0.00038185, 0.00038372, 0.00038557, &
0.00038738, 0.00038985, 0.00039163, 0.00039382, 0.00039648, &
0.00039861, 0.00040083, 0.00040421/
DATA RCP_2p6/278.05,278.11,278.22,278.34,278.47,278.60,278.73,278.87,279.01,279.15,279.30,279.46,279.62,279.78,279.94,280.10,280.24,280.38,280.52,280.66,&
280.80,280.96,281.12,281.28,281.44,281.60,281.75,281.89,282.03,282.17,282.30,282.43,282.55,282.67,282.79,282.90,283.01,283.11,283.21,283.31,283.40,283.49,&
283.58,283.66,283.74,283.80,283.85,283.89,283.93,283.96,284.00,284.04,284.09,284.13,284.17,284.20,284.22,284.24,284.26,284.28,284.30,284.32,284.34,284.36,&
284.38,284.40,284.39,284.28,284.13,283.98,283.83,283.68,283.53,283.43,283.40,283.40,283.43,283.50,283.60,283.73,283.90,284.08,284.23,284.40,284.58,284.73,&
284.88,285.00,285.13,285.28,285.43,285.58,285.73,285.90,286.08,286.23,286.38,286.50,286.63,286.78,286.90,287.00,287.10,287.23,287.38,287.53,287.70,287.90,&
288.13,288.40,288.70,289.03,289.40,289.80,290.23,290.70,291.20,291.68,292.13,292.58,292.98,293.30,293.58,293.80,294.00,294.18,294.33,294.48,294.60,294.70,&
294.80,294.90,295.03,295.23,295.50,295.80,296.13,296.48,296.83,297.20,297.63,298.08,298.50,298.90,299.30,299.70,300.08,300.43,300.78,301.10,301.40,301.73,&
302.08,302.40,302.70,303.03,303.40,303.78,304.13,304.53,304.98,305.40,305.83,306.30,306.78,307.23,307.70,308.18,308.60,309.00,309.40,309.75,310.00,310.18,&
310.30,310.38,310.38,310.30,310.20,310.13,310.10,310.13,310.20,310.33,310.50,310.75,311.10,311.50,311.93,312.43,313.00,313.60,314.23,314.85,315.50,316.27,&
317.08,317.80,318.40,318.93,319.65,320.65,321.61,322.64,323.90,324.99,325.86,327.14,328.68,329.74,330.59,331.75,333.27,334.85,336.53,338.36,339.73,340.79,&
342.20,343.78,345.28,346.80,348.65,350.74,352.49,353.86,355.02,355.89,356.78,358.13,359.84,361.46,363.16,365.32,367.35,368.87,370.47,372.52,374.76,376.81,&
378.81,380.83,382.78,384.80,387.00,389.29,391.56,393.84,396.12,398.40,400.68,402.97,405.25,407.53,409.80,412.07,414.33,416.52,418.60,420.60,422.52,424.35,&
426.10,427.75,429.31,430.78,432.16,433.44,434.59,435.65,436.63,437.52,438.33,439.06,439.69,440.22,440.66,441.02,441.35,441.62,441.86,442.08,442.28,442.46,&
442.60,442.70,442.75,442.76,442.73,442.66,442.55,442.41,442.25,442.08,441.89,441.67,441.42,441.13,440.80,440.43,440.01,439.54,439.05,438.54,438.02,437.48,&
436.92,436.34,435.76,435.18,434.60,434.00,433.38,432.78,432.19,431.62,431.06,430.51,429.96,429.41,428.86,428.30,427.73,427.14,426.57,426.00,425.46,424.94,&
424.43,423.93,423.43,422.93,422.43,421.92,421.40,420.90,420.41,419.95,419.50,419.06,418.62,418.17,417.71,417.25,416.77,416.28,415.80,415.32,414.87,414.42,&
413.99,413.55,413.10,412.64,412.17,411.69,411.19,410.70,410.22,409.76,409.31,408.86,408.42,407.97,407.52,407.07,406.61,406.15,405.69,405.26,404.84,404.45,&
404.07,403.68,403.29,402.90,402.51,402.10,401.69,401.28,400.89,400.53,400.17,399.83,399.49,399.14,398.79,398.43,398.06,397.68,397.31,396.96,396.62,396.30,&
395.99,395.68,395.36,395.03,394.70,394.36,394.00,393.66,393.33,393.02,392.72,392.44,392.14,391.85,391.54,391.23,390.91,390.58,390.26,389.95,389.65,389.38,&
389.11,388.83,388.55,388.27,387.97,387.67,387.35,387.05,386.75,386.48,386.21,385.96,385.70,385.44,385.16,384.88,384.59,384.29,384.00,383.72,383.45,383.20,&
382.96,382.72,382.46,382.20,381.93,381.66,381.37,381.08,380.81,380.56,380.32,380.09,379.86,379.61,379.36,379.11,378.84,378.56,378.29,378.03,377.78,377.56, &
377.33,377.11,376.87,376.63,376.38,376.12,375.85,375.59,375.34,375.11,374.89,374.67,374.45,374.23,373.99,373.75,373.50,373.24,372.98,372.74,372.52,372.30,&
372.10,371.89,371.67,371.44,371.21,370.96,370.71,370.46,370.23,370.01,369.80,369.60,369.40,369.19,368.97,368.74,368.50,368.26,368.02,367.79,367.58,367.38,&
367.18,366.98,366.78,366.57,366.35,366.11,365.87,365.64,365.42,365.21,365.02,364.83,364.64,364.44,364.23,364.02,363.79,363.55,363.32,363.11,362.91,362.72,&
362.54,362.35,362.16,361.95,361.75,361.52,361.29,361.07,360.86,360.67/
DATA RCP_6p0/ 278.05,278.11,278.22,278.34,278.47,278.60,278.73,278.87,279.01,279.15,279.30,279.46,279.62,279.78,279.94,280.10,280.24,280.38,280.52,280.66,&
280.80,280.96,281.12,281.28,281.44,281.60,281.75,281.89,282.03,282.17,282.30,282.43,282.55,282.67,282.79,282.90,283.01,283.11,283.21,283.31,283.40,283.49,&
283.58,283.66,283.74,283.80,283.85,283.89,283.93,283.96,284.00,284.04,284.09,284.13,284.17,284.20,284.22,284.24,284.26,284.28,284.30,284.32,284.34,284.36,&
284.38,284.40,284.39,284.28,284.13,283.98,283.83,283.68,283.53,283.43,283.40,283.40,283.43,283.50,283.60,283.73,283.90,284.08,284.23,284.40,284.58,284.73,&
284.88,285.00,285.13,285.28,285.43,285.58,285.73,285.90,286.08,286.23,286.38,286.50,286.63,286.78,286.90,287.00,287.10,287.23,287.38,287.53,287.70,287.90,&
288.13,288.40,288.70,289.03,289.40,289.80,290.23,290.70,291.20,291.68,292.13,292.58,292.98,293.30,293.58,293.80,294.00,294.18,294.33,294.48,294.60,294.70,&
294.80,294.90,295.03,295.23,295.50,295.80,296.13,296.48,296.83,297.20,297.63,298.08,298.50,298.90,299.30,299.70,300.08,300.43,300.78,301.10,301.40,301.73,&
302.08,302.40,302.70,303.03,303.40,303.78,304.13,304.53,304.98,305.40,305.83,306.30,306.78,307.23,307.70,308.18,308.60,309.00,309.40,309.75,310.00,310.18,&
310.30,310.38,310.38,310.30,310.20,310.13,310.10,310.13,310.20,310.33,310.50,310.75,311.10,311.50,311.93,312.43,313.00,313.60,314.23,314.85,315.50,316.27,&
317.08,317.80,318.40,318.93,319.65,320.65,321.61,322.64,323.90,324.99,325.86,327.14,328.68,329.74,330.59,331.75,333.27,334.85,336.53,338.36,339.73,340.79,&
342.20,343.78,345.28,346.80,348.65,350.74,352.49,353.86,355.02,355.89,356.78,358.13,359.84,361.46,363.16,365.32,367.35,368.87,370.47,372.52,374.76,376.81,&
378.81,380.83,382.78,384.80,386.93,389.07,391.17,393.24,395.30,397.35,399.39,401.42,403.43,405.43,407.40,409.36,411.30,413.22,415.14,417.08,419.04,421.00,&
422.98,424.95,426.92,428.88,430.83,432.81,434.83,436.92,439.07,441.29,443.57,445.90,448.28,450.70,453.15,455.65,458.18,460.76,463.41,466.12,468.91,471.77,&
474.69,477.67,480.70,483.78,486.92,490.10,493.34,496.64,500.02,503.48,507.02,510.63,514.31,518.03,521.80,525.62,529.49,533.40,537.38,541.44,545.59,549.82,&
554.13,558.49,562.87,567.27,571.70,576.15,580.61,585.10,589.65,594.26,598.92,603.54,608.02,612.36,616.57,620.65,624.58,628.38,632.06,635.65,639.14,642.60,&
646.06,649.52,652.95,656.36,659.75,663.11,666.42,669.72,673.02,676.29,679.50,682.65,685.71,688.69,691.59,694.40,697.11,699.73,702.28,704.76,707.20,709.60,&
711.93,714.21,716.40,718.52,720.56,722.51,724.37,726.16,727.90,729.59,731.24,732.85,734.39,735.86,737.26,738.59,739.83,740.99,742.08,743.12,744.13,745.10,&
746.02,746.88,747.68,748.40,749.05,749.62,750.09,750.51,750.87,751.20,751.49,751.74,751.92,752.00 /
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!^
end module data_climate
module data_evapo
! evapotranspiration data
real :: aet = 0. ! daily total actual evapotranspiration / mm
real :: aet_cum = 0. ! yearly total actual evapotranspiration / mm
real :: aet_m = 0. ! mean yearly total actual evapotranspiration / mm
real :: pet = 0. ! daily total potential evapotranspiration / mm
real :: pet_cum = 0. ! yearly total potential evapotranspiration / mm
real :: pet_m = 0. ! mean yearly total potential evapotranspiration / mm
real :: pev_s = 0. ! potential evaporation of soil / mm
real :: pev_sn = 0. ! potential evaporation of snow / mm
real :: dew_rime = 0. ! dew or rime resp. / mm
real :: dew_cum = 0. ! yearly total dew or rime resp. / mm
real :: dew_m = 0. ! mean yearly total dew or rime resp. / mm
real :: trans_dem = 0. ! potential transpiration / mm
real :: trans_tree= 0. ! actual transpiration of trees / mm
real :: trans_sveg= 0. ! actual transpiration of ground vegetation / mm
real :: tra_tr_cum= 0. ! yearly transpiration of trees / mm
real :: tra_sv_cum= 0. ! yearly transpiration of ground vegetation / mm
real :: aev_s = 0. ! actual evaporation of soil / mm
real :: aev_i = 0. ! actual evaporation of intercepted water / mm
real :: demand_mistletoe_cohort = 0. ! helping variable: transfer of mistletoe demand from evapo.f to soil.f
REAL, dimension(12) :: aet_mon ! monthly actual evapotranspiration sum / mm
REAL, dimension(53) :: aet_week ! weekly actual evapotranspiration sum / mm
REAL, dimension(12) :: pet_mon ! monthly potential evapotranspiration sum / mm
REAL, dimension(53) :: pet_week ! weekly potential evapotranspiration sum / mm
real :: Rnet_cum = 0. ! net radiation J/cm²
integer:: unit_eva
end module data_evapo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
module data_inter
! interception data
real :: interc_can = 0. ! total daily canopy interception / mm
real :: int_st_can = 0. ! canopy interception storage / mm
real :: int_cum_can = 0. ! cumulative canopy interception / mm
real :: interc_m_can = 0. ! mean yearly canopy interception / mm
real :: prec_stand = 0. ! stand precipitation / mm
real :: prec_stand_red= 0. ! reduction of stand precipitation by percentage (drought experiments) / %
real :: interc_sveg = 0. ! total daily interception of ground vegetation / mm
real :: int_st_sveg = 0. ! interception storage of ground vegetation / mm
real :: int_cum_sveg = 0. ! cumulative interception of ground vegetation / mm
real :: interc_m_sveg= 0. ! mean yearly interception of ground vegetation / mm
real :: stem_flow = 0. ! stem flow / mm
logical:: lint_snow = .false. ! interception of snow = .true.
end module data_inter
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
module data_depo
! deposition data
real,allocatable,save,dimension(:,:) :: NHd, NOd ! input fields / mg N/m2
real :: NH_dep = 0. ! deposition of NHx-N / g N/m2
real :: NO_dep = 0. ! deposition of NOx-N / g N/m2
real :: Ndep_cum = 0. ! yearly cumulative deposition / g N/m2
real :: Ndep_cum_all = 0. ! overall mean yearly deposition / g N/m2
end module data_depo
!*****************************************************************!
!* *!
!* 4C (FORESEE) Simulation Model *!
!* *!
!* environmental variables and indices *!
!* *!
!* containes: *!
!* DATA_BIODIV *!
!* DATA_FROST *!
!* *!
!* Copyright (C) 1996-2018 *!
!* Potsdam Institute for Climate Impact Reserach (PIK) *!
!* Authors and contributors see AUTHOR file *!
!* This file is part of 4C and is licensed under BSD-2-Clause *!
!* See LICENSE file or under *!
!* http://www.https://opensource.org/licenses/BSD-2-Clause *!
!* Contact: *!
!* https://gitlab.pik-potsdam.de/foresee/4C *!
!* *!
!*****************************************************************!
module data_biodiv
! indices of fire and biodiversity
! sum of hot days (Tmax>=25°C) and precipitation sum in the potential fire period
integer :: Ndayshot
real :: Psum_FP
integer :: prec_flag1 = 0 ! flag is equal 1 if first time precipitation of 5 mm occurs after bud burst of birch
integer :: prec_flag2 = 0
real :: ntindex ! temperature index
! fire risk
integer :: fire_indw = -99 ! fire index west
integer :: fd_fire_indw(1:5) = 0 ! frequency distribution of fore index west values
integer :: fire_inde = -99 ! fire index east
integer :: fire_indi_day = 0 ! days with forest fire indicator greater then a threshold (east)
real :: fire_indi = 0.0 ! forest fire indicator (east)
real :: fire_indi_max = 0.0 ! maximum forest fire indicator (east)
real :: fire_indb = -99 ! fire index Bruschek
real :: fire_indb_m = -99 ! mean yearly fire index Bruschek of simulation period
real :: tsumrob ! temperature sum 'Robinie'
real :: day_bb_rob = 0 ! day of budburst 'Robinie'
real :: tsumbi ! temperature sum birch
real :: day_bb_bi = 0 ! day of budburst birch
integer :: day_nest = 0 ! days since the last prec. greater then 3 mm (Nesterov)
real :: p_nest = 0.0 ! ignition index of Nesterov
type fire_risk
integer :: index ! daily fire risk level
integer, dimension (5):: frequ ! frequency of of fire risk levels (5 classes) of a year
real :: mean ! mean fire risk level of a year
real :: mean_m ! mean yearly fire risk level of simulation period
end type fire_risk
type (fire_risk),dimension(3) :: fire ! 1 - fire index west
! 2 - fire index east (M68 international)
! 3 - fire index Nesterov
! upper limit of climatic water balance for fire risk class (west)
real, dimension(4,7) :: risk_class
DATA risk_class &
/ 5., -3., -9., -15., & ! march
3., -8., -16., -27., & ! april
-3., -16., -25., -35., & ! may
-12., -24., -32., -41., & ! june
-12., -24., -31., -40., & ! july
-8., -20., -28., -37., & ! august
-6., -18., -26., -35./ ! september
integer, dimension(38) :: daybb_rob
integer, dimension(38) :: daybb_bi
DATA daybb_bi/100,114,115,113,120,115,111,109,123,124,113,110,119,99,117,117,118,117,120,124,101,117,113,117,112,119,116,112, &
102,92,106,109,109,110,111,112,112,101/
DATA daybb_rob/152,165,156,151,166,148,153,153,160,163,151,161,160,163,159,161,162,158,153,163,153,153,154,159,151,152,166,154, &
147,143,168,145,135,148,151,155,155,138/
end module data_biodiv
module data_frost
integer, allocatable, save, dimension(:) :: dnlf ! number of days with late frost during vegetation period
real, allocatable, save, dimension (:) :: tminmay_ann ! minimum temperature in may
integer, allocatable, save, dimension(:) :: date_lf ! date of last frost after start of vegetation period per year
integer, allocatable, save, dimension(:) :: date_lftot ! annual date of last frost event
integer, allocatable, save, dimension(:) :: anzdlf ! number of days with frost from April until June
integer, allocatable, save, dimension(:) :: sumtlf ! sum of temperature of days with frost from April until June
integer :: dlfabs ! number of day of the last frost for the whole simulation period
real :: tminmay ! minimum temperature of may of the whole simulation period
integer, allocatable, save, dimension(:) :: dnlf_sp ! number of day with late frost during vegetation period
integer :: dlfabs_sp ! number of day of the last frost for the whole simulation period
real :: tminmay_sp ! minimum temperature of may of the whole simulation period
real :: temp_frost = 0. ! temperature threshold of frost
integer :: lfind ! last frost index
real :: mlfind ! mean lfind
integer :: maxlfind ! maximum value of 5 part inidces
integer :: lfind_sp ! last frost index birch
integer :: maxlfind_sp ! last frost index beech
real :: mlfind_sp ! mean lfind
integer :: taxnum
end module data_frost
!*****************************************************************!
!* *!
!* 4C (FORESEE) Simulation Model *!
!* *!
!* *!
!* data module *!
!* data_help *!
!* data_help_dbh *!
!* *!
!* Copyright (C) 1996-2018 *!
!* Potsdam Institute for Climate Impact Reserach (PIK) *!
!* Authors and contributors see AUTHOR file *!
!* This file is part of 4C and is licensed under BSD-2-Clause *!
!* See LICENSE file or under: *!
!* http://www.https://opensource.org/licenses/BSD-2-Clause *!
!* Contact: *!
!* https://gitlab.pik-potsdam.de/foresee/4C *!
!* *!
!*****************************************************************!
Module data_help
integer :: hnspec=0 ! species number
real :: mschelp ! weight of seed class
real ::heihelp ! height of plant class
REAL :: x_sap,x_hrt,x_fol,x_frt,x_Ahb !inital values for cohorts
integer :: fail
end module data_help
module data_help_dbh
! for function in calc_dbh
real :: fAhb = 0., & ! cross sectional area heartwood at tree base
fB = 0., & ! bole height,
fH = 0., & ! heartwood
fHt = 0., & ! total tree height
fsprhos
end module data_help_dbh
!*****************************************************************!
!* *!
!* 4C (FORESEE) Simulation Model *!
!* *!
!* *!
!* module data_init *!
!* declaration of variables for additional information *!
!* used during initialisation *!
!* *!
!* Copyright (C) 1996-2018 *!
!* Potsdam Institute for Climate Impact Reserach (PIK) *!
!* Authors and contributors see AUTHOR file *!
!* This file is part of 4C and is licensed under BSD-2-Clause *!
!* See LICENSE file or under: *!
!* http://www.https://opensource.org/licenses/BSD-2-Clause *!
!* Contact: *!
!* https://gitlab.pik-potsdam.de/foresee/4C *!
!* *!
!*****************************************************************!
MODULE data_init
IMPLICIT NONE
INTEGER :: spec_nrDSW(120) ! species ordinal number in DSW according to BRA
INTEGER :: spec_nrBAY(120) ! species ordinal number in Bavaria
INTEGER :: spec_4C(120) ! species code number of 4C assigned to DSW species
CHARACTER (3) :: spec_code(120) ! specifies three letter code in DSW according to BRA
CHARACTER (50) :: GER_name(120) ! german name
CHARACTER (50) :: LAT_name(120) ! scientific, latin name
CHARACTER (50) :: ENG_name(120) ! english name
INTEGER :: spnum_for_DSW(800) ! species ordinal number (1..120) for DSW in element of vector
! which corresponds to species number according to BRA
! variables for treatment of DSW initialisation data
TYPE group_vec
INTEGER :: locid ! ID for stand
INTEGER :: taxid ! 4C species number
INTEGER :: BRAid ! DSW species code
INTEGER :: alter
INTEGER :: baumzahl
INTEGER :: schicht ! 10 = upper storey trees/Oberstand, 20 = retention trees/berhlter, 40 = understorey 50 = selction/plenter forest/ plenterartig
REAL :: dm
REAL :: mhoe
REAL :: gf
REAL :: patchsize
REAL :: standsize
REAL :: volume
END TYPE group_vec
TYPE(group_vec), DIMENSION(:), ALLOCATABLE :: ngroups
! variables for plenterwald initialisation
INTEGER, DIMENSION(4) :: low_age, high_age
! Parameter for volume functions provided by Eberswalde
REAL, DIMENSION (10,3) :: parEBW
! Parameter Pine (Kiefer) EBERSWALDE
DATA parEBW(10,1:3)/-9.780614,1.96047,0.89443/
! Parameter Ponderosa pine taken equal to Pine (Kiefer) EBERSWALDE
DATA parEBW(10,1:3)/-9.780614,1.96047,0.89443/
! Parameter for volume function adapted from SILVA
REAL, dimension (11,9) :: par_S
! Paramter Fichte/spruce SILVA
DATA par_S(2,1:9)/-3.59624,1.80213,-0.288243, 1.06247, -0.128993, 0.0353434, 0.142264, -0.058259, 0.00459854/
! Parameter Buche/beech SILVA
DATA par_S(1,1:9)/-2.7284,0.837563,-0.105843,1.62283,-0.214812,0.0289272,-0.0879719,0.0325667,-0.00446295/
! Parameter Eiche/oak SILVA
DATA par_S(4,1:9)/-3.06118,1.45506,-0.19992,1.93898,-0.689727,0.112653,-0.165102,0.120127,-0.0202543/
! Parameter Kiefer/ pine SILVA
DATA par_S(3,1:9)/-5.80915,3.387,-0.494392,3.67116,-1.83211,0.273999,-0.459282,0.29989,-0.0444931/
! Parameter Birke/birch SILVA = Weichlaub
DATA par_S(5,1:9)/-5.98031,2.65905,-0.3374,3.78395,-1.47318,0.188661,-0.540955,0.296957,-0.0385165/
! Parameter Pinus contorta (von Kiefer)
DATA par_S(6,1:9)/ -5.80915,3.387,-0.494392,3.67116,-1.83211,0.273999,-0.459282,0.29989,-0.0444931/
! Parameter Pinus ponderosa (von Kiefer)
DATA par_S(7,1:9)/ -5.80915,3.387,-0.494392,3.67116,-1.83211,0.273999,-0.459282,0.29989,-0.0444931/
! parameter Populus tremula
DATA par_S(8,1:9)/ -5.98031,2.65905,-0.3374,3.78395,-1.47318,0.188661,-0.54095500,0.296957,-0.03851650/
! parameter Robinie( black locust)
DATA par_S(11,1:9)/-2.7284,0.837563,-0.105843,1.62283,-0.214812,0.0289272,-0.0879719,0.0325667,-0.00446295/
END ! module data_init
!*****************************************************************!
!* *!
!* 4C (FORESEE) Simulation Model *!
!* *!
!* *!
!* data module management SR *!
!* *!
!* Copyright (C) 1996-2018 *!
!* Potsdam Institute for Climate Impact Reserach (PIK) *!
!* Authors and contributors see AUTHOR file *!
!* This file is part of 4C and is licensed under BSD-2-Clause *!
!* See LICENSE file or under: *!
!* http://www.https://opensource.org/licenses/BSD-2-Clause *!
!* Contact: *!
!* https://gitlab.pik-potsdam.de/foresee/4C *!
!* *!
!*****************************************************************!
module data_manag
real :: basarea_tot ! total basal area
real :: tardiam_dstem=15. ! diameter target for dead stems to C_opm_stems
integer :: thin_type ! type of management scenario
integer :: thin_nr ! Number of thinnings (years with management actions)
integer :: act_thin_year ! year field index of thinning
integer :: target_type ! type of thinning in case of target thinning
integer,allocatable,save,dimension(:) :: thin_year ! Field of management years
integer,allocatable,save,dimension(:) :: thin_age ! stand age of target thinning
integer,allocatable,save,dimension(:) :: thin_tree ! number of remaining stems after thinning
integer,allocatable,save,dimension(:) :: thin_spec ! species number for thinning (target)
integer,allocatable,save,dimension(:) :: thin_tysp ! type of thinning (for target thinning)
real, allocatable,save,dimension(:) :: target_mass ! target value of stem mass
integer,allocatable,save,dimension(:) :: thinyear ! year of last thinning
integer, allocatable, save, dimension(:) :: thin_stor ! information of storey which hase to manage
real,allocatable,save,dimension(:) :: np_mod ! multiplier for 'Nutzungsprozent'
integer :: thin_dead = 0 ! 0 dead stembiomass is accumulated in litter pools
! 1 dead stem biomass is removed as harvested
integer :: domspec ! dominant species of initialised stnad for management
integer :: domspec_reg ! dominant species of regenerated/planted stand after clear cut/shelterwood
real :: stump_sum= 0
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! thinning types
! 1 - Niederdurchforstung (mäßig) low thinning ( moderate)
! 2 - Niederdurchforstung (stark) low thinning (heavy)
! 3 - Hochdurchforstung crown thinning
! 4 - Auslesedurchforstung selective thinning
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
real :: ho1=0. ! dominant height first thinning
real :: ho2=0. ! dominant height second thinning
real :: ho3=0. ! dominant height third thinning
real :: ho4=0. ! dominant height fourth thinning
integer :: thr1=0 ! thinning regime for ho2
integer :: thr2=0 ! thinning regime for ho3
integer :: thr3=0 ! thinning regime for ho4
integer :: thr4=0 ! thinning regime for ho>ho4
integer :: thr5=0 ! 'Rückegassen'
real :: thr6=0. ! if thr5=1 this flag control time of realization =ho1,ho2,ho3 or ho4
integer :: thr7=0 ! management regime for rotation year
integer :: mgreg=0 ! regeneration, natural/artificial
integer :: thin_ob ! control of optimal basal area thinning, =1 yes, =0 no
real :: optb= 1. ! optimal 'Bestockungsgrad'
integer :: thinonce =0 ! special case of managemnet for only one single management activity; default=0
integer, allocatable,save,dimension(:) :: thin_flag1 ! aux. varaibles for adaptive management
integer, allocatable,save,dimension(:) :: thin_flag2
integer, allocatable,save,dimension(:) :: thin_flag3
integer, allocatable,save,dimension(:) :: thin_flag4
real, allocatable, save, dimension(:) :: zbnr ! number of 'Zielbäume'/target trees
real, allocatable, save, dimension(:) :: tend ! percentage of young tree tending/'tending of plantations'
integer, allocatable,save,dimension(:) :: rot ! rotation
integer, allocatable, save, dimension(:) :: regage ! age of natural/planted regeneration
integer :: flag_direct=0 !
integer :: thinstep=0 ! number of years between thinning if ho>ho4
integer :: flag_brush=1 ! defaul, if 1 then all harvested stems remain in the litter and are not removed from the stand
integer :: cutyear =0 ! year of cutting
real :: direcfel=0. ! percentage display of 'Rückegassen' creation 'directional felling'
real :: limit=0. ! limit für hight query (+- range)
integer :: shelteryear=0 ! year of last shelterwood mang.
integer :: stand_age =0 ! age of stand
integer :: flag_manreal=0 ! management no/yes
integer :: flag_shelter = 0! shelterwood management started
integer :: flag_sh_first=0 ! aux variable for the case age(1) > regage and age(1)> rotage-20
integer :: flag_plant_shw = 0 ! flag for planting in specieal case trhat initial age is > rot-20
character(30) :: maninf ! description of measure
integer :: meas ! flag of measure
! parameter for thinning depending on age ang stand density : percent of using
real, dimension(20,20) :: usp
! multi-species management
integer,allocatable,save,dimension(:) :: specnr, age_spec,anz_tree_spec
! Austrian management
integer,dimension(10) :: num_rel_cl ! number of relative diameter classes
integer :: num_man ! total numbe rof management treatments
integer, allocatable, save, dimension(:) :: yman ! years of management for each species
integer, allocatable, save, dimension(:) :: dbh_clm ! number of relative dbh class wihich is used for thinning
integer, allocatable, save, dimension(:) :: spec_man ! number of species for treatment
real, allocatable, save, dimension(:) :: rem_clm ! removal of biomass
integer, allocatable, save, dimension(:) :: act ! activity flag
real, allocatable,save, dimension(:) :: rel_part ! mixture flag for planting
! disturbance management
integer, allocatable, save, dimension(:) :: dis_id ! number of standid with disturbance
integer :: dis_row_nr ! the total number of disturbance events (line number of disturbance section)
integer, dimension(1:6,1:2) :: dis_control ! array which is used to control the dirsturbance simulation (dim1=disturbance type(D,X,P,R,S), dim2=zeile man-file)
character(1), allocatable, save, dimension(:) :: dis_type ! disturbance type D - defoliator, X - xylem clogger, P - phloem feeder
! R - root pathogen or feeder, S - stem rot
integer, allocatable, save, dimension(:) :: fortype ! forest type 1 managed forest, 2 - naturla forest
integer, allocatable, save, dimension(:) :: dis_year ! date of disturbance
integer, allocatable, save, dimension(:) :: dis_spec ! disturbed tree species
integer, allocatable, save, dimension(:) :: dis_start ! start of disturbance within year
real, allocatable, save, dimension(:) :: dis_rel ! relative value of disturbed area
real, allocatable,save, dimension(:) :: sum_dis ! accumulated value of disturbed area (relative), for each standid
real, allocatable, save, dimension(:) :: dis_year_id ! year of last disturbance for each standid
integer ::dis_number
integer :: count_dis_real =0 ! counter for realised disturbances
! aspen managment
integer :: nsprout = 3 ! number of sprouts per tree
integer :: flag_sprout = 0 ! 0 - sprouting 1-if sprouts exist
! liocourt management
real :: dbh_max ! maximum diameter
real :: lic_a ! parameter a of licourt function
real :: lic_b ! parameter b of licourt function
real :: thin_proc ! volume removal percent
integer :: spec_lic ! species number für li management
integer :: thin_int ! thinning interval
integer, dimension(22,11) :: ntree_lic ! filed for calculation of licourt function for species i and diamter class j
end module data_manag
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.