! FILE writgen.f ! ! SUBROUTINES IN THIS FILE CALLED FROM ! subroutine wr_daily main ! subroutine wr_month(mo1) main ! subroutine wr_annual main module output use utilities, only : & dp, & log_debug, & log_info, & log_error, & identifier_max_length, & output_max_variables, & path_max_length, & output_label_max_length implicit none integer, parameter :: nih = 7 integer :: nvrch = 18 integer :: nvsub = 30 integer :: nns = 30 ! integer, save :: ieapu ! area covered by snow [m2] real(dp), save :: area_tot_snow ! average snow depth [mm] real(dp), save :: depth_ave_snow ! area covered by glaciers [m2] real(dp), save :: area_tot_glacier ! real(dp), save :: depth_ave_glacier ! average glacier depth [mm], averaged over the entire catchment ! annual SUM of precipitation in subbasin real(dp), save, dimension(:), allocatable :: sbpy ! annual SUBBASIN outputs (dif. components) real(dp), save, dimension(:, :), allocatable :: sysub ! total SUBBASIN outputs = SUM(sysub) real(dp), save, dimension(:, :), allocatable :: stsub integer, save :: giscounter = 1; ! annual REACH outputs (dif. components) real(dp), save, dimension(:, :), allocatable :: syrch ! total REACH outputs = SUM(syrch) real(dp), save, dimension(:, :), allocatable :: strch integer :: nsb = 30 ! Directory to write output to character(len=path_max_length) :: output_dir = "output" ! Output specs namelist path character(len=path_max_length) :: output_specs_path = "input/output.nml" ! Write out interval in timesteps: daily D, monthly M, annual Y character(len=1) :: output_write_interval = "M" ! Float csv output format character(len=identifier_max_length) :: output_float_format = "f12.4" ! Format of space index in csv output character(len=identifier_max_length) :: output_space_index_format = "i6" ! Default file format if none given in output file nml character(len=identifier_max_length) :: output_default_format = "csv" ! Log levels and master logfile character(len=path_max_length) :: master_logfile = "swim.log" character(len=identifier_max_length) :: & log_stderr_level = "warning", & log_stdout_level = "info", & log_file_level = "info" ! Output file attributes (mostly as integer indeces of corresponding module variables) type output_file ! Suffix after _